]>
Commit | Line | Data |
---|---|---|
563113d0 | 1 | #ifndef ALICFEVENTCLASSCUTS_H |
2 | #define ALICFEVENTCLASSCUTS_H | |
3 | /************************************************************************** | |
4 | * Copyright(c) 1998-1999, ALICE Experiment at CERN, All rights reserved. * | |
5 | * * | |
6 | * Author: The ALICE Off-line Project. * | |
7 | * Contributors are mentioned in the code where appropriate. * | |
8 | * * | |
9 | * Permission to use, copy, modify and distribute this software and its * | |
10 | * documentation strictly for non-commercial purposes is hereby granted * | |
11 | * without fee, provided that the above copyright notice appears in all * | |
12 | * copies and that both the copyright notice and this permission notice * | |
13 | * appear in the supporting documentation. The authors make no claims * | |
14 | * about the suitability of this software for any purpose. It is * | |
15 | * provided "as is" without express or implied warranty. * | |
16 | **************************************************************************/ | |
17 | // Cut on the type of Event Class: for the moment | |
18 | // the Trigger (pp running configurations) | |
19 | // and requirements on the energy observed in the ZDC are implemented | |
20 | // The argument of IsSelected member function (passed object) is cast into | |
21 | // an AliVEvent, although conditions are meaningful only for AliESD(AOD)Event | |
22 | // type objects. | |
23 | // The class derives from AliCFCutBase | |
24 | // Author:S.Arcelli Silvia.Arcelli@cern.ch | |
25 | ||
26 | #include "AliCFCutBase.h" | |
27 | #include "TBits.h" | |
28 | class TH1F; | |
29 | class AliVEvent; | |
30 | //____________________________________________________________________________ | |
31 | class AliCFEventClassCuts: public AliCFCutBase | |
32 | { | |
33 | public : | |
34 | AliCFEventClassCuts() ; | |
35 | AliCFEventClassCuts(Char_t* name, Char_t* title) ; | |
36 | AliCFEventClassCuts(const AliCFEventClassCuts& c) ; | |
37 | AliCFEventClassCuts& operator=(const AliCFEventClassCuts& c) ; | |
38 | ~AliCFEventClassCuts(); | |
39 | Bool_t IsSelected(TObject* obj); | |
40 | void Init(); | |
41 | void GetBitMap(TObject *obj, TBits *bitmap); | |
42 | void AddQAHistograms(TList *list) const; | |
43 | ||
44 | //Association to The Trigger bits in the mask. | |
45 | //They correspond to the PP running descriptor as in | |
46 | //STEER/createTriggerDescriptor_pp.C plus five MB Trigger combinations | |
47 | enum TriggerType { | |
48 | kVZEROLeft=0,kVZERORight,kVZEROBeamGas, | |
49 | kSTARTAL0,kSTARTCL0, | |
50 | kITSSPDGFOL0,kITSSPDHMultL0, | |
51 | kMUSingleLPtL0,kMUUnlikeLPtL0,kMUUnlikeHPtL0,kMULikeLPtL0,kMULikeHPtL0, | |
52 | kMB,kTOFMB, | |
53 | kMUSingleMB,kMUUnLikeLPtMB,kMULikeLPtMB, | |
54 | kMB1,kMB2,kMB3,kMB4,kMB5 | |
55 | }; | |
56 | ||
57 | ||
58 | enum{kTrigger=0, | |
59 | kZDCEnergyN1, | |
60 | kZDCEnergyP1, | |
61 | kZDCEnergyN2, | |
62 | kZDCEnergyP2, | |
63 | kZDCEnergyEM1, | |
64 | kZDCEnergyEM2, | |
65 | kNTriggers=17, | |
66 | kNTriggersMB=5, | |
67 | kNCuts=7, | |
68 | kNStepQA=2 | |
69 | }; | |
70 | ||
71 | ||
72 | //static checker for trigger bits | |
73 | static Bool_t IsTriggered(AliVEvent *ev, TriggerType trigger=kMB1); | |
74 | ||
75 | void SetTriggerType(TriggerType trigger=kMB1) { fTriggerType.SetBitNumber(trigger,kTRUE);} // Set requested trigger bits | |
76 | TBits GetTriggerType() const { return fTriggerType;} // get Triggers bits which were requested | |
77 | void SetTriggersInAND( Bool_t flag){fTriggerAND=flag;} // request Trigger bits in .AND. | |
78 | ||
79 | void SetZDCN1EnergyCut(Double_t min,Double_t max){fZDCN1EnergyMin=min; fZDCN1EnergyMax=max;} // ZDC energy cuts | |
80 | void SetZDCN2EnergyCut(Double_t min,Double_t max){fZDCN2EnergyMin=min; fZDCN2EnergyMax=max;} // ZDC energy cuts | |
81 | void SetZDCP1EnergyCut(Double_t min,Double_t max){fZDCP1EnergyMin=min; fZDCP1EnergyMax=max;} // ZDC energy cuts | |
82 | void SetZDCP2EnergyCut(Double_t min,Double_t max){fZDCP2EnergyMin=min; fZDCP2EnergyMax=max;} // ZDC energy cuts | |
83 | void SetZDCEM1EnergyCut(Double_t min,Double_t max){fZDCEM1EnergyMin=min; fZDCEM1EnergyMax=max;} // ZDC energy cuts | |
84 | void SetZDCEM2EnergyCut(Double_t min,Double_t max){fZDCEM2EnergyMin=min; fZDCEM2EnergyMax=max;} // ZDC energy cuts | |
85 | ||
86 | Double_t GetZDCN1EnergyCutMin() const {return fZDCN1EnergyMin;};//ZDC N1 energy min | |
87 | Double_t GetZDCN2EnergyCutMin() const {return fZDCN2EnergyMin;};//ZDC N2 Emin | |
88 | Double_t GetZDCP1EnergyCutMin() const {return fZDCP1EnergyMin;};//ZDC P1 Emin | |
89 | Double_t GetZDCP2EnergyCutMin() const {return fZDCP2EnergyMin;};//ZDC P2 Emin | |
90 | Double_t GetZDCEM1EnergyCutMin() const {return fZDCEM1EnergyMin;};//ZDC EM1 Emin | |
91 | Double_t GetZDCEM2EnergyCutMin() const {return fZDCEM2EnergyMin;};//ZDC EM2 Emin | |
92 | ||
93 | Double_t GetZDCN1EnergyCutMax() const {return fZDCN1EnergyMax;};//ZDC N1 Emax | |
94 | Double_t GetZDCN2EnergyCutMax() const {return fZDCN2EnergyMax;};//ZDC N2 Emax | |
95 | Double_t GetZDCP1EnergyCutMax() const {return fZDCP1EnergyMax;};//ZDC P1 Emax | |
96 | Double_t GetZDCP2EnergyCutMax() const {return fZDCP2EnergyMax;};//ZDC P2 Emax | |
97 | Double_t GetZDCEM1EnergyCutMax() const {return fZDCEM1EnergyMax;};//ZDC EM1 Emax | |
98 | Double_t GetZDCEM2EnergyCutMax() const {return fZDCEM2EnergyMax;};//ZDC EM2 Emax | |
99 | ||
100 | ||
101 | // QA histograms | |
102 | void FillHistogramsBeforeCuts(TObject* obj) {return FillHistograms(obj,kFALSE);} | |
103 | void FillHistogramsAfterCuts(TObject* obj) {return FillHistograms(obj,kTRUE);} | |
104 | // QA histogram setter | |
105 | // please use indices from the enumeration below | |
106 | void SetHistogramBins(Int_t index, Int_t nbins, Double_t *bins); | |
107 | void SetHistogramBins(Int_t index, Int_t nbins, Double_t xmin, Double_t xmax); | |
108 | ||
109 | private: | |
110 | TBits* SelectionBitMap(TObject* obj); | |
111 | static void TriggerBitMap(AliVEvent* ev,TBits *bitmapT); | |
112 | void DefineHistograms(); // books histograms and TList | |
113 | void Initialise(); // sets everything to 0 | |
114 | void FillHistograms(TObject* obj, Bool_t b); | |
115 | ||
116 | TBits fTriggerType ; //The type of trigger to be checked | |
117 | Bool_t fTriggerAND; //Flag to ak for .AND of all the requested trigger bits (.or.is default) | |
118 | Double_t fZDCN1EnergyMin; //Min Energy in ZDCN1 | |
119 | Double_t fZDCP1EnergyMin; //Min Energy in ZDCP1 | |
120 | Double_t fZDCN2EnergyMin; //Min Energy in ZDCN2 | |
121 | Double_t fZDCP2EnergyMin; //Min Energy in ZDCP2 | |
122 | Double_t fZDCEM1EnergyMin; //Min Energy in ZDCEM1 | |
123 | Double_t fZDCEM2EnergyMin; //Min Energy in ZDCEM2 | |
124 | Double_t fZDCN1EnergyMax; //Max Energy in ZDCN1 | |
125 | Double_t fZDCP1EnergyMax; //Max Energy in ZDCP1 | |
126 | Double_t fZDCN2EnergyMax; //Max Energy in ZDCN2 | |
127 | Double_t fZDCP2EnergyMax; //Max Energy in ZDCP2 | |
128 | Double_t fZDCEM1EnergyMax; //Max Energy in ZDCEM1 | |
129 | Double_t fZDCEM2EnergyMax; //Max Energy in ZDCEM2 | |
130 | ||
131 | TBits *fBitMap ; //cut mask | |
132 | TH1F* fhQA[kNCuts][kNStepQA]; // QA Histograms | |
133 | //QA Histogram parameters | |
134 | ||
135 | Int_t fhNBinsTrigger;//size of array of bin limits, Trigger Mask | |
136 | Double_t *fhBinLimTrigger;//[fhNBinsTrigger] bin limits, Trigger Mask | |
137 | ||
138 | Int_t fhNBinsZDCEnN1;//size of array of bin limits, Energy in ZDC N1 | |
139 | Double_t *fhBinLimZDCEnN1;//[fhNBinsZDCEnN1] bin limits, Energy in ZDC N1 | |
140 | ||
141 | Int_t fhNBinsZDCEnP1;//size of array of bin limits, Energy in ZDC P1 | |
142 | Double_t *fhBinLimZDCEnP1;//[fhNBinsZDCEnP1] bin limits, Energy in ZDC P1 | |
143 | ||
144 | Int_t fhNBinsZDCEnN2;//size of array of bin limits, Energy in ZDC N2 | |
145 | Double_t *fhBinLimZDCEnN2;//[fhNBinsZDCEnN2] bin limits, Energy in ZDC N2 | |
146 | ||
147 | Int_t fhNBinsZDCEnP2;//size of array of bin limits, Energy in ZDC P2 | |
148 | Double_t *fhBinLimZDCEnP2;//[fhNBinsZDCEnP2] bin limits, Energy in ZDC P2 | |
149 | ||
150 | Int_t fhNBinsZDCEnEM1;//size of array of bin limits, Energy in ZDC EM1 | |
151 | Double_t *fhBinLimZDCEnEM1;//[fhNBinsZDCEnEM1] bin limits, Energy in ZDC EM1 | |
152 | ||
153 | Int_t fhNBinsZDCEnEM2;//size of array of bin limits, Energy in ZDC EM2 | |
154 | Double_t *fhBinLimZDCEnEM2;//[fhNBinsZDCEnEM1] bin limits, Energy in ZDC EM2 | |
155 | ||
156 | ClassDef(AliCFEventClassCuts,1); | |
157 | }; | |
158 | #endif |