]> git.uio.no Git - u/mrichter/AliRoot.git/blame - PWGJE/EMCALJetTasks/AliJetModelBaseTask.h
update task with other flag to select 2D binning and to change some other analysis...
[u/mrichter/AliRoot.git] / PWGJE / EMCALJetTasks / AliJetModelBaseTask.h
CommitLineData
762e8424 1#ifndef ALIJETMODELBASETASK_H
2#define ALIJETMODELBASETASK_H
3
4// $Id$
5
6class TClonesArray;
787a3c4f 7class TH1I;
762e8424 8class AliEMCALGeometry;
9class AliVCluster;
10class AliPicoTrack;
b16bb001 11class AliVCaloCells;
787a3c4f 12class AliAODMCParticle;
5be3857d 13class AliNamedArrayI;
65bb5510 14
15#include <TH1F.h>
16#include <TF1.h>
762e8424 17
18#include "AliAnalysisTaskSE.h"
19
20class AliJetModelBaseTask : public AliAnalysisTaskSE {
21 public:
22 AliJetModelBaseTask();
b16bb001 23 AliJetModelBaseTask(const char *name, Bool_t drawqa=kFALSE);
762e8424 24 virtual ~AliJetModelBaseTask();
25
ffe32451 26 void UserExec(Option_t* /*option*/);
b16bb001 27 void UserCreateOutputObjects();
762e8424 28
a825589f 29 void SetEtaRange(Float_t min, Float_t max) { fEtaMin = min; fEtaMax = max; }
a825589f 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; }
65bb5510 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); }
b16bb001 35
4358e58a 36 void SetMC(Bool_t a) { fIsMC = a ; }
37
b16bb001 38 void SetCopyArray(Bool_t copy) { fCopyArray = copy; }
a825589f 39 void SetTracksName(const char *n) { fTracksName = n; }
b16bb001 40 void SetClusName(const char *n) { fCaloName = n; }
41 void SetCellsName(const char *n) { fCellsName = n; }
787a3c4f 42 void SetMCParticlesName(const char *n) { fMCParticlesName = n; }
b16bb001 43 void SetSuffix(const char *s) { fSuffix = s; }
44
45 void SetGeometryName(const char *n) { fGeomName = n; }
f660c2d6 46 void SetMarkMC(Int_t m) { fMarkMC = m; }
b16bb001 47 virtual void SetNClusters(Int_t n) { fNClusters = n; }
48 virtual void SetNCells(Int_t n) { fNCells = n; }
49 virtual void SetNTracks(Int_t n) { fNTracks = n; }
50
762e8424 51
52 protected:
b16bb001 53 Int_t SetNumberOfOutCells(Int_t n); // set the number of cells
54 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
787a3c4f 55 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
56 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
57 AliVCluster *AddCluster(Double_t e, Int_t absId, Int_t label=0); // add a cluster with given energy and position
507f74bc 58 AliVCluster *AddCluster(AliVCluster *oc); // add a cluster (copy)
b16bb001 59 AliPicoTrack *AddTrack(Double_t pt = -1, Double_t eta = -999, Double_t phi = -1,
787a3c4f 60 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
61 AliAODMCParticle *AddMCParticle(AliAODMCParticle *part, Int_t origIndex); // add a MC particle
b16bb001 62 void CopyCells();
e44e8726 63 void CopyClusters();
64 void CopyTracks();
787a3c4f 65 void CopyMCParticles();
ffe32451 66 void GetRandomCell(Double_t &eta, Double_t &phi, Int_t &absId); // generate a random cell in the calorimeter
2103dc6a 67 Double_t GetRandomEta(Bool_t emcal=kFALSE); // generate a random eta value in the given range
68 Double_t GetRandomPhi(Bool_t emcal=kFALSE); // generate a random phi value in the given range
ffe32451 69 Double_t GetRandomPt(); // generate a random pt value in the given range
b16bb001 70 virtual Bool_t ExecOnce(); // intialize task
ffe32451 71 virtual void Run(); // do jet model action
762e8424 72
73 TString fGeomName; // EMCal geometry name
74 TString fTracksName; // name of track collection
75 TString fOutTracksName; // name of output track collection
76 TString fCaloName; // name of calo cluster collection
77 TString fOutCaloName; // name of output cluster collection
b16bb001 78 TString fCellsName; // name of calo cells collection
79 TString fOutCellsName; // name of output cells collection
787a3c4f 80 TString fMCParticlesName; // name of MC particle collection
81 TString fOutMCParticlesName; // name of output MC particle collection
4358e58a 82 Bool_t fIsMC; // whether the current event is MC or not
762e8424 83 TString fSuffix; // suffix to add in the name of new collections
84 Float_t fEtaMin; // eta minimum value
85 Float_t fEtaMax; // eta maximum value
86 Float_t fPhiMin; // phi minimum value
87 Float_t fPhiMax; // phi maximum value
88 Float_t fPtMin; // pt minimum value
89 Float_t fPtMax; // pt maximum value
90 Bool_t fCopyArray; // whether or not the array will be copied to a new one before modelling
91 Int_t fNClusters; // how many clusters are being processed
b16bb001 92 Int_t fNCells; // how many cells are being processed
762e8424 93 Int_t fNTracks; // how many tracks are being processed
f660c2d6 94 Int_t fMarkMC; // which MC label is to be used (default=100)
65bb5510 95 TH1 *fPtSpectrum; // pt spectrum parametrization to extract random pt values
b16bb001 96 Bool_t fQAhistos; // draw QA histograms
4358e58a 97 Bool_t fIsInit; //!=true if initialized
762e8424 98 AliEMCALGeometry *fGeom; //!pointer to EMCal geometry
99 TClonesArray *fClusters; //!cluster collection
100 TClonesArray *fOutClusters; //!output cluster collection
101 TClonesArray *fTracks; //!track collection
102 TClonesArray *fOutTracks; //!output track collection
b16bb001 103 AliVCaloCells *fCaloCells; //!cells collection
104 AliVCaloCells *fOutCaloCells; //!output cells collection
105 Int_t fAddedCells; //!number of added cells
787a3c4f 106 TClonesArray *fMCParticles; //!MC particles collection
5be3857d 107 AliNamedArrayI *fMCParticlesMap; //!MC particles mapping
787a3c4f 108 TClonesArray *fOutMCParticles; //!output MC particles collection
5be3857d 109 AliNamedArrayI *fOutMCParticlesMap; //!MC particles mapping
787a3c4f 110 Int_t fMCLabelShift; //!MC label shift
b16bb001 111 Bool_t fEsdMode; //!ESD/AOD mode
112 TList *fOutput; //!output list for QA histograms
762e8424 113
114 private:
115 AliJetModelBaseTask(const AliJetModelBaseTask&); // not implemented
116 AliJetModelBaseTask &operator=(const AliJetModelBaseTask&); // not implemented
117
4358e58a 118 ClassDef(AliJetModelBaseTask, 8) // Jet modelling task
762e8424 119};
120#endif