2 #ifndef ALICOLLISIONNORMALIZATION_H
3 #define ALICOLLISIONNORMALIZATION_H
5 /* Copyright(c) 1998-1999, ALICE Experiment at CERN, All rights reserved. *
6 * See cxx source for full Copyright notice */
8 //-------------------------------------------------------------------------
9 // Implementation of Class AliCollisionNormalization
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.
16 // Author: Michele Floris, CERN
17 //-------------------------------------------------------------------------
25 class AliCollisionNormalization : public TObject
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);
39 ~AliCollisionNormalization();
41 void SetMC(Bool_t flag = kTRUE) { fIsMC = flag;}
44 TH1 * BookVzHisto(const char * name , const char * title, Bool_t vzOnly=kFALSE);
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);}
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 ; }
56 TH1F * GetHistProcTypes () { return fHistProcTypes ; }
59 Int_t GetProcessType(AliMCEvent * mcEvt) ;
60 Double_t GetProcessWeight(Int_t proctype);
62 void SetReferencsXS(Int_t ref) { fReferenceXS = ref;}
64 Double_t ComputeNint();
65 void SetZRange(Float_t zrange) { fZRange = zrange ;}
67 void SetReferenceXS(Int_t ref) { fReferenceXS = ref ;}
68 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 void SetVerbose(Int_t lev) { fVerbose = lev ;}
72 Long64_t Merge(TCollection* list);
76 Int_t fNbinsVz; // number of z bins in the vz histo
77 Float_t fMinVz ; // lowest Z
78 Float_t fMaxVz ; // highest Z
80 Float_t fZRange; // max |Z| vertex to be considered
82 Bool_t fIsMC; // True if processing MC
84 Int_t fReferenceXS; // index of reference cross section to be used to rescale process types in the calculation of the efficiency
86 Int_t fVerbose; // Determines the ammount of printout
88 TH2F * fHistVzMCGen[kNProcs] ; // Vz distribution of generated events vs rec multiplicity
89 TH2F * fHistVzMCRec[kNProcs] ; // Vz distribution of reconstructed events vs rec multiplicity
90 TH2F * fHistVzMCTrg[kNProcs] ; // Vz distribution of triggered events vs rec multiplicity
91 TH2F * fHistVzData ; // Vz distribution of triggered events vs rec multiplicity
92 TH1F * fHistProcTypes ; // Number of evts for different Process types
94 TH1F * fHistStatBin0 ; // event stat histogram, created by physiscs selection; used in ComputeNint;
96 static const char * fProcLabel[] ; // labels of the different process types
98 ClassDef(AliCollisionNormalization, 1);
101 AliCollisionNormalization(const AliCollisionNormalization&);
102 AliCollisionNormalization& operator=(const AliCollisionNormalization&);