]> git.uio.no Git - u/mrichter/AliRoot.git/blame - PWGLF/RESONANCES/AliRsnCutV0.h
Update for centrality patch flag
[u/mrichter/AliRoot.git] / PWGLF / RESONANCES / AliRsnCutV0.h
CommitLineData
8082e538 1#ifndef ALIRSNCUTV0_H
2#define ALIRSNCUTV0_H
3
4#include <TMath.h>
5#include <TString.h>
6
7#include "AliRsnCut.h"
3da8cef7 8#include "AliPIDResponse.h"
8082e538 9
76d89202 10#include "AliRsnCutTrackQuality.h"
11
8082e538 12class AliESDtrack;
13class AliAODTrack;
14
3da8cef7 15
8082e538 16class AliRsnCutV0 : public AliRsnCut {
17
18public:
19
3da8cef7 20
21 //AliRsnCutV0(const char *name = "AliRsnCutV0", Int_t hypothesis = kLambda0);
22 AliRsnCutV0(const char *name = "AliRsnCutV0", Int_t hypothesis = kLambda0, AliPID::EParticleType pid = AliPID::kProton, AliPID::EParticleType pid2 = AliPID::kPion);
61f275d1 23 AliRsnCutV0(const AliRsnCutV0 &copy);
24 AliRsnCutV0 &operator=(const AliRsnCutV0 &copy);
8082e538 25 virtual ~AliRsnCutV0() { }
61f275d1 26
8082e538 27 void SetESDtrackCuts(AliESDtrackCuts *cuts) {fESDtrackCuts = cuts;}
28 void SetHypothesis(Int_t code);
29 void SetTolerance(Double_t value) {fTolerance = value;}
30 void SetMaxDCAVertex(Double_t value) {fMaxDCAVertex = value;}
31 void SetMinCosPointingAngle(Double_t value) {fMinCosPointAngle = value;}
32 void SetMaxDaughtersDCA(Double_t value) {fMaxDaughtersDCA = value;}
3da8cef7 33 void SetMaxRapidity(Double_t value) {fMaxRapidity = value;}
34
35 void SetPIDCut1(Double_t value) {fPIDCut1 = value;}
36 void SetPIDCut2(Double_t value) {fPIDCut2 = value;}
37 void SetPIDCut3(Double_t value) {fPIDCut3 = value;}
8082e538 38
76d89202 39 AliRsnCutTrackQuality *CutQuality() {return &fCutQuality;}
40 void SetAODTestFilterBit(Int_t value) {fAODTestFilterBit = value;}
41 Int_t GetAODTestFilterBit() {return fAODTestFilterBit;}
42
8082e538 43 virtual Bool_t IsSelected(TObject *obj);
44 virtual void Print(const Option_t *option = "") const;
45
46protected:
47
48 Bool_t CheckESD(AliESDv0 *track);
49 Bool_t CheckAOD(AliAODv0 *track);
61f275d1 50
8082e538 51 Int_t fHypothesis; // PDG code corresponding to expected V0 hypothesis
52 Double_t fMass; // mass corresponding to hypothesis
53 Double_t fTolerance; // tolerance in the difference between computed and expected mass
54 Double_t fMaxDCAVertex; // max allowed DCA from primary vertex
55 Double_t fMinCosPointAngle; // min allowed cosine of pointing angle
56 Double_t fMaxDaughtersDCA; // max allowed DCA between the two daughers
3da8cef7 57 Double_t fMaxRapidity; // max allowed V0 rapidity
58
59 AliPID::EParticleType fPID; // PID for track
60 AliPID::EParticleType fPID2; // PID for track
61
62 Double_t fPIDCut1; // nsigmas for protons < 600 MeV/c
63 Double_t fPIDCut2; // nsigmas for protons > 600 MeV/c
64 Double_t fPIDCut3; // nsigmas for pions
65
8082e538 66
67 AliESDtrackCuts *fESDtrackCuts; // quality cuts for v0 daughters
68
76d89202 69 AliRsnCutTrackQuality fCutQuality; // track quality cut
e6952ec7 70 Int_t fAODTestFilterBit; // test filter bit for AODs
76d89202 71
8082e538 72 ClassDef(AliRsnCutV0, 1)
73};
74
75//__________________________________________________________________________________________________
76inline void AliRsnCutV0::SetHypothesis(Int_t code)
77{
78//
79// Assign a V0 species hypothesis, which also assign the expected mass
80//
81
82 fHypothesis = code;
61f275d1 83
8082e538 84 switch (fHypothesis) {
85 case kLambda0:
3da8cef7 86 fMass = 1.11568;
74d60285 87 break;
8082e538 88 case kLambda0Bar:
89 fMass = 1.11568;
90 break;
91 case kK0Short:
92 fMass = 0.497614;
93 break;
94 default:
95 AliError(Form("You are setting an unexpected hypothesis: %d", fHypothesis));
96 fMass = 1E20;
97 }
98}
99
100#endif