AliPhysics  2797316 (2797316)
 All Classes Namespaces Files Functions Variables Typedefs Enumerations Enumerator Friends Macros Groups Pages
AliJetEmbeddingTask.h
Go to the documentation of this file.
1 
17 #ifndef ALIJETEMBEDDINGTASK_H
18 #define ALIJETEMBEDDINGTASK_H
19 
20 // $Id$
21 
22 #include "AliJetModelBaseTask.h"
23 
24 class TTree;
25 class THnSparse;
26 
28  public:
30  AliJetEmbeddingTask(const char *name);
31  virtual ~AliJetEmbeddingTask();
32 
34  void SetMasslessParticles(Bool_t b) { fMassless = b ; }
35  void SetMass(Double_t mass) { fMass = mass ; }
36  void SetNeutralFraction(Double_t f) { fNeutralFraction = f ; }
37  void SetNeutralMass(Double_t m) { fNeutralMass = m ; }
38  void SetNamesForTree(TString path, TString treename, TString branchname, TString branchnameP = "fJetPart.") { fPathTreeinputFile = path; fTreeinputName = treename; fBranchJDetName = branchname; fBranchJParName = branchnameP;}
39  void SetPathAndNameInputpTDistribution(TString path, TString name) { fPathpTinputFile = path; fpTinputName = name;}
40  void SetPathAndNameInputMDistribution(TString path, TString name) { fPathMinputFile = path; fMinputName = name;}
41 
42  void SetTreeBranchName(TString brDet = "fJetDet.") {fBranchJDetName = brDet; }
43  void SetTreeBranchPartName(TString brPar = "fJetPart.") {fBranchJParName = brPar; }
44  void SetTreeFromFile(TString filenameM, TString treename);
45  void SetUseRandomEntry(Bool_t isrdm = kTRUE) {fRandomEntry = isrdm; }
46  void SetNBinsEmbedding(Int_t n) { fNBins = n; }
47  void SetRejection(Float_t* rej);
48  void SetPtRangesEmb(Float_t* ptlims);
49  void SetNevPerBin(Int_t n) { fNevPerBin = n; Printf("Number of events per bin %d", fNevPerBin); }
50 
51  protected:
52  void Run();
53  void SetTree(TTree *tree);
54 
55  void FillHistograms();
56  Float_t GetDownscalinigFactor();
57  void Terminate(Option_t *option = "");
58  private:
59  Bool_t fMassless;
60 
61  Double_t fNeutralFraction;
62  Double_t fNeutralMass;
63  Double_t fMass;
64  TString fPathMinputFile;
65  TString fPathpTinputFile;
66  TString fMinputName;
67  TString fpTinputName;
68  Bool_t fFromTree;
70  TString fTreeinputName;
71  TString fBranchJDetName;
72  TString fBranchJParName;
73  TTree* fTreeJet4Vect;
74  Int_t fCurrentEntry;
75  TList *fInput;
76  Bool_t fRandomEntry;
77  Int_t fNBins;
78  Float_t *fDownscale; //[fNBins]
81  Float_t *fPtRanges; //[fNBins]
82  Int_t fNevPerBin;
83  Int_t fCount;
84  Int_t fCurrentBin;
85  Int_t fGoBack;
86  THnSparse *fhPartJet;
87  TH1F *fhEtaPart;
88  TH1F *fhPhiPart;
90  Long64_t fNTreeEntries;
91  Bool_t fOldCutOnDetPt;
92 
93  AliJetEmbeddingTask(const AliJetEmbeddingTask&); // not implemented
94  AliJetEmbeddingTask &operator=(const AliJetEmbeddingTask&); // not implemented
95 
97  ClassDef(AliJetEmbeddingTask, 13)
98 };
100 #endif
Class for track embedding into an event.
Int_t fCurrentEntry
Current TTree entry.
void SetPathAndNameInputpTDistribution(TString path, TString name)
void SetMasslessParticles(Bool_t b)
void SetNeutralFraction(Double_t f)
TString fBranchJDetName
name of the detector level jet branch in the TTree
Int_t fCount
counts number of embedded tracks in the current pT bin
TString fPathpTinputFile
path to the file where the external input pT distribution is (can be from alien)
THnSparse * fhPartJet
! control histogram particle level correponsding to embedded from tree
void SetUseRandomEntry(Bool_t isrdm=kTRUE)
void SetTree(TTree *tree)
Int_t fNevPerBin
number of embedded tracks per pT bins
Double_t mass
Double_t ptlims[nPtBins+1]
TTree * fTreeJet4Vect
! tree containing the jet 4-vectors (input for embed.)
Float_t * fDownscale
factor to exclude randomly entries from the embedding
void SetTreeBranchPartName(TString brPar="fJetPart.")
TH1F * fhPhiPart
! Phi particle corresponding to embedded from tree
Base class for embedding into an event.
Int_t fCurrentBin
the current pT bin
Long64_t fNTreeEntries
Tree entry number.
TString fPathTreeinputFile
path to the file where the external input Tree is (can be from alien)
Int_t fGoBack
how many times fCurrentBin is set back to 0
void Terminate(Option_t *option="")
Double_t fMass
assign this mass to particle
void SetNevPerBin(Int_t n)
void SetTreeFromFile(TString filenameM, TString treename)
Float_t * fPtRanges
low lims of the pT ranges corresponding to the fDownscale bin
void SetPtRangesEmb(Float_t *ptlims)
Bool_t fMassless
make particles massless
Bool_t fOldCutOnDetPt
Apply cut on the embedded track at detector level (this was default before, not we apply the cut at p...
TString fMinputName
name of the external input Mass histogram
Double_t fNeutralMass
assign this mass to neutral particles
void SetTreeBranchName(TString brDet="fJetDet.")
TH1F * fhEtaPart
! Eta particle corresponding to embedded from tree
Bool_t fFromTree
if true use TTree of jet 4-vectors as input single tracks
TList * fInput
! Input histograms saved in this list
Double_t fNeutralFraction
assign charge==0 to fraction of particles
TH1F * fhTreeEntriesUsed
! Entries of the TTree used
TString fpTinputName
name of the external input pT histogram
void SetMass(Double_t mass)
void SetPathAndNameInputMDistribution(TString path, TString name)
Bool_t fRandomEntry
draw random number to extract the entry number in the tree
void SetNeutralMass(Double_t m)
TString fTreeinputName
name of the external input Tree
void SetNBinsEmbedding(Int_t n)
void SetNamesForTree(TString path, TString treename, TString branchname, TString branchnameP="fJetPart.")
AliJetEmbeddingTask & operator=(const AliJetEmbeddingTask &)
TString fBranchJParName
name of the particle level jet branch in the TTree
void SetRejection(Float_t *rej)
TString fPathMinputFile
path to the file where the external input Mass distribution is (can be from alien) ...
void Run()
intialize task