AliPhysics  9b6b435 (9b6b435)
AliAnalysisTaskChargedJetsHadronToy.h
Go to the documentation of this file.
1 #ifndef ALIANALYSISTASKCHARGEDJETSHADRONTOY_H
2 #define ALIANALYSISTASKCHARGEDJETSHADRONTOY_H
3 /* Copyright(c) 1998-2016, ALICE Experiment at CERN, All rights reserved. *
4  * See cxx source for full Copyright notice */
5 
6 class TClonesArray;
7 class TString;
8 class TRandom3;
9 class TTree;
10 
11 // Toy model to create an event containing tracks
13 public:
14 
16  AliAnalysisTaskChargedJetsHadronToy(const char* name);
18 
20  void Terminate(Option_t *);
21 
22  // ### SETTERS/GETTERS
23  void AddTracksFromMixedEvent(const char* baseFolder) {fMixedEvent_BaseFolder = baseFolder; fAddTracksFromMixedEvent = kTRUE;}
24  void AddTracksFromPicoTracks(const char* arrName) {fPicoTracksArrayName = arrName; fAddTracksFromPicoTracks = kTRUE;}
25  void AddTracksFromInputEvent(const char* arrName) {fEventTracksArrayName = arrName; fAddTracksFromInputEvent = kTRUE;}
26  void AddTracksFromToy(const char* configFileName = "alien:///alice/cern.ch/user/r/rhaake/Distributions_PbPb_1800.root");
27 
32 
37 
38 
47  void SetMaxEta(Double_t val) {fMaxEta = val;}
48 
49  void SetOutputArrayName(const char* val) {fOutputArrayName = val;}
50 
51  void SetMixedEventTreeName(const char* val) {fMixedEvent_TreeName = val;}
53 
54 protected:
55  // ### Settings
56  Bool_t fAddTracksFromInputEvent; // Use tracks from the event
57  Bool_t fAddTracksFromPicoTracks; // Use tracks from PicoTrack array in event
58  Bool_t fAddTracksFromToy; // Use toy model to add tracks
59  Bool_t fAddTracksFromMixedEvent; // Use tracks from mixed event trees
60 
61  Double_t fTrackEfficiency_InputEvent; // tracking efficiency
62  Double_t fTrackEfficiency_Toy; // tracking efficiency
63  Double_t fTrackEfficiency_ME; // tracking efficiency
64  Double_t fTrackEfficiency_PicoTracks; // tracking efficiency
65 
66  Int_t fLabelOffset_InputEvent; // label offset
67  Int_t fLabelOffset_Toy; // label offset
68  Int_t fLabelOffset_ME; // label offset
69  Int_t fLabelOffset_PicoTracks; // label offset
70 
71  TH1* fDistributionMultiplicity; // histogram for multiplicity distribution
72  TH1* fDistributionPt; // histogram for Pt distribution
73  TH1* fDistributionEtaPhi; // histogram for eta/phi distribution
74  Int_t fMinCentrality; // minimum centrality
75  Int_t fMaxCentrality; // maximum centrality
76  Double_t fMaxEta; // maximum eta
77 
82 
83  // ### Mixed event settings
86  Int_t fMixedEvent_CurrentFileID; // ME: open file ID
87  TString fMixedEvent_BaseFolder; // ME: base folder from which we copy the files from
88  TString fMixedEvent_TreeName; // ME: name of tree from file
89  Int_t fMixedEvent_CurrentEventID; // ME: current event in tree
90  Int_t fMixedEvent_NumTotalFiles; // ME: number total files
91 
92  Int_t fBuffer_NumTracks; // number tracks in event
97 
98  // ### Input/output settings+arrays
99  TString fPicoTracksArrayName; // Name of the TClonesArray that will be loaded
100  TClonesArray* fPicoTracksArray;
101 
102  TString fEventTracksArrayName; // Name of the TClonesArray that will be loaded
103  TClonesArray* fEventTracksArray;
104 
105  TString fOutputArrayName; // Name of the TClonesArray that will be written
106  TClonesArray* fOutputArray;
107 
108  // ### Misc
109  TRandom3* fRandom;
114 
115  Bool_t Run();
116  void AssembleEvent();
117  void CreateQAPlots();
120  void ExecOnce();
121 
122  void FillHistogram(const char * key, Double_t x);
123  void FillHistogram(const char * key, Double_t x, Double_t y);
124  void FillHistogram(const char * key, Double_t x, Double_t y, Double_t add);
125  template <class T> T* AddHistogram1D(const char* name = "CustomHistogram", const char* title = "NO_TITLE", const char* options = "", Int_t xBins = 100, Double_t xMin = 0.0, Double_t xMax = 20.0, const char* xTitle = "x axis", const char* yTitle = "y axis");
126  template <class T> T* AddHistogram2D(const char* name = "CustomHistogram", const char* title = "NO_TITLE", const char* options = "", Int_t xBins = 100, Double_t xMin = 0.0, Double_t xMax = 20.0, Int_t yBins = 100, Double_t yMin = 0.0, Double_t yMax = 20.0, const char* xTitle = "x axis", const char* yTitle = "y axis", const char* zTitle = "z axis");
127 
128 private:
131 
133  ClassDef(AliAnalysisTaskChargedJetsHadronToy, 4); // Toy model
135 };
136 
137 #endif
TH2 * fDistributionV5
Distribution for v4 in bins of pt and centrality.
TH2 * fDistributionV3
Distribution for v2 in bins of pt and centrality.
double Double_t
Definition: External.C:58
Float_t * fBuffer_TrackPhi
buffer for track pt array
const char * title
Definition: MakeQAPdf.C:27
Short_t * fBuffer_TrackCharge
buffer for track eta array
TString fPicoTracksArrayName
buffer for track charge array
TString fOutputArrayName
input array containing tracks from events
TString fEventTracksArrayName
input array containing pico tracks
T * AddHistogram1D(const char *name="CustomHistogram", const char *title="NO_TITLE", const char *options="", Int_t xBins=100, Double_t xMin=0.0, Double_t xMax=20.0, const char *xTitle="x axis", const char *yTitle="y axis")
UShort_t T(UShort_t m, UShort_t t)
Definition: RingBits.C:60
void AddTracksFromToy(const char *configFileName="alien:///alice/cern.ch/user/r/rhaake/Distributions_PbPb_1800.root")
int Int_t
Definition: External.C:63
float Float_t
Definition: External.C:68
TH2 * fDistributionV4
Distribution for v3 in bins of pt and centrality.
short Short_t
Definition: External.C:23
Definition: External.C:220
Base task in the EMCAL jet framework.
TFile * fMixedEvent_CurrentFile
ME: The tree of the mixed event.
T * AddHistogram2D(const char *name="CustomHistogram", const char *title="NO_TITLE", const char *options="", Int_t xBins=100, Double_t xMin=0.0, Double_t xMax=20.0, Int_t yBins=100, Double_t yMin=0.0, Double_t yMax=20.0, const char *xTitle="x axis", const char *yTitle="y axis", const char *zTitle="z axis")
const char Option_t
Definition: External.C:48
bool Bool_t
Definition: External.C:53
Double_t yMin
TTree * fMixedEvent_Tree
Distribution for v5 in bins of pt and centrality.
Definition: External.C:196
Double_t yMax
void ExecOnce()
Perform steps needed to initialize the analysis.
Float_t * fBuffer_TrackEta
buffer for track phi array
AliAnalysisTaskChargedJetsHadronToy & operator=(const AliAnalysisTaskChargedJetsHadronToy &)