AliPhysics  9b6b435 (9b6b435)
AliAnalysisTaskSubJetFraction.h
Go to the documentation of this file.
1 #ifndef ALIANALYSISTASKSUBJETFRACTION_H
2 #define ALIANALYSISTASKSUBJETFRACTION_H
3 
4 class TH1;
5 class TH2;
6 class TH3;
7 class TH3F;
8 class TTree;
9 class THnSparse;
10 class TClonesArray;
11 class TArrayI;
12 class AliAnalysisManager;
13 class AliJetContainer;
14 class AliEmcalJetFinder;
15 class AliFJWrapper;
16 
17 
19 #include "AliFJWrapper.h"
20 #include "AliClusterContainer.h"
21 #include "TF1.h"
22 
24  public:
25 
26  enum JetShapeType {
27  kTrue = 0, // generated jets only
28  kTrueDet =1, // detector and generated jets
29  kData = 2, // raw data
30  kDetEmbPart = 3, //detector embedded jets
31  kSim = 4,
32  kGenOnTheFly=5 //fast truth level MC
33  };
34  enum JetShapeSub {
35  kNoSub = 0,
36  kConstSub = 1,
37  kDerivSub = 2
38  };
41  kRecoil = 1
42  };
46  };
47  enum TreeSize {
48  nVar = 28
49  };
50 
52  AliAnalysisTaskSubJetFraction(const char *name);
54 
56  void Terminate(Option_t *option);
57 
58  //Setters
65  void SetJetRadius(Double_t JetRadius) {fJetRadius=JetRadius;}
66  void SetRMatching(Float_t f) { fRMatching = f ;}
75  void SetHolePos(Float_t poshole) { fHolePos = poshole;}
76  void SetHoleWidth(Float_t holewidth) { fHoleWidth = holewidth;}
77  void SetSubJetAlgorithm(Int_t SubJetAlgorithm) {fSubJetAlgorithm=SubJetAlgorithm;}
78  void SetSubJetRadius(Float_t SubJetRadius) {fSubJetRadius=SubJetRadius;}
79  void SetSubJetMinPt(Float_t SubJetMinPt) {fSubJetMinPt=SubJetMinPt;}
80  void SetRMatched(Double_t RMatched) {fRMatched=RMatched;}
81  void SetSharedFractionPtMin(Double_t SharedFractionPtMin) {fSharedFractionPtMin=SharedFractionPtMin;}
83  void SetFullTree(Bool_t FullTree) {fFullTree = FullTree;}
84  void SetBetaSD(Double_t BetaSD) {fBeta_SD = BetaSD;}
85  void SetZCut(Double_t ZCut) {fZCut = ZCut;}
86  void SetReclusteringAlgorithm(Int_t ReclusteringAlgorithm) {fReclusteringAlgorithm = ReclusteringAlgorithm;}
87  void SetSoftDropOn(Int_t SoftDropOn) {fSoftDropOn = SoftDropOn;}
88  void SetMLOn(Int_t MLOn) {fMLOn = MLOn;}
90  Int_t GetMLOn() {return fMLOn;}
91  void SetRandomisationEqualPt(Bool_t RandmosationEqualPt) {fRandomisationEqualPt = RandmosationEqualPt;}
92 
93  void SetNsubUnNormMeasure( Bool_t NsubMeasure) {fNsubMeasure= NsubMeasure;}
94 
95 
96 
98  const char * njetsTrue, //Pyhthia Particle Level
99  const char * njetsDet,
100  const char * njetsHybridUs,
101  const char * njetsHybridS,
102  const Double_t R,
103  const char * nrhoBase,
104  const char * ntracksData,
105  const char * ntracksTrue,
106  const char * ntracksDet,
107  const char * ntracksHybridUs,
108  const char * ntracksHybridS,
109  const char * nclusters,
110  const char *type,
111  const char *CentEst,
113  Int_t SubJetAlgorithm,
114  Float_t SubJetRadius,
115  Float_t SubJetMinPt,
116  Int_t pSel,
117  TString trigClass = "",
118  TString kEmcalTriggers = "",
119  TString tag = "",
123  Float_t minpTHTrigger =0., Float_t maxpTHTrigger =0., AliAnalysisTaskSubJetFraction::DerivSubtrOrder derivSubtrOrder = AliAnalysisTaskSubJetFraction::kSecondOrder, Int_t SoftDropOn=0, Int_t MLOn=0);
124 
125 
126 
127 
128 
129 
130 
131  protected:
133  Bool_t Run();
135 
139  Double_t Angularity(AliEmcalJet *Jet, Int_t JetContNb);
140  Double_t PTD(AliEmcalJet *Jet, Int_t JetContNb);
141  AliEmcalJetFinder *Recluster(AliEmcalJet *Jet, Int_t JetContNb, Double_t SubJetRadius, Double_t SubJetMinPt, Int_t Algorithm, const char* Name);
143  Double_t SubJetFraction(AliEmcalJet *Jet, AliEmcalJetFinder *Reclusterer, Int_t N, Int_t Type, Bool_t Add, Bool_t Loss);
144  Double_t NSubJettiness(AliEmcalJet *Jet, Int_t JetContNb, Double_t JetRadius, AliEmcalJetFinder *Reclusterer, Int_t N, Int_t A, Int_t B);
145  Double_t FjNSubJettiness(AliEmcalJet *Jet, Int_t JetContNb, Int_t N, Int_t Algorithm, Double_t Beta, Int_t Option=0, Double_t Beta_SD=0, Double_t ZCut=0.1);
146  Double_t FjNSubJettinessFastJet(std::pair<fastjet::PseudoJet,fastjet::ClusterSequence *> Jet_ClusterSequence, Int_t JetContNb,Int_t N, Int_t Algorithm, Double_t Beta, Int_t Option=0, Double_t Beta_SD=0, Double_t ZCut=0.1);
147  std::pair<fastjet::PseudoJet,fastjet::ClusterSequence *> ModifyJet(AliEmcalJet* Jet, Int_t JetContNb, TString Modification);
148  std::vector<fastjet::PseudoJet> RandomiseTracks(AliEmcalJet *Jet,std::vector<fastjet::PseudoJet> fInputVectors);
149  std::vector<fastjet::PseudoJet> AddExtraProng(std::vector<fastjet::PseudoJet> fInputVectors, Double_t Distance, Double_t PtFrac);
150  std::vector<fastjet::PseudoJet> AddkTTracks(AliEmcalJet *Jet,std::vector<fastjet::PseudoJet> fInputVectors, Double_t QHat,Double_t Xlength, Int_t NAdditionalTracks);
151 
152  Int_t fContainer; // jets to be analyzed 0 for Base, 1 for subtracted.
153  Float_t fMinFractionShared; // only fill histos for jets if shared fraction larger than X
154  JetShapeType fJetShapeType; // jet type to be used
155  JetShapeSub fJetShapeSub; // jet subtraction to be used
156  JetSelectionType fJetSelection; // Jet selection: inclusive/recoil jet
158  Double_t fShapesVar[nVar]; // jet shapes used for the tagging
159  std::vector<std::vector<Double_t>> fShapesVar_Tracks_Rec;
160  std::vector<std::vector<Double_t>> fShapesVar_Tracks_Truth;
163 
164  Float_t fPtMinTriggerHadron; //min - max pT for trigger particle in case of recoil jet
166  Float_t fRecoilAngularWindow; //angular window for btb recoil analysis
167  Int_t fSemigoodCorrect; //if==1 we run over semigood runs
168  Float_t fHolePos; //position in radians of the bad TPC sector
169  Float_t fHoleWidth; //width of the hole in radians
170  TRandom3 *fRandom;
171  Bool_t fCentSelectOn; // switch on/off centrality selection
172  Float_t fCentMin; // min centrality value
173  Float_t fCentMax; // max centrality value
190 
193  TH1F *fhJetPt;
194  TH1F *fhJetPt_1;
195  TH1F *fhJetPt_2;
196  TH1F *fhJetPhi;
197  TH1F *fhJetPhi_1;
198  TH1F *fhJetPhi_2;
199  TH1F *fhJetEta;
200  TH1F *fhJetEta_1;
201  TH1F *fhJetEta_2;
202  TH1F *fhJetMass;
203  TH1F *fhJetMass_1;
204  TH1F *fhJetMass_2;
205  TH1F *fhJetRadius;
214  TH1F *fhSubJetPt;
234  TH1F *fhTrackPhi;
305  TTree *fTreeResponseMatrixAxis; //Tree with tagging variables subtracted MC or true MC or raw
307 
308  private:
311 
312  ClassDef(AliAnalysisTaskSubJetFraction, 7)
313 };
314 #endif
void SetNsubUnNormMeasure(Bool_t NsubMeasure)
Bool_t fCentSelectOn
Random number generator.
double Double_t
Definition: External.C:58
Definition: External.C:260
Definition: External.C:236
Bool_t Run()
Run function. This is the core function of the analysis and contains the user code. Therefore users have to implement this function.
Definition: External.C:244
std::vector< std::vector< Double_t > > fShapesVar_Tracks_Truth
AliAnalysisTaskSubJetFraction & operator=(const AliAnalysisTaskSubJetFraction &)
void SetPtTriggerSelections(Float_t PtMin, Float_t PtMax)
std::pair< fastjet::PseudoJet, fastjet::ClusterSequence * > ModifyJet(AliEmcalJet *Jet, Int_t JetContNb, TString Modification)
Double_t PTD(AliEmcalJet *Jet, Int_t JetContNb)
Bool_t RetrieveEventObjects()
Retrieve common objects from event.
std::vector< fastjet::PseudoJet > AddExtraProng(std::vector< fastjet::PseudoJet > fInputVectors, Double_t Distance, Double_t PtFrac)
TCanvas * c
Definition: TestFitELoss.C:172
Double_t NSubJettiness(AliEmcalJet *Jet, Int_t JetContNb, Double_t JetRadius, AliEmcalJetFinder *Reclusterer, Int_t N, Int_t A, Int_t B)
void SetReclusteringAlgorithm(Int_t ReclusteringAlgorithm)
Double_t RelativePhi(Double_t Phi1, Double_t Phi2)
AliAnalysisTaskSubJetFraction * AddTaskAliAnalysisTaskSubJetFraction(const char *njetsData, const char *njetsTrue, const char *njetsDet, const char *njetsHybridUs, const char *njetsHybridS, const Double_t R, const char *nrhoBase, const char *ntracksData, const char *ntracksTrue, const char *ntracksDet, const char *ntracksHybridUs, const char *ntracksHybridS, const char *nclusters, const char *type, const char *CentEst, Double_t fSharedFractionPtMin, Int_t SubJetAlgorithm, Float_t SubJetRadius, Float_t SubJetMinPt, Int_t pSel, TString trigClass="", TString kEmcalTriggers="", TString tag="", AliAnalysisTaskSubJetFraction::JetShapeType jetShapeType=AliAnalysisTaskSubJetFraction::kTrue, AliAnalysisTaskSubJetFraction::JetShapeSub jetShapeSub=AliAnalysisTaskSubJetFraction::kNoSub, AliAnalysisTaskSubJetFraction::JetSelectionType jetSelection=AliAnalysisTaskSubJetFraction::kInclusive, Float_t minpTHTrigger=0., Float_t maxpTHTrigger=0., AliAnalysisTaskSubJetFraction::DerivSubtrOrder derivSubtrOrder=AliAnalysisTaskSubJetFraction::kSecondOrder, Int_t SoftDropOn=0, Int_t MLOn=0)
Bool_t FillHistograms()
Function filling histograms.
void SetRandomisationEqualPt(Bool_t RandmosationEqualPt)
int Int_t
Definition: External.C:63
std::vector< std::vector< Double_t > > fShapesVar_Tracks_Rec
float Float_t
Definition: External.C:68
Int_t SelectTriggerHadron(Float_t PtMin, Float_t PtMax)
Definition: External.C:228
Definition: External.C:212
void SetSubJetAlgorithm(Int_t SubJetAlgorithm)
Definition: Option.C:68
Double_t SubJetFraction(AliEmcalJet *Jet, AliEmcalJetFinder *Reclusterer, Int_t N, Int_t Type, Bool_t Add, Bool_t Loss)
void SetSharedFractionPtMin(Double_t SharedFractionPtMin)
void SetSubJetRadius(Float_t SubJetRadius)
AliEmcalJetFinder * Recluster(AliEmcalJet *Jet, Int_t JetContNb, Double_t SubJetRadius, Double_t SubJetMinPt, Int_t Algorithm, const char *Name)
Double_t FjNSubJettinessFastJet(std::pair< fastjet::PseudoJet, fastjet::ClusterSequence * > Jet_ClusterSequence, Int_t JetContNb, Int_t N, Int_t Algorithm, Double_t Beta, Int_t Option=0, Double_t Beta_SD=0, Double_t ZCut=0.1)
Double_t FjNSubJettiness(AliEmcalJet *Jet, Int_t JetContNb, Int_t N, Int_t Algorithm, Double_t Beta, Int_t Option=0, Double_t Beta_SD=0, Double_t ZCut=0.1)
std::vector< fastjet::PseudoJet > RandomiseTracks(AliEmcalJet *Jet, std::vector< fastjet::PseudoJet > fInputVectors)
Definition: External.C:220
Base task in the EMCAL jet framework.
Represent a jet reconstructed using the EMCal jet framework.
Definition: AliEmcalJet.h:51
Double_t Angularity(AliEmcalJet *Jet, Int_t JetContNb)
const char Option_t
Definition: External.C:48
Double_t RelativePhiEventPlane(Double_t EventPlane, Double_t Phi)
std::vector< fastjet::PseudoJet > AddkTTracks(AliEmcalJet *Jet, std::vector< fastjet::PseudoJet > fInputVectors, Double_t QHat, Double_t Xlength, Int_t NAdditionalTracks)
bool Bool_t
Definition: External.C:53
Double_t SubJetOrdering(AliEmcalJet *Jet, AliEmcalJetFinder *Reclusterer, Int_t N, Int_t Type, Bool_t Index)
Container for jet within the EMCAL jet framework.
Definition: External.C:196