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