]>
Commit | Line | Data |
---|---|---|
563113d0 | 1 | /************************************************************************** |
2 | * Copyright(c) 1998-1999, ALICE Experiment at CERN, All rights reserved. * | |
3 | * * | |
4 | * Author: The ALICE Off-line Project. * | |
5 | * Contributors are mentioned in the code where appropriate. * | |
6 | * * | |
7 | * Permission to use, copy, modify and distribute this software and its * | |
8 | * documentation strictly for non-commercial purposes is hereby granted * | |
9 | * without fee, provided that the above copyright notice appears in all * | |
10 | * copies and that both the copyright notice and this permission notice * | |
11 | * appear in the supporting documentation. The authors make no claims * | |
12 | * about the suitability of this software for any purpose. It is * | |
13 | * provided "as is" without express or implied warranty. * | |
14 | **************************************************************************/ | |
15 | ||
16 | ////////////////////////////////////////////////////////////////////// | |
17 | // AliCFParticleGenCut implementation | |
18 | // This class is designed to handle | |
19 | // particle selection at generated level. | |
20 | // | |
b95f6a36 | 21 | // added support for MC in AOD tree (2008-11-04) |
22 | // added a bool flag for the alternative (standard MC) vs (AOD MC). | |
23 | // | |
563113d0 | 24 | // author : R. Vernet (renaud.vernet@cern.ch) |
25 | ////////////////////////////////////////////////////////////////////// | |
26 | ||
27 | ||
28 | #ifndef ALICFPARTICLEGENCUTS_H | |
29 | #define ALICFPARTICLEGENCUTS_H | |
30 | ||
31 | #include "AliCFCutBase.h" | |
32 | ||
107a3100 | 33 | class AliMCEvent; |
563113d0 | 34 | class TObject; |
35 | class AliMCParticle; | |
36 | class AliStack; | |
107a3100 | 37 | class TList; |
38 | class TH1F; | |
39 | class TH2F; | |
40 | class TBits; | |
c7803356 | 41 | class TArrayF; |
8fe1a43d | 42 | class TDecayChannel; |
b95f6a36 | 43 | class AliVParticle; |
44 | class AliVEvent; | |
45 | class AliAODMCParticle; | |
46 | ||
563113d0 | 47 | |
48 | class AliCFParticleGenCuts : public AliCFCutBase | |
49 | { | |
50 | public : | |
51 | AliCFParticleGenCuts() ; | |
52 | AliCFParticleGenCuts (const Char_t* name, const Char_t* title) ; | |
53 | AliCFParticleGenCuts (const AliCFParticleGenCuts& c) ; | |
54 | AliCFParticleGenCuts& operator=(const AliCFParticleGenCuts& c) ; | |
55 | virtual ~AliCFParticleGenCuts() { }; | |
9eeae5d5 | 56 | virtual Bool_t IsSelected(TObject* obj) ; |
57 | Bool_t IsSelected(TList* /*list*/) {return kTRUE;} | |
0c01ae65 | 58 | virtual void SetMCEventInfo(const TObject* mcEvent) ; |
b95f6a36 | 59 | void SetAODMC(Bool_t flag) {fIsAODMC=flag;} |
60 | ||
61 | Bool_t IsPrimaryCharged(AliVParticle *mcPart); | |
62 | Bool_t IsPrimary(AliMCParticle *mcPart) ; | |
63 | Bool_t IsPrimary(AliAODMCParticle *mcPart) ; | |
563113d0 | 64 | //static checkers |
b95f6a36 | 65 | static Bool_t IsCharged(AliVParticle *mcPart); |
66 | static Bool_t IsA(AliMCParticle *mcPart, Int_t pdg, Bool_t abs=kFALSE); | |
67 | static Bool_t IsA(AliAODMCParticle *mcPart, Int_t pdg, Bool_t abs=kFALSE); | |
563113d0 | 68 | |
107a3100 | 69 | void SetRequireIsCharged () {fRequireIsCharged =kTRUE; fRequireIsNeutral =kFALSE;} |
70 | void SetRequireIsNeutral () {fRequireIsNeutral =kTRUE; fRequireIsCharged =kFALSE;} | |
71 | void SetRequireIsPrimary () {fRequireIsPrimary =kTRUE; fRequireIsSecondary=kFALSE;} | |
72 | void SetRequireIsSecondary () {fRequireIsSecondary=kTRUE; fRequireIsPrimary =kFALSE;} | |
3ff4a092 | 73 | void SetRequirePdgCode (Int_t pdg, Bool_t useAbsolute=kFALSE) { |
74 | fRequirePdgCode=kTRUE; | |
75 | fPdgCode=pdg; | |
76 | fRequireAbsolutePdg=useAbsolute; | |
77 | } | |
563113d0 | 78 | void SetProdVtxRangeX (Double32_t xmin, Double32_t xmax) {fProdVtxXMin =xmin; fProdVtxXMax =xmax;} |
79 | void SetProdVtxRangeY (Double32_t ymin, Double32_t ymax) {fProdVtxYMin =ymin; fProdVtxYMax =ymax;} | |
80 | void SetProdVtxRangeZ (Double32_t zmin, Double32_t zmax) {fProdVtxZMin =zmin; fProdVtxZMax =zmax;} | |
004f223f | 81 | void SetProdVtxRange2D (Bool_t b=kFALSE) {fProdVtxRange2D = b;} |
563113d0 | 82 | void SetDecayVtxRangeX (Double32_t xmin, Double32_t xmax) {fDecayVtxXMin =xmin; fDecayVtxXMax =xmax;} |
83 | void SetDecayVtxRangeY (Double32_t ymin, Double32_t ymax) {fDecayVtxYMin =ymin; fDecayVtxYMax =ymax;} | |
84 | void SetDecayVtxRangeZ (Double32_t zmin, Double32_t zmax) {fDecayVtxZMin =zmin; fDecayVtxZMax =zmax;} | |
85 | void SetDecayLengthRange (Double32_t rmin, Double32_t rmax) {fDecayLengthMin=rmin; fDecayLengthMax=rmax;} | |
86 | void SetDecayRxyRange (Double32_t rmin, Double32_t rmax) {fDecayRxyMin =rmin; fDecayRxyMax =rmax;} | |
8fe1a43d | 87 | void SetDecayChannel (TDecayChannel* dc) {fDecayChannel = dc ;} |
563113d0 | 88 | |
107a3100 | 89 | enum { |
90 | kCutCharge, // ischarged cut | |
91 | kCutPrimSec, // isprimary cut | |
92 | kCutPDGCode, // PDG code cut | |
93 | kCutProdVtxXMin, // production vertex cut | |
94 | kCutProdVtxXMax, // production vertex cut | |
95 | kCutProdVtxYMin, // production vertex cut | |
96 | kCutProdVtxYMax, // production vertex cut | |
97 | kCutProdVtxZMin, // production vertex cut | |
98 | kCutProdVtxZMax, // production vertex cut | |
99 | kCutDecVtxXMin, // decay vertex cut | |
100 | kCutDecVtxXMax, // decay vertex cut | |
101 | kCutDecVtxYMin, // decay vertex cut | |
102 | kCutDecVtxYMax, // decay vertex cut | |
103 | kCutDecVtxZMin, // decay vertex cut | |
104 | kCutDecVtxZMax, // decay vertex cut | |
105 | kCutDecLgthMin, // decay length cut | |
106 | kCutDecLgthMax, // decay length cut | |
107 | kCutDecRxyMin, // transverse decay length cut | |
108 | kCutDecRxyMax, // transverse decay length cut | |
8fe1a43d | 109 | kCutDecayChannel, // decay channel reuired |
107a3100 | 110 | kNCuts, // number of single selections |
111 | kNStepQA=2 // number of QA steps (before/after the cuts) | |
112 | }; | |
113 | ||
114 | private: | |
b95f6a36 | 115 | Bool_t fIsAODMC ; // flag for standard MC or MC from AOD tree |
116 | AliVEvent* fMCInfo ; // pointer to the MC event information | |
563113d0 | 117 | Bool_t fRequireIsCharged; // require charged particle |
107a3100 | 118 | Bool_t fRequireIsNeutral; // require neutral particle |
563113d0 | 119 | Bool_t fRequireIsPrimary; // require primary particle |
120 | Bool_t fRequireIsSecondary; // require secondary particle | |
121 | Bool_t fRequirePdgCode; // require check of the PDG code | |
2f8e8cad | 122 | Bool_t fRequireAbsolutePdg; // use the PDG code absolute value, used also for the decay channel |
004f223f | 123 | Bool_t fProdVtxRange2D; // cut an ellipse in xy plane |
563113d0 | 124 | Int_t fPdgCode ; // particle PDG code |
125 | Double32_t fProdVtxXMin; // min X of particle production vertex | |
126 | Double32_t fProdVtxYMin; // min Y of particle production vertex | |
127 | Double32_t fProdVtxZMin; // min Z of particle production vertex | |
128 | Double32_t fProdVtxXMax; // max X of particle production vertex | |
129 | Double32_t fProdVtxYMax; // max Y of particle production vertex | |
130 | Double32_t fProdVtxZMax; // max Z of particle production vertex | |
131 | Double32_t fDecayVtxXMin; // min X of particle decay vertex | |
132 | Double32_t fDecayVtxYMin; // min Y of particle decay vertex | |
133 | Double32_t fDecayVtxZMin; // min Z of particle decay vertex | |
134 | Double32_t fDecayVtxXMax; // max X of particle decay vertex | |
135 | Double32_t fDecayVtxYMax; // max Y of particle decay vertex | |
136 | Double32_t fDecayVtxZMax; // max Z of particle decay vertex | |
137 | Double32_t fDecayLengthMin; // min decay length (absolute) | |
138 | Double32_t fDecayLengthMax; // max decay length (absolute) | |
139 | Double32_t fDecayRxyMin; // min decay length in transverse plane wrt (0,0,0) | |
140 | Double32_t fDecayRxyMax; // max decay length in transverse plane wrt (0,0,0) | |
2f8e8cad | 141 | TDecayChannel* fDecayChannel; // decay channel : if fRequireAbsolutePdg, the antiparticle channel will be checked as well |
563113d0 | 142 | |
107a3100 | 143 | //QA histos |
c7803356 | 144 | TH1F* fhCutStatistics; // Histogram: statistics of what cuts the tracks did not survive |
145 | TH2F* fhCutCorrelation; // Histogram: 2d statistics plot | |
146 | TH1F* fhQA[kNCuts][kNStepQA]; // QA Histograms | |
004f223f | 147 | TH2F* fhProdVtxXY[2]; // Histogram: production vertex in tranzverse plane |
c7803356 | 148 | TArrayF* fCutValues; // array of cut values |
149 | TBits* fBitmap ; // stores single selection decisions | |
107a3100 | 150 | |
b95f6a36 | 151 | void SelectionBitMap(AliMCParticle* obj); // for MC got from Kinematics |
152 | void SelectionBitMap(AliAODMCParticle* obj); // for MC got from AOD | |
107a3100 | 153 | void FillHistograms(TObject* obj, Bool_t afterCuts); |
154 | void AddQAHistograms(TList *qaList) ; | |
155 | void DefineHistograms(); | |
156 | ||
b95f6a36 | 157 | ClassDef(AliCFParticleGenCuts,2); |
563113d0 | 158 | }; |
159 | ||
160 | #endif |