]> git.uio.no Git - u/mrichter/AliRoot.git/blame - CORRFW/AliCFEventClassCuts.h
New raw-reader class which deals with events taken from shared memory via the DATE...
[u/mrichter/AliRoot.git] / CORRFW / AliCFEventClassCuts.h
CommitLineData
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"
28class TH1F;
29class AliVEvent;
30//____________________________________________________________________________
31class 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
b68f417e 57 //static checker for trigger bits
563113d0 58 static Bool_t IsTriggered(AliVEvent *ev, TriggerType trigger=kMB1);
59
60 void SetTriggerType(TriggerType trigger=kMB1) { fTriggerType.SetBitNumber(trigger,kTRUE);} // Set requested trigger bits
61 TBits GetTriggerType() const { return fTriggerType;} // get Triggers bits which were requested
62 void SetTriggersInAND( Bool_t flag){fTriggerAND=flag;} // request Trigger bits in .AND.
63
64 void SetZDCN1EnergyCut(Double_t min,Double_t max){fZDCN1EnergyMin=min; fZDCN1EnergyMax=max;} // ZDC energy cuts
65 void SetZDCN2EnergyCut(Double_t min,Double_t max){fZDCN2EnergyMin=min; fZDCN2EnergyMax=max;} // ZDC energy cuts
66 void SetZDCP1EnergyCut(Double_t min,Double_t max){fZDCP1EnergyMin=min; fZDCP1EnergyMax=max;} // ZDC energy cuts
67 void SetZDCP2EnergyCut(Double_t min,Double_t max){fZDCP2EnergyMin=min; fZDCP2EnergyMax=max;} // ZDC energy cuts
68 void SetZDCEM1EnergyCut(Double_t min,Double_t max){fZDCEM1EnergyMin=min; fZDCEM1EnergyMax=max;} // ZDC energy cuts
69 void SetZDCEM2EnergyCut(Double_t min,Double_t max){fZDCEM2EnergyMin=min; fZDCEM2EnergyMax=max;} // ZDC energy cuts
70
71 Double_t GetZDCN1EnergyCutMin() const {return fZDCN1EnergyMin;};//ZDC N1 energy min
72 Double_t GetZDCN2EnergyCutMin() const {return fZDCN2EnergyMin;};//ZDC N2 Emin
73 Double_t GetZDCP1EnergyCutMin() const {return fZDCP1EnergyMin;};//ZDC P1 Emin
74 Double_t GetZDCP2EnergyCutMin() const {return fZDCP2EnergyMin;};//ZDC P2 Emin
75 Double_t GetZDCEM1EnergyCutMin() const {return fZDCEM1EnergyMin;};//ZDC EM1 Emin
76 Double_t GetZDCEM2EnergyCutMin() const {return fZDCEM2EnergyMin;};//ZDC EM2 Emin
77
78 Double_t GetZDCN1EnergyCutMax() const {return fZDCN1EnergyMax;};//ZDC N1 Emax
79 Double_t GetZDCN2EnergyCutMax() const {return fZDCN2EnergyMax;};//ZDC N2 Emax
80 Double_t GetZDCP1EnergyCutMax() const {return fZDCP1EnergyMax;};//ZDC P1 Emax
81 Double_t GetZDCP2EnergyCutMax() const {return fZDCP2EnergyMax;};//ZDC P2 Emax
82 Double_t GetZDCEM1EnergyCutMax() const {return fZDCEM1EnergyMax;};//ZDC EM1 Emax
83 Double_t GetZDCEM2EnergyCutMax() const {return fZDCEM2EnergyMax;};//ZDC EM2 Emax
84
85
86 // QA histograms
87 void FillHistogramsBeforeCuts(TObject* obj) {return FillHistograms(obj,kFALSE);}
88 void FillHistogramsAfterCuts(TObject* obj) {return FillHistograms(obj,kTRUE);}
89 // QA histogram setter
90 // please use indices from the enumeration below
91 void SetHistogramBins(Int_t index, Int_t nbins, Double_t *bins);
92 void SetHistogramBins(Int_t index, Int_t nbins, Double_t xmin, Double_t xmax);
b68f417e 93 enum{kTrigger=0,
94 kZDCEnergyN1,
95 kZDCEnergyP1,
96 kZDCEnergyN2,
97 kZDCEnergyP2,
98 kZDCEnergyEM1,
99 kZDCEnergyEM2,
100 kNTriggers=17,
101 kNTriggersMB=5,
102 kNCuts=7,
103 kNStepQA=2
104 };
563113d0 105 private:
106 TBits* SelectionBitMap(TObject* obj);
107 static void TriggerBitMap(AliVEvent* ev,TBits *bitmapT);
108 void DefineHistograms(); // books histograms and TList
109 void Initialise(); // sets everything to 0
110 void FillHistograms(TObject* obj, Bool_t b);
111
112 TBits fTriggerType ; //The type of trigger to be checked
113 Bool_t fTriggerAND; //Flag to ak for .AND of all the requested trigger bits (.or.is default)
114 Double_t fZDCN1EnergyMin; //Min Energy in ZDCN1
115 Double_t fZDCP1EnergyMin; //Min Energy in ZDCP1
116 Double_t fZDCN2EnergyMin; //Min Energy in ZDCN2
117 Double_t fZDCP2EnergyMin; //Min Energy in ZDCP2
118 Double_t fZDCEM1EnergyMin; //Min Energy in ZDCEM1
119 Double_t fZDCEM2EnergyMin; //Min Energy in ZDCEM2
120 Double_t fZDCN1EnergyMax; //Max Energy in ZDCN1
121 Double_t fZDCP1EnergyMax; //Max Energy in ZDCP1
122 Double_t fZDCN2EnergyMax; //Max Energy in ZDCN2
123 Double_t fZDCP2EnergyMax; //Max Energy in ZDCP2
124 Double_t fZDCEM1EnergyMax; //Max Energy in ZDCEM1
125 Double_t fZDCEM2EnergyMax; //Max Energy in ZDCEM2
126
127 TBits *fBitMap ; //cut mask
b68f417e 128
563113d0 129 TH1F* fhQA[kNCuts][kNStepQA]; // QA Histograms
130 //QA Histogram parameters
563113d0 131 Int_t fhNBinsTrigger;//size of array of bin limits, Trigger Mask
132 Double_t *fhBinLimTrigger;//[fhNBinsTrigger] bin limits, Trigger Mask
563113d0 133 Int_t fhNBinsZDCEnN1;//size of array of bin limits, Energy in ZDC N1
134 Double_t *fhBinLimZDCEnN1;//[fhNBinsZDCEnN1] bin limits, Energy in ZDC N1
563113d0 135 Int_t fhNBinsZDCEnP1;//size of array of bin limits, Energy in ZDC P1
136 Double_t *fhBinLimZDCEnP1;//[fhNBinsZDCEnP1] bin limits, Energy in ZDC P1
563113d0 137 Int_t fhNBinsZDCEnN2;//size of array of bin limits, Energy in ZDC N2
138 Double_t *fhBinLimZDCEnN2;//[fhNBinsZDCEnN2] bin limits, Energy in ZDC N2
563113d0 139 Int_t fhNBinsZDCEnP2;//size of array of bin limits, Energy in ZDC P2
140 Double_t *fhBinLimZDCEnP2;//[fhNBinsZDCEnP2] bin limits, Energy in ZDC P2
563113d0 141 Int_t fhNBinsZDCEnEM1;//size of array of bin limits, Energy in ZDC EM1
142 Double_t *fhBinLimZDCEnEM1;//[fhNBinsZDCEnEM1] bin limits, Energy in ZDC EM1
563113d0 143 Int_t fhNBinsZDCEnEM2;//size of array of bin limits, Energy in ZDC EM2
144 Double_t *fhBinLimZDCEnEM2;//[fhNBinsZDCEnEM1] bin limits, Energy in ZDC EM2
145
146 ClassDef(AliCFEventClassCuts,1);
147};
148#endif