Added commet to explain AliAODTrack::fType, AliAODTrack::XAtDCA(), YAtDCA(), ZAtDCA...
[u/mrichter/AliRoot.git] / ANALYSIS / AliCollisionNormalization.h
CommitLineData
9b0cb3c3 1
2#ifndef ALICOLLISIONNORMALIZATION_H
3#define ALICOLLISIONNORMALIZATION_H
4
5/* Copyright(c) 1998-1999, ALICE Experiment at CERN, All rights reserved. *
6 * See cxx source for full Copyright notice */
7
8//-------------------------------------------------------------------------
9// Implementation of Class AliCollisionNormalization
10//
11// This class is used to store the vertex ditributions in the data
12// and in Monte Carlo, needed to compute the real number of
13// collisions a given sample is corresponding to.
14// The strategy matches what described in CERN-THESIS-2009-033 p 119.
15//
16// Author: Michele Floris, CERN
17//-------------------------------------------------------------------------
18
19#include "TH2F.h"
20
21class TH1F;
22class TH1I;
23class AliMCEvent;
24
25class AliCollisionNormalization : public TObject
26
27{
28
29
30public:
31 enum { kNevBin0, kNevCollisions, kNevNbin };
32 typedef enum { kProcSD, kProcDD, kProcND, kProcUnknown, kNProcs } ProcType_t;
33 AliCollisionNormalization();
34 AliCollisionNormalization(Int_t nbinz, Float_t minz, Float_t maxz);
35 AliCollisionNormalization(const char * dataFile, const char * dataListName,
36 const char * mcFile, const char * mcListName,
37 const char * eventStatFile);
38
39 ~AliCollisionNormalization();
40
41 void SetMC(Bool_t flag = kTRUE) { fIsMC = flag;}
42
43 void BookAllHistos();
44 TH1 * BookVzHisto(const char * name , const char * title, Bool_t vzOnly=kFALSE);
45
46 void FillVzMCGen(Float_t vz, Int_t ntrk, AliMCEvent * mcEvt);
47 void FillVzMCRec(Float_t vz, Int_t ntrk, AliMCEvent * mcEvt);
48 void FillVzMCTrg(Float_t vz, Int_t ntrk, AliMCEvent * mcEvt);
49 void FillVzData (Float_t vz, Int_t ntrk) {fHistVzData ->Fill(vz,ntrk);}
50
51 TH2F * GetVzMCGen (Int_t procType) ;
52 TH2F * GetVzMCRec (Int_t procType) ;
53 TH2F * GetVzMCTrg (Int_t procType) ;
54 TH2F * GetVzData () { return fHistVzData ; }
55 TH1F * GetStatBin0 () { return fHistStatBin0 ; }
0d300b4f 56 TH1F * GetStat () { return fHistStat ; }
9b0cb3c3 57 TH1F * GetHistProcTypes () { return fHistProcTypes ; }
58
59
3aa0e5b3 60 Int_t GetProcessType(const AliMCEvent * mcEvt) ;
9b0cb3c3 61 Double_t GetProcessWeight(Int_t proctype);
62
63 void SetReferencsXS(Int_t ref) { fReferenceXS = ref;}
64
65 Double_t ComputeNint();
66 void SetZRange(Float_t zrange) { fZRange = zrange ;}
67
68 void SetReferenceXS(Int_t ref) { fReferenceXS = ref ;}
69 void GetRelativeFractions(Int_t origin, Float_t& ref_SD, Float_t& ref_DD, Float_t& ref_ND, Float_t& error_SD, Float_t& error_DD, Float_t& error_ND);
70
71 void SetVerbose(Int_t lev) { fVerbose = lev ;}
72
0d300b4f 73 void SetEnergy(Float_t en) { fEnergy = en; }
74
9b0cb3c3 75 Long64_t Merge(TCollection* list);
76
3aa0e5b3 77 Double_t GetInputEvents() const {return fInputEvents;} // number of Input Events
78 Double_t GetPhysSelEvents() const {return fPhysSelEvents;} // number of Events after Physics Selection
79 Double_t GetBgEvents() const {return fBgEvents;} // number of background events
7a0032a9 80
3aa0e5b3 81 Double_t GetAllEvents() const {return fAllEvents;} // number of corrected events
82 Double_t GetAllEventsZRange() const {return fAllEventsZRange;} // number of corrected events in z range
83 Double_t GetAllEventsZRangeMult1() const{return fAllEventsZRangeMult1;} // number of corrected events with multiplicity larger 1 in z range
84 Double_t GetAllEventsInBin0ZRange() const {return fAllEventsInBin0ZRange;} // number of corrected events in bin0 in z range
85 Double_t GetTrigEffBin0() const {return fTrigEffBin0;} // trigger efficiency
7a0032a9 86
87
9b0cb3c3 88protected:
89
90 Int_t fNbinsVz; // number of z bins in the vz histo
91 Float_t fMinVz ; // lowest Z
92 Float_t fMaxVz ; // highest Z
93
94 Float_t fZRange; // max |Z| vertex to be considered
95
96 Bool_t fIsMC; // True if processing MC
97
98 Int_t fReferenceXS; // index of reference cross section to be used to rescale process types in the calculation of the efficiency
99
100 Int_t fVerbose; // Determines the ammount of printout
101
0d300b4f 102 Float_t fEnergy; // Beam energy in GeV. Defaults to 900.
103
9b0cb3c3 104 TH2F * fHistVzMCGen[kNProcs] ; // Vz distribution of generated events vs rec multiplicity
105 TH2F * fHistVzMCRec[kNProcs] ; // Vz distribution of reconstructed events vs rec multiplicity
106 TH2F * fHistVzMCTrg[kNProcs] ; // Vz distribution of triggered events vs rec multiplicity
107 TH2F * fHistVzData ; // Vz distribution of triggered events vs rec multiplicity
108 TH1F * fHistProcTypes ; // Number of evts for different Process types
109
110 TH1F * fHistStatBin0 ; // event stat histogram, created by physiscs selection; used in ComputeNint;
0d300b4f 111 TH1F * fHistStat ; // event stat histogram, created by physiscs selection; used in ComputeNint;
9b0cb3c3 112
7a0032a9 113 Double_t fInputEvents; // number of Input Events
114 Double_t fPhysSelEvents; // number of Events after Physics Selection
115 Double_t fBgEvents; // number of background events
116
117 Double_t fAllEvents; // number of corrected events
118 Double_t fAllEventsZRange; // number of corrected events in z range
119 Double_t fAllEventsZRangeMult1; // number of corrected events with multiplicity larger 1 in z range
120 Double_t fAllEventsInBin0ZRange; // number of corrected events in bin0 in z range
121 Double_t fTrigEffBin0; // trigger efficiency in Bin0
122
3aa0e5b3 123 static const char * fgkProcLabel[] ; // labels of the different process types
9b0cb3c3 124
7a0032a9 125 ClassDef(AliCollisionNormalization, 4);
9b0cb3c3 126
127private:
128 AliCollisionNormalization(const AliCollisionNormalization&);
129 AliCollisionNormalization& operator=(const AliCollisionNormalization&);
130};
131
132#endif