]> git.uio.no Git - u/mrichter/AliRoot.git/blob - PWGHF/hfe/AliHFENonPhotonicElectron.h
Yvonne for the TPC-TOF MB pPb analysis
[u/mrichter/AliRoot.git] / PWGHF / hfe / AliHFENonPhotonicElectron.h
1 #ifndef ALIHFENONPHOTONICELECTRON_H
2 #define ALIHFENONPHOTONICELECTRON_H
3
4  /************************************************************************************
5   *                                                                                     *
6   *     Copyright(c) 1998-1999, ALICE Experiment at CERN, All rights reserved.  *
7   *     See cxx source for full Copyright notice                                        *
8   *                                                                                     *
9   *                                                                                     *
10   *                                                                                     *
11   *     Task for the Selection of Non-photonic Electron study                           *
12   *                                                                                     *
13   *                     Author: R.Bailhache, C.A.Schmidt                                *
14   *                                                                                     *
15   ************************************************************************************/
16
17 #ifndef ROOT_TNamed
18 #include <TNamed.h>
19 #endif
20
21 #ifndef ROOT_TArrayD
22 #include <TArrayD.h>
23 #endif
24
25 class AliESDtrackCuts;
26 class AliHFEpid;
27 class AliHFEpidQAmanager;
28 class AliMCEvent;
29 class AliKFVertex;
30 class AliVEvent;
31 class AliVParticle;
32 class AliVTrack;
33 class THnSparse;
34 class TClonesArray;
35 class TList;
36
37 class AliHFENonPhotonicElectron : public TNamed {
38  public:
39
40   typedef enum{
41     kElectronfromconversion = 0,
42     kElectronfromconversionboth = 1,
43     kElectronfrompi0 = 2,
44     kElectronfrompi0both = 3,
45     kElectronfrometa = 4,
46     kElectronfrometaboth = 5,
47     kElectronfromC = 6,
48     kElectronfromB = 7,
49     kElectronfromother = 8,
50     kNoElectron = 9
51   } Source_t;
52
53   typedef enum{
54     kS = 0,
55     kOp = 1
56   } Sign_t;
57
58   AliHFENonPhotonicElectron();
59   AliHFENonPhotonicElectron(const char *name, const Char_t *title);
60   AliHFENonPhotonicElectron &operator=(const AliHFENonPhotonicElectron &ref);
61   virtual ~AliHFENonPhotonicElectron();
62
63   void SetAOD                   (Bool_t isAOD)                  { fIsAOD = isAOD; };
64   void SetMCEvent               (AliMCEvent *mcEvent)           { fMCEvent = mcEvent; };
65   void SetAODArrayMCInfo        (TClonesArray *aodArrayMCInfo) { fAODArrayMCInfo = aodArrayMCInfo; };
66   void SetHFEBackgroundCuts     (AliHFEcuts * const cuts)       { fHFEBackgroundCuts = cuts; };
67
68   AliHFEpid             *GetPIDBackground()             const   { return fPIDBackground; };
69   AliHFEpidQAmanager    *GetPIDBackgroundQAManager()    const   { return fPIDBackgroundQA; };
70
71   void  SetMaxInvMass           (Double_t MaxInvMass)           { fMaxInvMass           = MaxInvMass; };
72   void  SetMaxOpening3D         (Double_t MaxOpening3D)         { fMaxOpening3D         = MaxOpening3D; };
73 //  void  SetMaxOpeningTheta    (Double_t MaxOpeningTheta)      { fMaxOpeningTheta      = MaxOpeningTheta; };
74 //  void  SetMaxOpeningPhi      (Double_t MaxOpeningPhi)        { fMaxOpeningPhi        = MaxOpeningPhi; };
75   void  SetAlgorithmMA          (Bool_t algorithmMA)            { fAlgorithmMA          = algorithmMA; };
76   void  SetMassConstraint       (Bool_t MassConstraint)         { fSetMassConstraint    = MassConstraint; };
77   void  SetITSMeanShift(Double_t meanshift) { fITSmeanShift = meanshift; }
78
79   void SelectCategory1Tracks(Bool_t doSelect = kTRUE) { fSelectCategory1tracks = doSelect; }
80   void SelectCategory2Tracks(Bool_t doSelect = kTRUE) { fSelectCategory2tracks = doSelect; }
81
82   TList      *GetListOutput()           const   { return fListOutput; };
83   THnSparseF *GetAssElectronHisto()     const   { return fAssElectron; };
84   THnSparseF *GetIncElectronHisto()     const   { return fIncElectron; };
85   THnSparseF *GetUSignHisto()           const   { return fUSign; };
86   THnSparseF *GetLSignHisto()           const   { return fLSign; };
87 //  THnSparseF *GetUSignAngleHisto() const { return fUSignAngle; };
88 //  THnSparseF *GetLSignAngleHisto() const { return fLSignAngle; };
89
90   void     Init                         ();
91   void     InitRun                      (const AliVEvent *inputEvent, const AliPIDResponse *pidResponse);
92   Int_t    FillPoolAssociatedTracks     (AliVEvent *inputEvent, Int_t binct=-1);
93   Int_t    CountPoolAssociated          (AliVEvent *inputEvent, Int_t binct=-1);
94   Int_t    LookAtNonHFE                 (Int_t iTrack1, AliVTrack *track1, AliVEvent *vEvent, Double_t weight=1., Int_t binct=-1, Double_t deltaphi=-1, Int_t source=-1, Int_t indexmother=-1);
95
96   Int_t    FindMother           (Int_t tr, Int_t &indexmother) const;
97
98   void SetPtBinning(const TArrayD &binning) { fPtBinning = binning; }
99   void SetPtBinning(Int_t nbins, const Double_t *const binning) { fPtBinning.Set(nbins+1, binning); }
100   void SetEtaBinning(const TArrayD &binning) { fEtaBinning = binning; }
101   void SetEtaBinning(Int_t nbins, const Double_t *const binning) { fEtaBinning.Set(nbins+1, binning); }
102
103
104  private:
105   Int_t    GetMotherPDG(Int_t tr, Int_t &motherIndex) const;
106   Int_t    CheckPdg             (Int_t tr) const;
107   Int_t    IsMotherGamma        (Int_t tr) const;
108   Int_t    IsMotherPi0          (Int_t tr) const;
109   Int_t    IsMotherC            (Int_t tr) const;
110   Int_t    IsMotherB            (Int_t tr) const;
111   Int_t    IsMotherEta          (Int_t tr) const;
112   Bool_t MakePairDCA(const AliVTrack *inclusive, const AliVTrack *associated, AliVEvent *vEvent, Bool_t isAOD, Double_t &invMass, Double_t &angle) const;
113   Bool_t MakePairKF(const AliVTrack *inclusive, const AliVTrack *associated, AliKFVertex &primV, Double_t &invMass, Double_t &angle) const;
114   Bool_t FilterCategory1Track(const AliVTrack * const track, Bool_t isAOD, Int_t binct);
115   Bool_t FilterCategory2Track(const AliVTrack * const track, Bool_t isAOD);
116
117   Bool_t                    fIsAOD;                         // Is AOD
118   AliMCEvent                *fMCEvent;                      //! MC event ESD
119   TClonesArray              *fAODArrayMCInfo;               //! MC info particle AOD
120   AliHFEcuts                *fHFEBackgroundCuts;            // HFE background cuts
121   AliHFEpid                     *fPIDBackground;                // PID background cuts
122   AliHFEpidQAmanager        *fPIDBackgroundQA;              // QA Manager Background
123   const AliPIDResponse      *fkPIDRespons;                  // PID response
124   TArrayD                   fPtBinning;                     // pt binning
125   TArrayD                   fEtaBinning;                    // eta binning
126   Bool_t                    fAlgorithmMA;                   // algorithm MA
127   Double_t                  fChi2OverNDFCut;                // Limit chi2
128   Double_t                  fMaxDCA;                        // Limit dca
129 //  Double_t                fMaxOpeningTheta;               // Limit opening angle in theta
130 //  Double_t                fMaxOpeningPhi;                 // Limit opening angle in phi
131   Double_t                  fMaxOpening3D;                  // Limit opening 3D
132   Double_t                  fMaxInvMass;                    // Limit invariant mass
133   Bool_t                    fSetMassConstraint;             // Set mass constraint
134   Bool_t                    fSelectCategory1tracks;         // Category 1 tracks: Standard track cuts
135   Bool_t                    fSelectCategory2tracks;         // Category 2 tracks: tracks below 300 MeV/c
136   Double_t                  fITSmeanShift;                  // Shift of the mean in the ITS
137   TArrayI                   *fArraytrack;                   //! list of associated tracks
138   Int_t                     fCounterPoolBackground;         // number of associated electrons
139   Int_t                     fnumberfound;                   // number of inclusive  electrons
140   TList                     *fListOutput;                   // List of histos
141   THnSparseF                *fAssElectron;                  //! centrality, pt, Source MC, P, TPCsignal
142   THnSparseF                *fIncElectron;                  //! centrality, pt, Source MC, P, TPCsignal
143   THnSparseF                *fUSign;                        //! delta phi, c, pt, inv, source
144   THnSparseF                *fLSign;                        //! delta phi, c, pt, inv, source
145   THnSparseF                *fUSmatches;                    //! number of matched tracks with oposite sign per inclusive track after inv mass cut
146   THnSparseF                *fLSmatches;                    //! number of matched tracks with same sign per inclusive track after inv mass cut
147   TH2F*                     fHnsigmaITS;                    //! Control histogram for ITS pid of category 2 tracks
148 //  THnSparseF              *fUSignAngle;                   //! angle, c, source
149 //  THnSparseF              *fLSignAngle;                   //! angle, c, source
150
151
152   AliHFENonPhotonicElectron(const AliHFENonPhotonicElectron &ref); 
153
154   ClassDef(AliHFENonPhotonicElectron, 2); //!example of analysis
155 };
156
157 #endif