1 #ifndef ALIJETMODELBASETASK_H
2 #define ALIJETMODELBASETASK_H
8 class AliEMCALGeometry;
12 class AliAODMCParticle;
18 #include "AliAnalysisTaskSE.h"
20 class AliJetModelBaseTask : public AliAnalysisTaskSE {
22 AliJetModelBaseTask();
23 AliJetModelBaseTask(const char *name, Bool_t drawqa=kFALSE);
24 virtual ~AliJetModelBaseTask();
26 void UserExec(Option_t* /*option*/);
27 void UserCreateOutputObjects();
29 void SetEtaRange(Float_t min, Float_t max) { fEtaMin = min; fEtaMax = max; }
30 void SetPhiRange(Float_t min, Float_t max) { fPhiMin = min; fPhiMax = max; }
31 void SetPtRange(Float_t min, Float_t max) { fPtMin = min; fPtMax = max; }
32 void SetPtSpectrum(TH1 *f) { fPtSpectrum = f; }
33 void SetPtSpectrum(TF1 *f) { fPtSpectrum = new TH1F("ptSpectrum","ptSpectrum",250,f->GetXmin(),f->GetXmax());
34 fPtSpectrum->Add(f); }
36 void SetCopyArray(Bool_t copy) { fCopyArray = copy; }
37 void SetTracksName(const char *n) { fTracksName = n; }
38 void SetClusName(const char *n) { fCaloName = n; }
39 void SetCellsName(const char *n) { fCellsName = n; }
40 void SetMCParticlesName(const char *n) { fMCParticlesName = n; }
41 void SetSuffix(const char *s) { fSuffix = s; }
43 void SetGeometryName(const char *n) { fGeomName = n; }
44 void SetMarkMC(Int_t m) { fMarkMC = m; }
45 virtual void SetNClusters(Int_t n) { fNClusters = n; }
46 virtual void SetNCells(Int_t n) { fNCells = n; }
47 virtual void SetNTracks(Int_t n) { fNTracks = n; }
51 Int_t SetNumberOfOutCells(Int_t n); // set the number of cells
52 Int_t AddCell(Double_t e = -1, Double_t eta = -999, Double_t phi = -1); // add a cell; if values are -1 generate random parameters
53 Int_t AddCell(Double_t e, Int_t absId, Double_t time = 0, Int_t label=0); // add a cell with given energy, position and times
54 AliVCluster *AddCluster(Double_t e = -1, Double_t eta = -999, Double_t phi = -1, Int_t label=0); // add a cluster; if values are -1 generate random parameters
55 AliVCluster *AddCluster(Double_t e, Int_t absId, Int_t label=0); // add a cluster with given energy and position
56 AliPicoTrack *AddTrack(Double_t pt = -1, Double_t eta = -999, Double_t phi = -1,
57 Byte_t type=0, Double_t etaemc=0, Double_t phiemc=0, Bool_t ise=kFALSE, Int_t label=0); // add a track; if values are -1 generate random parameters
58 AliAODMCParticle *AddMCParticle(AliAODMCParticle *part, Int_t origIndex); // add a MC particle
62 void CopyMCParticles();
63 void GetRandomCell(Double_t &eta, Double_t &phi, Int_t &absId); // generate a random cell in the calorimeter
64 Double_t GetRandomEta(Bool_t emcal=kFALSE); // generate a random eta value in the given range
65 Double_t GetRandomPhi(Bool_t emcal=kFALSE); // generate a random phi value in the given range
66 Double_t GetRandomPt(); // generate a random pt value in the given range
67 virtual Bool_t ExecOnce(); // intialize task
68 virtual void Run(); // do jet model action
70 TString fGeomName; // EMCal geometry name
71 TString fTracksName; // name of track collection
72 TString fOutTracksName; // name of output track collection
73 TString fCaloName; // name of calo cluster collection
74 TString fOutCaloName; // name of output cluster collection
75 TString fCellsName; // name of calo cells collection
76 TString fOutCellsName; // name of output cells collection
77 TString fMCParticlesName; // name of MC particle collection
78 TString fOutMCParticlesName; // name of output MC particle collection
79 TString fSuffix; // suffix to add in the name of new collections
80 Float_t fEtaMin; // eta minimum value
81 Float_t fEtaMax; // eta maximum value
82 Float_t fPhiMin; // phi minimum value
83 Float_t fPhiMax; // phi maximum value
84 Float_t fPtMin; // pt minimum value
85 Float_t fPtMax; // pt maximum value
86 Bool_t fCopyArray; // whether or not the array will be copied to a new one before modelling
87 Int_t fNClusters; // how many clusters are being processed
88 Int_t fNCells; // how many cells are being processed
89 Int_t fNTracks; // how many tracks are being processed
90 Int_t fMarkMC; // which MC label is to be used (default=100)
91 TH1 *fPtSpectrum; // pt spectrum parametrization to extract random pt values
92 Bool_t fQAhistos; // draw QA histograms
93 Bool_t fIsInit; //=true if initialized
94 AliEMCALGeometry *fGeom; //!pointer to EMCal geometry
95 TClonesArray *fClusters; //!cluster collection
96 TClonesArray *fOutClusters; //!output cluster collection
97 TClonesArray *fTracks; //!track collection
98 TClonesArray *fOutTracks; //!output track collection
99 AliVCaloCells *fCaloCells; //!cells collection
100 AliVCaloCells *fOutCaloCells; //!output cells collection
101 Int_t fAddedCells; //!number of added cells
102 TClonesArray *fMCParticles; //!MC particles collection
103 AliNamedArrayI *fMCParticlesMap; //!MC particles mapping
104 TClonesArray *fOutMCParticles; //!output MC particles collection
105 AliNamedArrayI *fOutMCParticlesMap; //!MC particles mapping
106 Int_t fMCLabelShift; //!MC label shift
107 Bool_t fEsdMode; //!ESD/AOD mode
108 TList *fOutput; //!output list for QA histograms
111 AliJetModelBaseTask(const AliJetModelBaseTask&); // not implemented
112 AliJetModelBaseTask &operator=(const AliJetModelBaseTask&); // not implemented
114 ClassDef(AliJetModelBaseTask, 7) // Jet modelling task