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