]> git.uio.no Git - u/mrichter/AliRoot.git/blame - PWGJE/EMCALJetTasks/AliJetModelBaseTask.h
move EMCALJetTasks from PWGGA to PWGJE
[u/mrichter/AliRoot.git] / PWGJE / EMCALJetTasks / AliJetModelBaseTask.h
CommitLineData
762e8424 1#ifndef ALIJETMODELBASETASK_H
2#define ALIJETMODELBASETASK_H
3
4// $Id$
5
6class TClonesArray;
7class AliEMCALGeometry;
8class AliVCluster;
9class AliPicoTrack;
65bb5510 10
11#include <TH1F.h>
12#include <TF1.h>
762e8424 13
14#include "AliAnalysisTaskSE.h"
15
16class AliJetModelBaseTask : public AliAnalysisTaskSE {
17 public:
18 AliJetModelBaseTask();
19 AliJetModelBaseTask(const char *name);
20 virtual ~AliJetModelBaseTask();
21
ffe32451 22 void UserExec(Option_t* /*option*/);
762e8424 23
ffe32451 24 void SetClusName(const char *n) { fCaloName = n; }
ffe32451 25 void SetCopyArray(Bool_t copy) { fCopyArray = copy; }
a825589f 26 void SetEtaRange(Float_t min, Float_t max) { fEtaMin = min; fEtaMax = max; }
27 void SetGeometryName(const char *n) { fGeomName = n; }
28 void SetMarkMC(Bool_t m) { fMarkMC = m; }
ffe32451 29 void SetNClusters(Int_t n) { fNClusters = n; }
30 void SetNTracks(Int_t n) { fNTracks = n; }
a825589f 31 void SetPhiRange(Float_t min, Float_t max) { fPhiMin = min; fPhiMax = max; }
32 void SetPtRange(Float_t min, Float_t max) { fPtMin = min; fPtMax = max; }
65bb5510 33 void SetPtSpectrum(TH1 *f) { fPtSpectrum = f; }
34 void SetPtSpectrum(TF1 *f) { fPtSpectrum = new TH1F("ptSpectrum","ptSpectrum",250,f->GetXmin(),f->GetXmax());
35 fPtSpectrum->Add(f); }
a825589f 36 void SetSuffix(const char *s) { fSuffix = s; }
37 void SetTracksName(const char *n) { fTracksName = n; }
762e8424 38
39 protected:
38f684a8 40 AliVCluster *AddCluster(Double_t e = -1, Double_t eta = -999, Double_t phi = -1); // add a cluster; if values are -1 generate random parameters
41 AliVCluster *AddCluster(Double_t e, Int_t absId); // add a cluster with given energy and position
42 AliPicoTrack *AddTrack(Double_t pt = -1, Double_t eta = -999, Double_t phi = -1); // add a track; if values are -1 generate random parameters
e44e8726 43 void CopyClusters();
44 void CopyTracks();
ffe32451 45 virtual void ExecOnce();
46 void GetRandomCell(Double_t &eta, Double_t &phi, Int_t &absId); // generate a random cell in the calorimeter
47 Double_t GetRandomEta(); // generate a random eta value in the given range
48 Double_t GetRandomPhi(); // generate a random phi value in the given range
49 Double_t GetRandomPt(); // generate a random pt value in the given range
50 virtual void Run(); // do jet model action
762e8424 51
52 TString fGeomName; // EMCal geometry name
53 TString fTracksName; // name of track collection
54 TString fOutTracksName; // name of output track collection
55 TString fCaloName; // name of calo cluster collection
56 TString fOutCaloName; // name of output cluster collection
57 TString fSuffix; // suffix to add in the name of new collections
58 Float_t fEtaMin; // eta minimum value
59 Float_t fEtaMax; // eta maximum value
60 Float_t fPhiMin; // phi minimum value
61 Float_t fPhiMax; // phi maximum value
62 Float_t fPtMin; // pt minimum value
63 Float_t fPtMax; // pt maximum value
64 Bool_t fCopyArray; // whether or not the array will be copied to a new one before modelling
65 Int_t fNClusters; // how many clusters are being processed
66 Int_t fNTracks; // how many tracks are being processed
a825589f 67 Bool_t fMarkMC; // whether or not mark new tracks/cluster as MC
65bb5510 68 TH1 *fPtSpectrum; // pt spectrum parametrization to extract random pt values
ffe32451 69 Bool_t fIsInit; //=true if initialized
762e8424 70 AliEMCALGeometry *fGeom; //!pointer to EMCal geometry
71 TClonesArray *fClusters; //!cluster collection
72 TClonesArray *fOutClusters; //!output cluster collection
73 TClonesArray *fTracks; //!track collection
74 TClonesArray *fOutTracks; //!output track collection
75
76 private:
77 AliJetModelBaseTask(const AliJetModelBaseTask&); // not implemented
78 AliJetModelBaseTask &operator=(const AliJetModelBaseTask&); // not implemented
79
65bb5510 80 ClassDef(AliJetModelBaseTask, 4) // Jet modelling task
762e8424 81};
82#endif