]> git.uio.no Git - u/mrichter/AliRoot.git/blame - PWG0/multVScentPbPb/AliTrackletTaskUni.h
Coverity fix
[u/mrichter/AliRoot.git] / PWG0 / multVScentPbPb / AliTrackletTaskUni.h
CommitLineData
a9a39f46 1#ifndef ALITRACKLETTASKUNI_H
2#define ALITRACKLETTASKUNI_H
3
4///////////////////////////////////////////////////////////////////////////
5// Class AliTrackletTask //
6// Analysis task to study performance of tracklet reconstruction //
7// algorithm and combinatorial background //
8// Author: M. Nicassio (INFN Bari) //
9// Contact: Maria.Nicassio@ba.infn.it, Domenico.Elia@ba.infn.it //
10///////////////////////////////////////////////////////////////////////////
11
12class TH1F;
13class TH2F;
14class AliESDEvent;
15class TList;
16class TNtuple;
17
18class AliMCParticle;
19class AliITSMultRecBg;
20
21#include "../ITS/AliITSsegmentationSPD.h"
22#include "AliAnalysisTaskSE.h"
23#include "AliTriggerAnalysis.h"
24
25class AliTrackletTaskUni : public AliAnalysisTaskSE {
26 public:
27 enum {kData,kBgInj,kBgRot,kBgMix,kMC};
28 //
29 enum { // define here id's of the standard histos in corresponding TObjArray* fHistosTr...
30 kHEtaZvDist, // 3 d sparse histo with dist (uncut) vs zv vs eta
31 kHEtaZvDPhiS, // 3 d sparse histo with dphiS (uncut) vs zv vs eta
32 kHEtaZvCut, // zv vs eta with strict cut on tracklets applied (dist<1 or |dPhi|<narrowWindow)
33 kHDPhiDTheta, // measured dTheta vs dPhi
34 kHDPhiSDThetaX, // dTheta (1/sin^2 scaled if needed) vs dPhi (bending subtracted)
35 kHEtaDPhiS, // dPhi (bending subtracted) vs eta
36 kHEtaDThetaX, // dTheta (1/sin^2 scaled if needed) vs eta
37 kHEtaDist, // Weighted distance vs eta
38 kHZvDPhiS, // dPhi (bending subtracted) vs Zv
39 kHZvDThetaX, // dTheta (1/sin^2 scaled if needed) vs Zv
40 kHZvDist // Weighted distance vs Zv
41 };
42 enum { // define here id's of any custom histos to be added to fHistosCustom
43 kHStat, // job info (meaning of bins defined in the enum below)
44 kHZVEtaPrimMC, // Zv vs eta for all primary tracks (true MC multiplicity)
45 //
46 kHZVtxNoSel, // Z vertex distribution before event selection
47 kHNTrackletsNoSel, // N tracklets before event selection
48 kHNClSPD1NoSel, // N clusters on SPD1 before event selection
49 kHNClSPD2NoSel, // N clusters on SPD2 before event selection
50 kHV0NoSel, // V0 mult before selection
51 kHV0NClSPD2NoSel, // V0 - nspd2 correlation
52 //
53 kHZVtx, // Z vertex distribution
54 kHNTracklets, // N tracklets
55 kHNClSPD1, // N clusters on SPD1
56 kHNClSPD2, // N clusters on SPD2
57 kHV0, // V0 mult after selection
58 //
59 kHZVtxMixDiff, // difference in Z vtx of mixed events
60 kHNTrMixDiff, // difference in N tracklets of mixed events
61 //
62 kHPrimPDG, // PDG code of prim tracklet
63 kHSecPDG, // PDG code of sec tracklet
64 kHPrimParPDG, // PDG code of prim tracklet parent
65 kHSecParPDG // PDG code of sec tracklet parent
66 }; // custom histos
67
68 // bins for saved parameters
69 enum {kDummyBin,
3c78f321 70 kEvTot0, // events read
71 kEvTot, // events read after vertex quality selection
72 kEvTotPlp, // events with pile-up
a9a39f46 73 kEvProcData, // events with data mult.object (ESD or reco)
74 kEvProcInj, // events Injected
75 kEvProcRot, // events Rotated
76 kEvProcMix, // events Mixed
77 //
78 kDPhi, // dphi window
79 kDTht, // dtheta window
80 kNStd, // N.standard deviations to keep
81 kPhiShift, // bending shift
82 kThtS2, // is dtheta scaled by 1/sin^2
83 kThtCW, // on top of w.dist cut cut also on 1 sigma dThetaX
84 kPhiOvl, // overlap params
85 kZEtaOvl, // overlap params
86 kNoOvl, // flag that overlap are suppressed
87 //
88 kPhiRot, // rotation phi
89 kInjScl, // injection scaling
3c78f321 90 kEtaMin, // eta cut
91 kEtaMax, // eta cut
a9a39f46 92 kZVMin, // min ZVertex to process
93 kZVMax, // max ZVertex to process
94 kTrcMin, // min mult to process
95 kTrcMax, // max mult to process
96 //
3c78f321 97 kMCV0Scale, // scaling value for V0 in MC
98 //
a9a39f46 99 kOneUnit=49, // just 1 to track mergings
100 kNWorkers=50, // n workers
101 kNStatBins
102 };
103
104 //
105 AliTrackletTaskUni(const char *name = "AliTrackletTaskUni");
106 virtual ~AliTrackletTaskUni();
107
108 virtual void UserCreateOutputObjects();
109 virtual void UserExec(Option_t *option);
110 virtual void Terminate(Option_t *);
3c78f321 111 void RegisterStat();
a9a39f46 112
113 void SetUseMC(Bool_t mc = kFALSE) {fUseMC = mc;}
114 void SetCheckReconstructables(Bool_t c=kFALSE) {fCheckReconstructables = c;}
115 TObjArray* BookHistosSet(const char* pref, UInt_t selHistos=0xffffffff);
116 TObjArray* BookCustomHistos();
117 void AddHisto(TObjArray* histos, TObject* h, Int_t at=-1);
118 void FillHistosSet(TObjArray* histos, double phi,double theta,double dphi,double dtheta,double dist);
119 // RS
120 void SetNStdDev(Float_t f=1.) {fNStdDev = f<1e-5 ? 1e-5:f;}
121 void SetScaleDThetaBySin2T(Bool_t v=kFALSE) {fScaleDTBySin2T = v;}
122 void SetCutOnDThetaX(Bool_t v=kFALSE) {fCutOnDThetaX = v;}
123 void SetPhiWindow(float w=0.08) {fDPhiWindow = w<1e-5 ? 1e-5:w;}
124 void SetThetaWindow(float w=0.025) {if (w<0) fCutOnDThetaX=kTRUE; fDThetaWindow = TMath::Abs(w)<1e-5 ? 1e-5:TMath::Abs(w);}
125 void SetPhiShift(float w=0.0045) {fDPhiShift = w;}
126 void SetPhiOverlapCut(float w=0.005) {fPhiOverlapCut = w;}
127 void SetZetaOverlapCut(float w=0.05) {fZetaOverlap = w;}
128 void SetPhiRot(float w=0) {fPhiRot = w;}
129 void SetInjScale(Float_t s=1.) {fInjScale = s>0? s:1.;}
130 void SetRemoveOverlaps(Bool_t w=kFALSE) {fRemoveOverlaps = w;}
3c78f321 131 void SetScaleMCV0(Float_t s=1.0) {fMCV0Scale = s;}
a9a39f46 132 //
3c78f321 133 void SetEtaCut(Float_t etaCut) {fEtaMax = TMath::Abs(etaCut); fEtaMin= -fEtaMax;}
134 void SetEtaMin(Float_t etaMin) {fEtaMin = etaMin;}
135 void SetEtaMax(Float_t etaMax) {fEtaMax = etaMax;}
a9a39f46 136 void SetZVertexMin(Float_t z) {fZVertexMin = z;}
137 void SetZVertexMax(Float_t z) {fZVertexMax = z;}
138 void SetMultCutMin(Int_t n=0) {fMultCutMin = n;}
139 void SetMultCutMax(Int_t n=99999) {fMultCutMax = n;}
140 //
141 Bool_t GetDoNormalReco() const {return fDoNormalReco;}
142 Bool_t GetDoInjection() const {return fDoInjection;}
143 Bool_t GetDoRotation() const {return fDoRotation;}
144 Bool_t GetDoMixing() const {return fDoMixing;}
145 //
146 void SetDoNormalReco(Bool_t v=kTRUE) {fDoNormalReco = v;}
147 void SetDoInjection(Bool_t v=kTRUE) {fDoInjection = v;}
148 void SetDoRotation(Bool_t v=kTRUE) {fDoRotation = v;}
149 void SetDoMixing(Bool_t v=kTRUE) {fDoMixing = v;}
150 //
3c78f321 151 void SetDontMerge(Bool_t v=kTRUE) {fDontMerge = v;}
a9a39f46 152 /*
153 void SetTrigger(AliTriggerAnalysis::Trigger trigger) { fTrigger = trigger; }
154 void SetMCCentralityBin(MCCentralityBin mccentrbin) { fMCCentralityBin = mccentrbin;}
155 void SetCentralityLowLim(Float_t centrlowlim) { fCentrLowLim = centrlowlim;}
156 void SetCentralityUpLim(Float_t centruplim) { fCentrUpLim = centruplim;}
157 void SetCentralityEst(TString centrest) { fCentrEst = centrest;}
158 */
159 //
160 protected:
161 void InitMultReco();
162 Bool_t HaveCommonParent(const float* clLabs0,const float* clLabs1);
163 void FillHistos(Int_t type, const AliMultiplicity* mlt);
164 void FillMCPrimaries(TH2F* hetaz);
165 void FillSpecies(Int_t primsec, Int_t id, Double_t dist);
166 Int_t GetPdgBin(Int_t pdgCode);
167 void CheckReconstructables();
168 //
169 protected:
170 TList* fOutput; // output list send on output slot 1
171 //
172 Bool_t fDoNormalReco; // do normal reco
173 Bool_t fDoInjection; // do injection
174 Bool_t fDoRotation; // do rotation
175 Bool_t fDoMixing; // do mixing
176 //
177 Bool_t fUseMC;
178 Bool_t fCheckReconstructables;
179 //
180 TObjArray* fHistosTrData; //! all tracklets in data
181 TObjArray* fHistosTrInj; //! injected
182 TObjArray* fHistosTrRot; //! rotated
183 TObjArray* fHistosTrMix; //! mixed
184 //
185 TObjArray* fHistosTrPrim; //! primary
186 TObjArray* fHistosTrSec; //! secondary
187 TObjArray* fHistosTrComb; //! combinatorials
188 TObjArray* fHistosTrCombU; //! combinatorials uncorrelated
189 //
190 TObjArray* fHistosTrRcblPrim; //! Primary Reconstructable
191 TObjArray* fHistosTrRcblSec; //! Secondary Reconstructable
192 TObjArray* fHistosCustom; //! custom histos
193 //
194 // Settings for the reconstruction
195 // tracklet reco settings
3c78f321 196 Float_t fEtaMin; // histos filled only for this eta range
197 Float_t fEtaMax; // histos filled only for this eta range
a9a39f46 198 Float_t fZVertexMin; // min Z vtx to process
199 Float_t fZVertexMax; // max Z vtx to process
200 Int_t fMultCutMin; // min mult in ESD to process?
201 Int_t fMultCutMax; // max mult in ESD to process?
3c78f321 202 Float_t fMCV0Scale; // scaling factor for V0 in MC
a9a39f46 203 //
204 Bool_t fScaleDTBySin2T; // request dTheta scaling by 1/sin^2(theta)
205 Bool_t fCutOnDThetaX; // if true, apart from NStdDev cut apply also the cut on dThetaX
206 Float_t fNStdDev; // cut on weighted distance
207 Float_t fDPhiWindow; // max dPhi
208 Float_t fDThetaWindow; // max dTheta
209 Float_t fDPhiShift; // mean bend
210 Float_t fPhiOverlapCut; // overlaps cut in phi
211 Float_t fZetaOverlap; // overlaps cut in Z
212 Float_t fPhiRot; // rotate L1 wrt L2
213 Float_t fInjScale; // scaling factor for injection
214 Bool_t fRemoveOverlaps; // request overlaps removal
215 //
216 AliITSMultRecBg *fMultReco; //! mult.reco object
217 TTree* fRPTree; //! tree of recpoints
218 TTree* fRPTreeMix; //! tree of recpoints for mixing
219 AliStack* fStack; //! MC stack
220 AliMCEvent* fMCEvent; //! MC Event
221 Float_t fESDVtx[3]; // ESD vertex
222 //
223 /*
224 AliTriggerAnalysis::Trigger fTrigger; // requested trigger
225 MCCentralityBin fMCCentralityBin; // to select MC centrality bin in which corrections are calculated
226 Float_t fCentrLowLim; // to select centrality bin on data
227 Float_t fCentrUpLim; // to select centrality bin on data
228 TString fCentrEst; // to select centrality estimator
229 */
3c78f321 230 Bool_t fDontMerge; // no merging requested
a9a39f46 231 static const char* fgkPDGNames[]; //!pdg names
232 static const Int_t fgkPDGCodes[]; //!pdg codes
233 //
234 private:
235 AliTrackletTaskUni(const AliTrackletTaskUni&); // not implemented
236 AliTrackletTaskUni& operator=(const AliTrackletTaskUni&); // not implemented
237
238 ClassDef(AliTrackletTaskUni, 1);
239};
240
241
242#endif