]> git.uio.no Git - u/mrichter/AliRoot.git/blob - PWG3/hfe/AliHFEV0cuts.h
Major update of the HFE package (comments inside the code
[u/mrichter/AliRoot.git] / PWG3 / hfe / AliHFEV0cuts.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 // Class for the V0 cuts - tuned to obtain clean eletron, pion and proton samples.
17 // NOT suitable for V0 analysis
18 //
19 #ifndef ALIHFEV0CUTS_H
20 #define ALIHFEV0CUTS_H
21
22 #include "AliHFEcollection.h"
23
24 class TList;
25
26 class AliMCParticle;
27 class AliVEvent;
28 class AliMCEvent;
29 class AliESDtraack;
30 class AliESDv0;
31 class AliKFVertex;
32 class AliKFParticle;
33 class AliVTrack;
34
35 class AliHFEV0cuts : public TObject {
36  public:
37   enum{ // Reconstructed V0
38     kUndef = 0,
39       kRecoGamma = 1,
40       kRecoK0 = 2,
41       kRecoPhi = 3,
42       kRecoLambda = 4,
43       kRecoALambda = -4
44       
45       };
46   enum{ // Identified Daughter particles
47     kRecoElectron = 0,
48       kRecoPionK0 = 1,
49       kRecoPionL = 2,
50       kRecoKaon = 3,
51       kRecoProton = 4
52       };
53   AliHFEV0cuts();
54   ~AliHFEV0cuts();
55   AliHFEV0cuts(const AliHFEV0cuts &ref);
56   AliHFEV0cuts &operator=(const AliHFEV0cuts &ref);
57
58   void Init(const char* name);
59   
60   void RunQA();
61   void SetMCEvent(AliMCEvent* const mce)      { fMCEvent = mce; };
62   void SetInputEvent(AliVEvent* const e)      { fInputEvent = e; };
63   void SetPrimaryVertex(AliKFVertex* const v) { fPrimaryVertex = v; };
64   
65   TList* GetList()    { return fQA->GetList(); };
66   TList* GetListMC()  { return fQAmc->GetList(); };
67   
68   Bool_t   TrackCutsCommon(AliESDtrack* track);
69   Bool_t   V0CutsCommon(AliESDv0 *v0);
70   Bool_t   GammaCuts(AliESDv0 *v0);
71   Bool_t   K0Cuts(AliESDv0 *v0);
72   Bool_t   LambdaCuts(AliESDv0 *v0, Bool_t &isLambda);
73  
74   Bool_t LooseRejectK0(AliESDv0 * const v0) const;
75   Bool_t LooseRejectLambda(AliESDv0 * const v0) const;
76   Bool_t LooseRejectGamma(AliESDv0 * const v0) const;
77
78   void     Armenteros(AliESDv0 *v0, Float_t val[2]);
79
80   Double_t OpenAngle(AliESDv0 *v0) const;//opening angle between V0 daughters; close to zero for conversions
81   Double_t PsiPair(AliESDv0 *v0);
82   
83   Bool_t   CheckSigns(AliESDv0* const v0);
84   Bool_t   GetConvPosXY(AliESDtrack * const ptrack, AliESDtrack * const ntrack, Double_t convpos[2]);
85   Bool_t   GetHelixCenter(AliESDtrack * const track, Double_t b,Int_t charge, Double_t center[2]);
86
87
88   // MC stuff
89   void     SetCurrentV0id(Int_t id) { fCurrentV0id = id; };
90   void     SetDaughtersID(Int_t d[2]) {fPdaughterPDG = d[0]; fNdaughterPDG = d[1]; };
91   
92   AliKFParticle *CreateMotherParticle(AliVTrack* const pdaughter, AliVTrack* const ndaughter, Int_t pspec, Int_t nspec);
93
94  private:
95   void Copy(TObject &ref) const;
96       
97  private:
98   
99   AliHFEcollection     *fQA;            // store QA cut histograms
100   AliHFEcollection     *fQAmc;          // store 
101   AliMCEvent           *fMCEvent;       // MC event
102   AliVEvent            *fInputEvent;    // Input Event
103   AliKFVertex          *fPrimaryVertex; // primary vertex
104
105   Int_t                fCurrentV0id;   // MC flagged V0    
106   Int_t                fPdaughterPDG;   // MC id of the positive daugeter
107   Int_t                fNdaughterPDG;   // MC id of the negative daugeter
108
109
110   ClassDef(AliHFEV0cuts, 1)
111 };
112     
113
114 #endif