Cleaning the code and using "const" wherever it is ppossible (Boris)
[u/mrichter/AliRoot.git] / PWG2 / RESONANCES / AliRsnPair.h
CommitLineData
0f7f8d16 1#ifndef ALIRSNMVPAIR_H
2#define ALIRSNMVPAIR_H
3
4#include <TObject.h>
5#include <TH1.h>
6#include <TClonesArray.h>
7#include <TTree.h>
8
9#include "AliRsnDaughter.h"
10#include "AliRsnPairParticle.h"
11#include "AliRsnCutSet.h"
12#include "AliRsnCutMgr.h"
13#include "AliRsnPairDef.h"
0cf0c402 14#include "AliRsnPID.h"
15
0f7f8d16 16#include "AliRsnEventBuffer.h"
17
0cf0c402 18class AliRsnEvent;
0f7f8d16 19class AliRsnCut;
20
0cf0c402 21
0f7f8d16 22/**
23 @author Martin Vala <Martin.Vala@cern.ch>
24*/
25class AliRsnPair : public TObject
0cf0c402 26{
0f7f8d16 27 public:
28 enum EPairType
29 {
30 kESDNoPID = 0,kESDNoPIDMix,
31 kESDNormal, kESDMix,
32 kMCNoPID,
33 kMCNormal, kMCMix,
34 kMCSignalOnly, kMCBackgroundOnly,
35 kLastIndex
36 };
37
38 AliRsnPair();
39 AliRsnPair ( AliRsnPair::EPairType type , AliRsnPairDef *pairDef,Int_t numOfMix = 0 );
40 ~AliRsnPair();
41
42 TString GetESDParticleName ( AliRsnPID::EType type );
43 TString GetPairTypeName ( EPairType type );
44
45 TH1F *GenerateEffMassHist ( Int_t index = 0 );
46
47 void ProcessPair ( AliRsnEvent *event,TH1F *hist,Int_t index=0 );
48
49 void DoCleanUpAfterOneEvent();
50
51 void AddCutMgr ( AliRsnCutMgr* theValue );
52 AliRsnCutMgr* GetCutMgr ( Int_t index ) { return ( AliRsnCutMgr* ) fCutMgrs.At ( index );}
53 TObjArray* GetCutMgr () { return &fCutMgrs;}
54 Int_t GetNumOfCutMgr () { return fCutMgrs.GetEntriesFast();}
55
56 void SetMass ( Double_t theValue ) { fMass[0] = theValue; fMass[1] = theValue;}
57 void SetMass ( Double_t theValue , Int_t index ) { fMass[index] = theValue; }
58 Double_t GetMass ( Int_t index=0 ) const { return fMass[index]; }
59
60 TString GetEffMassHistName ( Int_t index = 0 );
61 TString GetEffMassHistTitle ( Int_t index = 0 );
62
63 void SetNumOfMixEvent ( const Int_t& theValue ) { fNumOfMixEvent = theValue; }
64 Int_t GetNumOfMixEvent() const { return fNumOfMixEvent;}
65
66 void SetIsFilledOnlyInHistRange ( const Bool_t& theValue ) { fIsFilledOnlyInHistRange = theValue; }
67
68 void PrepareMixForPair ( AliRsnEvent * event,TTree *tree );
69
70 void SetRsnMVEventBuffer ( AliRsnEventBuffer* theValue ) { fRsnMVEventBuffer = theValue; }
71 AliRsnEventBuffer* GetRsnMVEventBuffer() const { return fRsnMVEventBuffer; }
72
73
74 private:
75
76 AliRsnPairDef fPairDef; // pair definition
77 AliRsnPair::EPairType fPairType; // pair type
78
79 AliRsnCutMgr *fCurrentCutMgr; // cut manager
80 TObjArray fCutMgrs; // array of cuts
81
82 Double_t fMass[2]; // mass for nopid
83
84 AliRsnPairParticle fEffMassParticle;
85
86 Int_t fNumOfMixEvent; // number of events to be mix with current one
87 AliRsnEventBuffer *fRsnMVEventBuffer; // event buffer for event mixing
88
89 Bool_t fIsSignSame; // flag for same sign
90
91 Bool_t fIsFilledOnlyInHistRange; // flag filling histogram
92
93 void DoLoopPairESD ( AliRsnEvent *event1, TArrayI *array1,AliRsnEvent *event2, TArrayI *array2 ,TH1F *hist,Int_t index=0 );
94 void DoLoopPairMC ( AliRsnEvent *event1, TArrayI*array1,AliRsnEvent *event2, TArrayI*array2 ,TH1F *hist,Int_t index=0 );
95
96 void DoESDNoPID ( AliRsnEvent *event,TH1F *hist ,Int_t index=0 );
97 void DoESDNoPIDMix ( AliRsnEvent *event,TH1F *hist,Int_t index=0 );
98 void DoESDNormal ( AliRsnEvent *event,TH1F *hist,Int_t index=0 );
99 void DoESDMix ( AliRsnEvent *event,TH1F *hist,Int_t index=0 );
100
101 void DoMCNoPID ( AliRsnEvent *event,TH1F *hist,Int_t index=0 );
102 void DoMCNormal ( AliRsnEvent *event,TH1F *hist,Int_t index=0 );
0cf0c402 103
0f7f8d16 104 ClassDef ( AliRsnPair, 1 );
0cf0c402 105};
106
107#endif