]> git.uio.no Git - u/mrichter/AliRoot.git/blame - PWGLF/RESONANCES/AliRsnCutV0.h
Updated macros for lego_train phi analysis (mvala)
[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;}
9d4bb6d8 33 void SetMinTPCcluster(Int_t value) {fMinTPCcluster = value;}
3da8cef7 34 void SetMaxRapidity(Double_t value) {fMaxRapidity = value;}
35
36 void SetPIDCut1(Double_t value) {fPIDCut1 = value;}
37 void SetPIDCut2(Double_t value) {fPIDCut2 = value;}
38 void SetPIDCut3(Double_t value) {fPIDCut3 = value;}
8082e538 39
76d89202 40 AliRsnCutTrackQuality *CutQuality() {return &fCutQuality;}
41 void SetAODTestFilterBit(Int_t value) {fAODTestFilterBit = value;}
42 Int_t GetAODTestFilterBit() {return fAODTestFilterBit;}
43
8082e538 44 virtual Bool_t IsSelected(TObject *obj);
45 virtual void Print(const Option_t *option = "") const;
46
47protected:
48
49 Bool_t CheckESD(AliESDv0 *track);
50 Bool_t CheckAOD(AliAODv0 *track);
61f275d1 51
8082e538 52 Int_t fHypothesis; // PDG code corresponding to expected V0 hypothesis
53 Double_t fMass; // mass corresponding to hypothesis
54 Double_t fTolerance; // tolerance in the difference between computed and expected mass
55 Double_t fMaxDCAVertex; // max allowed DCA from primary vertex
56 Double_t fMinCosPointAngle; // min allowed cosine of pointing angle
57 Double_t fMaxDaughtersDCA; // max allowed DCA between the two daughers
9d4bb6d8 58 Int_t fMinTPCcluster; // min allowed TOC cluster
3da8cef7 59 Double_t fMaxRapidity; // max allowed V0 rapidity
60
61 AliPID::EParticleType fPID; // PID for track
62 AliPID::EParticleType fPID2; // PID for track
63
64 Double_t fPIDCut1; // nsigmas for protons < 600 MeV/c
65 Double_t fPIDCut2; // nsigmas for protons > 600 MeV/c
66 Double_t fPIDCut3; // nsigmas for pions
67
8082e538 68
69 AliESDtrackCuts *fESDtrackCuts; // quality cuts for v0 daughters
70
76d89202 71 AliRsnCutTrackQuality fCutQuality; // track quality cut
e6952ec7 72 Int_t fAODTestFilterBit; // test filter bit for AODs
76d89202 73
8082e538 74 ClassDef(AliRsnCutV0, 1)
75};
76
77//__________________________________________________________________________________________________
78inline void AliRsnCutV0::SetHypothesis(Int_t code)
79{
80//
81// Assign a V0 species hypothesis, which also assign the expected mass
82//
83
84 fHypothesis = code;
61f275d1 85
8082e538 86 switch (fHypothesis) {
87 case kLambda0:
3da8cef7 88 fMass = 1.11568;
74d60285 89 break;
8082e538 90 case kLambda0Bar:
91 fMass = 1.11568;
92 break;
93 case kK0Short:
94 fMass = 0.497614;
95 break;
96 default:
97 AliError(Form("You are setting an unexpected hypothesis: %d", fHypothesis));
98 fMass = 1E20;
99 }
100}
101
102#endif