]>
Commit | Line | Data |
---|---|---|
b725dccf | 1 | #ifndef ALIANALYSISTASKFASTEMBEDDING_H |
2 | #define ALIANALYSISTASKFASTEMBEDDING_H | |
3 | ||
4 | /* Copyright(c) 1998-1999, ALICE Experiment at CERN, All rights reserved. * | |
5 | * See cxx source for full Copyright notice */ | |
6 | ||
7 | /* $Id$ */ | |
8 | ||
9 | #include "AliAnalysisTaskSE.h" | |
10 | ||
11 | class AliAODEvent; | |
12 | class TTree; | |
13 | class TFile; | |
14 | class TChain; | |
15 | class TObjArray; | |
16 | class TObjString; | |
17 | class TRandom3; | |
18 | class TH1F; | |
19 | class TH2F; | |
20 | ||
21 | class AliAnalysisTaskFastEmbedding : public AliAnalysisTaskSE { | |
22 | ||
23 | public: | |
24 | ||
25 | AliAnalysisTaskFastEmbedding(); | |
26 | AliAnalysisTaskFastEmbedding(const char *name); | |
27 | AliAnalysisTaskFastEmbedding(const AliAnalysisTaskFastEmbedding ©); | |
28 | AliAnalysisTaskFastEmbedding& operator=(const AliAnalysisTaskFastEmbedding &o); | |
29 | virtual ~AliAnalysisTaskFastEmbedding(); | |
30 | ||
31 | virtual void UserCreateOutputObjects(); | |
0ed51e0d | 32 | virtual void LocalInit() { Init(); } |
b725dccf | 33 | virtual void Init(); |
34 | virtual void UserExec(Option_t*); | |
35 | virtual void Terminate(Option_t */*option*/); | |
36 | ||
37 | void SetAODPath(TString path) {fAODPath = path;} | |
38 | void SetArrayOfAODPaths(TObjArray* arr) {fAODPathArray = arr;} | |
39 | void SetTrackBranch(TString name) {fTrackBranch = name;} | |
40 | void SetMCparticlesBranch(TString name) {fMCparticlesBranch = name;} | |
1a2bb6d5 | 41 | void SetJetBranch(TString name) {fJetBranch = name;} |
b725dccf | 42 | |
43 | void SetEmbedMode(Int_t m) {fEmbedMode = m;} | |
44 | Int_t GetEmbedMode() {return fEmbedMode;} | |
45 | void SetEvtSelecMode(Int_t s) {fEvtSelecMode = s;} | |
46 | Int_t GetEvtSelecMode() {return fEvtSelecMode;} | |
47 | ||
48 | void SetEvtSelJetPtRange(Float_t minPt, Float_t maxPt) {fEvtSelMinJetPt = minPt; fEvtSelMaxJetPt = maxPt;} | |
46465e39 | 49 | void SetEvtSelJetEtaRange(Float_t minEta, Float_t maxEta) {fEvtSelMinJetEta = minEta; fEvtSelMaxJetEta = maxEta;} |
50 | void SetEvtSelJetPhiRange(Float_t minPhi, Float_t maxPhi) {fEvtSelMinJetPhi = minPhi; fEvtSelMaxJetPhi = maxPhi;} | |
b725dccf | 51 | |
52 | void SetToyNumberOfTrackRange(Int_t minN = 1, Int_t maxN = 1){ fToyMinNbOfTracks = minN, fToyMaxNbOfTracks = maxN; } | |
53 | void SetToyTrackRanges(Double_t minPt = 50., Double_t maxPt = 50., Double_t ptDistr=0, | |
54 | Double_t minEta = -.5, Double_t maxEta = .5, | |
55 | Double_t minPhi = 0., Double_t maxPhi = 2*TMath::Pi()) | |
56 | { | |
57 | fToyMinTrackPt = minPt; fToyMaxTrackPt = maxPt; fToyDistributionTrackPt = ptDistr; | |
58 | fToyMinTrackEta = minEta; fToyMaxTrackEta = maxEta; | |
59 | fToyMinTrackPhi = minPhi; fToyMaxTrackPhi = maxPhi;} | |
60 | void SetToyFilterMap(UInt_t f) {fToyFilterMap = f;} | |
61 | ||
62 | ||
63 | // embedding modes | |
64 | enum {kAODFull=0, kAODJetTracks, kAODJet4Mom, kToyTracks}; | |
65 | // event selection from AOD | |
66 | enum {kEventsAll=0, kEventsJetPt}; | |
67 | ||
68 | ||
69 | private: | |
70 | ||
71 | AliAODEvent* fAODout; //! AOD out | |
72 | AliAODEvent* fAODevent; //! AOD in | |
73 | TTree* fAODtree; //! AODin tree | |
74 | TFile* fAODfile; //! AODin file | |
75 | TRandom3* rndm; //! random nummer generator | |
76 | ||
77 | TObjArray* fAODPathArray; // array of paths of AOD in file | |
78 | TString fAODPath; // path of AOD in file | |
79 | ||
80 | TString fTrackBranch; // name of branch for extra tracks in AOD out | |
81 | TString fMCparticlesBranch; // name of branch for extra mcparticles in AOD out | |
1a2bb6d5 | 82 | TString fJetBranch; // name of branch for extra jets AOD in |
b725dccf | 83 | |
84 | Int_t fEntry; // entry of extra AOD | |
b725dccf | 85 | |
86 | Int_t fEmbedMode; | |
87 | Int_t fEvtSelecMode; | |
88 | ||
89 | // event selection from AOD | |
90 | Float_t fEvtSelMinJetPt; // minimum pt of the leading jet | |
91 | Float_t fEvtSelMaxJetPt; // maximum pt of the leading jet | |
46465e39 | 92 | Float_t fEvtSelMinJetEta; // minimum eta of the leading jet |
93 | Float_t fEvtSelMaxJetEta; // maximum eta of the leading jet | |
94 | Float_t fEvtSelMinJetPhi; // minimum phi of the leading jet | |
95 | Float_t fEvtSelMaxJetPhi; // maximum phi of the leading jet | |
b725dccf | 96 | |
97 | ||
98 | // settings for toy "track generation" | |
99 | Int_t fToyMinNbOfTracks; // minimum nb. of tracks per event | |
100 | Int_t fToyMaxNbOfTracks; // maximum nb. of tracks per event | |
101 | Double_t fToyMinTrackPt; // minimum track pT | |
102 | Double_t fToyMaxTrackPt; // maximum track pT | |
103 | Double_t fToyDistributionTrackPt; // distribution of track pt | |
104 | Double_t fToyMinTrackEta; // minimum eta of tracks | |
105 | Double_t fToyMaxTrackEta; // maximum eta of tracks | |
106 | Double_t fToyMinTrackPhi; // minimum phi of tracks | |
107 | Double_t fToyMaxTrackPhi; // maximum phi of tracks | |
108 | UInt_t fToyFilterMap; // filter map of tracks | |
109 | ||
110 | ||
111 | // qa histos | |
112 | TList *fHistList; // list of histograms | |
113 | TH1F *fh1TrackPt; //! track pt | |
114 | TH2F *fh2TrackEtaPhi; //! track eta-phi | |
115 | TH1F *fh1TrackN; //! nb. of tracks | |
46465e39 | 116 | TH1F *fh1JetPt; //! jet pt |
117 | TH2F *fh2JetEtaPhi; //! jet eta-phi | |
118 | TH1F *fh1JetN; //! nb. of jets | |
b725dccf | 119 | TH1F *fh1MCTrackPt; //! MC track pt |
120 | TH2F *fh2MCTrackEtaPhi; //! MC track eta-phi | |
121 | TH1F *fh1MCTrackN; //! nb. of MC tracks | |
46465e39 | 122 | TH1I *fh1AODfile; //! used AOD files from AODPathArray |
123 | ||
b725dccf | 124 | |
0ed51e0d | 125 | Int_t GetJobID(); // get job id (sub-job id on the GRID) |
1a2bb6d5 | 126 | Int_t SelectAODfile(); |
46465e39 | 127 | Int_t OpenAODfile(Int_t trial = 0); |
b725dccf | 128 | |
129 | ||
46465e39 | 130 | ClassDef(AliAnalysisTaskFastEmbedding, 4); |
b725dccf | 131 | }; |
132 | ||
133 | #endif | |
134 |