AliPhysics  5eaf189 (5eaf189)
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 
14  public:
16  AliEmcalMCTrackSelector(const char *name);
17  virtual ~AliEmcalMCTrackSelector();
18 
20  void UserExec(Option_t *option);
21 
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 
29  void ConvertMCParticles(AliMCEvent* mcEvent, TClonesArray* partOut, AliNamedArrayI* partMap=0); // for ESD analysis
30  void CopyMCParticles(TClonesArray* partIn, TClonesArray* partOut, AliNamedArrayI* partMap=0); // for AOD analysis
31 
32  static AliEmcalMCTrackSelector* AddTaskMCTrackSelector(TString outname = "mcparticles", Bool_t nk = kFALSE, Bool_t ch = kFALSE, Double_t etamax = 1, Bool_t physPrim = kTRUE);
33  protected:
34  virtual Bool_t AcceptParticle(AliAODMCParticle* part) const;
35 
36  TString fParticlesOutName; // name of output particle array
37  Bool_t fOnlyPhysPrim; // true = only physical primary particles
38  Bool_t fRejectNK; // true = reject K_0^L and neutrons
39  Bool_t fChargedMC; // true = only charged particles
40  Bool_t fOnlyHIJING; // true = only HIJING particles
41  Double_t fEtaMax; // maximum eta to accept particles
44  TClonesArray *fParticlesIn;
45  TClonesArray *fParticlesOut;
47  AliVEvent *fEvent;
48  AliMCEvent *fMC;
51 
52  private:
53  AliEmcalMCTrackSelector(const AliEmcalMCTrackSelector&); // not implemented
54  AliEmcalMCTrackSelector &operator=(const AliEmcalMCTrackSelector&); // not implemented
55 
56  ClassDef(AliEmcalMCTrackSelector, 5); // Task to select particle in MC events
57 };
58 #endif
void ConvertMCParticles(AliMCEvent *mcEvent, TClonesArray *partOut, AliNamedArrayI *partMap=0)
double Double_t
Definition: External.C:58
TClonesArray * fParticlesOut
particle array in (AOD)
Bool_t fIsESD
MC event (ESD)
void UserExec(Option_t *option)
Bool_t fDisabled
ESD or AOD analysis.
TCanvas * c
Definition: TestFitELoss.C:172
TString part
use mixed event to constrain combinatorial background
Definition: InvMassFit.C:52
void SetParticlesOutName(const char *name)
AliEmcalMCTrackSelector & operator=(const AliEmcalMCTrackSelector &)
AliNamedArrayI * fParticlesMap
particle array out
void CopyMCParticles(TClonesArray *partIn, TClonesArray *partOut, AliNamedArrayI *partMap=0)
AliVEvent * fEvent
particle index/label
const Double_t etamax
void SetRejectNK(Bool_t r=kTRUE)
const char Option_t
Definition: External.C:48
void SetChargedMC(Bool_t c=kTRUE)
static AliEmcalMCTrackSelector * AddTaskMCTrackSelector(TString outname="mcparticles", Bool_t nk=kFALSE, Bool_t ch=kFALSE, Double_t etamax=1, Bool_t physPrim=kTRUE)
Bool_t fInit
name of the particle map
bool Bool_t
Definition: External.C:53
TClonesArray * fParticlesIn
true = task initialized
virtual Bool_t AcceptParticle(AliAODMCParticle *part) const