4 /////////////////////////////////////////////////////////////////////////////////
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. //
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) //
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} //
22 // Author: ruben.shahoyan@cern.ch //
24 /////////////////////////////////////////////////////////////////////////////////
26 #include "AliLHCDipValT.h"
30 class AliLHCData : public TObject
33 enum BeamID_t {kBeam1,kBeam2};
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};
38 enum {kRecTotInt,kRecTotIntBunch,kRecBunchInt,kRecTotLum,kRecBunchLum,kRecCrossAngle,kRecBunchConf,kRecFillNum,
39 kRecPrfPrID,kRecPrfAmp,kRecPrfPos,kRecPrfSig};
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() {}
47 Bool_t FillData(const TMap* dcsMap, double tmin=0, double tmax=1.e20);
49 const TObjArray& GetIntensityTotal(BeamID_t b) const {return fIntTot[b];}
50 const TObjArray& GetIntensityTotalBunch(BeamID_t b) const {return fIntTotBunch[b];}
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];}
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;
72 TObjArray* GetDCSEntry(const TMap* dcsMap,const char* key,int &entry,double tmin,double tmax) const;
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;}
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
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)
86 TObjArray fIntBunch[2]; // bunch by bunch intensity for beam1 and beam2 (AliLHCDipValD)
88 TObjArray fBeamPos[2][2]; // horizontal and vertical projection gaussian fit params for beam1 and beam2 (AliLHCDipValD: amp,pos,sigma)
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)
94 TObjArray fCollimators[kNCollimators][kNJaws];// collimators data (AliLHCDipValD: kGapDn,kGapUp,kLeftDn,kLeftUp,kRightDn,kRightUp)
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
100 ClassDef(AliLHCData,2)