BmnRoot
Loading...
Searching...
No Matches
BmnVSPStationSet.h
Go to the documentation of this file.
1#ifndef BMNVSPSTATIONSET_H
2#define BMNVSPSTATIONSET_H
3
4#include "BmnStripData.h"
5#include "BmnVSPStation.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 VSP 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 BmnVSPStation** VSPStations; //[NStations] VSP stations [array]
24 map<Int_t, TVector3>* fStatShifts; //->
25
26 public:
27 /* Constructor */
29 BmnVSPStationSet(TString xml_config_file, map<Int_t, TVector3>* shifts = nullptr);
30 static unique_ptr<BmnVSPStationSet> Create(Int_t period, Int_t stp = 0);
31 /* Destructor */
33
34 /* Getters */
35 Int_t GetNStations() { return NStations; };
36 Double_t GetXStationPosition(Int_t station_num);
37 Double_t GetYStationPosition(Int_t station_num);
38 Double_t GetZStationPosition(Int_t station_num);
39 Double_t GetBeamHoleRadius(Int_t station_num) { return 0.; }
40 BmnVSPStation* GetVSPStation(Int_t station_num);
41 BmnVSPStation* GetStation(Int_t station_num) { return GetVSPStation(station_num); }
42
43 // Reset all data in stations of the station set
44 void Reset();
45
46 Bool_t AddPointToDetector(Double_t xcoord,
47 Double_t ycoord,
48 Double_t zcoord,
49 Double_t px,
50 Double_t py,
51 Double_t pz,
52 Double_t dEloss,
53 Int_t refID);
54
56
59
60 /* which station does the current point belong to?
61 * (OLD version: used in case of parallel stations) */
62 Int_t GetPointStationOwnership(Double_t zcoord);
63
64 /* which station does the current point belong to?
65 * If you use this function in any outer code, don't forget to invert
66 * the 'xcoord' parameter! (into local coordinate system) */
67 Int_t GetPointStationOwnership(Double_t xcoord, Double_t ycoord, Double_t zcoord);
68
69 private:
70 Bool_t CreateConfigurationFromXMLFile(TString xml_config_file);
71 Int_t CountNumberOfStations(TXMLNode* node);
72 Bool_t ParseStation(TXMLNode* node, Int_t iStation);
73
74 ClassDef(BmnVSPStationSet, 1);
75};
76
77#endif /* BMNVSPSTATIONSET_H */
Double_t * ZStationPositions
map< Int_t, TVector3 > * fStatShifts
Int_t CountNProcessedPointsInDetector()
static unique_ptr< BmnVSPStationSet > Create(Int_t period, Int_t stp=0)
Double_t GetZStationPosition(Int_t station_num)
Double_t * XStationPositions
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)
virtual ~BmnVSPStationSet()
BmnVSPStation * GetStation(Int_t station_num)
Int_t GetPointStationOwnership(Double_t zcoord)
Double_t GetXStationPosition(Int_t station_num)
BmnVSPStation ** VSPStations
BmnVSPStationSet(TString xml_config_file, map< Int_t, TVector3 > *shifts=nullptr)
Int_t CountNAddedToDetectorPoints()
Double_t * YStationPositions
Int_t GetPointStationOwnership(Double_t xcoord, Double_t ycoord, Double_t zcoord)
Double_t GetBeamHoleRadius(Int_t station_num)
void ProcessPointsInDetector()
BmnVSPStation * GetVSPStation(Int_t station_num)
Double_t GetYStationPosition(Int_t station_num)