AliPhysics  58f3d52 (58f3d52)
 All Classes Namespaces Files Functions Variables Typedefs Enumerations Enumerator Friends Macros Groups Pages
AliAnalysisTaskEmcalQGTagging.cxx
Go to the documentation of this file.
1 //
2 // Jet QG tagging analysis task.
3 //
4 // Author: D. Caffarri, L. Cunqueiro
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 "AliMCEvent.h"
36 #include "AliAnalysisManager.h"
37 #include "AliJetContainer.h"
38 #include "AliParticleContainer.h"
39 #include "AliEmcalPythiaInfo.h"
40 #include "TRandom3.h"
41 
42 
43 
44 #include "AliAODEvent.h"
46 
47 using std::cout;
48 using std::endl;
49 
51 
52 //________________________________________________________________________
55  fContainer(0),
56  fMinFractionShared(0),
57  fJetShapeType(kData),
58  fJetShapeSub(kNoSub),
59  fJetSelection(kInclusive),
60  fPtThreshold(-9999.),
61  fRMatching(0.2),
62  fSelectedShapes(0),
63  fminpTTrig(20.),
64  fmaxpTTrig(50.),
65  fangWindowRecoil(0.6),
66  fSemigoodCorrect(0),
67  fHolePos(0),
68  fHoleWidth(0),
69  fCentSelectOn(kTRUE),
70  fCentMin(0),
71  fCentMax(10),
72  fOneConstSelectOn(kFALSE),
73  fDerivSubtrOrder(0),
74  fh2ResponseUW(0x0),
75  fh2ResponseW(0x0),
76  fPhiJetCorr6(0x0),
77  fPhiJetCorr7(0x0),
78  fEtaJetCorr6(0x0),
79  fEtaJetCorr7(0x0),
80  fPtJetCorr(0x0),
81  fPtJet(0x0),
82  fhpTjetpT(0x0),
83  fhPt(0x0),
84  fhPhi(0x0),
85  fHLundIterative(0x0),
86  fNbOfConstvspT(0x0),
87  fTreeObservableTagging(0)
88 
89 {
90  for(Int_t i=0;i<17;i++){
91  fShapesVar[i]=0;}
92  SetMakeGeneralHistograms(kTRUE);
93  DefineOutput(1, TList::Class());
94  DefineOutput(2, TTree::Class());
95 }
96 
97 //________________________________________________________________________
99  AliAnalysisTaskEmcalJet(name, kTRUE),
100  fContainer(0),
101  fMinFractionShared(0),
102  fJetShapeType(kData),
103  fJetShapeSub(kNoSub),
104  fJetSelection(kInclusive),
105  fPtThreshold(-9999.),
106  fRMatching(0.2),
107  fSelectedShapes(0),
108  fminpTTrig(20.),
109  fmaxpTTrig(50.),
110  fangWindowRecoil(0.6),
111  fSemigoodCorrect(0),
112  fHolePos(0),
113  fHoleWidth(0),
114  fCentSelectOn(kTRUE),
115  fCentMin(0),
116  fCentMax(10),
117  fOneConstSelectOn(kFALSE),
118  fDerivSubtrOrder(0),
119  fh2ResponseUW(0x0),
120  fh2ResponseW(0x0),
121  fPhiJetCorr6(0x0),
122  fPhiJetCorr7(0x0),
123  fEtaJetCorr6(0x0),
124  fEtaJetCorr7(0x0),
125  fPtJetCorr(0x0),
126  fPtJet(0x0),
127  fhpTjetpT(0x0),
128  fhPt(0x0),
129  fhPhi(0x0),
130  fHLundIterative(0x0),
131  fNbOfConstvspT(0x0),
132  fTreeObservableTagging(0)
133 
134 {
135  // Standard constructor.
136  for(Int_t i=0;i<17;i++){
137  fShapesVar[i]=0;}
139 
140  DefineOutput(1, TList::Class());
141  DefineOutput(2, TTree::Class());
142 }
143 
144 //________________________________________________________________________
146 {
147  // Destructor.
148 }
149 
150 //________________________________________________________________________
152 {
153  // Create user output.
154 
156 
157  Bool_t oldStatus = TH1::AddDirectoryStatus();
158  TH1::AddDirectory(kFALSE);
159 
160 
161 
162 
163  fh2ResponseUW= new TH2F("fh2ResponseUW", "fh2ResponseUW", 100, 0, 200, 100, 0, 200);
164  fOutput->Add(fh2ResponseUW);
165  fh2ResponseW= new TH2F("fh2ResponseW", "fh2ResponseW", 100, 0, 200, 100, 0, 200);
166  fOutput->Add(fh2ResponseW);
167  fPhiJetCorr6= new TH2F("fPhiJetCorr6", "fPhiJetCorr6", 50, 0, 2*TMath::Pi(), 50, 0, 2*TMath::Pi());
168  fOutput->Add(fPhiJetCorr6);
169  fEtaJetCorr6= new TH2F("fEtaJetCorr6", "fEtaJetCorr6", 50, -1.5, 1.5, 50, -1.5, 1.5);
170  fOutput->Add(fEtaJetCorr6);
171 
172  fPhiJetCorr7= new TH2F("fPhiJetCorr7", "fPhiJetCorr7", 50, 0, 2*TMath::Pi(), 50, 0, 2*TMath::Pi());
173  fOutput->Add(fPhiJetCorr7);
174  fEtaJetCorr7= new TH2F("fEtaJetCorr7", "fEtaJetCorr7", 50, -1.5, 1.5, 50, -1.5, 1.5);
175  fOutput->Add(fEtaJetCorr7);
176 
177  fPtJetCorr= new TH2F("fPtJetCorr", "fPtJetCorr", 100, 0, 200, 100, 0, 200);
178  fOutput->Add(fPtJetCorr);
179  fPtJet= new TH1F("fPtJet", "fPtJet", 100, 0, 200);
180  fOutput->Add(fPtJet);
181 
182  fhpTjetpT= new TH2F("fhpTjetpT", "fhpTjetpT", 200, 0, 200, 200, 0, 200);
183  fOutput->Add(fhpTjetpT);
184  fhPt= new TH1F("fhPt", "fhPt", 200, 0, 200);
185  fOutput->Add(fhPt);
186  fhPhi= new TH1F("fhPhi", "fhPhi", 100, -TMath::Pi(), TMath::Pi());
187  fOutput->Add(fhPhi);
188 
189  //log(1/theta),log(z*theta),jetpT,algo//
190  const Int_t dimSpec = 5;
191  const Int_t nBinsSpec[5] = {50,50,10,3,10};
192  const Double_t lowBinSpec[5] = {0.0,-10, 0,0,0};
193  const Double_t hiBinSpec[5] = {5.0, 0,200,3,10};
194  fHLundIterative = new THnSparseF("fHLundIterative",
195  "LundIterativePlot [log(1/theta),log(z*theta),pTjet,algo]",
196  dimSpec,nBinsSpec,lowBinSpec,hiBinSpec);
197  fOutput->Add(fHLundIterative);
198 
199  fNbOfConstvspT=new TH2F("fNbOfConstvspT", "fNbOfConstvspT", 100, 0, 100, 200, 0, 200);
200  fOutput->Add(fNbOfConstvspT);
201 
202  // =========== Switch on Sumw2 for all histos ===========
203  for (Int_t i=0; i<fOutput->GetEntries(); ++i) {
204  TH1 *h1 = dynamic_cast<TH1*>(fOutput->At(i));
205  if (h1){
206  h1->Sumw2();
207  continue;
208  }
209  THnSparse *hn = dynamic_cast<THnSparse*>(fOutput->At(i));
210  if(hn)hn->Sumw2();
211  }
212 
213 
214  TH1::AddDirectory(oldStatus);
215  const Int_t nVar = 12;
216  const char* nameoutput = GetOutputSlot(2)->GetContainer()->GetName();
217  fTreeObservableTagging = new TTree(nameoutput, nameoutput);
218 
219 
220  TString *fShapesVarNames = new TString [nVar];
221 
222  fShapesVarNames[0] = "partonCode";
223  fShapesVarNames[1] = "ptJet";
224  fShapesVarNames[2] = "ptDJet";
225  fShapesVarNames[3] = "phiJet";
226  // fShapesVarNames[4] = "nbOfConst";
227  fShapesVarNames[4] = "angularity";
228  //fShapesVarNames[5] = "circularity";
229  fShapesVarNames[5] = "lesub";
230  //fShapesVarNames[7] = "coronna";
231 
232  fShapesVarNames[6] = "ptJetMatch";
233  fShapesVarNames[7] = "ptDJetMatch";
234  fShapesVarNames[8] = "phiJetMatch";
235  // fShapesVarNames[12] = "nbOfConstMatch";
236  fShapesVarNames[9] = "angularityMatch";
237  //fShapesVarNames[12] = "circularityMatch";
238  fShapesVarNames[10] = "lesubMatch";
239  //fShapesVarNames[14] = "coronnaMatch";
240  fShapesVarNames[11]="weightPythia";
241  //fShapesVarNames[14]="ntrksEvt";
242  //fShapesVarNames[16]="rhoVal";
243  //fShapesVarNames[17]="rhoMassVal";
244  //fShapesVarNames[12]="ptUnsub";
245 
246  for(Int_t ivar=0; ivar < nVar; ivar++){
247  cout<<"looping over variables"<<endl;
248  fTreeObservableTagging->Branch(fShapesVarNames[ivar].Data(), &fShapesVar[ivar], Form("%s/F", fShapesVarNames[ivar].Data()));}
249 
250  PostData(1,fOutput);
251  PostData(2,fTreeObservableTagging);
252 
253  delete [] fShapesVarNames;
254 }
255 
256 //________________________________________________________________________
258 {
259  // Run analysis code here, if needed. It will be executed before FillHistograms().
260 
261  return kTRUE;
262 }
263 
264 //________________________________________________________________________
266 {
267  // Fill histograms.
268  //cout<<"base container"<<endl;
269  AliEmcalJet* jet1 = NULL;
270  AliJetContainer *jetCont = GetJetContainer(0);
271 
272  Float_t kWeight=1;
273  if (fCentSelectOn)
274  if ((fCent>fCentMax) || (fCent<fCentMin)) return 0;
275 
276  AliAODTrack *triggerHadron = 0x0;
277 
278  if (fJetSelection == kRecoil) {
279  //Printf("Recoil jets!!!, fminpTTrig = %f, fmaxpTTrig = %f", fminpTTrig, fmaxpTTrig);
280  Int_t triggerHadronLabel = SelectTrigger(fminpTTrig, fmaxpTTrig);
281 
282 
283  if (triggerHadronLabel==-99999) {
284  //Printf ("Trigger Hadron not found, return");
285  return 0;}
286 
287  AliTrackContainer *PartCont =NULL;
288  AliParticleContainer *PartContMC=NULL;
289 
290  if (fJetShapeSub==kConstSub){
292  else PartCont = GetTrackContainer(1);
293  }
294  else{
296  else PartCont = GetTrackContainer(0);
297  }
298  TClonesArray *TrackArray = NULL;
299  TClonesArray *TrackArrayMC = NULL;
300  if (fJetShapeType == AliAnalysisTaskEmcalQGTagging::kGenOnTheFly) TrackArrayMC = PartContMC->GetArray();
301  else TrackArray = PartCont->GetArray();
302  if (fJetShapeType == AliAnalysisTaskEmcalQGTagging::kGenOnTheFly) triggerHadron = static_cast<AliAODTrack*>(TrackArrayMC->At(triggerHadronLabel));
303  else triggerHadron = static_cast<AliAODTrack*>(TrackArray->At(triggerHadronLabel));
304 
305 
306 
307 
308 
309  if (!triggerHadron) {
310  //Printf("No Trigger hadron with the found label!!");
311  return 0;
312  }
313 
314  if(fSemigoodCorrect){
315  Double_t disthole=RelativePhi(triggerHadron->Phi(),fHolePos);
316  if(TMath::Abs(disthole)+fHoleWidth>TMath::Pi()-fangWindowRecoil){
317  return 0;}
318  }
319 
320  fhPt->Fill(triggerHadron->Pt());
321 
322  }
323 
324 
326  TClonesArray *trackArrayAn = partContAn->GetArray();
327  Int_t ntracksEvt = trackArrayAn->GetEntriesFast();
328 
329  Float_t rhoVal=0, rhoMassVal = 0.;
330  if(jetCont) {
331 
332  jetCont->ResetCurrentID();
334  //rho
335  AliRhoParameter* rhoParam = dynamic_cast<AliRhoParameter*>(InputEvent()->FindListObject("RhoSparseR020"));
336  if (!rhoParam) {
337  Printf("%s: Could not retrieve rho %s (some histograms will be filled with zero)!", GetName(), jetCont->GetRhoName().Data());
338  } else rhoVal = rhoParam->GetVal();
339  //rhom
340  AliRhoParameter* rhomParam = dynamic_cast<AliRhoParameter*>(InputEvent()->FindListObject("RhoMassSparseR020"));
341  if (!rhomParam) {
342  Printf("%s: Could not retrieve rho_m %s (some histograms will be filled with zero)!", GetName(), jetCont->GetRhoMassName().Data());
343  } else rhoMassVal = rhomParam->GetVal();
344  }
345 
346  while((jet1 = jetCont->GetNextAcceptJet())) {
347  if (!jet1) continue;
348  AliEmcalJet* jet2 = 0x0;
349  AliEmcalJet* jet3 = 0x0;
350  fPtJet->Fill(jet1->Pt());
351  AliEmcalJet *jetUS = NULL;
352  Int_t ifound=0, jfound=0;
353  Int_t ilab=-1, jlab=-1;
354 
356  Double_t disthole=RelativePhi(jet1->Phi(),fHolePos);
357  if(TMath::Abs(disthole)<fHoleWidth){
358  continue;}
359  }
360 
361  Float_t dphiRecoil = 0.;
362  if (fJetSelection == kRecoil){
363  dphiRecoil = RelativePhi(triggerHadron->Phi(), jet1->Phi());
364  if (TMath::Abs(dphiRecoil) < (TMath::Pi() - fangWindowRecoil)) {
365  // Printf("Recoil jets back to back not found! continuing");
366  continue;
367  }
368 
369  fhpTjetpT->Fill(triggerHadron->Pt(), jet1->Pt());
370  //Printf(" ************ FILLING HISTOS****** shapeSub = %d, triggerHadron = %f, jet1 = %f", fJetShapeSub, triggerHadron->Pt(), jet1->Pt());
371  fhPhi->Fill(RelativePhi(triggerHadron->Phi(), jet1->Phi()));
372 
373  }
374 
375 
376  fShapesVar[0] = 0.;
378  AliJetContainer *jetContTrue = GetJetContainer(1);
379  AliJetContainer *jetContUS = GetJetContainer(2);
380 
381  if(fJetShapeSub==kConstSub){
382  for(Int_t i = 0; i<jetContUS->GetNJets(); i++) {
383  jetUS = jetContUS->GetJet(i);
384  if(jetUS->GetLabel()==jet1->GetLabel()) {
385  ifound++;
386  if(ifound==1) ilab = i;
387  }
388  }
389  if(ilab==-1) continue;
390  jetUS=jetContUS->GetJet(ilab);
391  jet2=jetUS->ClosestJet();
392  }
393 
394  if(!(fJetShapeSub==kConstSub)) jet2 = jet1->ClosestJet();
395  if (!jet2) {
396  Printf("jet2 does not exist, returning");
397  continue;
398  }
399 
400  AliJetContainer *jetContPart=GetJetContainer(3);
401  jet3=jet2->ClosestJet();
402 
403  if(!jet3){
404  Printf("jet3 does not exist, returning");
405  continue;
406  }
407  cout<<"jet 3 exists"<<jet3->Pt()<<endl;
408 
409 
410  fh2ResponseUW->Fill(jet1->Pt(),jet2->Pt());
411 
412  Double_t fraction=0;
413  if(!(fJetShapeSub==kConstSub)) fraction = jetCont->GetFractionSharedPt(jet1);
414  if(fJetShapeSub==kConstSub) fraction = jetContUS->GetFractionSharedPt(jetUS);
415  //if (fraction > 0.1) cout<<"***** hey a jet matched with fraction"<<fraction<<" "<<jet1->Pt()<<" "<<jet2->Pt()<<" "<<fCent<<endl;
416 
417  if(fraction<fMinFractionShared) continue;
418  //InputEvent()->Print();
419 
420  }
421 
422 
423 
424  if (fJetShapeType == kPythiaDef){
425 
426  AliJetContainer *jetContTrue = GetJetContainer(1);
427  AliJetContainer *jetContUS = GetJetContainer(2);
428  AliJetContainer *jetContPart = GetJetContainer(3);
429 
430  if(fJetShapeSub==kConstSub){
431 
432  for(Int_t i = 0; i<jetContUS->GetNJets(); i++) {
433  jetUS = jetContUS->GetJet(i);
434  if(jetUS->GetLabel()==jet1->GetLabel()) {
435  ifound++;
436  if(ifound==1) ilab = i;
437  }
438  }
439  if(ilab==-1) continue;
440  jetUS=jetContUS->GetJet(ilab);
441  jet2=jetUS->ClosestJet();
442 
443  if (!jet2) {
444  Printf("jet2 does not exist, returning");
445  continue;
446  }
447 
448  for(Int_t j=0; j<jetContPart->GetNJets(); j++) {
449 
450  jet3 = jetContPart->GetJet(j);
451  if(!jet3) continue;
452  if(jet3->GetLabel()==jet2->GetLabel()) {
453  jfound++;
454  if(jfound==1) jlab = j;
455  }
456  }
457  if(jlab==-1) continue;
458  jet3=jetContPart->GetJet(jlab);
459  if(!jet3){
460  Printf("jet3 does not exist, returning");
461  continue;
462  }
463  }
464  if(!(fJetShapeSub==kConstSub)) jet3 = jet1->ClosestJet();
465  if (!jet3) {
466  Printf("jet3 does not exist, returning");
467  continue;
468  }
469 
470 
471  fh2ResponseUW->Fill(jet1->Pt(),jet3->Pt());
472 
473 
474  }
475 
476 
477  if (fJetShapeType == kGenOnTheFly){
478  const AliEmcalPythiaInfo *partonsInfo = 0x0;
479  partonsInfo = GetPythiaInfo();
480  Double_t jp1=RelativePhi(jet1->Phi(),partonsInfo->GetPartonPhi6());
481  Double_t detap1=(jet1->Eta())-(partonsInfo->GetPartonEta6());
482  kWeight=partonsInfo->GetPythiaEventWeight();
483  fh2ResponseW->Fill(jet1->Pt(),jet1->Pt(),kWeight);
484 
485  Float_t dRp1 = TMath::Sqrt(jp1 * jp1 + detap1 * detap1);
486  fEtaJetCorr6->Fill(jet1->Eta(), partonsInfo->GetPartonEta6());
487  fPhiJetCorr6->Fill(jet1->Phi(), partonsInfo->GetPartonPhi6());
488  if(dRp1 < fRMatching) {
489  fShapesVar[0] = partonsInfo->GetPartonFlag6();
490  fPtJetCorr ->Fill(partonsInfo->GetPartonPt6(), jet1->Pt());
491  }
492  else {
493  jp1=RelativePhi(jet1->Phi(),partonsInfo->GetPartonPhi7());
494  detap1=(jet1->Eta())-(partonsInfo->GetPartonEta7());
495  dRp1 = TMath::Sqrt(jp1 * jp1 + detap1 * detap1);
496  fEtaJetCorr7->Fill(jet1->Eta(), partonsInfo->GetPartonEta7());
497  fPhiJetCorr7->Fill(jet1->Phi(), partonsInfo->GetPartonPhi7());
498  if(dRp1 < fRMatching) {
499  fShapesVar[0] = partonsInfo->GetPartonFlag7();
500  fPtJetCorr->Fill(partonsInfo->GetPartonPt7(), jet1->Pt());
501  }
502  else fShapesVar[0]=0;
503  }
504  }
505 
506 
507 
508 
509  Double_t ptSubtracted = 0;
510  if (fJetShapeSub==kConstSub) ptSubtracted= jet1->Pt();
511 
512  else if (fJetShapeSub==kDerivSub) {
513  ptSubtracted=jet1->Pt()-GetRhoVal(0)*jet1->Area();
514  }
515 
516  else if (fJetShapeSub==kNoSub) {
517  if ((fJetShapeType==kData) || (fJetShapeType==kDetEmbPartPythia)) ptSubtracted=jet1->Pt()-GetRhoVal(0)*jet1->Area();
518  else if ((fJetShapeType==kPythiaDef) || (fJetShapeType==kMCTrue) || (fJetShapeType==kGenOnTheFly)) ptSubtracted= jet1->Pt();
519  }
520 
521  //Printf("ptSubtracted=%f,fPtThreshold =%f ", ptSubtracted, fPtThreshold);
522  if (ptSubtracted < fPtThreshold) continue;
523 
524  if (fOneConstSelectOn == kTRUE) fNbOfConstvspT->Fill(GetJetNumberOfConstituents(jet1,0), ptSubtracted);
525  if ((fCentSelectOn == kFALSE) && (jet1->GetNumberOfTracks() <= 1)) continue;
526 
527 
528  fShapesVar[1] = ptSubtracted;
529  fShapesVar[2] = GetJetpTD(jet1,0);
530  fShapesVar[3] =jet1->Phi();
531  //GetJetMass(jet1,0);
532  fShapesVar[4] = GetJetAngularity(jet1,0);
533  //fShapesVar[5] = GetJetCircularity(jet1,0);
534  fShapesVar[5] = GetJetLeSub(jet1,0);
535  //fShapesVar[6] = GetJetCoronna(jet1,0);
536  RecursiveParents(jet1,jetCont,0);
537  RecursiveParents(jet1,jetCont,1);
538  RecursiveParents(jet1,jetCont,2);
539 
540  Float_t ptMatch=0., ptDMatch=0., massMatch=0., constMatch=0.,angulMatch=0.,circMatch=0., lesubMatch=0., sigma2Match=0., coronnaMatch=0;
541  Int_t kMatched = 0;
542 
543  if (fJetShapeType==kPythiaDef) {
544  kMatched =1;
545  if(fJetShapeSub==kConstSub) kMatched = 3;
546 
547  ptMatch=jet3->Pt();
548  ptDMatch=GetJetpTD(jet3, kMatched);
549  massMatch=jet3->Phi();
550  // GetJetMass(jet3,kMatched);
551  //constMatch=1.*GetJetNumberOfConstituents(jet2,kMatched);
552  angulMatch=GetJetAngularity(jet3, kMatched);
553  //circMatch=GetJetCircularity(jet3, kMatched);
554  lesubMatch=GetJetLeSub(jet3, kMatched);
555  //coronnaMatch=GetJetCoronna(jet3,kMatched);
556  //sigma2Match = GetSigma2(jet2, kMatched);
557  }
558 
560  if(fJetShapeSub==kConstSub) kMatched = 3;
561  if(fJetShapeSub==kDerivSub) kMatched = 2;
562  ptMatch=jet3->Pt();
563  ptDMatch=GetJetpTD(jet3, kMatched);
564  massMatch=jet3->Phi();
565  //GetJetMass(jet3,kMatched);
566  // constMatch=1.*GetJetNumberOfConstituents(jet3,kMatched);
567  angulMatch=GetJetAngularity(jet3, kMatched);
568  // circMatch=GetJetCircularity(jet3, kMatched);
569  lesubMatch=GetJetLeSub(jet3, kMatched);
570  //coronnaMatch = GetJetCoronna(jet3, kMatched);
571 
572  }
573 
574 
575 
577  kMatched = 0;
578  ptMatch=0.;
579  ptDMatch=0.;
580  massMatch=0.;
581  //constMatch=0.;
582  angulMatch=0.;
583  // circMatch=0.;
584  lesubMatch=0.;
585  //coronnaMatch =0.;
586 
587  }
588 
589 
590 
591  fShapesVar[6] = ptMatch;
592  fShapesVar[7] = ptDMatch;
593  fShapesVar[8] = massMatch;
594  fShapesVar[9] = angulMatch;
595  //fShapesVar[12] = circMatch;
596  fShapesVar[10] = lesubMatch;
597  // fShapesVar[14] = coronnaMatch;
598  fShapesVar[11] = kWeight;
599  //fShapesVar[16] = ntracksEvt;
600  // fShapesVar[16] = rhoVal;
601  //fShapesVar[17] = rhoMassVal;
602  //fShapesVar[16] = jet1->Pt();
603 
604 
605  fTreeObservableTagging->Fill();
606 
607 
608 
609 
610 
611 
612  }
613 
614  }
615 
616  return kTRUE;
617 }
618 
619 //________________________________________________________________________
621  //calc subtracted jet mass
622  if((fJetShapeSub==kDerivSub)&&(jetContNb==0))
624  else return jet->GetShapeProperties()->GetSecondOrderSubtracted();
625  else
626  return jet->M();
627 }
628 
629 //________________________________________________________________________
631 
632  AliJetContainer *jetCont = GetJetContainer(jetContNb);
633  if (!jet->GetNumberOfTracks())
634  return 0;
635  Double_t den=0.;
636  Double_t num = 0.;
637  AliVParticle *vp1 = 0x0;
638  for(UInt_t i = 0; i < jet->GetNumberOfTracks(); i++) {
639  vp1 = static_cast<AliVParticle*>(jet->TrackAt(i, jetCont->GetParticleContainer()->GetArray()));
640 
641  if (!vp1){
642  Printf("AliVParticle associated to constituent not found");
643  continue;
644  }
645 
646  Double_t dphi = RelativePhi(vp1->Phi(),jet->Phi());
647  Double_t dr2 = (vp1->Eta()-jet->Eta())*(vp1->Eta()-jet->Eta()) + dphi*dphi;
648  Double_t dr = TMath::Sqrt(dr2);
649  num=num+vp1->Pt()*dr;
650  den=den+vp1->Pt();
651  }
652  return num/den;
653 }
654 
655 //________________________________________________________________________
657 
658  if((fJetShapeSub==kDerivSub) && (jetContNb==0))
661  else
662  return Angularity(jet, jetContNb);
663 
664 }
665 
666 //____________________________________________________________________________
667 
669 
670  AliTrackContainer *PartCont = NULL;
671  AliParticleContainer *PartContMC = NULL;
672 
673 
674  if (fJetShapeSub==kConstSub){
676  else PartCont = GetTrackContainer(1);
677  }
678  else{
680  else PartCont = GetTrackContainer(0);
681  }
682 
683  TClonesArray *TracksArray = NULL;
684  TClonesArray *TracksArrayMC = NULL;
685 
686  if (fJetShapeType == AliAnalysisTaskEmcalQGTagging::kGenOnTheFly) TracksArrayMC = PartContMC->GetArray();
687  else TracksArray = PartCont->GetArray();
688 
690  if(!PartContMC || !TracksArrayMC) return -2;
691  }
692  else {
693  if(!PartCont || !TracksArray) return -2;
694  }
695 
696 
697  AliAODTrack *Track = 0x0;
698  Float_t sumpt=0;
699  Int_t NTracks=0;
700  if (fJetShapeType == AliAnalysisTaskEmcalQGTagging::kGenOnTheFly) NTracks = TracksArrayMC->GetEntriesFast();
701  else NTracks = TracksArray->GetEntriesFast();
702 
703  for(Int_t i=0; i < NTracks; i++){
705  if((Track = static_cast<AliAODTrack*>(PartContMC->GetAcceptParticle(i)))){
706  if (!Track) continue;
707  if(TMath::Abs(Track->Eta())>0.9) continue;
708  Double_t dphi = RelativePhi(Track->Phi(),jet->Phi());
709  Double_t dr2 = (Track->Eta()-jet->Eta())*(Track->Eta()-jet->Eta()) + dphi*dphi;
710  Double_t dr = TMath::Sqrt(dr2);
711  if((dr>=0.8) && (dr<1)) sumpt=sumpt+Track->Pt();
712  }
713  }
714  else{
715  if((Track = static_cast<AliAODTrack*>(PartCont->GetAcceptTrack(i)))){
716  if (!Track) continue;
717  if(TMath::Abs(Track->Eta())>0.9) continue;
718  if (Track->Pt()<0.15) continue;
719  Double_t dphi = RelativePhi(Track->Phi(),jet->Phi());
720  Double_t dr2 = (Track->Eta()-jet->Eta())*(Track->Eta()-jet->Eta()) + dphi*dphi;
721  Double_t dr = TMath::Sqrt(dr2);
722  if((dr>=0.8) && (dr<1)) sumpt=sumpt+Track->Pt();
723 
724  }
725  }
726  }
727 
728 
729 
730  return sumpt;
731 
732 
733 
734 
735 }
736 
737 //________________________________________________________________________
739 
740  if((fJetShapeSub==kDerivSub) && (jetContNb==0)) return -2;
741  else
742  return Coronna(jet, jetContNb);
743 
744 }
745 
746 
747 
748 
749 
750 //________________________________________________________________________
752 
753  AliJetContainer *jetCont = GetJetContainer(jetContNb);
754  if (!jet->GetNumberOfTracks())
755  return 0;
756  Double_t den=0.;
757  Double_t num = 0.;
758  AliVParticle *vp1 = 0x0;
759  for(UInt_t i = 0; i < jet->GetNumberOfTracks(); i++) {
760  vp1 = static_cast<AliVParticle*>(jet->TrackAt(i, jetCont->GetParticleContainer()->GetArray()));
761 
762  if (!vp1){
763  Printf("AliVParticle associated to constituent not found");
764  continue;
765  }
766 
767  num=num+vp1->Pt()*vp1->Pt();
768  den=den+vp1->Pt();
769  }
770  return TMath::Sqrt(num)/den;
771 }
772 
773 //________________________________________________________________________
775  //calc subtracted jet mass
776  if((fJetShapeSub==kDerivSub)&&(jetContNb==0))
778  else return jet->GetShapeProperties()->GetSecondOrderSubtractedpTD();
779  else
780  return PTD(jet, jetContNb);
781 
782 }
783 
784 //_____________________________________________________________________________
786 
787  AliJetContainer *jetCont = GetJetContainer(jetContNb);
788  if (!jet->GetNumberOfTracks())
789  return 0;
790  Double_t mxx = 0.;
791  Double_t myy = 0.;
792  Double_t mxy = 0.;
793  int nc = 0;
794  Double_t sump2 = 0.;
795  Double_t pxjet=jet->Px();
796  Double_t pyjet=jet->Py();
797  Double_t pzjet=jet->Pz();
798 
799 
800  //2 general normalized vectors perpendicular to the jet
801  TVector3 ppJ1(pxjet, pyjet, pzjet);
802  TVector3 ppJ3(- pxjet* pzjet, - pyjet * pzjet, pxjet * pxjet + pyjet * pyjet);
803  ppJ3.SetMag(1.);
804  TVector3 ppJ2(-pyjet, pxjet, 0);
805  ppJ2.SetMag(1.);
806  AliVParticle *vp1 = 0x0;
807  for(UInt_t i = 0; i < jet->GetNumberOfTracks(); i++) {
808  vp1 = static_cast<AliVParticle*>(jet->TrackAt(i, jetCont->GetParticleContainer()->GetArray()));
809 
810  if (!vp1){
811  Printf("AliVParticle associated to constituent not found");
812  continue;
813  }
814 
815  TVector3 pp(vp1->Px(), vp1->Py(), vp1->Pz());
816 
817  //local frame
818  TVector3 pLong = pp.Dot(ppJ1) / ppJ1.Mag2() * ppJ1;
819  TVector3 pPerp = pp - pLong;
820  //projection onto the two perpendicular vectors defined above
821 
822  Float_t ppjX = pPerp.Dot(ppJ2);
823  Float_t ppjY = pPerp.Dot(ppJ3);
824  Float_t ppjT = TMath::Sqrt(ppjX * ppjX + ppjY * ppjY);
825  if(ppjT<=0) return 0;
826 
827  mxx += (ppjX * ppjX / ppjT);
828  myy += (ppjY * ppjY / ppjT);
829  mxy += (ppjX * ppjY / ppjT);
830  nc++;
831  sump2 += ppjT;}
832 
833  if(nc<2) return 0;
834  if(sump2==0) return 0;
835  // Sphericity Matrix
836  Double_t ele[4] = {mxx / sump2, mxy / sump2, mxy / sump2, myy / sump2};
837  TMatrixDSym m0(2,ele);
838 
839  // Find eigenvectors
840  TMatrixDSymEigen m(m0);
841  TVectorD eval(2);
842  TMatrixD evecm = m.GetEigenVectors();
843  eval = m.GetEigenValues();
844  // Largest eigenvector
845  int jev = 0;
846  // cout<<eval[0]<<" "<<eval[1]<<endl;
847  if (eval[0] < eval[1]) jev = 1;
848  TVectorD evec0(2);
849  // Principle axis
850  evec0 = TMatrixDColumn(evecm, jev);
851  Double_t compx=evec0[0];
852  Double_t compy=evec0[1];
853  TVector2 evec(compx, compy);
854  Double_t circ=0;
855  if(jev==1) circ=2*eval[0];
856  if(jev==0) circ=2*eval[1];
857 
858  return circ;
859 
860 
861 
862 }
863 
864 
865 
866 
867 //________________________________________________________________________
869  //calc subtracted jet mass
870 
871  if((fJetShapeSub==kDerivSub)&&(jetContNb==0))
874  else
875  return Circularity(jet, jetContNb);
876 
877 }
878 
879 //________________________________________________________________________
881 
882  AliJetContainer *jetCont = GetJetContainer(jetContNb);
883  if (!jet->GetNumberOfTracks())
884  return 0;
885  Double_t den=0.;
886  Double_t num = 0.;
887  AliVParticle *vp1 = 0x0;
888  AliVParticle *vp2 = 0x0;
889  std::vector<int> ordindex;
890  ordindex=jet->GetPtSortedTrackConstituentIndexes(jetCont->GetParticleContainer()->GetArray());
891  //Printf("Nbof const = %d", jet->GetNumberOfTracks());
892  //Printf("ordindex[0] = %d, ordindex[1] = %d", ordindex[0], ordindex[1]);
893 
894  if(ordindex.size()<2) return -1;
895 
896  vp1 = static_cast<AliVParticle*>(jet->TrackAt(ordindex[0], jetCont->GetParticleContainer()->GetArray()));
897  if (!vp1){
898  Printf("AliVParticle associated to Leading constituent not found");
899  return -1;
900  }
901 
902  vp2 = static_cast<AliVParticle*>(jet->TrackAt(ordindex[1], jetCont->GetParticleContainer()->GetArray()));
903  if (!vp2){
904  Printf("AliVParticle associated to Subleading constituent not found");
905  return -1;
906  }
907 
908 
909  num=vp1->Pt();
910  den=vp2->Pt();
911  //Printf("vp1->Pt() =%f, vp2->Pt() =%f", vp1->Pt(), vp2->Pt());
912 
913 return num-den;
914 }
915 
916 //________________________________________________________________________
918  //calc subtracted jet mass
919 
920  if((fJetShapeSub==kDerivSub)&&(jetContNb==0))
923  else
924  return LeSub(jet, jetContNb);
925 
926 }
927 
928 //________________________________________________________________________
930  //calc subtracted jet mass
931 
932  if((fJetShapeSub==kDerivSub)&&(jetContNb==0))
935  else
936  return jet->GetNumberOfTracks();
937 
938  }
939 
940 
941 //______________________________________________________________________________
943 
944  AliJetContainer *jetCont = GetJetContainer(jetContNb);
945  if (!jet->GetNumberOfTracks())
946  return 0;
947  Double_t mxx = 0.;
948  Double_t myy = 0.;
949  Double_t mxy = 0.;
950  int nc = 0;
951  Double_t sump2 = 0.;
952 
953  AliVParticle *vp1 = 0x0;
954  for(UInt_t i = 0; i < jet->GetNumberOfTracks(); i++) {
955  vp1 = static_cast<AliVParticle*>(jet->TrackAt(i, jetCont->GetParticleContainer()->GetArray()));
956 
957  if (!vp1){
958  Printf("AliVParticle associated to constituent not found");
959  continue;
960  }
961 
962  Double_t ppt=vp1->Pt();
963  Double_t dphi = RelativePhi(vp1->Phi(),jet->Phi());
964 
965  Double_t deta = vp1->Eta()-jet->Eta();
966  mxx += ppt*ppt*deta*deta;
967  myy += ppt*ppt*dphi*dphi;
968  mxy -= ppt*ppt*deta*TMath::Abs(dphi);
969  nc++;
970  sump2 += ppt*ppt;
971 
972  }
973  if(nc<2) return 0;
974  if(sump2==0) return 0;
975  // Sphericity Matrix
976  Double_t ele[4] = {mxx , mxy , mxy , myy };
977  TMatrixDSym m0(2,ele);
978 
979  // Find eigenvectors
980  TMatrixDSymEigen m(m0);
981  TVectorD eval(2);
982  TMatrixD evecm = m.GetEigenVectors();
983  eval = m.GetEigenValues();
984  // Largest eigenvector
985  int jev = 0;
986  // cout<<eval[0]<<" "<<eval[1]<<endl;
987  if (eval[0] < eval[1]) jev = 1;
988  TVectorD evec0(2);
989  // Principle axis
990  evec0 = TMatrixDColumn(evecm, jev);
991  Double_t compx=evec0[0];
992  Double_t compy=evec0[1];
993  TVector2 evec(compx, compy);
994  Double_t sig=0;
995  if(jev==1) sig=TMath::Sqrt(TMath::Abs(eval[0])/sump2);
996  if(jev==0) sig=TMath::Sqrt(TMath::Abs(eval[1])/sump2);
997 
998  return sig;
999 
1000 }
1001 
1002 //________________________________________________________________________
1004  //calc subtracted jet mass
1005 
1006  if((fJetShapeSub==kDerivSub)&&(jetContNb==0))
1008  else return jet->GetShapeProperties()->GetSecondOrderSubtractedSigma2();
1009  else
1010  return Sigma2(jet, jetContNb);
1011 
1012 }
1013 
1014 //________________________________________________________________________
1016 
1017  AliTrackContainer *PartCont = NULL;
1018  AliParticleContainer *PartContMC = NULL;
1019 
1020 
1021  if (fJetShapeSub==kConstSub){
1023  else PartCont = GetTrackContainer(1);
1024  }
1025  else{
1027  else PartCont = GetTrackContainer(0);
1028  }
1029 
1030  TClonesArray *TracksArray = NULL;
1031  TClonesArray *TracksArrayMC = NULL;
1032 
1033  if (fJetShapeType == AliAnalysisTaskEmcalQGTagging::kGenOnTheFly) TracksArrayMC = PartContMC->GetArray();
1034  else TracksArray = PartCont->GetArray();
1035 
1037  if(!PartContMC || !TracksArrayMC) return -99999;
1038  }
1039  else {
1040  if(!PartCont || !TracksArray) return -99999;
1041  }
1042 
1043 
1044  AliAODTrack *Track = 0x0;
1045 
1046 
1047 
1048  TList *trackList = new TList();
1049  Int_t triggers[100];
1050  for (Int_t iTrigger=0; iTrigger<100; iTrigger++) triggers[iTrigger] = 0;
1051  Int_t iTT = 0;
1052  Int_t NTracks=0;
1053  if (fJetShapeType == AliAnalysisTaskEmcalQGTagging::kGenOnTheFly) NTracks = TracksArrayMC->GetEntriesFast();
1054  else NTracks = TracksArray->GetEntriesFast();
1055 
1056  for(Int_t i=0; i < NTracks; i++){
1058  if((Track = static_cast<AliAODTrack*>(PartContMC->GetAcceptParticle(i)))){
1059  if (!Track) continue;
1060  if(TMath::Abs(Track->Eta())>0.9) continue;
1061  if (Track->Pt()<0.15) continue;
1062  if ((Track->Pt() >= minpT) && (Track->Pt()< maxpT)) {
1063  triggers[iTT] = i;
1064  iTT++;
1065  }
1066  }
1067  }
1068  else{
1069  if((Track = static_cast<AliAODTrack*>(PartCont->GetAcceptTrack(i)))){
1070  if (!Track) continue;
1071  if(TMath::Abs(Track->Eta())>0.9) continue;
1072  if (Track->Pt()<0.15) continue;
1073  if ((Track->Pt() >= minpT) && (Track->Pt()< maxpT)) {
1074  triggers[iTT] = i;
1075  iTT++;
1076  }
1077  }
1078  }
1079  }
1080 
1081 
1082  if (iTT == 0) return -99999;
1083  Int_t nbRn = 0, index = 0 ;
1084  TRandom3* random = new TRandom3(0);
1085  nbRn = random->Integer(iTT);
1086  index = triggers[nbRn];
1087  //Printf("iTT Total= %d, nbRn = %d, Index = %d",iTT, nbRn, index );
1088  return index;
1089 
1090 }
1091 
1092 //__________________________________________________________________________________
1094 
1095  if (vphi < -1*TMath::Pi()) vphi += (2*TMath::Pi());
1096  else if (vphi > TMath::Pi()) vphi -= (2*TMath::Pi());
1097  if (mphi < -1*TMath::Pi()) mphi += (2*TMath::Pi());
1098  else if (mphi > TMath::Pi()) mphi -= (2*TMath::Pi());
1099  double dphi = mphi-vphi;
1100  if (dphi < -1*TMath::Pi()) dphi += (2*TMath::Pi());
1101  else if (dphi > TMath::Pi()) dphi -= (2*TMath::Pi());
1102  return dphi;//dphi in [-Pi, Pi]
1103 }
1104 
1105 
1106 //_________________________________________________________________________
1108 
1109  std::vector<fastjet::PseudoJet> fInputVectors;
1110  fInputVectors.clear();
1111  fastjet::PseudoJet PseudoTracks;
1112  double xflagalgo=0;
1113  AliParticleContainer *fTrackCont = fJetCont->GetParticleContainer();
1114 
1115  if (fTrackCont) for (Int_t i=0; i<fJet->GetNumberOfTracks(); i++) {
1116  AliVParticle *fTrk = fJet->TrackAt(i, fTrackCont->GetArray());
1117  if (!fTrk) continue;
1118  PseudoTracks.reset(fTrk->Px(), fTrk->Py(), fTrk->Pz(),fTrk->E());
1119  PseudoTracks.set_user_index(fJet->TrackAt(i)+100);
1120  fInputVectors.push_back(PseudoTracks);
1121 
1122  }
1123  fastjet::JetAlgorithm jetalgo(fastjet::antikt_algorithm);
1124 
1125  if(ReclusterAlgo==0){ xflagalgo=0.5;
1126  jetalgo=fastjet::kt_algorithm ;}
1127 
1128  if(ReclusterAlgo==1){ xflagalgo=1.5;
1129  jetalgo=fastjet::cambridge_algorithm;}
1130  if(ReclusterAlgo==2){ xflagalgo=2.5;
1131  jetalgo=fastjet::antikt_algorithm;}
1132 
1133  fastjet::JetDefinition fJetDef(jetalgo, 1., static_cast<fastjet::RecombinationScheme>(0), fastjet::BestFJ30 );
1134 
1135  try {
1136  fastjet::ClusterSequence fClustSeqSA(fInputVectors, fJetDef);
1137  std::vector<fastjet::PseudoJet> fOutputJets;
1138  fOutputJets.clear();
1139  fOutputJets=fClustSeqSA.inclusive_jets(0);
1140 
1141  fastjet::PseudoJet jj;
1142  fastjet::PseudoJet j1;
1143  fastjet::PseudoJet j2;
1144  jj=fOutputJets[0];
1145  double ndepth=0;
1146  while(jj.has_parents(j1,j2)){
1147  ndepth=ndepth+1;
1148  if(j1.perp() < j2.perp()) swap(j1,j2);
1149  double delta_R=j1.delta_R(j2);
1150  double z=j2.perp()/(j1.perp()+j2.perp());
1151  double y =log(1.0/delta_R);
1152  double lnpt_rel=log(z*delta_R);
1153  Double_t LundEntries[5] = {y,lnpt_rel,fOutputJets[0].perp(),xflagalgo,ndepth};
1154  fHLundIterative->Fill(LundEntries);
1155  jj=j1;}
1156 
1157 
1158 
1159 
1160  } catch (fastjet::Error) {
1161  AliError(" [w] FJ Exception caught.");
1162  //return -1;
1163  }
1164 
1165 
1166 
1167 
1168  return;
1169 
1170 
1171 }
1172 
1173 
1174 
1175 
1176 
1177 
1178 
1179 //________________________________________________________________________
1181  //
1182  // retrieve event objects
1183  //
1185  return kFALSE;
1186 
1187  return kTRUE;
1188 }
1189 
1190 //_______________________________________________________________________
1192 {
1193  // Called once at the end of the analysis.
1194 
1195  // fTreeObservableTagging = dynamic_cast<TTree*>(GetOutputData(1));
1196  // if (!fTreeObservableTagging){
1197  // Printf("ERROR: fTreeObservableTagging not available");
1198  // return;
1199  // }
1200 
1201 }
1202 
Int_t SelectTrigger(Float_t minpT, Float_t maxpT)
Float_t Coronna(AliEmcalJet *jet, Int_t jetContNb)
Double_t GetFirstOrderSubtractedAngularity() const
Double_t Area() const
Definition: AliEmcalJet.h:130
const TString & GetRhoName() const
double Double_t
Definition: External.C:58
Double_t GetSecondOrderSubtractedSigma2() const
Definition: External.C:236
Bool_t RetrieveEventObjects()
Retrieve common objects from event.
Float_t GetPartonEta6() const
AliEmcalJet * ClosestJet() const
Definition: AliEmcalJet.h:327
AliJetContainer * GetJetContainer(Int_t i=0) const
Bool_t FillHistograms()
Function filling histograms.
Float_t GetPartonEta7() const
Double_t GetSecondOrderSubtractedConstituent() const
Double_t Eta() const
Definition: AliEmcalJet.h:121
Double_t Py() const
Definition: AliEmcalJet.h:107
Double_t Phi() const
Definition: AliEmcalJet.h:117
Float_t GetJetMass(AliEmcalJet *jet, Int_t jetContNb)
Float_t GetPythiaEventWeight() const
Container with name, TClonesArray and cuts for particles.
Int_t GetLabel() const
Definition: AliEmcalJet.h:124
Float_t GetPartonPhi7() const
Float_t GetJetAngularity(AliEmcalJet *jet, Int_t jetContNb)
Int_t GetPartonFlag7() const
Container for particles within the EMCAL framework.
Float_t GetPartonPhi6() const
Int_t TrackAt(Int_t idx) const
Definition: AliEmcalJet.h:160
UShort_t GetNumberOfTracks() const
Definition: AliEmcalJet.h:139
Float_t GetJetCoronna(AliEmcalJet *jet, Int_t jetContNb)
TString kData
Declare data MC or deltaAOD.
Double_t Px() const
Definition: AliEmcalJet.h:106
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
Float_t GetJetCircularity(AliEmcalJet *jet, Int_t jetContNb)
unsigned int UInt_t
Definition: External.C:33
Float_t PTD(AliEmcalJet *jet, Int_t jetContNb)
float Float_t
Definition: External.C:68
Int_t GetNJets() const
Double_t GetSecondOrderSubtractedAngularity() const
Float_t GetSigma2(AliEmcalJet *jet, Int_t jetContNb)
virtual AliVParticle * GetAcceptParticle(Int_t i=-1) const
Double_t fCent
!event centrality
void RecursiveParents(AliEmcalJet *fJet, AliJetContainer *fJetCont, Int_t ReclusterAlgo)
AliEmcalJet * GetNextAcceptJet()
Float_t Angularity(AliEmcalJet *jet, Int_t jetContNb)
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:109
Double_t GetRhoVal(Int_t i=0) const
Double_t GetFirstOrderSubtractedCircularity() const
AliEmcalList * fOutput
!output list
Float_t Sigma2(AliEmcalJet *jet, Int_t jetContNb)
Double_t RelativePhi(Double_t mphi, Double_t vphi)
const Int_t nVar
Double_t GetSecondOrderSubtractedCircularity() const
Float_t GetJetNumberOfConstituents(AliEmcalJet *jet, Int_t jetContNb)
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)
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:51
const AliEmcalPythiaInfo * GetPythiaInfo() const
void swap(AliEmcalContainerIndexMap< X, Y > &first, AliEmcalContainerIndexMap< X, Y > &second)
Float_t GetJetpTD(AliEmcalJet *jet, Int_t jetContNb)
Double_t Pz() const
Definition: AliEmcalJet.h:108
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
Float_t Circularity(AliEmcalJet *jet, Int_t jetContNb)
bool Bool_t
Definition: External.C:53
AliEmcalJetShapeProperties * GetShapeProperties() const
Definition: AliEmcalJet.h:361
Float_t GetJetLeSub(AliEmcalJet *jet, Int_t jetContNb)
Float_t GetPartonPt7() const
Double_t M() const
Definition: AliEmcalJet.h:120
Container for jet within the EMCAL jet framework.
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:196
std::vector< int > GetPtSortedTrackConstituentIndexes(TClonesArray *tracks) const
Float_t GetPartonPt6() const
AliEmcalJet * GetJet(Int_t i) const