BmnRoot
Loading...
Searching...
No Matches
BmnSiProfStationSet.h
Go to the documentation of this file.
1#ifndef BMNSiProfSTATIONSET_H
2#define BMNSiProfSTATIONSET_H
3
4#include "BmnSiProfStation.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
16 protected:
17 /* station set parameters*/
18 Int_t NStations; // number of stations in the detector
19
20 Double_t* XStationPositions;
21 Double_t* YStationPositions;
22 Double_t* ZStationPositions;
23
25 map<Int_t, TVector3>* fStatShifts;
26
27 public:
28 /* Constructor */
30
31 BmnSiProfStationSet(TString xml_config_file, map<Int_t, TVector3>* shifts = nullptr);
32 static unique_ptr<BmnSiProfStationSet> 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 BmnSiProfStation* 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(BmnSiProfStationSet, 1);
78};
79
80#endif
void ProcessPointsInDetector()
BmnSiProfStation * GetStation(Int_t station_num)
Double_t * YStationPositions
x-position of each station [array]
virtual ~BmnSiProfStationSet()
static unique_ptr< BmnSiProfStationSet > Create(Int_t period, Int_t stp=0)
Int_t GetPointStationOwnership(Double_t zcoord)
Double_t GetZStationPosition(Int_t station_num)
Double_t GetYStationPosition(Int_t station_num)
Int_t CountNAddedToDetectorPoints()
Int_t GetPointStationOwnership(Double_t xcoord, Double_t ycoord, Double_t zcoord)
Double_t GetXStationPosition(Int_t station_num)
BmnSiProfStationSet(TString xml_config_file, map< Int_t, TVector3 > *shifts=nullptr)
map< Int_t, TVector3 > * fStatShifts
Stations [array].
Double_t * ZStationPositions
y-position of each station [array]
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)
Int_t CountNProcessedPointsInDetector()
BmnSiProfStation ** Stations
z-position of each station [array]