AliPhysics  068200c (068200c)
 All Classes Namespaces Files Functions Variables Typedefs Enumerations Enumerator Friends Macros Groups Pages
AliAnalysisTaskEmcalHfeTagging.cxx
Go to the documentation of this file.
1 //
2 // HFE tagged jet shape analysis task.
3 //
4 // Authors: D. Caffarri, L. Cunqueiro (jet); D. Godoy (HFE)
5 //just testing
6 #include <TClonesArray.h>
7 #include <TH1F.h>
8 #include <TH2F.h>
9 #include <TH3F.h>
10 #include <THnSparse.h>
11 #include <TTree.h>
12 #include <TList.h>
13 #include <TLorentzVector.h>
14 #include <TProfile.h>
15 #include <TChain.h>
16 #include <TSystem.h>
17 #include <TFile.h>
18 #include <TKey.h>
19 #include <AliAnalysisDataSlot.h>
20 #include <AliAnalysisDataContainer.h>
21 #include "TMatrixD.h"
22 #include "TMatrixDSym.h"
23 #include "TMatrixDSymEigen.h"
24 #include "TVector3.h"
25 #include "TVector2.h"
26 #include "AliVCluster.h"
27 #include "AliVTrack.h"
28 #include "AliEmcalJet.h"
29 #include "AliRhoParameter.h"
30 #include "AliLog.h"
31 #include "AliEmcalParticle.h"
32 #include "AliMCEvent.h"
33 #include "AliGenPythiaEventHeader.h"
34 #include "AliAODMCHeader.h"
35 #include "AliAODHandler.h"
36 #include "AliAODEvent.h"
37 #include "AliMCEvent.h"
38 #include "AliAnalysisManager.h"
39 #include "AliJetContainer.h"
40 #include "AliParticleContainer.h"
41 #include "AliEmcalPythiaInfo.h"
42 #include "TRandom3.h"
43 #include "AliAODInputHandler.h"
44 #include "AliPIDResponse.h"
45 #include "AliCFContainer.h"
46 #include "AliCFManager.h"
47 #include "AliMultiEventInputHandler.h"
48 #include "AliKFParticle.h"
49 #include "AliKFVertex.h"
50 
51 #include "AliAODEvent.h"
53 
54 using std::cout;
55 using std::endl;
56 
58 
59 //________________________________________________________________________
62 fAOD(0),
63 fVevent(0),
64 fpidResponse(0),
65 fTracksTender(0),
66 pVtx(0),
67 spdVtx(0),
68 fMC(0),
69 fStack(0),
70 fMCparticle(0),
71 fMCarray(0),
72 fMCheader(0),
73 fContainer(0),
74 fMinFractionShared(0),
75 fJetShapeType(kData),
76 fJetShapeSub(kNoSub),
77 fJetSelection(kInclusive),
78 fPtThreshold(-9999.),
79 fRMatching(0.2),
80 fSelectedShapes(0),
81 fminpTTrig(20.),
82 fmaxpTTrig(50.),
83 fangWindowRecoil(0.6),
84 fSemigoodCorrect(0),
85 fHolePos(0),
86 fHoleWidth(0),
87 fCentSelectOn(kTRUE),
88 fCentMin(0),
89 fCentMax(10),
90 fOneConstSelectOn(kFALSE),
91 fDerivSubtrOrder(0),
92 fJetShapeTree(0),
93 fAssPtCut(0.1),
94 fITSncut(3),
95 fAssTPCnCut(60),
96 fTPCnCut(100),
97 fAssITSrefitCut(kTRUE),
98 fUseTender(kFALSE),
99 fSigmaTOFcut(3.),
100 fSigmaTPCcut(-1.),
101 fDcaXYcut(1.),
102 fDcaZcut(2.),
103 fIMcut(0.1),
104 fh2ResponseUW(0x0),
105 fh2ResponseW(0x0),
106 fPhiJetCorr6(0x0),
107 fPhiJetCorr7(0x0),
108 fEtaJetCorr6(0x0),
109 fEtaJetCorr7(0x0),
110 fPtJetCorr(0x0),
111 fPtJet(0x0),
112 fhpTjetpT(0x0),
113 fhPt(0x0),
114 fhPhi(0x0),
115 fNbOfConstvspT(0x0),
116 fnTPCnTOFnocut(0),
117 fnTPCnocut(0),
118 fnTOFnocut(0),
119 fnTPCcut(0),
120 fnULSmLSpairsPerElectron(0),
121 fInvmassLS(0),
122 fInvmassULS(0),
123 fnPartPerJet(0),
124 fnElecOverPartPerJet(0),
125 fnInclElecPerJet(0),
126 fnPhotElecPerJet(0),
127 fnIncSubPhotElecPerJet(0),
128 fnTrueElecPerJet(0),
129 fnTrueHFElecPerJet(0),
130 fPi0Pt(0),
131 fEtaPt(0),
132 fTreeObservableTagging(0)
133 
134 {
135  for(Int_t i=0;i<17;i++){
136  fShapesVar[i]=0;}
137  SetMakeGeneralHistograms(kTRUE);
138  DefineOutput(1, TList::Class());
139  DefineOutput(2, TTree::Class());
140 
141 }
142 
143 //________________________________________________________________________
145 AliAnalysisTaskEmcalJet(name, kTRUE),
146 fAOD(0),
147 fVevent(0),
148 fpidResponse(0),
149 fTracksTender(0),
150 pVtx(0),
151 spdVtx(0),
152 fMC(0),
153 fStack(0),
154 fMCparticle(0),
155 fMCarray(0),
156 fMCheader(0),
157 fContainer(0),
158 fMinFractionShared(0),
159 fJetShapeType(kData),
160 fJetShapeSub(kNoSub),
161 fJetSelection(kInclusive),
162 fPtThreshold(-9999.),
163 fRMatching(0.2),
164 fSelectedShapes(0),
165 fminpTTrig(20.),
166 fmaxpTTrig(50.),
167 fangWindowRecoil(0.6),
168 fSemigoodCorrect(0),
169 fHolePos(0),
170 fHoleWidth(0),
171 fCentSelectOn(kTRUE),
172 fCentMin(0),
173 fCentMax(10),
174 fOneConstSelectOn(kFALSE),
175 fDerivSubtrOrder(0),
176 fJetShapeTree(0),
177 fAssPtCut(0.1),
178 fITSncut(3),
179 fAssTPCnCut(60),
180 fTPCnCut(100),
181 fAssITSrefitCut(kTRUE),
182 fUseTender(kFALSE),
183 fSigmaTOFcut(3.),
184 fSigmaTPCcut(-1.),
185 fDcaXYcut(1.),
186 fDcaZcut(2.),
187 fIMcut(0.1),
188 fh2ResponseUW(0x0),
189 fh2ResponseW(0x0),
190 fPhiJetCorr6(0x0),
191 fPhiJetCorr7(0x0),
192 fEtaJetCorr6(0x0),
193 fEtaJetCorr7(0x0),
194 fPtJetCorr(0x0),
195 fPtJet(0x0),
196 fhpTjetpT(0x0),
197 fhPt(0x0),
198 fhPhi(0x0),
199 fNbOfConstvspT(0x0),
200 fnTPCnTOFnocut(0),
201 fnTPCnocut(0),
202 fnTOFnocut(0),
203 fnTPCcut(0),
204 fnULSmLSpairsPerElectron(0),
205 fInvmassLS(0),
206 fInvmassULS(0),
207 fnPartPerJet(0),
208 fnElecOverPartPerJet(0),
209 fnInclElecPerJet(0),
210 fnPhotElecPerJet(0),
211 fnIncSubPhotElecPerJet(0),
212 fnTrueElecPerJet(0),
213 fnTrueHFElecPerJet(0),
214 fPi0Pt(0),
215 fEtaPt(0),
216 fTreeObservableTagging(0)
217 
218 {
219  // Standard constructor.
220  for(Int_t i=0;i<17;i++){
221  fShapesVar[i]=0;}
223 
224  DefineOutput(1, TList::Class());
225  DefineOutput(2, TTree::Class());
226 
227 }
228 
229 //________________________________________________________________________
231 {
232  // Destructor.
233 }
234 
235 //________________________________________________________________________
237 {
238  // Create user output.
239 
241 
242  Bool_t oldStatus = TH1::AddDirectoryStatus();
243  TH1::AddDirectory(kFALSE);
244 
245  fh2ResponseUW= new TH2F("fh2ResponseUW", "fh2ResponseUW", 100, 0, 200, 100, 0, 200);
246  fOutput->Add(fh2ResponseUW);
247  fh2ResponseW= new TH2F("fh2ResponseW", "fh2ResponseW", 100, 0, 200, 100, 0, 200);
248  fOutput->Add(fh2ResponseW);
249  fPhiJetCorr6= new TH2F("fPhiJetCorr6", "fPhiJetCorr6", 50, 0, 2*TMath::Pi(), 50, 0, 2*TMath::Pi());
250  fOutput->Add(fPhiJetCorr6);
251  fEtaJetCorr6= new TH2F("fEtaJetCorr6", "fEtaJetCorr6", 50, -1.5, 1.5, 50, -1.5, 1.5);
252  fOutput->Add(fEtaJetCorr6);
253 
254  fPhiJetCorr7= new TH2F("fPhiJetCorr7", "fPhiJetCorr7", 50, 0, 2*TMath::Pi(), 50, 0, 2*TMath::Pi());
255  fOutput->Add(fPhiJetCorr7);
256  fEtaJetCorr7= new TH2F("fEtaJetCorr7", "fEtaJetCorr7", 50, -1.5, 1.5, 50, -1.5, 1.5);
257  fOutput->Add(fEtaJetCorr7);
258 
259  fPtJetCorr= new TH2F("fPtJetCorr", "fPtJetCorr", 100, 0, 200, 100, 0, 200);
260  fOutput->Add(fPtJetCorr);
261  fPtJet= new TH1F("fPtJet", "fPtJet", 100, 0, 200);
262  fOutput->Add(fPtJet);
263 
264  fhpTjetpT= new TH2F("fhpTjetpT", "fhpTjetpT", 200, 0, 200, 200, 0, 200);
265  fOutput->Add(fhpTjetpT);
266  fhPt= new TH1F("fhPt", "fhPt", 200, 0, 200);
267  fOutput->Add(fhPt);
268  fhPhi= new TH1F("fhPhi", "fhPhi", 100, -TMath::Pi(), TMath::Pi());
269  fOutput->Add(fhPhi);
270 
271  fNbOfConstvspT=new TH2F("fNbOfConstvspT", "fNbOfConstvspT", 100, 0, 100, 200, 0, 200);
272  fOutput->Add(fNbOfConstvspT);
273 
274  fnTPCnTOFnocut=new TH2F("fnTPCnTOFnocut", "fnTPCnTOFnocut", 200, -10, 10, 200, -10, 10);
275  fOutput->Add(fnTPCnTOFnocut);
276 
277  fnTPCnocut=new TH2F("fnTPCnocut", "fnTPCnocut", 50, 0, 5, 200, -10, 10);
278  fOutput->Add(fnTPCnocut);
279 
280  fnTOFnocut=new TH2F("fnTOFnocut", "fnTOFnocut", 50, 0, 5, 200, -10, 10);
281  fOutput->Add(fnTOFnocut);
282 
283  fnTPCcut=new TH2F("fnTPCcut", "fnTPCcut", 50, 0, 5, 200, -10, 10);
284  fOutput->Add(fnTPCcut);
285 
286  fnULSmLSpairsPerElectron =new TH2F("fnULSmLSpairsPerElectron", "fnULSmLSpairsPerElectron", 50, 0, 5, 100, 0, 100);
288 
289  fInvmassLS =new TH2F("fInvmassLS", "fInvmassLS", 50, 0, 5, 250, 0, 0.5);
290  fOutput->Add(fInvmassLS);
291 
292  fInvmassULS=new TH2F("fInvmassULS", "fInvmassULS", 50, 0, 5, 250, 0, 0.5);
293  fOutput->Add(fInvmassULS);
294 
295  fnPartPerJet=new TH1I("fnPartPerJet", "fnPartPerJet", 500,0,500);
296  fOutput->Add(fnPartPerJet);
297 
298  fnElecOverPartPerJet=new TH1F("fnElecOverPartPerJet", "fnElecOverPartPerJet", 100,0,1);
300 
301  fnInclElecPerJet=new TH1I("fnInclElecPerJet", "fnInclElecPerJet", 100,0,100);
303 
304  fnPhotElecPerJet=new TH1I("fnPhotElecPerJet", "fnPhotElecPerJet", 100,0,100);
306 
307  fnIncSubPhotElecPerJet=new TH1I("fnIncSubPhotElecPerJet", "fnIncSubPhotElecPerJet", 101,-1,100);
309 
310 
311  fnTrueElecPerJet=new TH1I("fnTrueElecPerJet", "fnTrueElecPerJet", 100,0,100);
313 
314  fnTrueHFElecPerJet=new TH1I("fnTrueHFElecPerJet", "fnTrueHFElecPerJet", 100,0,100);
316 
317  fPi0Pt = new TH2F("fPi0Pt","fPi0Pt",4,0,4,100,0,50);
318  fOutput->Add(fPi0Pt);
319 
320  fEtaPt = new TH2F("fEtaPt", "fEtaPt",4,0,4,100,0,50);
321  fOutput->Add(fEtaPt);
322 
323 
324  // =========== Switch on Sumw2 for all histos ===========
325  for (Int_t i=0; i<fOutput->GetEntries(); ++i) {
326  TH1 *h1 = dynamic_cast<TH1*>(fOutput->At(i));
327  if (h1){
328  h1->Sumw2();
329  continue;
330  }
331  THnSparse *hn = dynamic_cast<THnSparse*>(fOutput->At(i));
332  if(hn)hn->Sumw2();
333  }
334 
335 
336  TH1::AddDirectory(oldStatus);
337  const Int_t nVar = 19;
338 
339  fTreeObservableTagging = new TTree(GetOutputSlot(2)->GetContainer()->GetName(), GetOutputSlot(2)->GetContainer()->GetName());
340 
341  TString *fShapesVarNames = new TString [nVar];
342 
343  fShapesVarNames[0] = "partonCode";
344  fShapesVarNames[1] = "ptJet";
345  fShapesVarNames[2] = "ptDJet";
346  fShapesVarNames[3] = "mJet";
347  // fShapesVarNames[4] = "nbOfConst";
348  fShapesVarNames[4] = "angularity";
349  fShapesVarNames[5] = "circularity";
350  fShapesVarNames[6] = "lesub";
351  fShapesVarNames[7] = "coronna";
352 
353  fShapesVarNames[8] = "ptJetMatch";
354  fShapesVarNames[9] = "ptDJetMatch";
355  fShapesVarNames[10] = "mJetMatch";
356  // fShapesVarNames[12] = "nbOfConstMatch";
357  fShapesVarNames[11] = "angularityMatch";
358  fShapesVarNames[12] = "circularityMatch";
359  fShapesVarNames[13] = "lesubMatch";
360  fShapesVarNames[14] = "coronnaMatch";
361  fShapesVarNames[15]="weightPythia";
362  //fShapesVarNames[14]="ntrksEvt";
363  fShapesVarNames[16]="rhoVal";
364  fShapesVarNames[17]="rhoMassVal";
365  fShapesVarNames[18]="ptUnsub";
366 
367  for(Int_t ivar=0; ivar < nVar; ivar++){
368  //cout<<"looping over variables"<<endl;
369  fTreeObservableTagging->Branch(fShapesVarNames[ivar].Data(), &fShapesVar[ivar], Form("%s/F", fShapesVarNames[ivar].Data()));
370  }
371 
372  PostData(1,fOutput);
373  PostData(2,fTreeObservableTagging);
374 
375  delete [] fShapesVarNames;
376 }
377 
378 //________________________________________________________________________
380 {
381  // // Run analysis code here, if needed. It will be executed before FillHistograms().
382 
383  fAOD = dynamic_cast<AliAODEvent*>(InputEvent());
384  if (!fAOD){
385  printf("ERROR: fAOD not available\n");
386  return kFALSE;
387  }
388 
389  fVevent = dynamic_cast<AliVEvent*>(InputEvent());
390  if(!fVevent){
391  printf("ERROR: fVEvent not available\n");
392  return kFALSE;
393  }
394 
395  //event selection
396  pVtx = fVevent->GetPrimaryVertex();
397  spdVtx = fVevent->GetPrimaryVertexSPD();
398 
399  fMCarray = dynamic_cast<TClonesArray*>(fAOD->FindListObject(AliAODMCParticle::StdBranchName()));
400  fMCheader = dynamic_cast<AliAODMCHeader*>(fAOD->GetList()->FindObject(AliAODMCHeader::StdBranchName()));
401 
402  Int_t NpureMC = -1;
403 
404  if (fMCheader){
405  TList *lh=fMCheader->GetCocktailHeaders();
406  if(lh){
407  AliGenEventHeader* gh=(AliGenEventHeader*)lh->At(0); // 0 for HIJING
408  NpureMC = gh->NProduced();
409  }
410  }
411 
412  // Selection of pi0 and eta in MC to compute the weight
413 
414  Bool_t isPrimary = kFALSE, isFromLMdecay = kTRUE, isFromHFdecay=kTRUE;
415 
416  if(fMCarray){
417  Int_t nParticles = fMCarray->GetEntries();
418  for (Int_t iParticle = 0; iParticle < nParticles; iParticle++) {
419  AliAODMCParticle* particle = (AliAODMCParticle*) fMCarray->At(iParticle);
420  int fPDG = particle->GetPdgCode();
421  double pTMC = particle->Pt();
422 
423  Bool_t iEnhance = kFALSE;
424  if(iParticle>=NpureMC)iEnhance = kTRUE;
425 
426  Double_t etaMC = particle->Eta();
427  if (TMath::Abs(etaMC)>1.2)continue;
428 
429  isPrimary = IsPrimary(particle);
430  isFromLMdecay = IsFromLMdecay(particle);
431  isFromHFdecay = IsFromHFdecay(particle);
432 
433  if (isPrimary){
434  if(fPDG==111) fPi0Pt->Fill(iEnhance,pTMC); //pi0
435  if(fPDG==221) fEtaPt->Fill(iEnhance,pTMC); //eta
436  }
437  if (!isFromHFdecay && !isFromLMdecay){
438  if(fPDG==111) fPi0Pt->Fill(iEnhance+2,pTMC); //pi0
439  if(fPDG==221) fEtaPt->Fill(iEnhance+2,pTMC); //eta
440  }
441  }
442  }//MC
443 
444 
445  return kTRUE;
446 }
447 //________________________________________________________________________
449 {
450  // Fill histograms.
451  //cout<<"base container"<<endl;
452  AliEmcalJet* jet1 = NULL;
453  AliJetContainer *jetCont = GetJetContainer(0);
454 
455  Float_t kWeight=1;
456  if (fCentSelectOn)
457  if ((fCent>fCentMax) || (fCent<fCentMin)) return 0;
458 
459  AliAODTrack *triggerHadron = 0x0;
460 
461  if (fJetSelection == kRecoil) {
462  //Printf("Recoil jets!!!, fminpTTrig = %f, fmaxpTTrig = %f", fminpTTrig, fmaxpTTrig);
463  Int_t triggerHadronLabel = SelectTrigger(fminpTTrig, fmaxpTTrig);
464 
465 
466  if (triggerHadronLabel==-99999) {
467  //Printf ("Trigger Hadron not found, return");
468  return 0;}
469 
470  AliTrackContainer *PartCont =NULL;
471  AliParticleContainer *PartContMC=NULL;
472 
473  if (fJetShapeSub==kConstSub){
475  else PartCont = GetTrackContainer(1);
476  }
477  else{
479  else PartCont = GetTrackContainer(0);
480  }
481  TClonesArray *TrackArray = NULL;
482  TClonesArray *TrackArrayMC = NULL;
483  if (fJetShapeType == AliAnalysisTaskEmcalHfeTagging::kGenOnTheFly) TrackArrayMC = PartContMC->GetArray();
484  else TrackArray = PartCont->GetArray();
485  if (fJetShapeType == AliAnalysisTaskEmcalHfeTagging::kGenOnTheFly) triggerHadron = static_cast<AliAODTrack*>(TrackArrayMC->At(triggerHadronLabel));
486  else triggerHadron = static_cast<AliAODTrack*>(TrackArray->At(triggerHadronLabel));
487 
488 
489 
490  if (!triggerHadron) {
491  //Printf("No Trigger hadron with the found label!!");
492  return 0;
493  }
494 
495  if(fSemigoodCorrect){
496  Double_t disthole=RelativePhi(triggerHadron->Phi(),fHolePos);
497  if(TMath::Abs(disthole)+fHoleWidth>TMath::Pi()-fangWindowRecoil){
498  return 0;}
499  }
500 
501  fhPt->Fill(triggerHadron->Pt());
502 
503  }
504 
505  // list of kink mothers
506  Int_t nVertices = 1;
507  nVertices = fAOD->GetNumberOfVertices();
508  Double_t listofmotherkink[nVertices];
509  Int_t nMotherKink = 0;
510  for(Int_t ivertex=0; ivertex < nVertices; ivertex++) {
511  AliAODVertex *vertex = fAOD->GetVertex(ivertex);
512  if(!vertex) continue;
513  if(vertex->GetType()==AliAODVertex::kKink) {
514  AliAODTrack *mother = (AliAODTrack *) vertex->GetParent();
515  if(!mother) continue;
516  Int_t idmother = mother->GetID();
517  listofmotherkink[nMotherKink] = idmother;
518  nMotherKink++;
519  }
520  }
521 
522  //AliParticleContainer *partContAn = GetParticleContainer(0);
523  //TClonesArray *trackArrayAn = partContAn->GetArray();
524  //Int_t ntracksEvt = trackArrayAn->GetEntriesFast();
525 
526  Float_t rhoVal=0, rhoMassVal = 0.;
527  if(jetCont) {
528 
529  jetCont->ResetCurrentID();
531  //rho
532  AliRhoParameter* rhoParam = dynamic_cast<AliRhoParameter*>(InputEvent()->FindListObject("RhoSparseR020"));
533  if (!rhoParam) {
534  Printf("%s: Could not retrieve rho %s (some histograms will be filled with zero)!", GetName(), jetCont->GetRhoName().Data());
535  } else rhoVal = rhoParam->GetVal();
536  //rhom
537  AliRhoParameter* rhomParam = dynamic_cast<AliRhoParameter*>(InputEvent()->FindListObject("RhoMassSparseR020"));
538  if (!rhomParam) {
539  Printf("%s: Could not retrieve rho_m %s (some histograms will be filled with zero)!", GetName(), jetCont->GetRhoMassName().Data());
540  } else rhoMassVal = rhomParam->GetVal();
541  }
542 
543  while((jet1 = jetCont->GetNextAcceptJet())) {
544  if (!jet1) continue;
545  AliEmcalJet* jet2 = 0x0;
546  AliEmcalJet* jet3 = 0x0;
547  fPtJet->Fill(jet1->Pt());
548  AliEmcalJet *jetUS = NULL;
549  Int_t ifound=0, jfound=0;
550  Int_t ilab=-1, jlab=-1;
551 
553  Double_t disthole=RelativePhi(jet1->Phi(),fHolePos);
554  if(TMath::Abs(disthole)<fHoleWidth){
555  continue;}
556  }
557 
558  Float_t dphiRecoil = 0.;
559  if (fJetSelection == kRecoil){
560  dphiRecoil = RelativePhi(triggerHadron->Phi(), jet1->Phi());
561  if (TMath::Abs(dphiRecoil) < (TMath::Pi() - fangWindowRecoil)) {
562  // Printf("Recoil jets back to back not found! continuing");
563  continue;
564  }
565 
566  fhpTjetpT->Fill(triggerHadron->Pt(), jet1->Pt());
567  //Printf(" ************ FILLING HISTOS****** shapeSub = %d, triggerHadron = %f, jet1 = %f", fJetShapeSub, triggerHadron->Pt(), jet1->Pt());
568  fhPhi->Fill(RelativePhi(triggerHadron->Phi(), jet1->Phi()));
569 
570  }
571 
572 
573  fShapesVar[0] = 0.;
575  //AliJetContainer *jetContTrue = GetJetContainer(1);
576  AliJetContainer *jetContUS = GetJetContainer(2);
577 
578  if(fJetShapeSub==kConstSub){
579  for(Int_t i = 0; i<jetContUS->GetNJets(); i++) {
580  jetUS = jetContUS->GetJet(i);
581  if(jetUS->GetLabel()==jet1->GetLabel()) {
582  ifound++;
583  if(ifound==1) ilab = i;
584  }
585  }
586  if(ilab==-1) continue;
587  jetUS=jetContUS->GetJet(ilab);
588  jet2=jetUS->ClosestJet();
589  }
590 
591  if(!(fJetShapeSub==kConstSub)) jet2 = jet1->ClosestJet();
592  if (!jet2) {
593  Printf("jet2 does not exist, returning");
594  continue;
595  }
596 
597  //AliJetContainer *jetContPart=GetJetContainer(3);
598  jet3=jet2->ClosestJet();
599 
600  if(!jet3){
601  Printf("jet3 does not exist, returning");
602  continue;
603  }
604  //cout<<"jet 3 exists"<<jet3->Pt()<<endl;
605 
606 
607  fh2ResponseUW->Fill(jet1->Pt(),jet2->Pt());
608 
609  Double_t fraction=0;
610  if(!(fJetShapeSub==kConstSub)) fraction = jetCont->GetFractionSharedPt(jet1);
611  if(fJetShapeSub==kConstSub) fraction = jetContUS->GetFractionSharedPt(jetUS);
612  //if (fraction > 0.1) cout<<"***** hey a jet matched with fraction"<<fraction<<" "<<jet1->Pt()<<" "<<jet2->Pt()<<" "<<fCent<<endl;
613 
614  if(fraction<fMinFractionShared) continue;
615  //InputEvent()->Print();
616 
617  }
618 
619 
620 
621  if (fJetShapeType == kPythiaDef){
622 
623  //AliJetContainer *jetContTrue = GetJetContainer(1);
624  AliJetContainer *jetContUS = GetJetContainer(2);
625  AliJetContainer *jetContPart = GetJetContainer(3);
626 
627  if(fJetShapeSub==kConstSub){
628 
629  for(Int_t i = 0; i<jetContUS->GetNJets(); i++) {
630  jetUS = jetContUS->GetJet(i);
631  if(jetUS->GetLabel()==jet1->GetLabel()) {
632  ifound++;
633  if(ifound==1) ilab = i;
634  }
635  }
636  if(ilab==-1) continue;
637  jetUS=jetContUS->GetJet(ilab);
638  jet2=jetUS->ClosestJet();
639 
640  if (!jet2) {
641  Printf("jet2 does not exist, returning");
642  continue;
643  }
644 
645  for(Int_t j=0; j<jetContPart->GetNJets(); j++) {
646 
647  jet3 = jetContPart->GetJet(j);
648  if(!jet3) continue;
649  if(jet3->GetLabel()==jet2->GetLabel()) {
650  jfound++;
651  if(jfound==1) jlab = j;
652  }
653  }
654  if(jlab==-1) continue;
655  jet3=jetContPart->GetJet(jlab);
656  if(!jet3){
657  Printf("jet3 does not exist, returning");
658  continue;
659  }
660  }
661  if(!(fJetShapeSub==kConstSub)) jet3 = jet1->ClosestJet();
662  if (!jet3) {
663  Printf("jet3 does not exist, returning");
664  continue;
665  }
666 
667 
668  fh2ResponseUW->Fill(jet1->Pt(),jet3->Pt());
669 
670 
671  }
672 
673 
674  if (fJetShapeType == kGenOnTheFly){
675  const AliEmcalPythiaInfo *partonsInfo = 0x0;
676  partonsInfo = GetPythiaInfo();
677  Double_t jp1=RelativePhi(jet1->Phi(),partonsInfo->GetPartonPhi6());
678  Double_t detap1=(jet1->Eta())-(partonsInfo->GetPartonEta6());
679  kWeight=partonsInfo->GetPythiaEventWeight();
680  fh2ResponseW->Fill(jet1->Pt(),jet1->Pt(),kWeight);
681 
682  Float_t dRp1 = TMath::Sqrt(jp1 * jp1 + detap1 * detap1);
683  fEtaJetCorr6->Fill(jet1->Eta(), partonsInfo->GetPartonEta6());
684  fPhiJetCorr6->Fill(jet1->Phi(), partonsInfo->GetPartonPhi6());
685  if(dRp1 < fRMatching) {
686  fShapesVar[0] = partonsInfo->GetPartonFlag6();
687  fPtJetCorr ->Fill(partonsInfo->GetPartonPt6(), jet1->Pt());
688  }
689  else {
690  jp1=RelativePhi(jet1->Phi(),partonsInfo->GetPartonPhi7());
691  detap1=(jet1->Eta())-(partonsInfo->GetPartonEta7());
692  dRp1 = TMath::Sqrt(jp1 * jp1 + detap1 * detap1);
693  fEtaJetCorr7->Fill(jet1->Eta(), partonsInfo->GetPartonEta7());
694  fPhiJetCorr7->Fill(jet1->Phi(), partonsInfo->GetPartonPhi7());
695  if(dRp1 < fRMatching) {
696  fShapesVar[0] = partonsInfo->GetPartonFlag7();
697  fPtJetCorr->Fill(partonsInfo->GetPartonPt7(), jet1->Pt());
698  }
699  else fShapesVar[0]=0;
700  }
701  }
702 
703 
704 
705 
706  Double_t ptSubtracted = 0;
707  if (fJetShapeSub==kConstSub) ptSubtracted= jet1->Pt();
708 
709  else if (fJetShapeSub==kDerivSub) {
710  ptSubtracted=jet1->Pt()-GetRhoVal(0)*jet1->Area();
711  }
712 
713  else if (fJetShapeSub==kNoSub) {
714  if ((fJetShapeType==kData) || (fJetShapeType==kDetEmbPartPythia)) ptSubtracted=jet1->Pt()-GetRhoVal(0)*jet1->Area();
715  else if ((fJetShapeType==kPythiaDef) || (fJetShapeType==kMCTrue) || (fJetShapeType==kGenOnTheFly)) ptSubtracted= jet1->Pt();
716  }
717 
718  //Printf("ptSubtracted=%f,fPtThreshold =%f ", ptSubtracted, fPtThreshold);
719  if (ptSubtracted < fPtThreshold) continue;
720 
721  if (fOneConstSelectOn == kTRUE) fNbOfConstvspT->Fill(GetJetNumberOfConstituents(jet1,0), ptSubtracted);
722  if ((fCentSelectOn == kFALSE) && (jet1->GetNumberOfTracks() <= 1)) continue;
723 
724 
725  fShapesVar[1] = ptSubtracted;
726  fShapesVar[2] = GetJetpTD(jet1,0);
727  fShapesVar[3] = GetJetMass(jet1,0);
728  fShapesVar[4] = GetJetAngularity(jet1,0);
729  fShapesVar[5] = GetJetCircularity(jet1,0);
730  fShapesVar[6] = GetJetLeSub(jet1,0);
731  fShapesVar[6] = GetJetCoronna(jet1,0);
732 
733 
734 
735  Float_t ptMatch=0., ptDMatch=0., massMatch=0., angulMatch=0.,circMatch=0., lesubMatch=0., coronnaMatch=0;
736  //Float constMatch=0., sigma2Match=0.;
737  Int_t kMatched = 0;
738 
739  if (fJetShapeType==kPythiaDef) {
740  kMatched =1;
741  if(fJetShapeSub==kConstSub) kMatched = 3;
742 
743  ptMatch=jet3->Pt();
744  ptDMatch=GetJetpTD(jet3, kMatched);
745  massMatch=GetJetMass(jet3,kMatched);
746  //constMatch=1.*GetJetNumberOfConstituents(jet2,kMatched);
747  angulMatch=GetJetAngularity(jet3, kMatched);
748  circMatch=GetJetCircularity(jet3, kMatched);
749  lesubMatch=GetJetLeSub(jet3, kMatched);
750  coronnaMatch=GetJetCoronna(jet3,kMatched);
751  //sigma2Match = GetSigma2(jet2, kMatched);
752  }
753 
755  if(fJetShapeSub==kConstSub) kMatched = 3;
756  if(fJetShapeSub==kDerivSub) kMatched = 2;
757  ptMatch=jet3->Pt();
758  ptDMatch=GetJetpTD(jet3, kMatched);
759  massMatch=GetJetMass(jet3,kMatched);
760  // constMatch=1.*GetJetNumberOfConstituents(jet3,kMatched);
761  angulMatch=GetJetAngularity(jet3, kMatched);
762  circMatch=GetJetCircularity(jet3, kMatched);
763  lesubMatch=GetJetLeSub(jet3, kMatched);
764  coronnaMatch = GetJetCoronna(jet3, kMatched);
765  }
766 
767 
768 
770  kMatched = 0;
771  ptMatch=0.;
772  ptDMatch=0.;
773  massMatch=0.;
774  //constMatch=0.;
775  angulMatch=0.;
776  circMatch=0.;
777  lesubMatch=0.;
778  coronnaMatch =0.;
779 
780  }
781 
782 
783 
784  fShapesVar[8] = ptMatch;
785  fShapesVar[9] = ptDMatch;
786  fShapesVar[10] = massMatch;
787  fShapesVar[11] = angulMatch;
788  fShapesVar[12] = circMatch;
789  fShapesVar[13] = lesubMatch;
790  fShapesVar[14] = coronnaMatch;
791  fShapesVar[15] = kWeight;
792  //fShapesVar[16] = ntracksEvt;
793  fShapesVar[16] = rhoVal;
794  fShapesVar[17] = rhoMassVal;
795  fShapesVar[18] = jet1->Pt();
796 
797  Int_t nInclusiveElectrons = 0, nPhotonicElectrons = 0, nTrueElectronsMC, nTrueHFElecMC;
798  GetNumberOfElectrons(jet1, 0,nMotherKink,listofmotherkink,nInclusiveElectrons,nPhotonicElectrons);
799  //cout<<"Number of electrons"<<nInclusiveElectrons<<"ULS - LS "<<nPhotonicElectrons<<endl;
800 
801 
803  fTreeObservableTagging->Fill();
804 
806  if (nInclusiveElectrons==1) fTreeObservableTagging->Fill();
807 
809  if (nInclusiveElectrons==1 && nPhotonicElectrons==1) fTreeObservableTagging->Fill();
810 
812  if (nInclusiveElectrons==0) fTreeObservableTagging->Fill();
813 
814 
815  if(fMCarray)
816  GetNumberOfTrueElectrons(jet1, 0,nMotherKink,listofmotherkink,nTrueElectronsMC,nTrueHFElecMC);
817 
818 
819  }//jet loop
820 
821  }
822 
823  return kTRUE;
824 }
825 
826 //________________________________________________________________________
828  //calc subtracted jet mass
829  if((fJetShapeSub==kDerivSub)&&(jetContNb==0))
831  else return jet->GetShapeProperties()->GetSecondOrderSubtracted();
832  else
833  return jet->M();
834 }
835 
836 //________________________________________________________________________
837 void AliAnalysisTaskEmcalHfeTagging::GetNumberOfElectrons(AliEmcalJet *jet, Int_t jetContNb , Int_t nMother, Double_t listMother[] , Int_t &nIncElec, Int_t &nPhotElec){
838  // count the number of inclusive electrons per jet and per event
839 
840  AliVParticle *vp1 = 0x0;
841  Int_t nIE=0, nPairs=0, nPE=0, sub = -1;
842  Float_t ratioElec = -1.;
843 
844  AliJetContainer *jetCont = GetJetContainer(jetContNb);
845  if (jet->GetNumberOfTracks()){
846 
847  fnPartPerJet->Fill(jet->GetNumberOfTracks());
848  fpidResponse = fInputHandler->GetPIDResponse();
849  if(!fpidResponse){
850  printf("ERROR: pid response not available\n");
851  }
852 
853  for(UInt_t i = 0; i < jet->GetNumberOfTracks(); i++) {
854  vp1 = static_cast<AliVParticle*>(jet->TrackAt(i, jetCont->GetParticleContainer()->GetArray()));
855 
856  if (!vp1){
857  Printf("AliVParticle associated to constituent not found");
858  continue;
859  }
860 
861  AliVTrack *vtrack = dynamic_cast<AliVTrack*>(vp1);
862  AliAODTrack *track = dynamic_cast<AliAODTrack*>(vtrack);
863 
864  // track cuts
865  Bool_t passTrackCut = kFALSE;
866  passTrackCut = InclElecTrackCuts(pVtx,track,nMother,listMother);
867  if (!passTrackCut) continue;
868 
869  nPairs=0;
870 
871  Double_t p=-9., fTPCnSigma=-99., fTOFnSigma=-99.;
872  p = track->P();
873 
874  fTPCnSigma = fpidResponse->NumberOfSigmasTPC(track, AliPID::kElectron);
875  fTOFnSigma = fpidResponse->NumberOfSigmasTOF(track, AliPID::kElectron);
876 
877  fnTPCnTOFnocut->Fill(fTPCnSigma,fTOFnSigma);
878  fnTPCnocut->Fill(p,fTPCnSigma);
879  fnTOFnocut->Fill(p,fTOFnSigma);
880  if (TMath::Abs(fTOFnSigma)<fSigmaTOFcut) fnTPCcut->Fill(p,fTPCnSigma);
881 
882  if ((fTPCnSigma>fSigmaTPCcut) && (fTPCnSigma<3) && TMath::Abs(fTOFnSigma)<fSigmaTOFcut){
883  nIE++;
884  nPairs = GetNumberOfPairs(track,pVtx,nMother,listMother);
885  if (nPairs>0) nPE++;
886  }
887 
888  }
889  sub = nIE - nPE;
890  if (jet->GetNumberOfTracks()>0) ratioElec = nIE/jet->GetNumberOfTracks();
891  fnInclElecPerJet->Fill(nIE);
892  fnPhotElecPerJet->Fill(nPE);
893  fnIncSubPhotElecPerJet->Fill(sub);
894  fnElecOverPartPerJet->Fill(ratioElec);
895  }
896 
897  nIncElec = nIE;
898  nPhotElec = nPE;
899 }
900 //________________________________________________________________________
901 void AliAnalysisTaskEmcalHfeTagging::GetNumberOfTrueElectrons(AliEmcalJet *jet, Int_t jetContNb , Int_t nMother, Double_t listMother[] , Int_t &nTrueElec, Int_t &nTrueHFElec){
902  // count the number of inclusive and HF electrons per jet and per event (true MC)
903 
904  AliVParticle *vp1 = 0x0;
905  Int_t nIE=0, nHFE=0;
906 
907  Bool_t isFromHFdecay=kFALSE;
908 
909  AliJetContainer *jetCont = GetJetContainer(jetContNb);
910  if (jet->GetNumberOfTracks()){
911  for(UInt_t i = 0; i < jet->GetNumberOfTracks(); i++) {
912  vp1 = static_cast<AliVParticle*>(jet->TrackAt(i, jetCont->GetParticleContainer()->GetArray()));
913 
914  if (!vp1){
915  Printf("AliVParticle associated to constituent not found");
916  continue;
917  }
918 
919  AliVTrack *vtrack = dynamic_cast<AliVTrack*>(vp1);
920  AliAODTrack *track = dynamic_cast<AliAODTrack*>(vtrack);
921 
922  // track cuts
923  //Bool_t passTrackCut = kFALSE;
924  //passTrackCut = InclElecTrackCuts(pVtx,track,nMotherKink,listofmotherkink);
925  //if (!passTrackCut) continue;
926 
927  isFromHFdecay=kFALSE;
928 
929 
930  if(fMCarray){
931  Int_t label = track->GetLabel();
932  if(label!=0){
933  fMCparticle = (AliAODMCParticle*) fMCarray->At(label);
934  if(fMCparticle){
935  Int_t partPDG = fMCparticle->GetPdgCode();
936 
937  if (TMath::Abs(partPDG)==11){
938  nIE++;
939 
940  isFromHFdecay = IsFromHFdecay(fMCparticle);
941  if (isFromHFdecay) nHFE++;
942  }
943 
944  }
945  }
946  }
947  }//track loop
948  fnTrueElecPerJet->Fill(nIE);
949  fnTrueHFElecPerJet->Fill(nHFE);
950  }
951 
952  nTrueElec = nIE;
953  nTrueHFElec = nHFE;
954 }
955 
956 //_________________________________________
957 Int_t AliAnalysisTaskEmcalHfeTagging::GetNumberOfPairs(AliAODTrack *track,const AliVVertex *pVtx, Int_t nMother, Double_t listMother[])
958 {
959  //Get number of ULS and LS pairs per event
960 
961  Int_t ntracks = 0;
962  ntracks = fVevent->GetNumberOfTracks();
963 
964  Int_t nULSpairs = 0;
965  Int_t nLSpairs = 0;
966  Int_t sub = -1;
967 
968  for(Int_t jTracks = 0; jTracks < ntracks; jTracks++){
969 
970  AliVParticle* Vassotrack = fVevent->GetTrack(jTracks);
971 
972  if (!Vassotrack) {
973  printf("ERROR: Could not receive associated track %d\n", jTracks);
974  continue;
975  }
976  AliAODTrack *trackAsso = dynamic_cast<AliAODTrack*>(Vassotrack);
977  if(!trackAsso) continue;
978 
979  if((track->GetID())==(trackAsso->GetID())) continue;
980 
981  // track cuts
982  Bool_t passAssoTrackCut = kFALSE;
983  passAssoTrackCut = PhotElecTrackCuts(pVtx,trackAsso,nMother,listMother);
984  if (!passAssoTrackCut) continue;
985 
986  // tagged particle
987  Double_t p=-9.,pt=-9.,eta =-9.,phi=-9.;
988  Int_t charge = 0;
989 
990  pt = track->Pt();
991  p = track->P();
992  phi = track->Phi();
993  eta = track->Eta();
994  charge = track->Charge();
995 
996 
997  // associated particle variables
998  Double_t pAsso=-9.,ptAsso=-9.,etaAsso =-9.,fITSnSigmaAsso=-9.,fTPCnSigmaAsso=-9.,phiAsso=-9.;
999  Int_t chargeAsso = 0;
1000 
1001  ptAsso = trackAsso->Pt();
1002  pAsso = trackAsso->P();
1003  phiAsso = trackAsso->Phi();
1004  etaAsso = trackAsso->Eta();
1005  chargeAsso = trackAsso->Charge();
1006 
1007 
1008  // looser PID cuts
1009 
1010  fITSnSigmaAsso = fpidResponse->NumberOfSigmasITS(trackAsso, AliPID::kElectron);
1011  fTPCnSigmaAsso = fpidResponse->NumberOfSigmasTPC(trackAsso, AliPID::kElectron);
1012 
1013  if(TMath::Abs(fTPCnSigmaAsso)>3) continue;
1014 
1015  // invariant mass
1016  Bool_t fFlagLS=kFALSE, fFlagULS=kFALSE;
1017  Double_t openingAngle = -999., mass=999., width = -999;
1018 
1019  Int_t fPDGe1 = 11; Int_t fPDGe2 = 11;
1020  if(charge>0) fPDGe1 = -11;
1021  if(chargeAsso>0) fPDGe2 = -11;
1022 
1023  if(charge == chargeAsso) fFlagLS = kTRUE;
1024  if(charge != chargeAsso) fFlagULS = kTRUE;
1025 
1026  AliKFParticle::SetField(fVevent->GetMagneticField());
1027  AliKFParticle ge1(*track, fPDGe1);
1028  AliKFParticle ge2(*trackAsso, fPDGe2);
1029  AliKFParticle recg(ge1, ge2);
1030 
1031  if(recg.GetNDF()<1) continue;
1032  Double_t chi2recg = recg.GetChi2()/recg.GetNDF();
1033  if(TMath::Sqrt(TMath::Abs(chi2recg))>3.) continue;
1034 
1035  openingAngle = ge1.GetAngle(ge2);
1036  //if(openingAngle > fOpeningAngleCut) continue;
1037 
1038  Int_t MassCorrect=-9;
1039  MassCorrect = recg.GetMass(mass,width);
1040 
1041 
1042  if (fFlagULS)
1043  fInvmassULS->Fill(pt,mass);
1044 
1045  if (fFlagLS)
1046  fInvmassLS->Fill(pt,mass);
1047 
1048  if(mass<fIMcut && fFlagULS)
1049  nULSpairs++;
1050 
1051  if(mass<fIMcut && fFlagLS)
1052  nLSpairs++;
1053 
1054  }//track loop
1055 
1056  sub = nULSpairs-nLSpairs;
1057  fnULSmLSpairsPerElectron->Fill(track->Pt(),sub);
1058 
1059  return sub;
1060 }
1061 
1062 
1063 //_________________________________________
1065 {
1066  // Check if the mother comes from heavy-flavour decays
1067  Bool_t isHFdecay = kFALSE;
1068  //Int_t partPDG = particle->GetPdgCode();
1069 
1070  Int_t idMother = particle->GetMother();
1071  if (idMother>0){
1072  AliAODMCParticle* mother = (AliAODMCParticle*) fMCarray->At(idMother);
1073  Int_t motherPDG = TMath::Abs(mother->GetPdgCode());
1074 
1075  // c decays
1076  if((motherPDG % 1000) / 100 == 4) isHFdecay = kTRUE;
1077  if(motherPDG / 1000 == 4) isHFdecay = kTRUE;
1078 
1079  // b decays
1080  if((motherPDG % 1000) / 100 == 5) isHFdecay = kTRUE;
1081  if(motherPDG / 1000 == 5) isHFdecay = kTRUE;
1082 
1083  // all particles related to HF
1084 // if(motherPDG==4 || motherPDG==5 || motherPDG == 211 || motherPDG ==13 || motherPDG ==2112 || motherPDG ==130 || motherPDG ==3122 ||
1085 // motherPDG ==310 || motherPDG ==3222 || motherPDG ==2212 || motherPDG ==3112 || motherPDG ==321 ||
1086 // motherPDG ==11 || motherPDG ==3212 || motherPDG ==311 || motherPDG ==20213 || motherPDG ==3312 ||
1087 // motherPDG ==3334 || motherPDG ==3324 || motherPDG ==3322 || motherPDG ==1000010020 || motherPDG ==15
1088 // || motherPDG ==10323 || motherPDG ==2114 || motherPDG ==1000010030 || motherPDG ==2214 || motherPDG ==2224
1089 // || motherPDG ==1114 || motherPDG == 2214 || motherPDG == 3114 || motherPDG ==3224 || motherPDG ==3124
1090 // || motherPDG ==3314 || motherPDG ==10323 || motherPDG == 3214) isHFdecay = kTRUE;
1091 
1092  }
1093 
1094  return isHFdecay;
1095 }
1096 //_________________________________________
1098 {
1099  // Check if mother comes from light-meson decays
1100  Bool_t isLMdecay = kFALSE;
1101  //Int_t partPDG = particle->GetPdgCode();
1102 
1103  Int_t idMother = particle->GetMother();
1104  if (idMother>0){
1105  AliAODMCParticle* mother = (AliAODMCParticle*) fMCarray->At(idMother);
1106  Int_t motherPDG = TMath::Abs(mother->GetPdgCode());
1107 
1108  if(motherPDG == 111 || motherPDG == 221 || motherPDG==223 || motherPDG==333 || motherPDG==331 ||
1109  motherPDG==113 || motherPDG==213 || motherPDG==313 || motherPDG==323) isLMdecay = kTRUE;
1110  }
1111 
1112  return isLMdecay;
1113 }
1114 //_________________________________________
1116 {
1117  // Check if particle is primary
1118  Bool_t isprimary = kFALSE;
1119 
1120  Int_t idMother = particle->GetMother();
1121  if (idMother==-1) isprimary = kTRUE;
1122  //if (particle->IsPrimary()) isprimary = kTRUE;
1123 
1124  return isprimary;
1125 }
1126 
1127 //________________________________________________________________________
1129 
1130  AliJetContainer *jetCont = GetJetContainer(jetContNb);
1131  if (!jet->GetNumberOfTracks())
1132  return 0;
1133  Double_t den=0.;
1134  Double_t num = 0.;
1135  AliVParticle *vp1 = 0x0;
1136  for(UInt_t i = 0; i < jet->GetNumberOfTracks(); i++) {
1137  vp1 = static_cast<AliVParticle*>(jet->TrackAt(i, jetCont->GetParticleContainer()->GetArray()));
1138 
1139  if (!vp1){
1140  Printf("AliVParticle associated to constituent not found");
1141  continue;
1142  }
1143 
1144  Double_t dphi = RelativePhi(vp1->Phi(),jet->Phi());
1145  Double_t dr2 = (vp1->Eta()-jet->Eta())*(vp1->Eta()-jet->Eta()) + dphi*dphi;
1146  Double_t dr = TMath::Sqrt(dr2);
1147  num=num+vp1->Pt()*dr;
1148  den=den+vp1->Pt();
1149  }
1150  return num/den;
1151 }
1152 
1153 //________________________________________________________________________
1155 
1156  if((fJetShapeSub==kDerivSub) && (jetContNb==0))
1159  else
1160  return Angularity(jet, jetContNb);
1161 
1162 }
1163 
1164 //____________________________________________________________________________
1165 
1167 
1168  AliTrackContainer *PartCont = NULL;
1169  AliParticleContainer *PartContMC = NULL;
1170 
1171 
1172  if (fJetShapeSub==kConstSub){
1174  else PartCont = GetTrackContainer(1);
1175  }
1176  else{
1178  else PartCont = GetTrackContainer(0);
1179  }
1180 
1181  TClonesArray *TracksArray = NULL;
1182  TClonesArray *TracksArrayMC = NULL;
1183 
1184  if (fJetShapeType == AliAnalysisTaskEmcalHfeTagging::kGenOnTheFly) TracksArrayMC = PartContMC->GetArray();
1185  else TracksArray = PartCont->GetArray();
1186 
1188  if(!PartContMC || !TracksArrayMC) return -2;
1189  }
1190  else {
1191  if(!PartCont || !TracksArray) return -2;
1192  }
1193 
1194 
1195  AliAODTrack *Track = 0x0;
1196  Float_t sumpt=0;
1197  Int_t NTracks=0;
1198  if (fJetShapeType == AliAnalysisTaskEmcalHfeTagging::kGenOnTheFly) NTracks = TracksArrayMC->GetEntriesFast();
1199  else NTracks = TracksArray->GetEntriesFast();
1200 
1201  for(Int_t i=0; i < NTracks; i++){
1203  if((Track = static_cast<AliAODTrack*>(PartContMC->GetAcceptParticle(i)))){
1204  if (!Track) continue;
1205  if(TMath::Abs(Track->Eta())>0.9) continue;
1206  Double_t dphi = RelativePhi(Track->Phi(),jet->Phi());
1207  Double_t dr2 = (Track->Eta()-jet->Eta())*(Track->Eta()-jet->Eta()) + dphi*dphi;
1208  Double_t dr = TMath::Sqrt(dr2);
1209  if((dr>=0.8) && (dr<1)) sumpt=sumpt+Track->Pt();
1210  }
1211  }
1212  else{
1213  if((Track = static_cast<AliAODTrack*>(PartCont->GetAcceptTrack(i)))){
1214  if (!Track) continue;
1215  if(TMath::Abs(Track->Eta())>0.9) continue;
1216  if (Track->Pt()<0.15) continue;
1217  Double_t dphi = RelativePhi(Track->Phi(),jet->Phi());
1218  Double_t dr2 = (Track->Eta()-jet->Eta())*(Track->Eta()-jet->Eta()) + dphi*dphi;
1219  Double_t dr = TMath::Sqrt(dr2);
1220  if((dr>=0.8) && (dr<1)) sumpt=sumpt+Track->Pt();
1221 
1222  }
1223  }
1224  }
1225  return sumpt;
1226 }
1227 
1228 //________________________________________________________________________
1230 
1231  if((fJetShapeSub==kDerivSub) && (jetContNb==0)) return -2;
1232  else
1233  return Coronna(jet, jetContNb);
1234 
1235 }
1236 
1237 
1238 
1239 
1240 
1241 //________________________________________________________________________
1243 
1244  AliJetContainer *jetCont = GetJetContainer(jetContNb);
1245  if (!jet->GetNumberOfTracks())
1246  return 0;
1247  Double_t den=0.;
1248  Double_t num = 0.;
1249  AliVParticle *vp1 = 0x0;
1250  for(UInt_t i = 0; i < jet->GetNumberOfTracks(); i++) {
1251  vp1 = static_cast<AliVParticle*>(jet->TrackAt(i, jetCont->GetParticleContainer()->GetArray()));
1252 
1253  if (!vp1){
1254  Printf("AliVParticle associated to constituent not found");
1255  continue;
1256  }
1257 
1258  num=num+vp1->Pt()*vp1->Pt();
1259  den=den+vp1->Pt();
1260  }
1261  return TMath::Sqrt(num)/den;
1262 }
1263 
1264 //________________________________________________________________________
1266  //calc subtracted jet mass
1267  if((fJetShapeSub==kDerivSub)&&(jetContNb==0))
1269  else return jet->GetShapeProperties()->GetSecondOrderSubtractedpTD();
1270  else
1271  return PTD(jet, jetContNb);
1272 
1273 }
1274 
1275 //_____________________________________________________________________________
1277 
1278  AliJetContainer *jetCont = GetJetContainer(jetContNb);
1279  if (!jet->GetNumberOfTracks())
1280  return 0;
1281  Double_t mxx = 0.;
1282  Double_t myy = 0.;
1283  Double_t mxy = 0.;
1284  int nc = 0;
1285  Double_t sump2 = 0.;
1286  Double_t pxjet=jet->Px();
1287  Double_t pyjet=jet->Py();
1288  Double_t pzjet=jet->Pz();
1289 
1290 
1291  //2 general normalized vectors perpendicular to the jet
1292  TVector3 ppJ1(pxjet, pyjet, pzjet);
1293  TVector3 ppJ3(- pxjet* pzjet, - pyjet * pzjet, pxjet * pxjet + pyjet * pyjet);
1294  ppJ3.SetMag(1.);
1295  TVector3 ppJ2(-pyjet, pxjet, 0);
1296  ppJ2.SetMag(1.);
1297  AliVParticle *vp1 = 0x0;
1298  for(UInt_t i = 0; i < jet->GetNumberOfTracks(); i++) {
1299  vp1 = static_cast<AliVParticle*>(jet->TrackAt(i, jetCont->GetParticleContainer()->GetArray()));
1300 
1301  if (!vp1){
1302  Printf("AliVParticle associated to constituent not found");
1303  continue;
1304  }
1305 
1306  TVector3 pp(vp1->Px(), vp1->Py(), vp1->Pz());
1307 
1308  //local frame
1309  TVector3 pLong = pp.Dot(ppJ1) / ppJ1.Mag2() * ppJ1;
1310  TVector3 pPerp = pp - pLong;
1311  //projection onto the two perpendicular vectors defined above
1312 
1313  Float_t ppjX = pPerp.Dot(ppJ2);
1314  Float_t ppjY = pPerp.Dot(ppJ3);
1315  Float_t ppjT = TMath::Sqrt(ppjX * ppjX + ppjY * ppjY);
1316  if(ppjT<=0) return 0;
1317 
1318  mxx += (ppjX * ppjX / ppjT);
1319  myy += (ppjY * ppjY / ppjT);
1320  mxy += (ppjX * ppjY / ppjT);
1321  nc++;
1322  sump2 += ppjT;}
1323 
1324  if(nc<2) return 0;
1325  if(sump2==0) return 0;
1326  // Sphericity Matrix
1327  Double_t ele[4] = {mxx / sump2, mxy / sump2, mxy / sump2, myy / sump2};
1328  TMatrixDSym m0(2,ele);
1329 
1330  // Find eigenvectors
1331  TMatrixDSymEigen m(m0);
1332  TVectorD eval(2);
1333  TMatrixD evecm = m.GetEigenVectors();
1334  eval = m.GetEigenValues();
1335  // Largest eigenvector
1336  int jev = 0;
1337  // cout<<eval[0]<<" "<<eval[1]<<endl;
1338  if (eval[0] < eval[1]) jev = 1;
1339  TVectorD evec0(2);
1340  // Principle axis
1341  evec0 = TMatrixDColumn(evecm, jev);
1342  Double_t compx=evec0[0];
1343  Double_t compy=evec0[1];
1344  TVector2 evec(compx, compy);
1345  Double_t circ=0;
1346  if(jev==1) circ=2*eval[0];
1347  if(jev==0) circ=2*eval[1];
1348 
1349  return circ;
1350 
1351 
1352 
1353 }
1354 
1355 
1356 
1357 
1358 //________________________________________________________________________
1360  //calc subtracted jet mass
1361 
1362  if((fJetShapeSub==kDerivSub)&&(jetContNb==0))
1365  else
1366  return Circularity(jet, jetContNb);
1367 
1368 }
1369 
1370 //________________________________________________________________________
1372 
1373  AliJetContainer *jetCont = GetJetContainer(jetContNb);
1374  if (!jet->GetNumberOfTracks())
1375  return 0;
1376  Double_t den=0.;
1377  Double_t num = 0.;
1378  AliVParticle *vp1 = 0x0;
1379  AliVParticle *vp2 = 0x0;
1380  std::vector<int> ordindex;
1381  ordindex=jet->GetPtSortedTrackConstituentIndexes(jetCont->GetParticleContainer()->GetArray());
1382  //Printf("Nbof const = %d", jet->GetNumberOfTracks());
1383  //Printf("ordindex[0] = %d, ordindex[1] = %d", ordindex[0], ordindex[1]);
1384 
1385  if(ordindex.size()<2) return -1;
1386 
1387  vp1 = static_cast<AliVParticle*>(jet->TrackAt(ordindex[0], jetCont->GetParticleContainer()->GetArray()));
1388  if (!vp1){
1389  Printf("AliVParticle associated to Leading constituent not found");
1390  return -1;
1391  }
1392 
1393  vp2 = static_cast<AliVParticle*>(jet->TrackAt(ordindex[1], jetCont->GetParticleContainer()->GetArray()));
1394  if (!vp2){
1395  Printf("AliVParticle associated to Subleading constituent not found");
1396  return -1;
1397  }
1398 
1399 
1400  num=vp1->Pt();
1401  den=vp2->Pt();
1402  //Printf("vp1->Pt() =%f, vp2->Pt() =%f", vp1->Pt(), vp2->Pt());
1403 
1404  return num-den;
1405 }
1406 
1407 //________________________________________________________________________
1409  //calc subtracted jet mass
1410 
1411  if((fJetShapeSub==kDerivSub)&&(jetContNb==0))
1413  else return jet->GetShapeProperties()->GetSecondOrderSubtractedLeSub();
1414  else
1415  return LeSub(jet, jetContNb);
1416 
1417 }
1418 
1419 //________________________________________________________________________
1421  //calc subtracted jet mass
1422 
1423  if((fJetShapeSub==kDerivSub)&&(jetContNb==0))
1426  else
1427  return jet->GetNumberOfTracks();
1428 
1429 }
1430 
1431 
1432 //______________________________________________________________________________
1434 
1435  AliJetContainer *jetCont = GetJetContainer(jetContNb);
1436  if (!jet->GetNumberOfTracks())
1437  return 0;
1438  Double_t mxx = 0.;
1439  Double_t myy = 0.;
1440  Double_t mxy = 0.;
1441  int nc = 0;
1442  Double_t sump2 = 0.;
1443 
1444  AliVParticle *vp1 = 0x0;
1445  for(UInt_t i = 0; i < jet->GetNumberOfTracks(); i++) {
1446  vp1 = static_cast<AliVParticle*>(jet->TrackAt(i, jetCont->GetParticleContainer()->GetArray()));
1447 
1448  if (!vp1){
1449  Printf("AliVParticle associated to constituent not found");
1450  continue;
1451  }
1452 
1453  Double_t ppt=vp1->Pt();
1454  Double_t dphi = RelativePhi(vp1->Phi(),jet->Phi());
1455 
1456  Double_t deta = vp1->Eta()-jet->Eta();
1457  mxx += ppt*ppt*deta*deta;
1458  myy += ppt*ppt*dphi*dphi;
1459  mxy -= ppt*ppt*deta*TMath::Abs(dphi);
1460  nc++;
1461  sump2 += ppt*ppt;
1462 
1463  }
1464  if(nc<2) return 0;
1465  if(sump2==0) return 0;
1466  // Sphericity Matrix
1467  Double_t ele[4] = {mxx , mxy , mxy , myy };
1468  TMatrixDSym m0(2,ele);
1469 
1470  // Find eigenvectors
1471  TMatrixDSymEigen m(m0);
1472  TVectorD eval(2);
1473  TMatrixD evecm = m.GetEigenVectors();
1474  eval = m.GetEigenValues();
1475  // Largest eigenvector
1476  int jev = 0;
1477  // cout<<eval[0]<<" "<<eval[1]<<endl;
1478  if (eval[0] < eval[1]) jev = 1;
1479  TVectorD evec0(2);
1480  // Principle axis
1481  evec0 = TMatrixDColumn(evecm, jev);
1482  Double_t compx=evec0[0];
1483  Double_t compy=evec0[1];
1484  TVector2 evec(compx, compy);
1485  Double_t sig=0;
1486  if(jev==1) sig=TMath::Sqrt(TMath::Abs(eval[0])/sump2);
1487  if(jev==0) sig=TMath::Sqrt(TMath::Abs(eval[1])/sump2);
1488 
1489  return sig;
1490 
1491 }
1492 
1493 //________________________________________________________________________
1495  //calc subtracted jet mass
1496 
1497  if((fJetShapeSub==kDerivSub)&&(jetContNb==0))
1499  else return jet->GetShapeProperties()->GetSecondOrderSubtractedSigma2();
1500  else
1501  return Sigma2(jet, jetContNb);
1502 
1503 }
1504 
1505 //________________________________________________________________________
1507 
1508  AliTrackContainer *PartCont = NULL;
1509  AliParticleContainer *PartContMC = NULL;
1510 
1511 
1512  if (fJetShapeSub==kConstSub){
1514  else PartCont = GetTrackContainer(1);
1515  }
1516  else{
1518  else PartCont = GetTrackContainer(0);
1519  }
1520 
1521  TClonesArray *TracksArray = NULL;
1522  TClonesArray *TracksArrayMC = NULL;
1523 
1524  if (fJetShapeType == AliAnalysisTaskEmcalHfeTagging::kGenOnTheFly) TracksArrayMC = PartContMC->GetArray();
1525  else TracksArray = PartCont->GetArray();
1526 
1528  if(!PartContMC || !TracksArrayMC) return -99999;
1529  }
1530  else {
1531  if(!PartCont || !TracksArray) return -99999;
1532  }
1533 
1534 
1535  AliAODTrack *Track = 0x0;
1536 
1537 
1538 
1539  //TList *trackList = new TList();
1540  Int_t triggers[100];
1541  for (Int_t iTrigger=0; iTrigger<100; iTrigger++) triggers[iTrigger] = 0;
1542  Int_t iTT = 0;
1543  Int_t NTracks=0;
1544  if (fJetShapeType == AliAnalysisTaskEmcalHfeTagging::kGenOnTheFly) NTracks = TracksArrayMC->GetEntriesFast();
1545  else NTracks = TracksArray->GetEntriesFast();
1546 
1547  for(Int_t i=0; i < NTracks; i++){
1549  if((Track = static_cast<AliAODTrack*>(PartContMC->GetAcceptParticle(i)))){
1550  if (!Track) continue;
1551  if(TMath::Abs(Track->Eta())>0.9) continue;
1552  if (Track->Pt()<0.15) continue;
1553  if ((Track->Pt() >= minpT) && (Track->Pt()< maxpT)) {
1554  triggers[iTT] = i;
1555  iTT++;
1556  }
1557  }
1558  }
1559  else{
1560  if((Track = static_cast<AliAODTrack*>(PartCont->GetAcceptTrack(i)))){
1561  if (!Track) continue;
1562  if(TMath::Abs(Track->Eta())>0.9) continue;
1563  if (Track->Pt()<0.15) continue;
1564  if ((Track->Pt() >= minpT) && (Track->Pt()< maxpT)) {
1565  triggers[iTT] = i;
1566  iTT++;
1567  }
1568  }
1569  }
1570  }
1571 
1572 
1573  if (iTT == 0) return -99999;
1574  Int_t nbRn = 0, index = 0 ;
1575  TRandom3* random = new TRandom3(0);
1576  nbRn = random->Integer(iTT);
1577  index = triggers[nbRn];
1578  //Printf("iTT Total= %d, nbRn = %d, Index = %d",iTT, nbRn, index );
1579  return index;
1580 
1581 }
1582 
1583 //__________________________________________________________________________________
1585 
1586  if (vphi < -1*TMath::Pi()) vphi += (2*TMath::Pi());
1587  else if (vphi > TMath::Pi()) vphi -= (2*TMath::Pi());
1588  if (mphi < -1*TMath::Pi()) mphi += (2*TMath::Pi());
1589  else if (mphi > TMath::Pi()) mphi -= (2*TMath::Pi());
1590  double dphi = mphi-vphi;
1591  if (dphi < -1*TMath::Pi()) dphi += (2*TMath::Pi());
1592  else if (dphi > TMath::Pi()) dphi -= (2*TMath::Pi());
1593  return dphi;//dphi in [-Pi, Pi]
1594 }
1595 
1596 
1597 //________________________________________________________________________
1599  //
1600  // retrieve event objects
1601  //
1603  return kFALSE;
1604 
1605  return kTRUE;
1606 }
1607 
1608 //_________________________________________
1609 Bool_t AliAnalysisTaskEmcalHfeTagging::InclElecTrackCuts(const AliVVertex *pVietx,AliAODTrack *ietrack,Int_t nMother, Double_t listMother[])
1610 {
1611  // track cuts for inclusive electrons
1612 
1613  if(!ietrack->TestFilterMask(AliAODTrack::kTrkGlobalNoDCA)) return kFALSE;
1614  if(TMath::Abs(ietrack->Eta())>0.8) return kFALSE;
1615  if(ietrack->GetTPCNcls() < fTPCnCut) return kFALSE;
1616  if (ietrack->GetITSNcls() < fITSncut) return kFALSE;
1617  if(!ietrack->IsOn(AliAODTrack::kITSrefit)) return kFALSE;
1618  if(!ietrack->IsOn(AliAODTrack::kTPCrefit)) return kFALSE;
1619  if(!(ietrack->HasPointOnITSLayer(0) && ietrack->HasPointOnITSLayer(1))) return kFALSE;
1620  if ((ietrack->Pt()<0.5) || (ietrack->Pt()>4)) return kFALSE;
1621 
1622  Bool_t kinkmotherpass = kTRUE;
1623  for(Int_t kinkmother = 0; kinkmother < nMother; kinkmother++) {
1624  if(ietrack->GetID() == listMother[kinkmother]) {
1625  kinkmotherpass = kFALSE;
1626  continue;
1627  }
1628  }
1629  if(!kinkmotherpass) return kFALSE;
1630 
1631  Double_t d0z0[2]={-999,-999}, cov[3];
1632 
1633  if(ietrack->PropagateToDCA(pVietx, fVevent->GetMagneticField(), 20., d0z0, cov))
1634  if(TMath::Abs(d0z0[0]) > fDcaXYcut || TMath::Abs(d0z0[1]) > fDcaZcut) return kFALSE;
1635 
1636  return kTRUE;
1637 
1638 }
1639 //_________________________________________
1640 Bool_t AliAnalysisTaskEmcalHfeTagging::PhotElecTrackCuts(const AliVVertex *pVaetx,AliAODTrack *aetrack,Int_t nMother, Double_t listMother[])
1641 {
1642  // track cuts for associate tracks of photonic electrons
1643 
1644  if(!aetrack->TestFilterMask(AliAODTrack::kTrkTPCOnly)) return kFALSE;
1645  if(aetrack->Pt() < fAssPtCut) return kFALSE;
1646  if(TMath::Abs(aetrack->Eta())>0.9) return kFALSE;
1647  if(aetrack->GetTPCNcls() < fAssTPCnCut) return kFALSE;
1648  if (fAssITSrefitCut && !(aetrack->GetStatus()&AliAODTrack::kITSrefit)) return kFALSE;
1649  if(!(aetrack->GetStatus()&AliAODTrack::kTPCrefit)) return kFALSE;
1650 
1651  return kTRUE;
1652 
1653 }
1654 
1655 //_______________________________________________________________________
1657 {
1658  // Called once at the end of the analysis.
1659 
1660  // fTreeObservableTagging = dynamic_cast<TTree*>(GetOutputData(1));
1661  // if (!fTreeObservableTagging){
1662  // Printf("ERROR: fTreeObservableTagging not available");
1663  // return;
1664  // }
1665 
1666 }
1667 
Int_t charge
Float_t Angularity(AliEmcalJet *jet, Int_t jetContNb)
Double_t GetFirstOrderSubtractedAngularity() const
Float_t GetJetLeSub(AliEmcalJet *jet, Int_t jetContNb)
Double_t Area() const
Definition: AliEmcalJet.h:123
Bool_t IsFromHFdecay(AliAODMCParticle *particle)
const TString & GetRhoName() const
double Double_t
Definition: External.C:58
Double_t GetSecondOrderSubtractedSigma2() const
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.
Bool_t FillHistograms()
Function filling histograms.
Float_t GetPartonEta6() const
AliEmcalJet * ClosestJet() const
Definition: AliEmcalJet.h:222
AliJetContainer * GetJetContainer(Int_t i=0) const
Float_t GetPartonEta7() const
Double_t GetSecondOrderSubtractedConstituent() const
Double_t Eta() const
Definition: AliEmcalJet.h:114
Double_t Py() const
Definition: AliEmcalJet.h:100
Double_t Phi() const
Definition: AliEmcalJet.h:110
Double_t mass
Float_t GetPythiaEventWeight() const
Container with name, TClonesArray and cuts for particles.
Int_t GetLabel() const
Definition: AliEmcalJet.h:117
Float_t GetPartonPhi7() const
Bool_t RetrieveEventObjects()
Retrieve common objects from event.
Int_t GetNumberOfPairs(AliAODTrack *track, const AliVVertex *pVtx, Int_t nMother, Double_t listMother[])
Bool_t PhotElecTrackCuts(const AliVVertex *pVtx, AliAODTrack *aetrack, Int_t nMother, Double_t listMother[])
Float_t Circularity(AliEmcalJet *jet, Int_t jetContNb)
void GetNumberOfElectrons(AliEmcalJet *jet, Int_t jetContNb, Int_t nMother, Double_t listMother[], Int_t &nIncElec, Int_t &nPhotElec)
Float_t GetJetCircularity(AliEmcalJet *jet, Int_t jetContNb)
Int_t GetPartonFlag7() const
Container for particles within the EMCAL framework.
Float_t Sigma2(AliEmcalJet *jet, Int_t jetContNb)
Float_t GetPartonPhi6() const
Int_t TrackAt(Int_t idx) const
Definition: AliEmcalJet.h:153
UShort_t GetNumberOfTracks() const
Definition: AliEmcalJet.h:132
TString kData
Declare data MC or deltaAOD.
Double_t Px() const
Definition: AliEmcalJet.h:99
Float_t PTD(AliEmcalJet *jet, Int_t jetContNb)
AliParticleContainer * GetParticleContainer(Int_t i=0) const
Get particle container attached to this task.
const TString & GetRhoMassName() const
Int_t GetPartonFlag6() const
AliParticleContainer * GetParticleContainer() const
Double_t GetFirstOrderSubtractedConstituent() const
int Int_t
Definition: External.C:63
Definition: External.C:204
unsigned int UInt_t
Definition: External.C:33
float Float_t
Definition: External.C:68
Bool_t IsPrimary(AliAODMCParticle *particle)
Int_t GetNJets() const
Float_t GetJetMass(AliEmcalJet *jet, Int_t jetContNb)
Double_t GetSecondOrderSubtractedAngularity() const
Bool_t InclElecTrackCuts(const AliVVertex *pVtx, AliAODTrack *ietrack, Int_t nMother, Double_t listMother[])
Double_t RelativePhi(Double_t mphi, Double_t vphi)
virtual AliVParticle * GetAcceptParticle(Int_t i=-1) const
Double_t fCent
!event centrality
AliEmcalJet * GetNextAcceptJet()
Bool_t Data(TH1F *h, Double_t *rangefit, Bool_t writefit, Double_t &sgn, Double_t &errsgn, Double_t &bkg, Double_t &errbkg, Double_t &sgnf, Double_t &errsgnf, Double_t &sigmafit, Int_t &status)
Float_t LeSub(AliEmcalJet *jet, Int_t jetContNb)
Double_t Pt() const
Definition: AliEmcalJet.h:102
Double_t GetRhoVal(Int_t i=0) const
Double_t GetFirstOrderSubtractedCircularity() const
AliEmcalList * fOutput
!output list
const Int_t nVar
Float_t GetJetCoronna(AliEmcalJet *jet, Int_t jetContNb)
Double_t GetSecondOrderSubtractedCircularity() const
AliTrackContainer * GetTrackContainer(Int_t i=0) const
Store some informaion about a Pythia eventThis class is used to store some information about a Pythia...
void SetMakeGeneralHistograms(Bool_t g)
Float_t GetJetAngularity(AliEmcalJet *jet, Int_t jetContNb)
Float_t GetSigma2(AliEmcalJet *jet, Int_t jetContNb)
virtual AliVTrack * GetAcceptTrack(Int_t i=-1) const
Base task in the EMCAL jet framework.
Represent a jet reconstructed using the EMCal jet framework.
Definition: AliEmcalJet.h:44
void GetNumberOfTrueElectrons(AliEmcalJet *jet, Int_t jetContNb, Int_t nMother, Double_t listMother[], Int_t &nTrueElec, Int_t &nTrueHFElec)
const AliEmcalPythiaInfo * GetPythiaInfo() const
Double_t Pz() const
Definition: AliEmcalJet.h:101
Double_t GetFractionSharedPt(const AliEmcalJet *jet, AliParticleContainer *cont2=0x0) const
Declaration of class AliEmcalPythiaInfo.
const char Option_t
Definition: External.C:48
void UserCreateOutputObjects()
Main initialization function on the worker.
Double_t GetFirstOrderSubtractedSigma2() const
bool Bool_t
Definition: External.C:53
Bool_t IsFromLMdecay(AliAODMCParticle *particle)
AliEmcalJetShapeProperties * GetShapeProperties() const
Definition: AliEmcalJet.h:256
Int_t SelectTrigger(Float_t minpT, Float_t maxpT)
Float_t GetJetpTD(AliEmcalJet *jet, Int_t jetContNb)
Float_t Coronna(AliEmcalJet *jet, Int_t jetContNb)
Float_t GetPartonPt7() const
Double_t M() const
Definition: AliEmcalJet.h:113
Container for jet within the EMCAL jet framework.
Definition: External.C:196
std::vector< int > GetPtSortedTrackConstituentIndexes(TClonesArray *tracks) const
Float_t GetPartonPt6() const
Float_t GetJetNumberOfConstituents(AliEmcalJet *jet, Int_t jetContNb)
AliEmcalJet * GetJet(Int_t i) const