]> git.uio.no Git - u/mrichter/AliRoot.git/blame - STEER/AliLHCData.h
- Clean methods related to matching and hit pattern in AODTrack.
[u/mrichter/AliRoot.git] / STEER / AliLHCData.h
CommitLineData
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
28class TMap;
29
30class 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};
38 enum {kRecTotInt,kRecBunchInt,kRecTotLum,kRecBunchLum,kRecCrossAngle,kRecBunchConf,kRecFillNum,
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];}
50 const TObjArray& GetIntensityBunch(BeamID_t b) const {return fIntBunch[b];}
51 const TObjArray& GetBeamPos(BeamID_t b,Proj_t p) const {return fBeamPos[b][p];}
52 const TObjArray& GetLuminTotal(Side_t s) const {return fLuminTot[s];}
53 const TObjArray& GetLuminBunch(Side_t s) const {return fLuminBunch[s];}
54 const TObjArray& GetCrossAngle(Side_t s) const {return fCrossAngle[s];}
55 const AliLHCDipValI& GetBunchConfig(BeamID_t b) const {return fBunchConfig[b];}
56 const TObjArray& GetCollimator(Collim_t c,ColJaw_t jaw) const {return fCollimators[c][jaw];}
57 //
58 Double_t GetTMin() const {return fTMin;}
59 Double_t GetTMax() const {return fTMax;}
60 Int_t GetPeriod() const {return fPeriod;}
61 Int_t GetNBunches(BeamID_t b) const {return GetBunchConfig(b).GetSize();}
62 Int_t GetBunchRFBeam1(BeamID_t b,Int_t bunch) const {return GetBunchConfig(b).GetValue(bunch);}
63 Int_t GetFillNumber() const {return GetUniqueID();}
64 void SetFillNumber(Int_t fill) {SetUniqueID(fill);}
65 void SetPeriod(Int_t nsec=600) {fPeriod = nsec;}
66 void SetTMin(Double_t t) {fTMin = t;}
67 void SetTMax(Double_t t) {fTMax = t;}
68 virtual void Print(const Option_t *opt="") const;
69 //
70 protected:
71 TObjArray* GetDCSEntry(const TMap* dcsMap,const char* key,int &entry,double tmin,double tmax) const;
72
73 AliLHCData(const AliLHCData& src) : TObject(src),fPeriod(src.fPeriod),fTMin(src.fTMin),fTMax(src.fTMax) { /*dummy*/ }
74 AliLHCData& operator=(const AliLHCData& ) { /*dummy*/ return *this;}
75
76 protected:
77 //
78 Int_t fPeriod; // averaging period in seconds
79 Double_t fTMin; // selection timeMin
80 Double_t fTMax; // selection timeMax
81 AliLHCDipValI fBunchConfig[2]; // bunches configuration for beam1 and beam2
82 //
83 TObjArray fIntTot[2]; // total intensity for beam1 and beam2 (AliLHCDipValD)
84 TObjArray fIntBunch[2]; // bunch by bunch intensity for beam1 and beam2 (AliLHCDipValD)
85 //
86 TObjArray fBeamPos[2][2]; // horizontal and vertical projection gaussian fit params for beam1 and beam2 (AliLHCDipValD: amp,pos,sigma)
87 //
88 TObjArray fLuminTot[2]; // total luminosity from BRANB_4L2 and BRANB_4R2 (AliLHCDipValD)
89 TObjArray fLuminBunch[2]; // bunch by bunch luminosity from BRANB_4L2 and BRANB_4R2 (AliLHCDipValD)
90 TObjArray fCrossAngle[2]; // beams crossing angle from BRANB_4L2 and BRANB_4R2 (AliLHCDipValD)
91 //
92 TObjArray fCollimators[kNCollimators][kNJaws];// collimators data (AliLHCDipValD: kGapDn,kGapUp,kLeftDn,kLeftUp,kRightDn,kRightUp)
93 //
94 static const Char_t *fgkDCSNames[]; // beam related DCS names to extract
95 static const Char_t *fgkDCSColNames[]; // collimators to extract
96 static const Char_t *fgkDCSColJaws[]; // names of collimator pieces
97
98 ClassDef(AliLHCData,1)
99};
100
101#endif