1 /**************************************************************************
2 * Copyright(c) 1998-1999, ALICE Experiment at CERN, All rights reserved. *
4 * Author: The ALICE Off-line Project. *
5 * Contributors are mentioned in the code where appropriate. *
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 **************************************************************************/
16 //////////////////////////////////////////////////////////////////////
17 // AliCFParticleGenCut implementation
18 // This class is designed to handle
19 // particle selection at generated level.
21 // author : R. Vernet (renaud.vernet@cern.ch)
22 //////////////////////////////////////////////////////////////////////
25 #ifndef ALICFPARTICLEGENCUTS_H
26 #define ALICFPARTICLEGENCUTS_H
28 #include "AliCFCutBase.h"
40 class AliCFParticleGenCuts : public AliCFCutBase
43 AliCFParticleGenCuts() ;
44 AliCFParticleGenCuts (const Char_t* name, const Char_t* title) ;
45 AliCFParticleGenCuts (const AliCFParticleGenCuts& c) ;
46 AliCFParticleGenCuts& operator=(const AliCFParticleGenCuts& c) ;
47 virtual ~AliCFParticleGenCuts() { };
48 virtual Bool_t IsSelected(TObject* obj) ;
49 Bool_t IsSelected(TList* /*list*/) {return kTRUE;}
50 virtual void SetEvtInfo(TObject* mcEvent) ;
52 static Bool_t IsPrimaryCharged(AliMCParticle *mcPart,AliStack*stack);
53 static Bool_t IsPrimary(AliMCParticle *mcPart,AliStack*stack);
54 static Bool_t IsCharged(AliMCParticle *mcPart);
55 static Bool_t IsA(AliMCParticle *mcPart, Int_t pdg, Bool_t abs=kFALSE);
57 void SetRequireIsCharged () {fRequireIsCharged =kTRUE; fRequireIsNeutral =kFALSE;}
58 void SetRequireIsNeutral () {fRequireIsNeutral =kTRUE; fRequireIsCharged =kFALSE;}
59 void SetRequireIsPrimary () {fRequireIsPrimary =kTRUE; fRequireIsSecondary=kFALSE;}
60 void SetRequireIsSecondary () {fRequireIsSecondary=kTRUE; fRequireIsPrimary =kFALSE;}
61 void SetRequirePdgCode (Int_t pdg) {fRequirePdgCode=kTRUE; fPdgCode=pdg;}
62 void SetProdVtxRangeX (Double32_t xmin, Double32_t xmax) {fProdVtxXMin =xmin; fProdVtxXMax =xmax;}
63 void SetProdVtxRangeY (Double32_t ymin, Double32_t ymax) {fProdVtxYMin =ymin; fProdVtxYMax =ymax;}
64 void SetProdVtxRangeZ (Double32_t zmin, Double32_t zmax) {fProdVtxZMin =zmin; fProdVtxZMax =zmax;}
65 void SetDecayVtxRangeX (Double32_t xmin, Double32_t xmax) {fDecayVtxXMin =xmin; fDecayVtxXMax =xmax;}
66 void SetDecayVtxRangeY (Double32_t ymin, Double32_t ymax) {fDecayVtxYMin =ymin; fDecayVtxYMax =ymax;}
67 void SetDecayVtxRangeZ (Double32_t zmin, Double32_t zmax) {fDecayVtxZMin =zmin; fDecayVtxZMax =zmax;}
68 void SetDecayLengthRange (Double32_t rmin, Double32_t rmax) {fDecayLengthMin=rmin; fDecayLengthMax=rmax;}
69 void SetDecayRxyRange (Double32_t rmin, Double32_t rmax) {fDecayRxyMin =rmin; fDecayRxyMax =rmax;}
72 kCutCharge, // ischarged cut
73 kCutPrimSec, // isprimary cut
74 kCutPDGCode, // PDG code cut
75 kCutProdVtxXMin, // production vertex cut
76 kCutProdVtxXMax, // production vertex cut
77 kCutProdVtxYMin, // production vertex cut
78 kCutProdVtxYMax, // production vertex cut
79 kCutProdVtxZMin, // production vertex cut
80 kCutProdVtxZMax, // production vertex cut
81 kCutDecVtxXMin, // decay vertex cut
82 kCutDecVtxXMax, // decay vertex cut
83 kCutDecVtxYMin, // decay vertex cut
84 kCutDecVtxYMax, // decay vertex cut
85 kCutDecVtxZMin, // decay vertex cut
86 kCutDecVtxZMax, // decay vertex cut
87 kCutDecLgthMin, // decay length cut
88 kCutDecLgthMax, // decay length cut
89 kCutDecRxyMin, // transverse decay length cut
90 kCutDecRxyMax, // transverse decay length cut
91 kNCuts, // number of single selections
92 kNStepQA=2 // number of QA steps (before/after the cuts)
96 AliMCEvent* fMCInfo ; // pointer to the MC event information
97 Bool_t fRequireIsCharged; // require charged particle
98 Bool_t fRequireIsNeutral; // require neutral particle
99 Bool_t fRequireIsPrimary; // require primary particle
100 Bool_t fRequireIsSecondary; // require secondary particle
101 Bool_t fRequirePdgCode; // require check of the PDG code
102 Int_t fPdgCode ; // particle PDG code
103 Double32_t fProdVtxXMin; // min X of particle production vertex
104 Double32_t fProdVtxYMin; // min Y of particle production vertex
105 Double32_t fProdVtxZMin; // min Z of particle production vertex
106 Double32_t fProdVtxXMax; // max X of particle production vertex
107 Double32_t fProdVtxYMax; // max Y of particle production vertex
108 Double32_t fProdVtxZMax; // max Z of particle production vertex
109 Double32_t fDecayVtxXMin; // min X of particle decay vertex
110 Double32_t fDecayVtxYMin; // min Y of particle decay vertex
111 Double32_t fDecayVtxZMin; // min Z of particle decay vertex
112 Double32_t fDecayVtxXMax; // max X of particle decay vertex
113 Double32_t fDecayVtxYMax; // max Y of particle decay vertex
114 Double32_t fDecayVtxZMax; // max Z of particle decay vertex
115 Double32_t fDecayLengthMin; // min decay length (absolute)
116 Double32_t fDecayLengthMax; // max decay length (absolute)
117 Double32_t fDecayRxyMin; // min decay length in transverse plane wrt (0,0,0)
118 Double32_t fDecayRxyMax; // max decay length in transverse plane wrt (0,0,0)
121 TH1F* fhCutStatistics; // Histogram: statistics of what cuts the tracks did not survive
122 TH2F* fhCutCorrelation; // Histogram: 2d statistics plot
123 TH1F* fhQA[kNCuts][kNStepQA]; // QA Histograms
124 TArrayF* fCutValues; // array of cut values
125 TBits* fBitmap ; // stores single selection decisions
127 void SelectionBitMap(TObject* obj);
128 void FillHistograms(TObject* obj, Bool_t afterCuts);
129 void AddQAHistograms(TList *qaList) ;
130 void DefineHistograms();
132 ClassDef(AliCFParticleGenCuts,1);