AliPhysics  cdeda5a (cdeda5a)
 All Classes Namespaces Files Functions Variables Typedefs Enumerations Enumerator Friends Macros Groups Pages
AliAnalysisTaskEmcalEmbeddingHelper.h
Go to the documentation of this file.
1 #ifndef ALIANALYSISTASKEMCALEMBEDDINGHELPER_H
2 #define ALIANALYSISTASKEMCALEMBEDDINGHELPER_H
3 
16 /* Copyright(c) 1998-2016, ALICE Experiment at CERN, All rights reserved. *
17  * See cxx source for full Copyright notice */
18 
19 class TString;
20 class TChain;
21 class TFile;
22 class AliVEvent;
23 
24 #include <AliAnalysisTaskSE.h>
25 
60  public:
61 
63  AliAnalysisTaskEmcalEmbeddingHelper(const char *name) ;
65 
66  void UserExec(Option_t *option) ;
69  void SetAnchorRun(Int_t r) { fAnchorRun = r ; }
70  void Terminate(Option_t *option) ;
71 
73 
74  AliVEvent* GetExternalEvent() const { return fExternalEvent ; }
75 
76  TString GetTreeName() const { return fTreeName; }
81  TString GetFilePattern() const { return fFilePattern; }
84 
85  void SetESD(const char * treeName = "esdTree") { fTreeName = treeName; }
86  void SetAOD(const char * treeName = "aodTree") { fTreeName = treeName; }
89  void SetFilePattern(const char * pattern) { fFilePattern = pattern; }
92 
93  UInt_t GetTriggerMask() const { return fTriggerMask; }
94  Double_t GetZVertexCut() const { return fZVertexCut; }
96 
97  void SetTriggerMask(UInt_t triggerMask) { fTriggerMask = triggerMask; }
98  void SetZVertexCut(Double_t zVertex) { fZVertexCut = zVertex; }
99  void SetMaxVertexDistance(Double_t distance) { fMaxVertexDist = distance; }
100 
102 
103  protected:
104  void GetFilenames() ;
105  void SetupEmbedding() ;
107  Bool_t GetNextEntry() ;
109  Bool_t InitEvent() ;
110  void InitTree() ;
111 
115 
119 
125 
129  std::vector <std::string> fFilenames ;
130  TFile *fExternalFile ;
138  AliVEvent *fExternalEvent ;
139 
141 
142  private:
145 
149 };
150 #endif
Bool_t fRandomEventNumberAccess
If true, it will start embedding from a random entry in the file rather than from the first...
Double_t fZVertexCut
Z vertex cut on embedded event.
const char * filename
Definition: TestFCM.C:1
double Double_t
Definition: External.C:58
Int_t fPtHardBin
ptHard bin for the given pythia production
Bool_t GetRandomEventNumberAccess() const
Randomly start from an entry in the file. Will then loop around so that all entries are made availabl...
Int_t fLowerEntry
! First entry of the current tree to be used for embedding
Int_t fAnchorRun
Anchor run for the given pythia production.
TString fFileListFilename
Name of the file list containing paths to files to embed.
Bool_t fRandomFileAccess
If true, it will start embedding from a random file in the input files list.
Int_t fCurrentEntry
! Current entry in the current tree
TFile * fExternalFile
! External file used for embedding
TChain * fChain
! External TChain (tree) containing the events available for embedding
Int_t fMaxNumberOfFiles
! Max number of files that are in the TChain
int Int_t
Definition: External.C:63
unsigned int UInt_t
Definition: External.C:33
bool fInitializedEmbedding
! Notes where the TChain has been initialized for embedding
Implementation of task to embed external events.
Double_t fMaxVertexDist
Max distance between Z vertex of internal and embedded event.
AliVEvent * fExternalEvent
! Current external event available for embedding
TString fTreeName
Name of the ESD/AOD tree where the events are to be found.
Int_t fOffset
! Offset from fLowerEntry where the loop over the tree should start
Bool_t GetRandomFileAccess() const
Randomly select the first file. Continues sequentially afterwards.
bool fWrappedAroundTree
! Notes whether we have wrapped around the tree, which is important if the offset into the tree is no...
static AliAnalysisTaskEmcalEmbeddingHelper * AddTaskEmcalEmbeddingHelper()
bool fInitializedNewFile
! Notes where the entry indices have been initialized for a new tree in the chain ...
static AliAnalysisTaskEmcalEmbeddingHelper * fgInstance
! Global instance of this class
AliAnalysisTaskEmcalEmbeddingHelper & operator=(const AliAnalysisTaskEmcalEmbeddingHelper &)
const char Option_t
Definition: External.C:48
bool Bool_t
Definition: External.C:53
Int_t fUpperEntry
! Last entry of the current tree to be used for embedding
Int_t fFilenameIndex
Index of vector containing paths to files to embed.
std::vector< std::string > fFilenames
! Paths to the files to embed
TString fFilePattern
File pattern to select AliEn files.
Int_t fFileNumber
! File number corresponding to the current tree
static const AliAnalysisTaskEmcalEmbeddingHelper * GetInstance()