AliPhysics  vAN-20150723 (baea2bf)
 All Classes Namespaces Files Functions Variables Enumerations Enumerator Macros
AliEmcalMCTrackSelector.h
Go to the documentation of this file.
1 #ifndef ALIEMCALMCTRAKCSELECTOR_H
2 #define ALIEMCALMCTRAKCSELECTOR_H
3 
4 class TClonesArray;
5 class TString;
6 class AliVEvent;
7 class AliMCEvent;
8 class AliNamedArrayI;
9 class AliAODMCParticle;
10 
11 #include "AliAnalysisTaskSE.h"
12 
13 class AliEmcalMCTrackSelector : public AliAnalysisTaskSE {
14  public:
16  AliEmcalMCTrackSelector(const char *name);
17  virtual ~AliEmcalMCTrackSelector();
18 
20  void UserExec(Option_t *option);
21 
22  void SetOnlyPhysPrim(Bool_t s) { fOnlyPhysPrim = s ; }
23  void SetChargedMC(Bool_t c = kTRUE) { fChargedMC = c ; }
24  void SetEtaMax(Double_t e) { fEtaMax = e ; }
25  void SetRejectNK(Bool_t r = kTRUE) { fRejectNK = r ; }
26  void SetOnlyHIJING(Bool_t s) { fOnlyHIJING = s ; }
27  void SetParticlesOutName(const char *name) { fParticlesOutName = name ; }
28  void SetSpecialPDG(Int_t pdg) { fSpecialPDG = pdg ; }
29 
30  protected:
31  void ConvertMCParticles(); // for ESD analysis
32  void CopyMCParticles(); // for AOD analysis
33 
34  Bool_t CheckSpecialPDGDaughter(AliAODMCParticle* part, Int_t nprim);
35  Bool_t CheckSpecialPDGDaughter(Int_t iPart);
36 
37  TString fParticlesOutName; // name of output particle array
38  Bool_t fOnlyPhysPrim; // true = only physical primary particles
39  Bool_t fRejectNK; // true = reject K_0^L and neutrons
40  Bool_t fChargedMC; // true = only charged particles
41  Bool_t fOnlyHIJING; // true = only HIJING particles
42  Double_t fEtaMax; // maximum eta to accept particles
43  Int_t fSpecialPDG; // include particles with this PDG code even if they are not primary particles (and exclude their daughters)
45  Bool_t fInit;
46  TClonesArray *fParticlesIn;
47  TClonesArray *fParticlesOut;
48  AliNamedArrayI *fParticlesMap;
49  AliVEvent *fEvent;
50  AliMCEvent *fMC;
51  Bool_t fIsESD;
52  Bool_t fDisabled;
53 
54  private:
55  AliEmcalMCTrackSelector(const AliEmcalMCTrackSelector&); // not implemented
56  AliEmcalMCTrackSelector &operator=(const AliEmcalMCTrackSelector&); // not implemented
57 
58  ClassDef(AliEmcalMCTrackSelector, 4); // Task to select particle in MC events
59 };
60 #endif
ClassDef(AliEmcalMCTrackSelector, 4)
TClonesArray * fParticlesOut
particle array in (AOD)
Bool_t fIsESD
MC event (ESD)
void UserExec(Option_t *option)
Bool_t fDisabled
ESD or AOD analysis.
void SetParticlesOutName(const char *name)
AliEmcalMCTrackSelector & operator=(const AliEmcalMCTrackSelector &)
AliNamedArrayI * fParticlesMap
particle array out
Bool_t CheckSpecialPDGDaughter(AliAODMCParticle *part, Int_t nprim)
AliVEvent * fEvent
particle index/label
void SetRejectNK(Bool_t r=kTRUE)
void SetChargedMC(Bool_t c=kTRUE)
Bool_t fInit
name of the particle map
TClonesArray * fParticlesIn
true = task initialized