AliPhysics  master (3d17d9d)
AliAnalysisTaskHFJetIPQA.h
Go to the documentation of this file.
1 #ifndef ALIANALYSISTASKJETIPQA_H
2 #define ALIANALYSISTASKJETIPQA_H
4 #include "TGraph.h"
5 #include "THistManager.h"
6 #include <memory>
7 class AliEmcalJet;
8 class AliAODVertex;
9 class AliAODTrack;
10 class TList;
11 class TH1D;
12 class THistManager;
13 class AliPIDResponse;
14 class AliHFEpidBayes;
15 class TTree;
16 class TH2D;
17 class TCanvas;
18 class TParticle;
19 class TClonesArray;
20 class AliAODMCParticle;
21 class AliMCEvent;
22 class AliESDEvent;
23 class AliESDtrack;
24 class TGraph;
25 class AliAnalysisUtils;
26 class TRandom3;
27 class AliTriggerAnalysis;
28 class THnSparse;
29 class AliOADBContainer;
30 class AliEmcalList;
31 class AliVertexerTracks;
32 class AliPID;
33 class TGraph;
34 class AliVParticle;
35 class AliPIDCombined;
36 class AliEmcalJetFinder;
37 #include "AliFJWrapper.h"
38 
39 
40 #include "TMatrixD.h"
41 #include "TF1.h"
42 #include "AliESDtrackCuts.h"
43 #include <TDatabasePDG.h>
44 #include <vector>
45 #include <utility>
46 #include <map>
47 
48 //Define helper classes to cleanup analysis
49 
51 {
52 public:
53  //STATIC ENUM DEFINITIONS
58  enum EParticleType {bPi0=111,bEta=221,bEtaPrime=331,bPhi=333,bRho=113,bOmega=223,bSigma0=3212,bK0s=310,bLambda=3122,bPi=211,bProton=2212,bKaon=321,bOmegaBaryon=3334,
59  bAntiOmegaBaryon=-3334,bXiBaryon=3312,bAntiXiBaryon=-3312,bD0=421,bDPlus=411,bDStarPlus=413,bDSPlus=431,bK0l=130,bSigmaMinus = 3112,bSigmaPlus = 3222,bRhoPlus=213,
60  bBPlus = 521,bB0 = 511,bLambdaB =5122,bLambdaC=4122,bBStarPlus=523,bK0S892 = 313,bK0S892plus = 323};
64 
65  enum bCuts{
93  };
94 
95  enum V0Cuts{
106 
119 
123  };
124 
125  enum TCTagType{
129  };
130 
135  };
136 
137  enum V0TagType{
142  };
143 
147  C,
148  B,
151  };
152 
153 
154  //UTILITY STRUCT DEFINITIONS
155  struct SJetIpPati {
156  SJetIpPati(Double_t v1, Double_t v2, Int_t isv0, Bool_t c,Int_t tl,Double_t pt): first(v1),second(v2),is_V0(isv0),is_fromB(c),trackLabel(tl),trackpt(pt){}
157  Double_t first; // to be compatible with std::pair
158  Double_t second;// to be compatible with std::pair
159  Int_t is_V0; // added for electron contribution check
160  Bool_t is_fromB; // added for electron contribution check
163  };
164 
165  struct SV0Daugh {
166  SV0Daugh(): fPt(0), fEta(0), iCharge(0), iCrossedTPC(0), iNoTPCCluster(0), fDCAtoPV(0), bTPCRefitOn(kFALSE), bIsKink(kFALSE){}
167  double fPt;
168  double fEta;
169  int iCharge;
172  double fDCAtoPV;
174  bool bIsKink;
175 
176  void Reset() {memset(this,0, sizeof(*this));}
177  void Print() const;
178  };
179 
180  struct SV0Cand {
182  bOnFly(0),
183  fDCAV0DaughvsDaugh(0),
184  fPA(0),
185  fDecayRadius(0),
186  fLifetimeK0(0),
187  fLifetimeLambda(0),
188  fEta(0),
189  fPt(0),
190  fRapK0(0),
191  fRapLambda(0),
192  fDecayLength3D(0),
193  fDecayLength2D(0),
194  fArmenterosAlpha(0),
195  fArmenterosPt(0),
196  fMassK0(0),
197  fMassLambda(0),
198  fMassAntilambda(0),
199  fSigmaPosPion(0),
200  fSigmaPosProton(0),
201  fSigmaNegPion(0),
202  fSigmaNegProton(0),
203  bDaughsMissing(0),
204 
205  bIsCandidateK0s (kTRUE), // candidate for K0s
206  bIsCandidateLambda (kTRUE), // candidate for Lambda
207  bIsCandidateALambda (kTRUE), // candidate for anti-Lambda
208  bIsInPeakK0s (kFALSE), // candidate within the K0s mass peak
209  bIsInPeakLambda (kFALSE), // candidate within the Lambda mass peak
210  bIsInPeakALambda (kFALSE), // candidate within the anti-Lambda mass peak
211  bIsInConeJet (kFALSE), // candidate within the jet cones
212  bIsInConePerp (kFALSE), // candidate within a perpendicular cone
213  bIsInConeRnd (kFALSE), // candidate within the random cone
214  bIsInConeMed (kFALSE), // candidate within the median-cluster cone
215  bIsOutsideCones (kFALSE) // candidate outside excluded cones
216  {}
217 
218  bool bOnFly;
220  double fPA;
221  double fDecayRadius;
222  double fLifetimeK0;
224  double fEta;
225  double fPt;
226  double fRapK0;
227  double fRapLambda;
232  double fMassK0;
233  double fMassLambda;
240 
241  Bool_t bIsCandidateK0s ; // candidate for K0s
242  Bool_t bIsCandidateLambda ; // candidate for Lambda
243  Bool_t bIsCandidateALambda ; // candidate for anti-Lambda
244  Bool_t bIsInPeakK0s ; // candidate within the K0s mass peak
245  Bool_t bIsInPeakLambda ; // candidate within the Lambda mass peak
246  Bool_t bIsInPeakALambda ; // candidate within the anti-Lambda mass peak
247  Bool_t bIsInConeJet ; // candidate within the jet cones
248  Bool_t bIsInConePerp ; // candidate within a perpendicular cone
249  Bool_t bIsInConeRnd ; // candidate within the random cone
250  Bool_t bIsInConeMed ; // candidate within the median-cluster cone
251  Bool_t bIsOutsideCones ; // candidate outside excluded cones
252 
253  void Reset() {memset(this,0, sizeof(*this)); bIsCandidateK0s=bIsCandidateLambda=bIsCandidateALambda=kTRUE;}
254  void Print() const;
255  };
256 
257  //_________________________
258  //FUNCTION DEFINITIONS
260  AliAnalysisTaskHFJetIPQA(const char *name);
261  AliAnalysisTaskHFJetIPQA(const AliAnalysisTaskHFJetIPQA&); // not implemented
262  AliAnalysisTaskHFJetIPQA& operator=(const AliAnalysisTaskHFJetIPQA&); // not implemented
264  virtual void UserCreateOutputObjects();
265  virtual void UserExecOnce();
266  virtual void Terminate(Option_t *option="");
267  virtual Bool_t Run();
268 
269  //__________________________
270  //basic stuff
271  void localtoglobal(double alpha, double *local, double *global);
272  // void EventwiseCleanup();
273  AliVParticle * GetVParticleMother(AliVParticle *part);
274  Double_t GetLocalAlphaAOD(AliAODTrack *track);
275  Double_t GetTrackCurvature(AliAODTrack *track);
276  Double_t GetLocalThetaAOD(AliAODTrack *track);
277  Bool_t getJetVtxMass( AliEmcalJet *jet, double &value);
278  void SetJetRadius(Double_t fJetRadRead){fJetRadius=fJetRadRead;}
279 
280  int GetMCTruth(AliAODTrack *track, int &motherpdg);
281  bool GetPIDCombined(AliAODTrack * track, double *prob, int &nDetectors, UInt_t &usedDet , AliPID::EParticleType &MostProbablePID, bool setTrackPID );
283  {
284  fProductionNumberPtHard = value;
285  }
286  Bool_t IsParton(int pdg);
287  Bool_t IsParticleInCone(const AliVParticle* part, const AliEmcalJet* jet, Double_t dRMax);
288 
289  //____________________________
290  //Cuts
291  void SetESDCuts (AliESDtrackCuts *cuts =NULL){fESDTrackCut = new AliESDtrackCuts(*cuts);}
292  void SetDefaultAnalysisCuts();
293  void SetDefaultV0Cuts();
294  Bool_t IsPhysicalPrimary(AliVParticle *part);
296  void GetMaxImpactParameterCutR(const AliVTrack * const track, Double_t &maximpactRcut);
297 
298  Bool_t IsTrackAccepted(AliVTrack* track, int jetflavour);
299  Bool_t IsDCAAccepted(double decaylength, double ipwrtjet, Double_t * dca, int jetflavour);
301 
302  void GetV0Properties(SV0Cand*& sV0, AliAODv0* &v0);
303  void GetV0DaughProperties(SV0Daugh* & sTrack,AliAODv0* &v0, bool isPos);
304  void FillV0Candidates(Bool_t isK, Bool_t isL, Bool_t isAL, Int_t iCut);
305  Int_t IsV0Daughter(const AliAODTrack* track);
306  void SelectV0Candidates(AliAODEvent *fAODIn);
307  void GetV0MCTrueCandidates(AliAODEvent *fAODIn);
308  //AliAODMCParticle* GetMCTrack( const AliAODTrack* track);
309  AliAODMCParticle* GetMCTrack(int iLabel);
310  int GetV0MCVeto(AliAODEvent* fAODIn, AliAODv0* v0, bool bIsCandidateK0s,bool bIsCandidateLambda, bool bIsCandidateALambda);
311  void FillV0EfficiencyHists(int isV0, int & jetflavour, double jetpt, bool &isV0Jet);
312  void FillTrackIPvsPt(int isV0, double pt, double IP, int jetflavour);
313 
314  void FillCandidateJet(Int_t CutIndex, Int_t JetFlavor);
315  bool IsFromElectron(AliAODTrack *track);
316  bool IsFromProton(AliAODTrack *track);
317  bool IsFromKaon(AliAODTrack *track);
318  bool IsFromPion(AliAODTrack *track);
319 
320 
321  //_____________________________
322  //Impact Parameter Generation
323  Bool_t GetImpactParameter(const AliAODTrack *track, const AliAODEvent *event, Double_t *dca, Double_t *cov, Double_t *XYZatDCA);
324  AliExternalTrackParam GetExternalParamFromJet(const AliEmcalJet *jet, const AliAODEvent *event);
325  Bool_t GetImpactParameterWrtToJet(const AliAODTrack *track, const AliAODEvent *event, const AliEmcalJet *jet, Double_t *dca, Double_t *cov, Double_t *XYZatDCA, Double_t &jetsign, int jetflavour);
326  int DetermineUnsuitableVtxTracks(int *skipped, AliAODEvent * const aod, AliVTrack * const track);
327  //void SetIPVals(vector <SJetIpPati > sImpPar, bool* hasIPs, double* ipval);
328  //______________________________
329  //Corrections
330  double DoUESubtraction(AliJetContainer* &jetcongen, AliJetContainer* &jetconrec, AliEmcalJet* &jetrec, double jetpt);
331  void SetUseMonteCarloWeighingLinus(TH1F *Pi0 ,TH1F *Eta,TH1F *EtaP,TH1F *Rho,TH1F *Phi,TH1F *Omega,TH1F *K0s,TH1F *Lambda,TH1F *ChargedPi,
332  TH1F *ChargedKaon,TH1F *Proton,TH1F *D0,TH1F *DPlus,TH1F *DStarPlus,
333  TH1F *DSPlus,TH1F *LambdaC,TH1F *BPlus,TH1F *B0,TH1F *LambdaB,TH1F *BStarPlus);
334  void SetFlukaFactor(TGraph* GraphOmega, TGraph* GraphXi, TGraph* K0Star, TGraph* Phi);
335  AliAODVertex *RemoveDaughtersFromPrimaryVtx(const AliVTrack * const track);
336 
337  //_______________________________
338  //Filling Histograms
339  Bool_t FillTrackHistograms(AliVTrack * track, double * dca , double *cov,double weight);
340  void FillRecHistograms(int jetflavour, double jetpt, double eta, double phi);
341  void FillGenHistograms(int jetflavour, AliEmcalJet* jetgen);
342  void FillIPTypePtHists(int jetflavour, double jetpt, bool* nTracks);
343  void FillIPTemplateHists(double jetpt, int iN,int jetflavour,double* params);
344  void FillTaggedJetPtDistribution(bool** kTagDec, double jetpt);
345  void FillTrackTypeResHists();
346 
347  //________________________________
348  //Setters
349  void SmearTrack(AliAODTrack *track);
350  void setFRunSmearing(Bool_t value){fRunSmearing = value;}
353  void setFApplyV0Rec(Bool_t value){fApplyV0Rej=value;}
355  void setV0Cut(int iCut,double value){fV0Cuts[iCut]=value;}
356 
357  Bool_t SetResFunctionPID(const char * filename);
359  void setFMCglobalDCAxyShift(const Double_t &value);
361  void setFVertexRecalcMinPt(const Double_t &value);
362  void setFMCglobalDCASmear(const Double_t value);
365  void setGlobalVertex(Bool_t value){fGlobalVertex = value;}
367  void setDoJetProb(Bool_t value){fDoJetProb = value;}
368  void setDoTCTagging(Int_t value) {fDoTCTagging=value;}
369  void setDoProbTagging(Int_t value) {fDoProbTagging=value;}
370  void setDoMCEffs(Bool_t value){fDoMCEffs=value;}
371 
372  void setTrackIPvsPtValues(double fav0cut, double fbv0cut, double fcv0cut){fV0Cuts[fAV0Cut]=fav0cut;fV0Cuts[fBV0Cut]=fbv0cut;fV0Cuts[fCV0Cut]=fcv0cut;}
375  void setfNThresholds(Int_t value){fNThresholds=value;}
377 
378  //_____________________________
379  //Lund Plane
380  void RecursiveParents(AliEmcalJet *fJet,AliJetContainer *fJetCont); //Based on AliAnalysisTaskEmcalQGTagging::RecursiveParents
381 
382  //_____________________________
383  //Track Counting
391  };
392 
393  void DoTCTagging(double jetpt, bool* hasIPs, double* ipval, bool **kTagDec);
394  void DoProbTagging(double probval, double jetpt, bool** kTagDec);
395  void FillEfficiencyHists(bool** kTagDec, int jetflavour, double jetpt,bool hasIPs);
396  void SetTCThresholds(TObjArray** &threshs);
397  void SetProbThresholds(TObjArray** &threshs);
398  void ReadProbvsIPLookup(TObjArray *&oLookup);
399  void ReadThresholdHists(TString PathToThresholds, TString taskname, int nTCThresh);
400  void setTagLevel(int taglevel){kTagLevel=taglevel;}
401  void setTCThresholdPtFixed(double value){fTCThresholdPtFixed=value;};
402 
403  //________________________________
404  //Probability Tagging
405  double GetTrackProbability(double jetpt, bool* hasIPs, double* ipval);
406  void FillProbabilityHists(double jetpt,double probval,int jetflavour,bool **kTagDec);
407  void FillProbThreshHists(double proval, double* ipval, double jetpt, int jetflavour,bool* hasIPs, bool** kTagDec);
408  void setDoLundPlane(Bool_t dolundplane){fDoLundPlane=dolundplane;}
409  double IntegrateIP(int iJetPtBin, int iIPBin, int iN);
410 
412  //virtual Bool_t IsEventSelected();
413  void FillCorrelations(bool bn[3], double v[3], double jetpt);
414  void setFFillCorrelations(const Bool_t &value);
415  virtual void SetPtHardBin(Int_t b){ fSelectPtHardBin = b;}
417 
418 
419 public:
420  AliEventCuts fEventCuts;
421 
422 private:
424  AliAODVertex * fEventVertex;
425  AliPIDResponse *fPidResponse ;
426  AliEmcalJet * GetPerpendicularPseudoJet (AliEmcalJet*jet_in , bool rev );
427  void GetOutOfJetParticleComposition(AliEmcalJet * jet, int flavour);
428  void FillParticleCompositionSpectra(AliEmcalJet * jet,const char * histname );
430  void DoJetLoop(); //jet matching function 2/4
431  void SetMatchingLevel(AliEmcalJet *jet1, AliEmcalJet *jet2, Int_t matching=0);
432  void GetGeometricalMatchingLevel(AliEmcalJet *jet1, AliEmcalJet *jet2, Double_t &d) const;
433  void SmearTrackHybrid(AliVTrack * track);
434  void FillHist(const char * name,Double_t x ,Double_t w);
435  void FillHist(const char * name,Double_t x, Double_t y,Double_t w);
436  void IncHist(const char * name,Int_t bin);
437  void SubtractMean (Double_t val[2],AliVTrack *track);
438  Bool_t MatchJetsGeometricDefault(); //jet matching function 1/4
439  Double_t GetMonteCarloCorrectionFactor(AliVTrack *track, Int_t &pCorr_indx, double &ppt);
440  Double_t GetWeightFactor( AliVTrack * mcpart,Int_t &pCorr_indx, double &ppt);
442  Bool_t IsSelectionParticle( AliVParticle * mcpart ,Int_t &pdg,Double_t &pT,Int_t &idx );
443  Bool_t IsSelectionParticleALICE( AliVParticle * mcpart ,Int_t &pdg,Double_t &pT,Int_t &idx );
444  Bool_t IsSelectionParticleStrange( AliVParticle * mcpart ,Int_t &pdg,Double_t &pT,Int_t &idx );
445  Bool_t IsSelectionParticleMeson( AliVParticle * mcpart ,Int_t &pdg,Double_t &pT,Int_t &idx );
446  Bool_t IsSelectionParticleOmegaXiSigmaP( AliVParticle * mcpart ,Int_t &pdg,Double_t &pT,Int_t &idx );
447  Bool_t IsSecondaryFromWeakDecay( AliVParticle * particle ) ;
448  Bool_t IsTruePrimary (AliVParticle * mcpart);
449  Bool_t GetBMesonWeight( AliVParticle * mcpart ,Int_t &pdg,Double_t &pT,Int_t &idx );
450  Bool_t IsPromptDMeson(AliVParticle * part );
451  Bool_t IsPromptBMeson(AliVParticle * part );
453  static Bool_t mysort(const SJetIpPati& i, const SJetIpPati& j);
454  Int_t IsMCJetPartonFast(const AliEmcalJet *jet, Double_t radius,Bool_t &is_udg);
455  Int_t GetRunNr(AliVEvent * event){return event->GetRunNumber();}
456  Double_t GetPtCorrected(const AliEmcalJet* jet);
458  void PrintSettings();
459  void PrintV0Settings();
460 
461 
462  //Functions to allow jet probability/TC System 8 efficiency estimation
463  Bool_t IsJetTaggedTC(int n =0 ,double thres = 0.1);
464  Bool_t IsJetTaggedJetProb(double thresProb = 0.90);
465  TH1 * AddHistogramm(const char * name,const char * title,Int_t x,Double_t xlow,Double_t xhigh, Int_t y=0,Double_t ylow=0,Double_t yhigh=0);
466  TH1D * GetHist1D(const char * name){return (TH1D*)fOutput->FindObject(name);}
467  TH2D * GetHist2D(const char * name){return (TH2D*)fOutput->FindObject(name);}
468 
469 
470 private:
473 
474  //___________________
475  //Booleans for settings
478  Bool_t fDoMCCorrection;// Bool to turn on/off MC correction. Take care: some histograms may still be influenced by weighting.
481 
491  Int_t fDoProbTagging;// //0: no probability tagging, 1: use JP for tagging, 2: use lnJP for tagging //0: no TC tagging, 1: IP Significance tagging, 2: IP tagging, fixed threshold
494 
495  //_____________________
496  //variables
497  int kTagLevel; //1: accept single splittings, 2: accept only 2+3, 3: accept only 3 for track counting algorithm
498  vector<double > fFracs;
502  vector<TString> sTemplateFlavour;
503 
504  //______________________
505  //Cuts
510  //_____________________
511  //TGraphs
524 
525  //*********************************
526  //Histograms
527 
528  //__________________________
529  //Histograms for track counting
530  std::vector<TH1D*> h1DThresholdsFirst; //0-> single probability, 1-> double probability, 2-> tripple probability
531  std::vector<TH1D*> h1DThresholdsSecond; //
532  std::vector<TH1D*> h1DThresholdsThird;//
533 
534  //_____________________________
535  //Histograms for probability tagging
536  std::vector<TH2D*> h2DProbLookup;//
543  //TH2D* h2DProbDists;//!
544 
551  //TH2D* h2DLNProbDists;//!
552 
553  std::vector<TH1D*> h1DProbThresholds;//
554 
555  //______________________________
556  //Cut Histograms
557  TCanvas *cCuts; //
558 
564 
567 
568  THnSparse *fHLundIterative;
569 
570  THnSparse* fhnV0InJetK0s;
571  THnSparse* fhnV0InJetLambda;
572  THnSparse* fhnV0InJetALambda;
579 
584 
591 
592  //________________________________
593  //vectors
594  TClonesArray *fMCArray;
595  AliMCEvent *fMCEvent;
596  AliESDtrackCuts *fESDTrackCut;//
597  AliVertexerTracks *fVertexer;
598  TClonesArray* fV0CandidateArray;
600  Double_t fBackgroundFactorLinus[21][498]; //[21][498]FineBinned correction factors up 0.1-25 GeV/c first value below last above 0.05 binwidth
601  std::vector <Double_t > fPUdsgJet;
602  std::vector <Double_t > fPSJet;
603  std::vector <Double_t > fPCJet;
604  std::vector <Double_t > fPBJet;
605  std::vector <Double_t > fJetCont;
606  std::map<int, int> daughtermother;
607 
609  Double_t fAnalysisCuts[27]; // /Additional (to ESD track cut or AOD filter bits) analysis cuts.
611 
612  AliPIDCombined *fCombined ;
613 
618 //Event mixing for correlation study
634 
635 
636  void SetMixDCA(int n , Double_t v){
637  if(n==1){
638  if(fIsMixSignalReady_n1) return;
639  fn1_mix = v;
640  fIsMixSignalReady_n1 = kTRUE;
641  fIsSameEvent_n1 = kTRUE;
642 
643  }
644  else if(n==2){
645  if(fIsMixSignalReady_n2) return;
646  fn2_mix = v;
647  fIsMixSignalReady_n2 = kTRUE;
648  fIsSameEvent_n2 = kTRUE;
649 
650  }
651  else if(n==3){
652  if(fIsMixSignalReady_n3) return;
653  fn3_mix = v;
654  fIsMixSignalReady_n3 = kTRUE;
655  fIsSameEvent_n3 = kTRUE;
656  }
657  }
658 
659  Bool_t GetMixDCA(int n , double &v){
660  if(n==1){
661  if (!fIsMixSignalReady_n1 || fIsSameEvent_n1) return kFALSE;
662  v= fn1_mix;
663  fIsMixSignalReady_n1 = kFALSE;
664  }
665  else if(n==2){
666  if (!fIsMixSignalReady_n2|| fIsSameEvent_n2) return kFALSE;
667  v = fn2_mix;
668  fIsMixSignalReady_n2 = kFALSE;
669  }
670  else if(n==3){
671  if (!fIsMixSignalReady_n3|| fIsSameEvent_n3) return kFALSE;
672  v = fn3_mix;
673  fIsMixSignalReady_n3 = kFALSE;
674  }
675  return kTRUE;
676  }
677 
678  ClassDef(AliAnalysisTaskHFJetIPQA, 52)
679 };
680 
681 #endif
682 
683 
Double_t GetTrackCurvature(AliAODTrack *track)
Int_t pdg
const char * filename
Definition: TestFCM.C:1
void ReadThresholdHists(TString PathToThresholds, TString taskname, int nTCThresh)
void Print(std::ostream &o, const char *name, Double_t dT, Double_t dVM, Double_t alldT, Double_t alldVM)
Definition: PlotSysInfo.C:121
std::vector< Double_t > fPSJet
Double_t GetLocalAlphaAOD(AliAODTrack *track)
void setfDoFlavourMatching(Bool_t value)
int DetermineUnsuitableVtxTracks(int *skipped, AliAODEvent *const aod, AliVTrack *const track)
AliVParticle * GetVParticleMother(AliVParticle *part)
GetVParticleMother.
double Double_t
Definition: External.C:58
virtual void Terminate(Option_t *option="")
void setTrackIPvsPtValues(double fav0cut, double fbv0cut, double fcv0cut)
void setFFillCorrelations(const Bool_t &value)
AliAODMCParticle * GetMCTrack(int iLabel)
Bool_t SetResFunctionPID(const char *filename)
SetResFunction.
bool IsFromElectron(AliAODTrack *track)
void setV0Cut(int iCut, double value)
void GetOutOfJetParticleComposition(AliEmcalJet *jet, int flavour)
const char * title
Definition: MakeQAPdf.C:27
Bool_t GetBMesonWeight(AliVParticle *mcpart, Int_t &pdg, Double_t &pT, Int_t &idx)
GetBMesonWeight.
Double_t fBackgroundFactorLinus[21][498]
void FillProbThreshHists(double proval, double *ipval, double jetpt, int jetflavour, bool *hasIPs, bool **kTagDec)
void setFParam_Smear_Sigma(Double_t value)
void setTCThresholdPtFixed(double value)
void setFParam_Smear_Mean(Double_t value)
Double_t GetPtCorrected(const AliEmcalJet *jet)
GetPtCorrected.
std::vector< Double_t > fPCJet
Bool_t IsJetTaggedJetProb(double thresProb=0.90)
IsJetTaggedJetProb.
TH2D * GetHist2D(const char *name)
void SetMatchingLevel(AliEmcalJet *jet1, AliEmcalJet *jet2, Int_t matching=0)
SetMatchingLevel.
void FillCorrelations(bool bn[3], double v[3], double jetpt)
TH1D * fh1V0CounterCentLambda
number of K0s candidates after various cuts
int GetMCTruth(AliAODTrack *track, int &motherpdg)
Bool_t ParticleIsPossibleSource(Int_t pdg)
ParticleIsPossibleSource.
void GetV0Properties(SV0Cand *&sV0, AliAODv0 *&v0)
void setfDaughterRadius(Double_t value)
void SetTCThresholds(TObjArray **&threshs)
void SetMixDCA(int n, Double_t v)
THnSparse * fhnV0InJetK0s
iterative declustering
Bool_t GetImpactParameter(const AliAODTrack *track, const AliAODEvent *event, Double_t *dca, Double_t *cov, Double_t *XYZatDCA)
SubtractMean.
Bool_t IsEventAccepted(AliAODEvent *ev)
Bool_t IsSecondaryFromWeakDecay(AliVParticle *particle)
IsSecondaryFromWeakDecay.
void RecursiveParents(AliEmcalJet *fJet, AliJetContainer *fJetCont)
RecursiveParents.
Bool_t IsSelectionParticleMeson(AliVParticle *mcpart, Int_t &pdg, Double_t &pT, Int_t &idx)
IsSelectionParticleMeson.
void FillTrackIPvsPt(int isV0, double pt, double IP, int jetflavour)
TH1D * fh1V0CounterCentALambda
number of Lambda candidates after various cuts
void SetJetRadius(Double_t fJetRadRead)
TCanvas * c
Definition: TestFitELoss.C:172
Bool_t IsTrackAccepted(AliVTrack *track, int jetflavour)
void GetV0MCTrueCandidates(AliAODEvent *fAODIn)
Bool_t FillTrackHistograms(AliVTrack *track, double *dca, double *cov, double weight)
void FillEfficiencyHists(bool **kTagDec, int jetflavour, double jetpt, bool hasIPs)
void FillParticleCompositionSpectra(AliEmcalJet *jet, const char *histname)
Bool_t IsPromptBMeson(AliVParticle *part)
IsPromptBMeson.
void SmearTrackHybrid(AliVTrack *track)
THistManager fHistManager
Histogram manager.
void setDoLundPlane(Bool_t dolundplane)
Double_t GetValImpactParameter(TTypeImpPar type, Double_t *impar, Double_t *cov)
CalculateTrackImpactParameter.
Int_t IsV0Daughter(const AliAODTrack *track)
std::vector< Double_t > fPUdsgJet
std::vector< Double_t > fPBJet
void setFDoUnderlyingEventSub(Bool_t value)
double GetTrackProbability(double jetpt, bool *hasIPs, double *ipval)
void SelectV0Candidates(AliAODEvent *fAODIn)
Bool_t IsParton(int pdg)
IsParton.
THnSparse * fhnV0InJetLambda
V0 in jet cones, in a centrality bin, m_V0; pt_V0; eta_V0; pt_jet.
void SetDefaultAnalysisCuts()
SetDefaultAnalysisCuts.
AliEmcalJet * GetPerpendicularPseudoJet(AliEmcalJet *jet_in, bool rev)
void SetESDCuts(AliESDtrackCuts *cuts=NULL)
void FillRecHistograms(int jetflavour, double jetpt, double eta, double phi)
Cleanup.
std::map< int, int > daughtermother
void FillProbabilityHists(double jetpt, double probval, int jetflavour, bool **kTagDec)
Bool_t GetImpactParameterWrtToJet(const AliAODTrack *track, const AliAODEvent *event, const AliEmcalJet *jet, Double_t *dca, Double_t *cov, Double_t *XYZatDCA, Double_t &jetsign, int jetflavour)
Bool_t IsParticleInCone(const AliVParticle *part, const AliEmcalJet *jet, Double_t dRMax)
Bool_t IsDCAAccepted(double decaylength, double ipwrtjet, Double_t *dca, int jetflavour)
void setDoNotCheckIsPhysicalPrimary(Bool_t value)
Bool_t IsJetTaggedTC(int n=0, double thres=0.1)
IsJetTaggedTC unused.
void SubtractMean(Double_t val[2], AliVTrack *track)
void FillTaggedJetPtDistribution(bool **kTagDec, double jetpt)
int Int_t
Definition: External.C:63
Bool_t IsSelectionParticleOmegaXiSigmaP(AliVParticle *mcpart, Int_t &pdg, Double_t &pT, Int_t &idx)
IsSelectionParticleOmegaXiSigmaP.
void setFProductionNumberPtHard(Int_t value=-1)
void SetFlukaFactor(TGraph *GraphOmega, TGraph *GraphXi, TGraph *K0Star, TGraph *Phi)
AliAnalysisTaskHFJetIPQA & operator=(const AliAnalysisTaskHFJetIPQA &)
unsigned int UInt_t
Definition: External.C:33
float Float_t
Definition: External.C:68
void SetUseMonteCarloWeighingLinus(TH1F *Pi0, TH1F *Eta, TH1F *EtaP, TH1F *Rho, TH1F *Phi, TH1F *Omega, TH1F *K0s, TH1F *Lambda, TH1F *ChargedPi, TH1F *ChargedKaon, TH1F *Proton, TH1F *D0, TH1F *DPlus, TH1F *DStarPlus, TH1F *DSPlus, TH1F *LambdaC, TH1F *BPlus, TH1F *B0, TH1F *LambdaB, TH1F *BStarPlus)
IsSelected.
Bool_t IsTruePrimary(AliVParticle *mcpart)
IsTruePrimary.
Bool_t getJetVtxMass(AliEmcalJet *jet, double &value)
bool GetPIDCombined(AliAODTrack *track, double *prob, int &nDetectors, UInt_t &usedDet, AliPID::EParticleType &MostProbablePID, bool setTrackPID)
std::vector< Double_t > fJetCont
void ReadProbvsIPLookup(TObjArray *&oLookup)
std::vector< TH1D * > h1DProbThresholds
void FillParticleCompositionEvent()
FillParticleCompositionEvent.
std::vector< TH1D * > h1DThresholdsSecond
Definition: External.C:228
Definition: External.C:212
void FillGenHistograms(int jetflavour, AliEmcalJet *jetgen)
void FillCandidateJet(Int_t CutIndex, Int_t JetFlavor)
SJetIpPati(Double_t v1, Double_t v2, Int_t isv0, Bool_t c, Int_t tl, Double_t pt)
void IncHist(const char *name, Int_t bin)
IncHist.
double DoUESubtraction(AliJetContainer *&jetcongen, AliJetContainer *&jetconrec, AliEmcalJet *&jetrec, double jetpt)
AliExternalTrackParam GetExternalParamFromJet(const AliEmcalJet *jet, const AliAODEvent *event)
static Bool_t mysort(const SJetIpPati &i, const SJetIpPati &j)
mysort
Double_t GetMonteCarloCorrectionFactor(AliVTrack *track, Int_t &pCorr_indx, double &ppt)
GetMonteCarloCorrectionFactor.
void setFMCglobalDCASmear(const Double_t value)
Bool_t MatchJetsGeometricDefault()
FillTrackingEfficiencyDCA.
double IntegrateIP(int iJetPtBin, int iIPBin, int iN)
void GetV0DaughProperties(SV0Daugh *&sTrack, AliAODv0 *&v0, bool isPos)
Int_t fSelectPtHardBin
select one pt hard bin for analysis
Double_t GetWeightFactor(AliVTrack *mcpart, Int_t &pCorr_indx, double &ppt)
Composition correction factor getter.
Double_t GetLocalThetaAOD(AliAODTrack *track)
void GetMaxImpactParameterCutR(const AliVTrack *const track, Double_t &maximpactRcut)
Int_t GetRunNr(AliVEvent *event)
void setfUserSignificance(Bool_t value)
void FillV0EfficiencyHists(int isV0, int &jetflavour, double jetpt, bool &isV0Jet)
std::vector< TH1D * > h1DThresholdsThird
void GetGeometricalMatchingLevel(AliEmcalJet *jet1, AliEmcalJet *jet2, Double_t &d) const
GetGeometricalMatchingLevel.
Enhanced TList-derived class that implements correct merging for pt_hard binned production.
Definition: AliEmcalList.h:25
void localtoglobal(double alpha, double *local, double *global)
Transforms local to global coordinates.
Bool_t IsSelectionParticle(AliVParticle *mcpart, Int_t &pdg, Double_t &pT, Int_t &idx)
IsSelectionParticle.
void FillHist(const char *name, Double_t x, Double_t w)
FillHist.
AliAODVertex * RemoveDaughtersFromPrimaryVtx(const AliVTrack *const track)
std::vector< TH1D * > h1DThresholdsFirst
Bool_t IsSelectionParticleStrange(AliVParticle *mcpart, Int_t &pdg, Double_t &pT, Int_t &idx)
IsSelectionParticleStrange.
TH1D * GetHist1D(const char *name)
AliEmcalList * fOutput
!output list
bool IsFromKaon(AliAODTrack *track)
void DoTCTagging(double jetpt, bool *hasIPs, double *ipval, bool **kTagDec)
void useTreeForCorrelations(Bool_t value)
void FillV0Candidates(Bool_t isK, Bool_t isL, Bool_t isAL, Int_t iCut)
virtual void SetPtHardBin(Int_t b)
TH1 * AddHistogramm(const char *name, const char *title, Int_t x, Double_t xlow, Double_t xhigh, Int_t y=0, Double_t ylow=0, Double_t yhigh=0)
AddHistogramm.
Base task in the EMCAL jet framework.
bool IsFromProton(AliAODTrack *track)
virtual void UserExecOnce()
Task initializations handled in user tasks.
Represent a jet reconstructed using the EMCal jet framework.
Definition: AliEmcalJet.h:51
Container class for histograms.
Definition: THistManager.h:99
void SmearTrack(AliAODTrack *track)
void FillIPTypePtHists(int jetflavour, double jetpt, bool *nTracks)
virtual 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.
void ChangeDefaultCutTo(AliAnalysisTaskHFJetIPQA::bCuts cutname, Double_t newcutvalue)
ChangeDefaultCutTo.
int GetV0MCVeto(AliAODEvent *fAODIn, AliAODv0 *v0, bool bIsCandidateK0s, bool bIsCandidateLambda, bool bIsCandidateALambda)
std::vector< TH2D * > h2DProbLookup
const char Option_t
Definition: External.C:48
bool Bool_t
Definition: External.C:53
void setFMCglobalDCAxyShift(const Double_t &value)
void DoProbTagging(double probval, double jetpt, bool **kTagDec)
void SetProbThresholds(TObjArray **&threshs)
Bool_t GetMixDCA(int n, double &v)
Double_t GetPtCorrectedMC(const AliEmcalJet *jet)
GetPtCorrectedMC.
Bool_t IsPromptDMeson(AliVParticle *part)
IsPromptDMeson.
Bool_t IsSelectionParticleALICE(AliVParticle *mcpart, Int_t &pdg, Double_t &pT, Int_t &idx)
IsSelectionParticleALICE.
Int_t IsMCJetPartonFast(const AliEmcalJet *jet, Double_t radius, Bool_t &is_udg)
IsMCJetPartonFast.
Bool_t IsPhysicalPrimary(AliVParticle *part)
IsPhysicalPrimary.
Container for jet within the EMCAL jet framework.
Definition: External.C:196
void setFVertexRecalcMinPt(const Double_t &value)
bool IsFromPion(AliAODTrack *track)
void FillIPTemplateHists(double jetpt, int iN, int jetflavour, double *params)
TH2D * fh2dKshortMassVsPt
number of ALambda candidates after various cuts