]>
Commit | Line | Data |
---|---|---|
9b0229cf | 1 | #ifndef ALILHCDATA_H |
2 | #define ALILHCDATA_H | |
3 | ||
4 | ///////////////////////////////////////////////////////////////////////////////// | |
5 | // // | |
6 | // AliLHCData: summary of the lumnosity related information from LHC DIP. // | |
7 | // The time dependent values are averaged over the fPeriod (default: 10 min) // | |
8 | // Created from the TMap provided by the AliLHCReader with optional beginning // | |
9 | // and end time stamps to account. // | |
10 | // // | |
11 | // The data are (wrapped in the AliLHCDipValT): // | |
12 | // Total beam intensities ( eg GetIntensityTotal(beam) for beam=0,1 // | |
13 | // Total beam luminosities ( eg GetLuminTotal(side) for side=0,1 (left/right)// | |
14 | // Bunched intensities and luminosities and crossing angle: // | |
15 | // GetIntensityBunch(beam),GetLuminBunch(side),GetCrossAngle(side) // | |
16 | // Bunches configuration: GetBunchConfig(beam) // | |
17 | // // | |
18 | // Collimators information (initial position + changes > 100 microns) // | |
19 | // GetCollimator(collID,jawID) with collID={kTCTVB4L2, kTCTVB4R2, kTCLIA4R2} // | |
20 | // and jawID={kGapDn,kGapUp,kLeftDn,kLeftUp,kRightDn,kRightUp} // | |
21 | // // | |
22 | // Author: ruben.shahoyan@cern.ch // | |
23 | // // | |
24 | ///////////////////////////////////////////////////////////////////////////////// | |
25 | #include "TObject.h" | |
26 | #include "AliLHCDipValT.h" | |
27 | ||
28 | class TMap; | |
29 | ||
30 | class AliLHCData : public TObject | |
31 | { | |
32 | public: | |
33 | enum BeamID_t {kBeam1,kBeam2}; | |
34 | enum Proj_t {kX,kY}; | |
35 | enum Side_t {kLeft,kRight}; | |
36 | enum Collim_t {kTCTVB4L2, kTCTVB4R2, kTCLIA4R2, kNCollimators}; | |
37 | enum ColJaw_t {kGapDn,kGapUp,kLeftDn,kLeftUp,kRightDn,kRightUp,kNJaws}; | |
197ea1a9 | 38 | enum {kRecTotInt,kRecTotIntBunch,kRecBunchInt,kRecTotLum,kRecBunchLum,kRecCrossAngle,kRecBunchConf,kRecFillNum, |
9b0229cf | 39 | kRecPrfPrID,kRecPrfAmp,kRecPrfPos,kRecPrfSig}; |
40 | // | |
41 | public: | |
42 | // | |
43 | AliLHCData() : fPeriod(600),fTMin(0),fTMax(1e20) {} | |
44 | AliLHCData(const TMap* dcsMap, double tmin=0, double tmax=1.e20,int avPeriod=600); | |
45 | virtual ~AliLHCData() {} | |
46 | // | |
47 | Bool_t FillData(const TMap* dcsMap, double tmin=0, double tmax=1.e20); | |
48 | // | |
49 | const TObjArray& GetIntensityTotal(BeamID_t b) const {return fIntTot[b];} | |
197ea1a9 | 50 | const TObjArray& GetIntensityTotalBunch(BeamID_t b) const {return fIntTotBunch[b];} |
9b0229cf | 51 | const TObjArray& GetIntensityBunch(BeamID_t b) const {return fIntBunch[b];} |
52 | const TObjArray& GetBeamPos(BeamID_t b,Proj_t p) const {return fBeamPos[b][p];} | |
53 | const TObjArray& GetLuminTotal(Side_t s) const {return fLuminTot[s];} | |
54 | const TObjArray& GetLuminBunch(Side_t s) const {return fLuminBunch[s];} | |
55 | const TObjArray& GetCrossAngle(Side_t s) const {return fCrossAngle[s];} | |
56 | const AliLHCDipValI& GetBunchConfig(BeamID_t b) const {return fBunchConfig[b];} | |
57 | const TObjArray& GetCollimator(Collim_t c,ColJaw_t jaw) const {return fCollimators[c][jaw];} | |
58 | // | |
59 | Double_t GetTMin() const {return fTMin;} | |
60 | Double_t GetTMax() const {return fTMax;} | |
61 | Int_t GetPeriod() const {return fPeriod;} | |
62 | Int_t GetNBunches(BeamID_t b) const {return GetBunchConfig(b).GetSize();} | |
63 | Int_t GetBunchRFBeam1(BeamID_t b,Int_t bunch) const {return GetBunchConfig(b).GetValue(bunch);} | |
64 | Int_t GetFillNumber() const {return GetUniqueID();} | |
65 | void SetFillNumber(Int_t fill) {SetUniqueID(fill);} | |
66 | void SetPeriod(Int_t nsec=600) {fPeriod = nsec;} | |
67 | void SetTMin(Double_t t) {fTMin = t;} | |
68 | void SetTMax(Double_t t) {fTMax = t;} | |
69 | virtual void Print(const Option_t *opt="") const; | |
70 | // | |
71 | protected: | |
72 | TObjArray* GetDCSEntry(const TMap* dcsMap,const char* key,int &entry,double tmin,double tmax) const; | |
73 | ||
74 | AliLHCData(const AliLHCData& src) : TObject(src),fPeriod(src.fPeriod),fTMin(src.fTMin),fTMax(src.fTMax) { /*dummy*/ } | |
75 | AliLHCData& operator=(const AliLHCData& ) { /*dummy*/ return *this;} | |
76 | ||
77 | protected: | |
78 | // | |
79 | Int_t fPeriod; // averaging period in seconds | |
80 | Double_t fTMin; // selection timeMin | |
81 | Double_t fTMax; // selection timeMax | |
82 | AliLHCDipValI fBunchConfig[2]; // bunches configuration for beam1 and beam2 | |
83 | // | |
197ea1a9 | 84 | TObjArray fIntTot[2]; // total intensity (DC BCT) for beam1 and beam2 (AliLHCDipValD) |
85 | TObjArray fIntTotBunch[2]; // total intensity (BCTFR) for beam1 and beam2 (AliLHCDipValD) | |
9b0229cf | 86 | TObjArray fIntBunch[2]; // bunch by bunch intensity for beam1 and beam2 (AliLHCDipValD) |
87 | // | |
88 | TObjArray fBeamPos[2][2]; // horizontal and vertical projection gaussian fit params for beam1 and beam2 (AliLHCDipValD: amp,pos,sigma) | |
89 | // | |
90 | TObjArray fLuminTot[2]; // total luminosity from BRANB_4L2 and BRANB_4R2 (AliLHCDipValD) | |
91 | TObjArray fLuminBunch[2]; // bunch by bunch luminosity from BRANB_4L2 and BRANB_4R2 (AliLHCDipValD) | |
92 | TObjArray fCrossAngle[2]; // beams crossing angle from BRANB_4L2 and BRANB_4R2 (AliLHCDipValD) | |
93 | // | |
94 | TObjArray fCollimators[kNCollimators][kNJaws];// collimators data (AliLHCDipValD: kGapDn,kGapUp,kLeftDn,kLeftUp,kRightDn,kRightUp) | |
95 | // | |
96 | static const Char_t *fgkDCSNames[]; // beam related DCS names to extract | |
97 | static const Char_t *fgkDCSColNames[]; // collimators to extract | |
98 | static const Char_t *fgkDCSColJaws[]; // names of collimator pieces | |
99 | ||
197ea1a9 | 100 | ClassDef(AliLHCData,2) |
9b0229cf | 101 | }; |
102 | ||
103 | #endif |