]> git.uio.no Git - u/mrichter/AliRoot.git/blob - CORRFW/AliCFParticleGenCuts.h
We don't check the path to the raw-data file, it is done inside AliRawReader::Create...
[u/mrichter/AliRoot.git] / CORRFW / AliCFParticleGenCuts.h
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 // author : R. Vernet (renaud.vernet@cern.ch)
22 //////////////////////////////////////////////////////////////////////
23
24
25 #ifndef ALICFPARTICLEGENCUTS_H
26 #define ALICFPARTICLEGENCUTS_H
27
28 #include "AliCFCutBase.h"
29
30 class AliMCEvent;
31 class TObject;
32 class AliMCParticle;
33 class AliStack;
34 class TList;
35 class TH1F;
36 class TH2F;
37 class TBits;
38 class TArrayF;
39 class TDecayChannel;
40
41 class AliCFParticleGenCuts : public AliCFCutBase
42 {
43  public :
44   AliCFParticleGenCuts() ;
45   AliCFParticleGenCuts           (const Char_t* name, const Char_t* title) ;
46   AliCFParticleGenCuts           (const AliCFParticleGenCuts& c) ;
47   AliCFParticleGenCuts& operator=(const AliCFParticleGenCuts& c) ;
48   virtual ~AliCFParticleGenCuts() { };
49   virtual Bool_t IsSelected(TObject* obj) ;
50   Bool_t IsSelected(TList* /*list*/) {return kTRUE;}
51   virtual void   SetEvtInfo(TObject* mcEvent) ;
52   //static checkers
53   static Bool_t IsPrimaryCharged(AliMCParticle *mcPart,AliStack*stack);
54   static Bool_t IsPrimary(AliMCParticle *mcPart,AliStack*stack);
55   static Bool_t IsCharged(AliMCParticle *mcPart);
56   static Bool_t IsA(AliMCParticle *mcPart, Int_t pdg, Bool_t abs=kFALSE);
57
58   void SetRequireIsCharged   () {fRequireIsCharged  =kTRUE; fRequireIsNeutral  =kFALSE;}
59   void SetRequireIsNeutral   () {fRequireIsNeutral  =kTRUE; fRequireIsCharged  =kFALSE;}
60   void SetRequireIsPrimary   () {fRequireIsPrimary  =kTRUE; fRequireIsSecondary=kFALSE;}
61   void SetRequireIsSecondary () {fRequireIsSecondary=kTRUE; fRequireIsPrimary  =kFALSE;}
62   void SetRequirePdgCode     (Int_t pdg)            {fRequirePdgCode=kTRUE; fPdgCode=pdg;}
63   void SetProdVtxRangeX    (Double32_t xmin, Double32_t xmax) {fProdVtxXMin   =xmin; fProdVtxXMax   =xmax;}
64   void SetProdVtxRangeY    (Double32_t ymin, Double32_t ymax) {fProdVtxYMin   =ymin; fProdVtxYMax   =ymax;}
65   void SetProdVtxRangeZ    (Double32_t zmin, Double32_t zmax) {fProdVtxZMin   =zmin; fProdVtxZMax   =zmax;}
66   void SetDecayVtxRangeX   (Double32_t xmin, Double32_t xmax) {fDecayVtxXMin  =xmin; fDecayVtxXMax  =xmax;}
67   void SetDecayVtxRangeY   (Double32_t ymin, Double32_t ymax) {fDecayVtxYMin  =ymin; fDecayVtxYMax  =ymax;}
68   void SetDecayVtxRangeZ   (Double32_t zmin, Double32_t zmax) {fDecayVtxZMin  =zmin; fDecayVtxZMax  =zmax;}
69   void SetDecayLengthRange (Double32_t rmin, Double32_t rmax) {fDecayLengthMin=rmin; fDecayLengthMax=rmax;}
70   void SetDecayRxyRange    (Double32_t rmin, Double32_t rmax) {fDecayRxyMin   =rmin; fDecayRxyMax   =rmax;}
71   void SetDecayChannel     (TDecayChannel* dc) {fDecayChannel = dc ;}
72
73   enum { 
74     kCutCharge,       // ischarged cut
75     kCutPrimSec,      // isprimary cut
76     kCutPDGCode,      // PDG code  cut
77     kCutProdVtxXMin,  // production vertex cut
78     kCutProdVtxXMax,  // production vertex cut
79     kCutProdVtxYMin,  // production vertex cut
80     kCutProdVtxYMax,  // production vertex cut
81     kCutProdVtxZMin,  // production vertex cut
82     kCutProdVtxZMax,  // production vertex cut
83     kCutDecVtxXMin,   // decay vertex cut
84     kCutDecVtxXMax,   // decay vertex cut
85     kCutDecVtxYMin,   // decay vertex cut
86     kCutDecVtxYMax,   // decay vertex cut
87     kCutDecVtxZMin,   // decay vertex cut
88     kCutDecVtxZMax,   // decay vertex cut
89     kCutDecLgthMin,   // decay length cut
90     kCutDecLgthMax,   // decay length cut
91     kCutDecRxyMin,    // transverse decay length cut
92     kCutDecRxyMax,    // transverse decay length cut
93     kCutDecayChannel, // decay channel reuired
94     kNCuts,           // number of single selections
95     kNStepQA=2        // number of QA steps (before/after the cuts)
96   };
97
98  private:
99   AliMCEvent* fMCInfo ;    // pointer to the MC event information
100   Bool_t     fRequireIsCharged;   // require charged particle
101   Bool_t     fRequireIsNeutral;   // require neutral particle
102   Bool_t     fRequireIsPrimary;   // require primary particle
103   Bool_t     fRequireIsSecondary; // require secondary particle
104   Bool_t     fRequirePdgCode;     // require check of the PDG code
105   Int_t      fPdgCode ;           // particle PDG code
106   Double32_t fProdVtxXMin;        // min X of particle production vertex
107   Double32_t fProdVtxYMin;        // min Y of particle production vertex
108   Double32_t fProdVtxZMin;        // min Z of particle production vertex
109   Double32_t fProdVtxXMax;        // max X of particle production vertex
110   Double32_t fProdVtxYMax;        // max Y of particle production vertex
111   Double32_t fProdVtxZMax;        // max Z of particle production vertex
112   Double32_t fDecayVtxXMin;       // min X of particle decay vertex
113   Double32_t fDecayVtxYMin;       // min Y of particle decay vertex
114   Double32_t fDecayVtxZMin;       // min Z of particle decay vertex
115   Double32_t fDecayVtxXMax;       // max X of particle decay vertex
116   Double32_t fDecayVtxYMax;       // max Y of particle decay vertex
117   Double32_t fDecayVtxZMax;       // max Z of particle decay vertex
118   Double32_t fDecayLengthMin;     // min decay length (absolute)
119   Double32_t fDecayLengthMax;     // max decay length (absolute)
120   Double32_t fDecayRxyMin;        // min decay length in transverse plane wrt (0,0,0)
121   Double32_t fDecayRxyMax;        // max decay length in transverse plane wrt (0,0,0)
122   TDecayChannel* fDecayChannel;   // decay channel 
123
124   //QA histos
125   TH1F*    fhCutStatistics;        // Histogram: statistics of what cuts the tracks did not survive
126   TH2F*    fhCutCorrelation;       // Histogram: 2d statistics plot
127   TH1F*    fhQA[kNCuts][kNStepQA]; // QA Histograms
128   TArrayF* fCutValues;             // array of cut values
129   TBits* fBitmap ;                 // stores single selection decisions
130
131   void SelectionBitMap(TObject* obj);
132   void FillHistograms(TObject* obj, Bool_t afterCuts);
133   void AddQAHistograms(TList *qaList) ;
134   void DefineHistograms();
135
136   ClassDef(AliCFParticleGenCuts,1);
137 };
138
139 #endif