]> git.uio.no Git - u/mrichter/AliRoot.git/blob - PWGHF/hfe/AliHFEsignalCuts.h
Merge branch 'master' of https://git.cern.ch/reps/AliRoot
[u/mrichter/AliRoot.git] / PWGHF / hfe / AliHFEsignalCuts.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 // Signal cuts
17 // Checks whether a particle (reconstructed or MC) is coming from MC Signal
18 // For more information see implementation file
19 //
20 #ifndef ALIHFESIGNALCUTS_H
21 #define ALIHFESIGNALCUTS_H
22
23 #ifndef ALIANALYSISCUTS_H
24 #include "AliAnalysisCuts.h"
25 #endif
26
27 class TList;
28 class AliMCEvent;
29 class AliVParticle;
30 class AliHFEmcQA;
31 class TClonesArray;
32
33 class AliHFEsignalCuts : public AliAnalysisCuts{
34   public: 
35     enum ESignalSource_t{
36        kEleCharm = 0,
37        kEleBeauty = 1,
38        kEleGamma = 2,
39        kEleNonHFE = 3,
40        kEleJPsi = 4,
41        kEleBtoJPsi = 5,
42        kEleKe3 =6,
43        kOther = 7
44     };
45     AliHFEsignalCuts();
46     AliHFEsignalCuts(const Char_t *name, const Char_t *title);
47     AliHFEsignalCuts(const AliHFEsignalCuts &ref);
48     AliHFEsignalCuts &operator=(const AliHFEsignalCuts &ref);
49     virtual ~AliHFEsignalCuts();
50
51     virtual Bool_t IsSelected(TObject *o);
52     virtual Bool_t IsSelected(TList * /*l*/) { return kTRUE; };
53
54     ESignalSource_t GetSignalSource(const TObject *const o) const;
55
56     Bool_t IsCharmElectron(const TObject * const o) const { return GetSignalSource(o) == kEleCharm; }
57     Bool_t IsBeautyElectron(const TObject * const o) const { return GetSignalSource(o) == kEleBeauty; }
58     Bool_t IsGammaElectron(const TObject * const o) const { return GetSignalSource(o) == kEleGamma; }
59     Bool_t IsNonHFElectron(const TObject * const o) const { return GetSignalSource(o) == kEleNonHFE; }
60     Bool_t IsJpsiElectron(const TObject * const o) const { return GetSignalSource(o) == kEleJPsi; }
61     Bool_t IsB2JpsiElectron(const TObject * const o) const { return GetSignalSource(o) == kEleBtoJPsi; }
62     Bool_t IsKe3Electron(const TObject * const o) const { return GetSignalSource(o) == kEleKe3; }
63
64     /*********************************************
65      *           Old legacy code                 *
66      *********************************************/
67     Bool_t IsCharmElectronOld(const TObject * const o) const;
68     Bool_t IsBeautyElectronOld(const TObject * const o) const;
69     Bool_t IsGammaElectronOld(const TObject * const o) const;
70     Bool_t IsNonHFElectronOld(const TObject * const o) const;
71     Bool_t IsJpsiElectronOld(const TObject * const o) const;
72     Bool_t IsB2JpsiElectronOld(const TObject * const o) const;
73     Bool_t IsKe3ElectronOld(const TObject * const o) const;
74
75     //void SetMCEvent(AliMCEvent *mc) { fMC = mc; }
76     void SetMCEvent(AliMCEvent *mc);
77     void SetMCAODInfo(TClonesArray *mcarray);
78     const AliHFEmcQA *GetMCQAObject() const { return fMCQA; }
79   
80   protected:
81     Int_t GetMotherPDG(const AliVParticle * const track) const;
82     Int_t GetTrackPDG(const AliVParticle * const track) const;
83     Int_t GetElecSource(const AliVParticle * const track) const ;
84
85   private:
86     AliMCEvent *fMC;                   //! MC event
87     TClonesArray *fAODArrayMCInfo;     //! MC info particle AOD
88     AliHFEmcQA *fMCQA;                 //! MC QA
89
90     ClassDef(AliHFEsignalCuts, 3)
91 };
92 #endif
93