BmnRoot
Loading...
Searching...
No Matches
BmnGemStripStationSet.h
Go to the documentation of this file.
1#ifndef BMNGEMSTRIPSTATIONSET_H
2#define BMNGEMSTRIPSTATIONSET_H
3
4#include "BmnEnums.h"
6#include "BmnStripData.h"
7#include "TDOMParser.h"
8#include "TList.h"
9#include "TXMLAttr.h"
10#include "TXMLNode.h"
11
12#include <TVector3.h>
13
14class BmnGemStripStationSet : public TObject
15{
16 protected:
17 /* station set parameters*/
18 Int_t NStations; // number of stations in the GEM detector
19
20 Double_t* XStationPositions; //[NStations] x-position of each station [array]
21 Double_t* YStationPositions; //[NStations] y-position of each station [array]
22 Double_t* ZStationPositions; //[NStations] z-position of each station [array]
23
24 Double_t* BeamHoleRadiuses; //[NStations] beam hole radius of each station [array]
25
26 BmnGemStripStation** GemStations; //[NStations] GEM stations [array]
27 map<Int_t, TVector3>* fStatShifts; //->
28
29 public:
30 /* Constructor */
32 BmnGemStripStationSet(TString xml_config_file, map<Int_t, TVector3>* shifts = nullptr);
33 BmnGemStripStationSet(Int_t period, BmnSetup stp = kBMNSETUP, map<Int_t, TVector3>* shifts = nullptr);
34 static unique_ptr<BmnGemStripStationSet> Create(Int_t period, Int_t stp = 0);
35 /* Destructor */
36 virtual ~BmnGemStripStationSet();
37
38 /* Getters */
39 Int_t GetNStations() { return NStations; };
40 Double_t GetXStationPosition(Int_t station_num);
41 Double_t GetYStationPosition(Int_t station_num);
42 Double_t GetZStationPosition(Int_t station_num);
43 Double_t GetBeamHoleRadius(Int_t station_num);
44 BmnGemStripStation* GetGemStation(Int_t station_num);
45 BmnGemStripStation* GetStation(Int_t station_num) { return GetGemStation(station_num); }
46
47 // Reset all data in stations of the station set
48 void Reset();
49
51 Bool_t AddPointToDetector(Double_t xcoord,
52 Double_t ycoord,
53 Double_t zcoord,
54 Double_t px,
55 Double_t py,
56 Double_t pz,
57 Double_t dEloss,
58 Int_t refID);
59
61
64
65 // which station in the GEM detector does a point belong to? ----------------
66
67 // This is an OLD version of the function being used in case of parallel stations
68 Int_t GetPointStationOwnership(Double_t zcoord);
69
70 // If you use this function in any outer code, don't forget to invert the 'xcoord' parameter!
71 Int_t GetPointStationOwnership(Double_t xcoord, Double_t ycoord, Double_t zcoord);
72
73 //--------------------------------------------------------------------------
74
75 private:
76 Bool_t CreateConfigurationFromXMLFile(TString xml_config_file);
77 Int_t CountNumberOfStations(TXMLNode* node);
78 Bool_t ParseStation(TXMLNode* node, Int_t iStation);
79
80 ClassDef(BmnGemStripStationSet, 1);
81};
82
83#endif
BmnSetup
Definition BmnEnums.h:89
@ kBMNSETUP
Definition BmnEnums.h:90
BmnGemStripStation ** GemStations
BmnGemStripStation * GetStation(Int_t station_num)
map< Int_t, TVector3 > * fStatShifts
Double_t GetXStationPosition(Int_t station_num)
BmnGemStripStation * GetGemStation(Int_t station_num)
static unique_ptr< BmnGemStripStationSet > Create(Int_t period, Int_t stp=0)
Double_t GetZStationPosition(Int_t station_num)
Double_t GetYStationPosition(Int_t station_num)
Double_t GetBeamHoleRadius(Int_t station_num)
Int_t GetPointStationOwnership(Double_t zcoord)
Bool_t AddPointToDetector(Double_t xcoord, Double_t ycoord, Double_t zcoord, Double_t px, Double_t py, Double_t pz, Double_t dEloss, Int_t refID)