]> git.uio.no Git - u/mrichter/AliRoot.git/blame_incremental - CORRFW/AliCFParticleGenCuts.h
Removal of warnings and compliance with ALICE coding conventions (Raphaƫl)
[u/mrichter/AliRoot.git] / CORRFW / AliCFParticleGenCuts.h
... / ...
CommitLineData
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//
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//
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
33class AliMCEvent;
34class TObject;
35class AliMCParticle;
36class AliStack;
37class TList;
38class TH1F;
39class TH2F;
40class TBits;
41class TArrayF;
42class TDecayChannel;
43class AliVParticle;
44class AliVEvent;
45class AliAODMCParticle;
46
47
48class 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() { };
56 virtual Bool_t IsSelected(TObject* obj) ;
57 Bool_t IsSelected(TList* /*list*/) {return kTRUE;}
58 virtual void SetEvtInfo(TObject* mcEvent) ;
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) ;
64 //static checkers
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);
68
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;}
73 void SetRequirePdgCode (Int_t pdg, Bool_t useAbsolute=kFALSE) {
74 fRequirePdgCode=kTRUE;
75 fPdgCode=pdg;
76 fRequireAbsolutePdg=useAbsolute;
77 }
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;}
81 void SetDecayVtxRangeX (Double32_t xmin, Double32_t xmax) {fDecayVtxXMin =xmin; fDecayVtxXMax =xmax;}
82 void SetDecayVtxRangeY (Double32_t ymin, Double32_t ymax) {fDecayVtxYMin =ymin; fDecayVtxYMax =ymax;}
83 void SetDecayVtxRangeZ (Double32_t zmin, Double32_t zmax) {fDecayVtxZMin =zmin; fDecayVtxZMax =zmax;}
84 void SetDecayLengthRange (Double32_t rmin, Double32_t rmax) {fDecayLengthMin=rmin; fDecayLengthMax=rmax;}
85 void SetDecayRxyRange (Double32_t rmin, Double32_t rmax) {fDecayRxyMin =rmin; fDecayRxyMax =rmax;}
86 void SetDecayChannel (TDecayChannel* dc) {fDecayChannel = dc ;}
87
88 enum {
89 kCutCharge, // ischarged cut
90 kCutPrimSec, // isprimary cut
91 kCutPDGCode, // PDG code cut
92 kCutProdVtxXMin, // production vertex cut
93 kCutProdVtxXMax, // production vertex cut
94 kCutProdVtxYMin, // production vertex cut
95 kCutProdVtxYMax, // production vertex cut
96 kCutProdVtxZMin, // production vertex cut
97 kCutProdVtxZMax, // production vertex cut
98 kCutDecVtxXMin, // decay vertex cut
99 kCutDecVtxXMax, // decay vertex cut
100 kCutDecVtxYMin, // decay vertex cut
101 kCutDecVtxYMax, // decay vertex cut
102 kCutDecVtxZMin, // decay vertex cut
103 kCutDecVtxZMax, // decay vertex cut
104 kCutDecLgthMin, // decay length cut
105 kCutDecLgthMax, // decay length cut
106 kCutDecRxyMin, // transverse decay length cut
107 kCutDecRxyMax, // transverse decay length cut
108 kCutDecayChannel, // decay channel reuired
109 kNCuts, // number of single selections
110 kNStepQA=2 // number of QA steps (before/after the cuts)
111 };
112
113 private:
114 Bool_t fIsAODMC ; // flag for standard MC or MC from AOD tree
115 AliVEvent* fMCInfo ; // pointer to the MC event information
116 Bool_t fRequireIsCharged; // require charged particle
117 Bool_t fRequireIsNeutral; // require neutral particle
118 Bool_t fRequireIsPrimary; // require primary particle
119 Bool_t fRequireIsSecondary; // require secondary particle
120 Bool_t fRequirePdgCode; // require check of the PDG code
121 Bool_t fRequireAbsolutePdg; // use the PDG code absolute value, used also for the decay channel
122 Int_t fPdgCode ; // particle PDG code
123 Double32_t fProdVtxXMin; // min X of particle production vertex
124 Double32_t fProdVtxYMin; // min Y of particle production vertex
125 Double32_t fProdVtxZMin; // min Z of particle production vertex
126 Double32_t fProdVtxXMax; // max X of particle production vertex
127 Double32_t fProdVtxYMax; // max Y of particle production vertex
128 Double32_t fProdVtxZMax; // max Z of particle production vertex
129 Double32_t fDecayVtxXMin; // min X of particle decay vertex
130 Double32_t fDecayVtxYMin; // min Y of particle decay vertex
131 Double32_t fDecayVtxZMin; // min Z of particle decay vertex
132 Double32_t fDecayVtxXMax; // max X of particle decay vertex
133 Double32_t fDecayVtxYMax; // max Y of particle decay vertex
134 Double32_t fDecayVtxZMax; // max Z of particle decay vertex
135 Double32_t fDecayLengthMin; // min decay length (absolute)
136 Double32_t fDecayLengthMax; // max decay length (absolute)
137 Double32_t fDecayRxyMin; // min decay length in transverse plane wrt (0,0,0)
138 Double32_t fDecayRxyMax; // max decay length in transverse plane wrt (0,0,0)
139 TDecayChannel* fDecayChannel; // decay channel : if fRequireAbsolutePdg, the antiparticle channel will be checked as well
140
141 //QA histos
142 TH1F* fhCutStatistics; // Histogram: statistics of what cuts the tracks did not survive
143 TH2F* fhCutCorrelation; // Histogram: 2d statistics plot
144 TH1F* fhQA[kNCuts][kNStepQA]; // QA Histograms
145 TArrayF* fCutValues; // array of cut values
146 TBits* fBitmap ; // stores single selection decisions
147
148 void SelectionBitMap(AliMCParticle* obj); // for MC got from Kinematics
149 void SelectionBitMap(AliAODMCParticle* obj); // for MC got from AOD
150 void FillHistograms(TObject* obj, Bool_t afterCuts);
151 void AddQAHistograms(TList *qaList) ;
152 void DefineHistograms();
153
154 ClassDef(AliCFParticleGenCuts,2);
155};
156
157#endif