AliPhysics  a1733f5 (a1733f5)
 All Classes Namespaces Files Functions Variables Typedefs Enumerations Enumerator Friends Macros Groups Pages
AliFilteredTreeEventCuts.h
Go to the documentation of this file.
1 #ifndef ALIFILTEREDTREEEVENTCUTS_H
2 #define ALIFILTEREDTREEEVENTCUTS_H
3 
4 //------------------------------------------------------------------------------
5 // Class to keep event selection cuts for dNdPt analysis.
6 //
7 // Author: J.Otwinowski 01/11/2008
8 //------------------------------------------------------------------------------
9 
10 #include "AliAnalysisCuts.h"
11 
12 class AliESDEvent;
13 class AliESDVertex;
14 class AliMCEvent;
15 class AliHeader;
16 class AliGenEventHeader;
17 class AliStack;
18 
19 class AliFilteredTreeEventCuts : public AliAnalysisCuts
20 {
21 public:
22  AliFilteredTreeEventCuts(const Char_t* name ="AliFilteredTreeEventCuts", const Char_t *title ="");
23  virtual ~AliFilteredTreeEventCuts();
24 
25  //TODO: copied from AliPWG0Helper, find a more central place for these
26  enum AnalysisMode { kInvalid = -1, kSPD = 0x1, kTPC = 0x2, kTPCITS = 0x4, kFieldOn = 0x8, kSPDOnlyL0 = 0x10, kTPCSPD = 0x20};
27  enum MCProcessType { kInvalidProcess = -1, kND = 0x1, kDD = 0x2, kSD = 0x4, kOnePart = 0x8 };
29 
30  // setters
31  void SetTriggerRequired(Bool_t bFlag=kTRUE) {fTriggerRequired=bFlag;}
32  void SetRecVertexRequired(Bool_t bFlag=kTRUE) {fRecVertexRequired=bFlag;}
35  void SetMaxR(Float_t max=1e99) {fMaxR=max;}
36  void SetZvRange(Float_t min=-1e99, Float_t max=1e99) {fMinZv=min; fMaxZv=max;}
37 
38  void SetMeanXYZv(Float_t xv=0.0, Float_t yv=0.0, Float_t zv=0.0) {
39  fMeanXv = xv; fMeanYv = yv; fMeanZv = zv;
40  }
41 
42  void SetSigmaMeanXYZv(Float_t sxv=1.0, Float_t syv=1.0, Float_t szv=10.0) {
43  fSigmaMeanXv = sxv; fSigmaMeanYv = syv; fSigmaMeanZv = szv;
44  }
45 
46 
47  void SetRedoTPCVertex(Bool_t redo = kTRUE) {fRedoTPCVertex = redo;}
48  void SetUseBeamSpotConstraint(Bool_t useConstr = kTRUE) {fUseBeamSpotConstraint = useConstr;}
49  void SetEventSelectedRequired(Bool_t evtSel = kTRUE) {fEventSelectedRequired = evtSel;}
50 
51 
52  // getters
59  Float_t GetMaxR() const {return fMaxR;}
60  Float_t GetMinZv() const {return fMinZv;}
61  Float_t GetMaxZv() const {return fMaxZv;}
62 
63  Float_t GetMeanXv() const {return fMeanXv;}
64  Float_t GetMeanYv() const {return fMeanYv;}
65  Float_t GetMeanZv() const {return fMeanZv;}
66 
70 
73 
74 
75  // cuts init function
76  void Init();
77 
78  // check MC tracks
79  Bool_t IsSelected(TObject *) {return kTRUE;}
80  Bool_t IsSelected(TList *) {return kTRUE;}
81 
82  // accept event
83  Bool_t AcceptEvent(AliESDEvent *event=0, AliMCEvent *mcEvent=0, const AliESDVertex *vtx=0);
84  Bool_t AcceptMCEvent(AliMCEvent *mcEvent=0);
85 
86  // Merge output objects (needed by PROOF)
87  virtual Long64_t Merge(TCollection* list);
88 
89  //statics copied from AliPWG0Helper
90  static MCProcessType GetEventProcessType(AliESDEvent* esd, AliHeader* header, AliStack* stack, DiffTreatment diffTreatment);
91  static MCProcessType GetEventProcessType(AliHeader* aHeader, Bool_t adebug = kFALSE);
92  static MCProcessType GetPythiaEventProcessType(AliGenEventHeader* aHeader, Bool_t adebug = kFALSE);
93  static MCProcessType GetDPMjetEventProcessType(AliGenEventHeader* aHeader, Bool_t adebug = kFALSE);
94  static Bool_t IsHadronLevelSingleDiffractive(AliStack* stack, Float_t cms, Float_t xiMin, Float_t xiMax);
95  static Double_t Rapidity(Double_t pt, Double_t pz, Double_t m);
96 protected:
97  static Int_t fgLastProcessType; // stores the raw value of the last process type extracted
98  //
99 
100 private:
101  Bool_t fTriggerRequired; // trigger required
102  Bool_t fRecVertexRequired; // reconstructed event vertex required
103  Int_t fEventProcessType; // select MC event process type (ND, SD, DD)
104  Float_t fMinNContributors; // min. number of contributing vertex tracks
105  Float_t fMaxNContributors; // max. number of contributing vertex tracks
106  Float_t fMaxR; // max. vertex radii (R = sqrt(Xv^2+Yv^2)
107  Float_t fMinZv; // min. Zv vertex
108  Float_t fMaxZv; // max. Zv vertex
109 
110  // interaction spot constraint
111  Float_t fMeanXv; // mean Xv position
112  Float_t fMeanYv; // mean Yv position
113  Float_t fMeanZv; // mean Zv position
114 
115  Float_t fSigmaMeanXv; // sigma mean Xv position
116  Float_t fSigmaMeanYv; // sigma mean Yv position
117  Float_t fSigmaMeanZv; // sigma mean Zv position
118 
119  Bool_t fRedoTPCVertex; // redo vertex
120  Bool_t fUseBeamSpotConstraint; // use beam spot contraints
121 
122  Bool_t fEventSelectedRequired; // event with at least one track (pT>0.5 GeV, |eta|<0.8) required
123 
124  AliFilteredTreeEventCuts(const AliFilteredTreeEventCuts&); // not implemented
125  AliFilteredTreeEventCuts& operator=(const AliFilteredTreeEventCuts&); // not implemented
126 
127  ClassDef(AliFilteredTreeEventCuts, 1)
128 };
129 
130 #endif // ALIFILTEREDTREEEVENTCUTS_H
void SetRedoTPCVertex(Bool_t redo=kTRUE)
void SetEventProcessType(MCProcessType type=kInvalidProcess)
double Double_t
Definition: External.C:58
const char * title
Definition: MakeQAPdf.C:27
long long Long64_t
Definition: External.C:43
AliFilteredTreeEventCuts(const Char_t *name="AliFilteredTreeEventCuts", const Char_t *title="")
char Char_t
Definition: External.C:18
void SetUseBeamSpotConstraint(Bool_t useConstr=kTRUE)
static MCProcessType GetPythiaEventProcessType(AliGenEventHeader *aHeader, Bool_t adebug=kFALSE)
void SetEventSelectedRequired(Bool_t evtSel=kTRUE)
void SetZvRange(Float_t min=-1e99, Float_t max=1e99)
static Bool_t IsHadronLevelSingleDiffractive(AliStack *stack, Float_t cms, Float_t xiMin, Float_t xiMax)
AliStack * stack
int Int_t
Definition: External.C:63
void SetSigmaMeanXYZv(Float_t sxv=1.0, Float_t syv=1.0, Float_t szv=10.0)
float Float_t
Definition: External.C:68
void SetNContributorsRange(Float_t min=0., Float_t max=1e99)
void SetMaxR(Float_t max=1e99)
static MCProcessType GetDPMjetEventProcessType(AliGenEventHeader *aHeader, Bool_t adebug=kFALSE)
void SetRecVertexRequired(Bool_t bFlag=kTRUE)
virtual Long64_t Merge(TCollection *list)
AliFilteredTreeEventCuts & operator=(const AliFilteredTreeEventCuts &)
void SetTriggerRequired(Bool_t bFlag=kTRUE)
void SetMeanXYZv(Float_t xv=0.0, Float_t yv=0.0, Float_t zv=0.0)
Bool_t AcceptMCEvent(AliMCEvent *mcEvent=0)
bool Bool_t
Definition: External.C:53
Bool_t AcceptEvent(AliESDEvent *event=0, AliMCEvent *mcEvent=0, const AliESDVertex *vtx=0)
static Double_t Rapidity(Double_t pt, Double_t pz, Double_t m)