]> git.uio.no Git - u/mrichter/AliRoot.git/blob - PWG3/hfe/AliHFEelecbackground.h
Fixes to cure warnings
[u/mrichter/AliRoot.git] / PWG3 / hfe / AliHFEelecbackground.h
1 /**************************************************************************
2  * Copyright(c) 1998-1999, ALICE Experiment at CERN, All rights reserved. *
3  *                                                                        *
4  * Author: The ALICE Off-line Project.                                    *
5  * Contributors are mentioned in the code where appropriate.              *
6  *                                                                        *
7  * Permission to use, copy, modify and distribute this software and its   *
8  * documentation strictly for non-commercial purposes is hereby granted   *
9  * without fee, provided that the above copyright notice appears in all   *
10  * copies and that both the copyright notice and this permission notice   *
11  * appear in the supporting documentation. The authors make no claims     *
12  * about the suitability of this software for any purpose. It is          *
13  * provided "as is" without express or implied warranty.                  *
14  **************************************************************************/
15 //
16 //  Secondary vertexing construction Class
17 //  Construct secondary vertex from Beauty hadron with electron and
18 //  hadrons, then apply selection criteria
19 //
20
21 #ifndef ALIHFEELECBACKGROUND_H
22 #define ALIHFEELECBACKGROUND_H
23
24 #ifndef ROOT_TObject
25 //#include <TObject.h>
26 #endif
27
28 class AliESDEvent;
29 class AliESDpid;
30 class AliESDVertex;
31 class AliAODEvent;
32 class AliESDtrack;
33 class AliAODTrack;
34 class AliMCEvent;
35
36 class AliHFEpid;
37
38
39 //________________________________________________________________
40 class AliHFEelecbackground : public TObject {
41   public: 
42     AliHFEelecbackground();
43     AliHFEelecbackground(const AliHFEelecbackground &p);
44     AliHFEelecbackground &operator=(const AliHFEelecbackground &);
45     virtual ~AliHFEelecbackground();
46                 virtual Bool_t Load(const Char_t *filename);
47                 virtual Bool_t Load(TList * const outputlist);
48
49     void CreateHistograms(TList * const qaList);
50                 void Reset();
51
52     Bool_t HasMCData() const { return TestBit(kHasMCData); };
53     Bool_t IsAODanalysis() const { return TestBit(kAODanalysis); };
54     Bool_t IsESDanalysis() const { return !TestBit(kAODanalysis); };
55
56     void SetHasMCData(Bool_t hasMCdata = kTRUE) { SetBit(kHasMCData,hasMCdata); };
57     void SetAODAnalysis() { SetBit(kAODanalysis, kTRUE); };
58     void SetESDAnalysis() { SetBit(kAODanalysis, kFALSE); };
59     void SetEvent(AliESDEvent* const ESD); 
60     void SetEventAOD(AliAODEvent* const AOD){fAOD1=AOD;}; 
61     void SetMCEvent(AliMCEvent* const mcEvent){fMCEvent=mcEvent;};  
62
63     void SetOpeningAngleCut(Double_t openingAngleCut){fOpeningAngleCut = openingAngleCut;};
64                 void SetInvMassCut(Double_t invMassCut){fInvMassCut = invMassCut;};
65                 void SetChi2NdfCut(Double_t chi2NdfCut){fChi2NdfCut = chi2NdfCut;};
66                 void SetUseAliKFCode(Bool_t useAliKFCode){fUseAliKFCode = useAliKFCode;};    
67                 void SetSharedClusterCut(Bool_t sharedClusterCut){fSharedClusterCut = sharedClusterCut;};
68                 void SetRequireITSStandalone(Short_t requireITSStandalone){fRequireITSStandalone = requireITSStandalone;};
69                 void SetMinITSChi2(Double_t minITSChi2) {fMinITSChi2 = minITSChi2;};
70                 void SetMinNbCls(Int_t minNbCls){fMinNbCls = minNbCls;};
71                 void SetMinNbClsSDDSPD(Int_t minNbClsSDDSPD){fMinNbClsSDDSPD = minNbClsSDDSPD;};
72                 void SetPIDPartner();
73                 void SetPIDMethodPartner(AliHFEpid * const pid) {fPIDMethodPartner = pid;};
74                 void SetPIDMethodPartnerITS(AliESDpid * const pid) {fPIDMethodPartnerITS = pid;};
75                 void SetDebugLevel(Short_t debugLevel) { fDebugLevel = debugLevel;};
76         
77                 Double_t GetOpeningAngleCut() const { return fOpeningAngleCut; };
78                 Double_t GetInvMassCut() const { return fInvMassCut; };
79                 Double_t GetChi2NdfCut() const { return fChi2NdfCut; };
80                 Bool_t GetUseAliKFCode() const { return fUseAliKFCode; };
81                 Bool_t GetSharedClusterCut() const { return fSharedClusterCut; };
82                 Short_t GetRequireITSStandalone() const { return fRequireITSStandalone; };
83                 Int_t GetMinNbCls() const { return fMinNbCls;};
84                 Double_t GetMinITSChi2() const { return fMinITSChi2; };
85                 Int_t GetMinNbClsSDDSPD() const { return fMinNbClsSDDSPD;};
86                 Bool_t GetPIDPartner() const { return fPIDPartner;};
87
88                 TList *GetList()  const           { return fList; };
89                 TList *GetListPostProcess() const { return fListPostProcess; };
90
91                 Bool_t SingleTrackCut(AliESDtrack* const trackPart) const;
92                 Bool_t ShareCluster(AliESDtrack * const track1,AliESDtrack * const track2) const; 
93                 Bool_t PIDTrackCut(AliESDtrack* const trackPart);
94                 void PairAnalysis(AliESDtrack* const track, AliESDtrack* const trackpart); 
95                 void FillOutput(Double_t *results, Double_t *resultsr, Int_t sign); 
96     void PostProcess();
97                 void Plot() const;
98
99  private:
100     enum{
101       kHasMCData = BIT(15),             // bitset for mc data usage
102                   kAODanalysis = BIT(16)            // bitset for aod analysis
103                 };
104                 enum {kDatai=0, kDatar=1, kDatadca=2, kDatachi2Ndf=3, kMCo=4, kMCr=5, kMCdca=6, kMCchi2Ndf=7, kMCe=8, kMCcutPart0=9, kMCcutPart1=10, kMCcutPart2=11, kMCcutPart3=12};   // In the fList Data/MC
105                 enum {kOs=0, kPp=1, kNn=2, kR=3};            // In the last dimension Charge
106                 enum {kOos=0, kOss=1, kOr=2, kOdiff=3};      // outputs 
107                 enum {kNOutput=4,kNMCInfo=5};                // Nb of outputs
108                 enum{
109                   kElectronFromBackground = 0,
110                   kElectronFromGamma = 1,
111                   kElectronFromPi0 = 2,
112                   kElectronFromEta = 3,
113                   kElectronFromC = 4,
114                   kElectronFromB = 5              
115                 };                                // MC: Origin 
116                 enum {kNotSplitted=0, kSplittedOs=1, kSplittedSs=2}; // MC: splitted 
117                 
118                 Bool_t CalculateMotherVariable(AliESDtrack* const track, AliESDtrack* const trackpart, Double_t *results);
119                 void CalculateMotherVariableR(AliESDtrack* const track, AliESDtrack* const trackpart, Double_t *results);
120                 Int_t IsMotherGamma(Int_t tr);
121                 Int_t IsMotherPi0(Int_t tr);
122                 Int_t IsMotherEta(Int_t tr);
123                 Int_t IsMotherC(Int_t tr);
124                 Int_t IsMotherB(Int_t tr);
125                 Int_t GetPdg(Int_t tr);
126                 Int_t GetLabMother(Int_t tr);
127                 
128           static Double_t BetheBlochElectronITS(const Double_t *x, const Double_t * /*par*/);
129                 static Double_t BetheBlochMuonITS(const Double_t *x, const Double_t * /*par*/);
130                 static Double_t BetheBlochPionITS(const Double_t *x, const Double_t * /*par*/);
131                 static Double_t BetheBlochKaonITS(const Double_t *x, const Double_t * /*par*/);
132                 static Double_t BetheBlochProtonITS(const Double_t *x, const Double_t * /*par*/); 
133
134                 static Double_t BetheBlochElectronTPC(const Double_t *x, const Double_t * /*par*/);
135                 static Double_t BetheBlochMuonTPC(const Double_t *x, const Double_t * /*par*/);
136                 static Double_t BetheBlochPionTPC(const Double_t *x, const Double_t * /*par*/);
137                 static Double_t BetheBlochKaonTPC(const Double_t *x, const Double_t * /*par*/);
138                 static Double_t BetheBlochProtonTPC(const Double_t *x, const Double_t * /*par*/); 
139
140     AliESDEvent* fESD1;              //! ESD pointer             
141     AliAODEvent* fAOD1;              //! AOD pointer             
142     AliMCEvent*  fMCEvent;           //! MC event             
143                 Double_t fBz;                    // Magnetic field 
144                 const AliESDVertex *fkVertex;    //! Primary vertex
145                 static const Double_t fgkMe;     //!  Mass of the electron
146                 
147                 Double_t fPtESD;                 //! pt of tagged electron
148                 Int_t fIndexTrack;               //! index track
149                 Int_t fPdg;                      //! pdg code track 
150                 Int_t fLabMother;                //! label first mother track 
151                 Int_t fIsFrom;                   //! is track from
152                 Int_t fMotherGamma;              //! Gamma, mother of track
153                 Int_t fMotherPi0;                //! Pi0, mother of track
154                 Int_t fMotherC;                  //! C, mother of track
155                 Int_t fMotherB;                  //! B, mother of track
156                 Int_t fMotherEta;                //! eta, mother of track
157                 Bool_t fIsPartner;               //! Are partners
158                 Bool_t fIsSplittedTrack;         //! Are splitted track
159    
160                 Double_t fOpeningAngleCut;       //! Opening angle cut
161                 Double_t fInvMassCut;            //! Inv mass cut
162                 Double_t fChi2NdfCut;            //! chi2ndf cut for KF code
163
164                 Bool_t   fUseAliKFCode;          //! Use AliKF code to calculate the pair properties
165
166                 Bool_t  fSharedClusterCut;       //! Shared Cluster Cut
167                 Short_t fRequireITSStandalone;   //! ITS standalone: 1 and 2 (pureITSStandalone)
168                 Int_t  fMinNbCls;                //! Min Nb of clusters ITS or TPC
169                 Double_t fMinITSChi2;            //! ITS chi2 min
170                 Int_t  fMinNbClsSDDSPD;          //! Min Nb of clusters ITS SDD&SPD
171                 Bool_t fPIDPartner;              //! PID partner
172                 AliHFEpid *fPIDMethodPartner;    //! PID cuts
173                 AliESDpid *fPIDMethodPartnerITS; //! PID cuts ITS
174
175                 Short_t fDebugLevel;             //! Debug Level
176
177                 Bool_t   fCuts[10];               //! Cut passed already
178                 
179     TList *fList;                    //! list for outputs
180                 TList *fListPostProcess;         //! list for postprocess
181
182                 static Bool_t  fgUseMCPID;       // flag to use MC PID for tagged electron
183     
184     ClassDef(AliHFEelecbackground,0);
185 };
186
187 #endif