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