]>
Commit | Line | Data |
---|---|---|
762e8424 | 1 | #ifndef ALIJETMODELBASETASK_H |
2 | #define ALIJETMODELBASETASK_H | |
3 | ||
4 | // $Id$ | |
5 | ||
6 | class TClonesArray; | |
7 | class AliEMCALGeometry; | |
8 | class AliVCluster; | |
9 | class AliPicoTrack; | |
b16bb001 | 10 | class AliVCaloCells; |
65bb5510 | 11 | |
12 | #include <TH1F.h> | |
13 | #include <TF1.h> | |
762e8424 | 14 | |
15 | #include "AliAnalysisTaskSE.h" | |
16 | ||
17 | class AliJetModelBaseTask : public AliAnalysisTaskSE { | |
18 | public: | |
19 | AliJetModelBaseTask(); | |
b16bb001 | 20 | AliJetModelBaseTask(const char *name, Bool_t drawqa=kFALSE); |
762e8424 | 21 | virtual ~AliJetModelBaseTask(); |
22 | ||
ffe32451 | 23 | void UserExec(Option_t* /*option*/); |
b16bb001 | 24 | void UserCreateOutputObjects(); |
762e8424 | 25 | |
a825589f | 26 | void SetEtaRange(Float_t min, Float_t max) { fEtaMin = min; fEtaMax = max; } |
a825589f | 27 | void SetPhiRange(Float_t min, Float_t max) { fPhiMin = min; fPhiMax = max; } |
28 | void SetPtRange(Float_t min, Float_t max) { fPtMin = min; fPtMax = max; } | |
65bb5510 | 29 | void SetPtSpectrum(TH1 *f) { fPtSpectrum = f; } |
30 | void SetPtSpectrum(TF1 *f) { fPtSpectrum = new TH1F("ptSpectrum","ptSpectrum",250,f->GetXmin(),f->GetXmax()); | |
31 | fPtSpectrum->Add(f); } | |
b16bb001 | 32 | |
33 | void SetCopyArray(Bool_t copy) { fCopyArray = copy; } | |
a825589f | 34 | void SetTracksName(const char *n) { fTracksName = n; } |
b16bb001 | 35 | void SetClusName(const char *n) { fCaloName = n; } |
36 | void SetCellsName(const char *n) { fCellsName = n; } | |
37 | void SetSuffix(const char *s) { fSuffix = s; } | |
38 | ||
39 | void SetGeometryName(const char *n) { fGeomName = n; } | |
f660c2d6 | 40 | void SetMarkMC(Int_t m) { fMarkMC = m; } |
b16bb001 | 41 | virtual void SetNClusters(Int_t n) { fNClusters = n; } |
42 | virtual void SetNCells(Int_t n) { fNCells = n; } | |
43 | virtual void SetNTracks(Int_t n) { fNTracks = n; } | |
44 | ||
762e8424 | 45 | |
46 | protected: | |
b16bb001 | 47 | Int_t SetNumberOfOutCells(Int_t n); // set the number of cells |
48 | 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 | |
49 | Int_t AddCell(Double_t e, Int_t absId, Double_t time = 0); // add a cell with given energy, position and times | |
38f684a8 | 50 | AliVCluster *AddCluster(Double_t e = -1, Double_t eta = -999, Double_t phi = -1); // add a cluster; if values are -1 generate random parameters |
51 | AliVCluster *AddCluster(Double_t e, Int_t absId); // add a cluster with given energy and position | |
b16bb001 | 52 | AliPicoTrack *AddTrack(Double_t pt = -1, Double_t eta = -999, Double_t phi = -1, |
53 | Byte_t type=0, Double_t etaemc=0, Double_t phiemc=0, Bool_t ise=kFALSE); // add a track; if values are -1 generate random parameters | |
54 | void CopyCells(); | |
e44e8726 | 55 | void CopyClusters(); |
56 | void CopyTracks(); | |
ffe32451 | 57 | void GetRandomCell(Double_t &eta, Double_t &phi, Int_t &absId); // generate a random cell in the calorimeter |
58 | Double_t GetRandomEta(); // generate a random eta value in the given range | |
59 | Double_t GetRandomPhi(); // generate a random phi value in the given range | |
60 | Double_t GetRandomPt(); // generate a random pt value in the given range | |
b16bb001 | 61 | virtual Bool_t ExecOnce(); // intialize task |
ffe32451 | 62 | virtual void Run(); // do jet model action |
762e8424 | 63 | |
64 | TString fGeomName; // EMCal geometry name | |
65 | TString fTracksName; // name of track collection | |
66 | TString fOutTracksName; // name of output track collection | |
67 | TString fCaloName; // name of calo cluster collection | |
68 | TString fOutCaloName; // name of output cluster collection | |
b16bb001 | 69 | TString fCellsName; // name of calo cells collection |
70 | TString fOutCellsName; // name of output cells collection | |
762e8424 | 71 | TString fSuffix; // suffix to add in the name of new collections |
72 | Float_t fEtaMin; // eta minimum value | |
73 | Float_t fEtaMax; // eta maximum value | |
74 | Float_t fPhiMin; // phi minimum value | |
75 | Float_t fPhiMax; // phi maximum value | |
76 | Float_t fPtMin; // pt minimum value | |
77 | Float_t fPtMax; // pt maximum value | |
78 | Bool_t fCopyArray; // whether or not the array will be copied to a new one before modelling | |
79 | Int_t fNClusters; // how many clusters are being processed | |
b16bb001 | 80 | Int_t fNCells; // how many cells are being processed |
762e8424 | 81 | Int_t fNTracks; // how many tracks are being processed |
f660c2d6 | 82 | Int_t fMarkMC; // which MC label is to be used (default=100) |
65bb5510 | 83 | TH1 *fPtSpectrum; // pt spectrum parametrization to extract random pt values |
b16bb001 | 84 | Bool_t fQAhistos; // draw QA histograms |
ffe32451 | 85 | Bool_t fIsInit; //=true if initialized |
762e8424 | 86 | AliEMCALGeometry *fGeom; //!pointer to EMCal geometry |
87 | TClonesArray *fClusters; //!cluster collection | |
88 | TClonesArray *fOutClusters; //!output cluster collection | |
89 | TClonesArray *fTracks; //!track collection | |
90 | TClonesArray *fOutTracks; //!output track collection | |
b16bb001 | 91 | AliVCaloCells *fCaloCells; //!cells collection |
92 | AliVCaloCells *fOutCaloCells; //!output cells collection | |
93 | Int_t fAddedCells; //!number of added cells | |
94 | Bool_t fEsdMode; //!ESD/AOD mode | |
95 | TList *fOutput; //!output list for QA histograms | |
762e8424 | 96 | |
97 | private: | |
98 | AliJetModelBaseTask(const AliJetModelBaseTask&); // not implemented | |
99 | AliJetModelBaseTask &operator=(const AliJetModelBaseTask&); // not implemented | |
100 | ||
f660c2d6 | 101 | ClassDef(AliJetModelBaseTask, 6) // Jet modelling task |
762e8424 | 102 | }; |
103 | #endif |