]> git.uio.no Git - u/mrichter/AliRoot.git/blob - CORRFW/AliCFParticleGenCuts.h
AliAnalysisCuts::IsSelected(TList*) added to cuts interface. Needed by V0 selection.
[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 AliMCEventHandler;
31 class TObject;
32 class AliMCParticle;
33 class AliStack;
34
35 class AliCFParticleGenCuts : public AliCFCutBase
36 {
37  public :
38   AliCFParticleGenCuts() ;
39   AliCFParticleGenCuts           (const Char_t* name, const Char_t* title) ;
40   AliCFParticleGenCuts           (const AliCFParticleGenCuts& c) ;
41   AliCFParticleGenCuts& operator=(const AliCFParticleGenCuts& c) ;
42   virtual ~AliCFParticleGenCuts() { };
43   virtual Bool_t IsSelected(TObject* obj) ;
44   Bool_t IsSelected(TList* /*list*/) {return kTRUE;}
45   virtual void   SetEvtInfo(TObject* mcInfo) ;
46   //static checkers
47   static Bool_t IsPrimaryCharged(AliMCParticle *mcPart,AliStack*stack);
48   static Bool_t IsPrimary(AliMCParticle *mcPart,AliStack*stack);
49   static Bool_t IsCharged(AliMCParticle *mcPart);
50   static Bool_t IsA(AliMCParticle *mcPart, Int_t pdg, Bool_t abs=kFALSE);
51
52   void SetRequireIsCharged   (Bool_t b=kTRUE)       {fRequireIsCharged=b;}
53   void SetRequireIsPrimary   (Bool_t b=kTRUE)       {fRequireIsPrimary=b;}
54   void SetRequireIsSecondary (Bool_t b=kTRUE)       {fRequireIsSecondary=b;}
55   void SetRequirePdgCode     (Int_t pdg)            {fRequirePdgCode=kTRUE; fPdgCode=pdg;}
56   void SetProdVtxRangeX    (Double32_t xmin, Double32_t xmax) {fProdVtxXMin   =xmin; fProdVtxXMax   =xmax;}
57   void SetProdVtxRangeY    (Double32_t ymin, Double32_t ymax) {fProdVtxYMin   =ymin; fProdVtxYMax   =ymax;}
58   void SetProdVtxRangeZ    (Double32_t zmin, Double32_t zmax) {fProdVtxZMin   =zmin; fProdVtxZMax   =zmax;}
59   void SetDecayVtxRangeX   (Double32_t xmin, Double32_t xmax) {fDecayVtxXMin  =xmin; fDecayVtxXMax  =xmax;}
60   void SetDecayVtxRangeY   (Double32_t ymin, Double32_t ymax) {fDecayVtxYMin  =ymin; fDecayVtxYMax  =ymax;}
61   void SetDecayVtxRangeZ   (Double32_t zmin, Double32_t zmax) {fDecayVtxZMin  =zmin; fDecayVtxZMax  =zmax;}
62   void SetDecayLengthRange (Double32_t rmin, Double32_t rmax) {fDecayLengthMin=rmin; fDecayLengthMax=rmax;}
63   void SetDecayRxyRange    (Double32_t rmin, Double32_t rmax) {fDecayRxyMin   =rmin; fDecayRxyMax   =rmax;}
64
65  protected:
66   AliMCEventHandler* fMCInfo ;    // pointer to the MC event information
67   Bool_t     fRequireIsCharged;   // require charged particle
68   Bool_t     fRequireIsPrimary;   // require primary particle
69   Bool_t     fRequireIsSecondary; // require secondary particle
70   Bool_t     fRequirePdgCode;     // require check of the PDG code
71   Int_t      fPdgCode ;           // particle PDG code
72   Double32_t fProdVtxXMin;        // min X of particle production vertex
73   Double32_t fProdVtxYMin;        // min Y of particle production vertex
74   Double32_t fProdVtxZMin;        // min Z of particle production vertex
75   Double32_t fProdVtxXMax;        // max X of particle production vertex
76   Double32_t fProdVtxYMax;        // max Y of particle production vertex
77   Double32_t fProdVtxZMax;        // max Z of particle production vertex
78   Double32_t fDecayVtxXMin;       // min X of particle decay vertex
79   Double32_t fDecayVtxYMin;       // min Y of particle decay vertex
80   Double32_t fDecayVtxZMin;       // min Z of particle decay vertex
81   Double32_t fDecayVtxXMax;       // max X of particle decay vertex
82   Double32_t fDecayVtxYMax;       // max Y of particle decay vertex
83   Double32_t fDecayVtxZMax;       // max Z of particle decay vertex
84   Double32_t fDecayLengthMin;     // min decay length (absolute)
85   Double32_t fDecayLengthMax;     // max decay length (absolute)
86   Double32_t fDecayRxyMin;        // min decay length in transverse plane wrt (0,0,0)
87   Double32_t fDecayRxyMax;        // max decay length in transverse plane wrt (0,0,0)
88
89   ClassDef(AliCFParticleGenCuts,1);
90 };
91
92 #endif