AliPhysics  ebc57ae (ebc57ae)
 All Classes Namespaces Files Functions Variables Typedefs Enumerations Enumerator Friends Macros Groups Pages
AliJetEmbeddingFromAODTask.h
Go to the documentation of this file.
1 
6 #ifndef ALIJETEMBEDDINGFROMAODTASK_H
7 #define ALIJETEMBEDDINGFROMAODTASK_H
8 
9 // $Id$
10 
11 class TFile;
12 class TObjArray;
13 class TClonesArray;
14 class TString;
15 class AliVCaloCells;
16 class AliVHeader;
17 class TH2;
18 class TH1;
19 class TLorentzVector;
20 class AliNamedString;
21 
22 #include "AliJetModelBaseTask.h"
23 
25  public:
27  AliJetEmbeddingFromAODTask(const char *name, Bool_t drawqa=kFALSE);
29 
32 
34  void SetAODTreeName(const char *t) { fAODTreeName = t ; }
35  void SetAODHeaderName(const char *t) { fAODHeaderName = t ; }
36  void SetAODTracksName(const char *n) { fAODTrackName = n ; }
37  void SetAODClusName(const char *n) { fAODClusName = n ; }
38  void SetAODCellsName(const char *n) { fAODCellsName = n ; }
39  void SetAODMCParticlesName(const char *n) { fAODMCParticlesName = n ; }
41  void SetTriggerMask(UInt_t mask) { fTriggerMask = mask ; }
42  void SetAODfilterBits(Int_t b0 = 0, Int_t b1 = 0) { fAODfilterBits[0] = b0 ; fAODfilterBits[1] = b1 ; }
46  void SetTrackEfficiency(Double_t eff = 0.95) { fTrackEfficiency = new TF1("eff", "[0]", 0, 500); fTrackEfficiency->FixParameter(0,eff); }
47  void SetTrackEfficiency(TF1* eff) { fTrackEfficiency = eff ; }
48  void SetTotalFiles(Int_t n) { fTotalFiles = n ; }
49  void SetAttempts(Int_t n) { fAttempts = n ; }
50  void SetRandomAccess(Bool_t r=kTRUE) { fRandomAccess = r ; }
51  void SetAODMC(Bool_t a) { fIsAODMC = a ; }
52  void SetJetMinPt(Double_t pt) { fJetMinPt = pt ; }
53  void SetJetEtaRange(Double_t emi, Double_t ema) { fJetMinEta = emi; fJetMaxEta = ema; }
54  void SetJetPhiRange(Double_t pmi, Double_t pma) { fJetMinPhi = pmi; fJetMaxPhi = pma; }
56  void SetJetType(Byte_t t) { fJetType = t ; }
57  void SetJetAlgo(Byte_t t) { fJetAlgo = t ; }
60  void SetParticlePtRange(Double_t min, Double_t max, Byte_t t=1) { fParticleMinPt = min; fParticleMaxPt = max; fParticleSelection = t; }
62 
63  protected:
64  Bool_t ExecOnce() ;// intialize task
65  void Run() ;// do jet model action
66  virtual TFile *GetNextFile() ;// get next file from fFileList
67  virtual Bool_t OpenNextFile() ;// open next file
68  virtual Bool_t GetNextEntry() ;// get next entry in current tree
69  virtual Bool_t IsAODEventSelected() ;// AOD event trigger/centrality selection
70  TLorentzVector GetLeadingJet(TClonesArray *tracks, TClonesArray *clusters=0); // get the leading jet
71  Bool_t FindParticleInRange(TClonesArray *array);// Find particle in array within range (fParticleMinPt, fParticleMaxPt)
72 
73  TObjArray *fFileList ;// List of AOD files
74  Bool_t fRandomAccess ;// Random access to file number and event
75  TString fAODTreeName ;// Name of the tree in the AOD file
76  TString fAODHeaderName ;// Name of the header in the AOD tree
77  TString fAODVertexName ;// Name of the vertex branch in the AOD tree
78  TString fAODTrackName ;// Name of the track collection branch in the AOD tree
79  TString fAODClusName ;// Name of the cluster collection branch in the AOD tree
80  TString fAODCellsName ;// Name of the cell collection branch in the AOD tree
81  TString fAODMCParticlesName ;// Name of the cell collection branch in the AOD tree
82  Double_t fMinCentrality ;// Minimum centrality
83  Double_t fMaxCentrality ;// Maximum centrality
84  UInt_t fTriggerMask ;// Trigger selection mask
85  Double_t fZVertexCut ;// Z vertex cut
86  Double_t fMaxVertexDist ;// Maximum distance allowed between the vertices of the current and the embedded events
87  Double_t fJetMinPt ;// Select events with a minimum jet pt
88  Double_t fJetMinEta ;// Min eta for jets
89  Double_t fJetMaxEta ;// Max eta for jets
90  Double_t fJetMinPhi ;// Min phi for jets
91  Double_t fJetMaxPhi ;// Max phi for jets
92  Double_t fJetConstituentMinPt ;// Jet constituent min pt
93  Double_t fJetRadius ;// Jet radius
94  Byte_t fJetType ;// Jet type (0=full, 1=charged, 2=neutral)
95  Byte_t fJetAlgo ;// Jet algorithm (0=kT, 1=anti-kT)
96  Bool_t fJetParticleLevel ;// Trigger, look at particle level jets
97  Double_t fParticleMinPt ;// Select events with a particle pt between fParticleMinPt and fParticleMaxPt (see fParticleSelection)
98  Double_t fParticleMaxPt ;// Select events with a particle pt between fParticleMinPt and fParticleMaxPt (see fParticleSelection)
99  Byte_t fParticleSelection ;// Particles used to select events (def=0=none, 1=tracks, 2=clusters, 3=MC particles)
100  Int_t fAODfilterBits[2] ;// AOD track filter bit map
101  Bool_t fIncludeNoITS ;// True = includes tracks with failed ITS refit
102  Double_t fCutMaxFractionSharedTPCClusters; // max fraction of shared TPC clusters
103  Bool_t fUseNegativeLabels ;// Whether or not should use negative MC labels
104  TF1 *fTrackEfficiency ;// Track efficiency
105  Bool_t fIsAODMC ;// Whether the embedding AOD is MC or not
106  Int_t fTotalFiles ;// Total number of files per pt hard bin
107  Int_t fAttempts ;// Attempts to be tried before giving up in opening the next file
108  Bool_t fEmbedCentrality ;// If true, embed centrality (only works when running on AOD) - carefull: it overwrites the event centrality (if any)
115  AliVHeader *fAODHeader ;
116  TClonesArray *fAODVertex ;
117  TClonesArray *fAODTracks ;
118  TClonesArray *fAODClusters ;
119  AliVCaloCells *fAODCaloCells ;
120  TClonesArray *fAODMCParticles ;
131 
132  private:
133  AliJetEmbeddingFromAODTask(const AliJetEmbeddingFromAODTask&); // not implemented
135 
136  ClassDef(AliJetEmbeddingFromAODTask, 13) // Jet embedding from AOD task
137 };
138 #endif
void SetParticlePtRange(Double_t min, Double_t max, Byte_t t=1)
double Double_t
Definition: External.C:58
Bool_t FindParticleInRange(TClonesArray *array)
Int_t fEmbeddingCount
Rejected events.
TH1 * fHistAODFileError
Current file ID vs. AOD file ID (to be embedded)
TList * list
TDirectory file where lists per trigger are stored in train ouput.
TClonesArray * fAODMCParticles
AOD cell collection.
TCanvas * c
Definition: TestFitELoss.C:172
Base class for embedding into an event.
TH1 * fHistEmbeddingQA
File ID not embedded.
TH2 * fHistFileMatching
Current AOD file path being embedded.
Bool_t ExecOnce()
generate a particle with random eta,phi, and correlated pt,mass values
void SetCutMaxFractionSharedTPCClusters(Double_t c=0.4)
AliVHeader * fAODHeader
Current open tree.
int Int_t
Definition: External.C:63
unsigned int UInt_t
Definition: External.C:33
Int_t fFirstAODEntry
Current entry in the AOD tree.
void SetCentralityRange(Double_t min, Double_t max)
TClonesArray * fAODVertex
AOD header.
Int_t fCurrentAODEntry
AOD MC particles collection.
TH1 * fHistNotEmbedded
AOD file ID (to be embedded) error.
TFile * fCurrentAODFile
Current file ID.
AliNamedString * fAODFilePath
Last entry in the AOD tree.
void SetJetPhiRange(Double_t pmi, Double_t pma)
void SetAODfilterBits(Int_t b0=0, Int_t b1=0)
Definition: External.C:220
AliVCaloCells * fAODCaloCells
AOD cluster collection.
Int_t fLastAODEntry
First entry in the AOD tree.
Int_t fPicoTrackVersion
Current open file.
AliJetEmbeddingFromAODTask & operator=(const AliJetEmbeddingFromAODTask &)
Int_t fCurrentAODFileID
Current file being processed (via the event handler)
TClonesArray * fAODTracks
AOD vertex.
bool Bool_t
Definition: External.C:53
TTree * fCurrentAODTree
Version of the PicoTrack class (if any) in fCurrentAODFile.
TClonesArray * fAODClusters
AOD track collection.
Int_t fCurrentFileID
True = embed from ESD (must be a skimmed ESD!)
TLorentzVector GetLeadingJet(TClonesArray *tracks, TClonesArray *clusters=0)
void SetJetEtaRange(Double_t emi, Double_t ema)
Definition: External.C:196
void SetTrackEfficiency(Double_t eff=0.95)
Class for embedding a AOD event into a data event.