]> git.uio.no Git - u/mrichter/AliRoot.git/blob - PWGGA/GammaConv/AliConversionSelection.h
baec2849906b5b5c900716d0c437bd9bd2f1ad07
[u/mrichter/AliRoot.git] / PWGGA / GammaConv / AliConversionSelection.h
1 #ifndef AliConversionSelection_cxx
2 #define AliConversionSelection_cxx
3
4 #include "AliAODConversionMother.h"
5 #include "AliConversionPhotonBase.h"
6 #include "AliAODConversionPhoton.h"
7 #include "AliConversionAODBGHandlerRP.h"
8 #include "AliConversionCuts.h"
9 #include "AliConversionMesonCuts.h"
10 #include "TRandom3.h"
11 #include "AliVEvent.h"
12 #include "AliMCEvent.h"
13 #include "TClonesArray.h"
14 #include "AliESDtrackCuts.h"
15
16 class AliConversionSelection : public TObject{
17
18 public:
19
20     AliConversionSelection(AliConversionCuts *convCut, AliConversionMesonCuts *mesonCut);
21     AliConversionSelection(TString convCut, TString mesonCut);
22     virtual ~AliConversionSelection();
23
24     // Main Functions
25     Bool_t ProcessEvent(TClonesArray *photons,AliVEvent *inputEvent,AliMCEvent *mcEvent);
26    
27     // public getter functions
28
29     Int_t GetNumberOfPi0s(){return fPi0Candidates->GetEntriesFast();}
30     Int_t GetNumberOfBGs(){return fBGPi0s->GetEntriesFast();}
31     Int_t GetNumberOfPhotons(){return fGoodGammas->GetEntriesFast();}
32
33     Double_t GetMultiplicity(AliVEvent *inputEvent);
34
35     AliAODConversionMother* GetPi0(Int_t index);
36     AliAODConversionMother* GetBG(Int_t index);
37     AliAODConversionPhoton* GetPhoton(Int_t index);
38
39     TClonesArray *GetPi0Candidates(){return fPi0Candidates;}
40     TClonesArray *GetBGPi0s(){return fBGPi0s;}
41
42     // public Set Functions
43     void SetInvMassRange(Double_t low,Double_t up){fInvMassRange[0]=low;fInvMassRange[1]=up;};
44     void SetInvMassRange(Double_t range[2]){SetInvMassRange(range[0],range[1]);};
45
46     Double_t* GetInvMassRange(){return fInvMassRange;}
47
48     TObjArray *GetGoodGammas(){return fGoodGammas;}
49
50     Int_t GetNumberOfChargedTracks(AliVEvent *inputEvent);
51     Double_t GetSPDMult(AliVEvent *inputEvent);
52     Double_t GetVZEROMult(AliVEvent *inputEvent);
53
54     Int_t GetEventNumber(AliVEvent *inputEvent);
55
56     TString GetCutString();
57
58 protected:
59    
60     void InitializeBGHandler();
61     void CalculatePi0Candidates();
62     void CalculateBackground();
63
64     void RotateParticle(AliAODConversionPhoton *gamma,Int_t nDegreesPMBackground);
65
66     Bool_t MesonInMassWindow(AliAODConversionMother *pi0cand);
67
68     AliVEvent *fInputEvent;
69     AliMCEvent *fMCEvent;
70     AliConversionCuts *fConversionCut;
71     AliConversionMesonCuts *fMesonCut;
72     AliESDtrackCuts *fESDTrackCuts;
73     TObjArray *fGoodGammas; // Pointer to selected photons
74     TClonesArray *fPi0Candidates;
75     TClonesArray *fBGPi0s;
76     TRandom3 *fRandomizer; // Randomizer for Rotation
77     AliConversionAODBGHandlerRP *fBGHandler;
78     Double_t *fInvMassRange;
79     Double_t *fUnsmearedPx;
80     Double_t *fUnsmearedPy;
81     Double_t *fUnsmearedPz;
82     Double_t *fUnsmearedE;
83     Int_t fCurrentEventNumber; // Current Event Number
84     Bool_t fIsOwner; // Cuts will be deleted when the destructor is called
85
86     AliConversionSelection(const AliConversionSelection&); // not implemented
87     AliConversionSelection& operator=(const AliConversionSelection&); // not implemented
88   
89     ClassDef(AliConversionSelection, 1); // example of analysis
90 };
91
92 #endif
93