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