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