AliPhysics  e59a9ba (e59a9ba)
 All Classes Namespaces Files Functions Variables Typedefs Enumerations Enumerator Friends Macros Groups Pages
AliAnalysisTaskJetShapeDeriv.cxx
Go to the documentation of this file.
1 #include <TRandom3.h>
2 #include <TH1F.h>
3 #include <TH2F.h>
4 #include <TH3F.h>
5 #include <THnSparse.h>
6 #include <TLorentzVector.h>
7 
8 #include <AliParticleContainer.h>
9 #include <AliJetContainer.h>
10 #include <AliRhoParameter.h>
11 #include <AliEmcalJet.h>
12 
14 
16 
17 //________________________________________________________________________
20  fM1st(0),
21  fM2nd(0),
22  fDeriv1st(0),
23  fDeriv2nd(0),
24  fPartialExclusion(0),
25  fh2MSubPtSubAll(0x0),
26  fh2PtTrueSubFacV1(0x0),
27  fh2PtRawSubFacV1(0x0),
28  fh2PtCorrSubFacV1(0x0),
29  fh2NConstSubFacV1(0x0),
30  fh2PtTrueSubFacV2(0x0),
31  fh2PtRawSubFacV2(0x0),
32  fh2PtCorrSubFacV2(0x0),
33  fh2NConstSubFacV2(0x0)
34 
35 {
36  // Default constructor.
37 
38  fh2MSubPtSubAll = new TH2F*[fNcentBins];
39  fh2PtTrueSubFacV1 = new TH2F*[fNcentBins];
40  fh2PtRawSubFacV1 = new TH2F*[fNcentBins];
41  fh2PtCorrSubFacV1 = new TH2F*[fNcentBins];
42  fh2NConstSubFacV1 = new TH2F*[fNcentBins];
43  fh2PtTrueSubFacV2 = new TH2F*[fNcentBins];
44  fh2PtRawSubFacV2 = new TH2F*[fNcentBins];
45  fh2PtCorrSubFacV2 = new TH2F*[fNcentBins];
46  fh2NConstSubFacV2 = new TH2F*[fNcentBins];
47 
48  for (Int_t i = 0; i < fNcentBins; i++) {
49  fh2MSubPtSubAll[i] = 0;
50  fh2PtTrueSubFacV1[i] = 0;
51  fh2PtRawSubFacV1[i] = 0;
52  fh2PtCorrSubFacV1[i] = 0;
53  fh2NConstSubFacV1[i] = 0;
54  fh2PtTrueSubFacV2[i] = 0;
55  fh2PtRawSubFacV2[i] = 0;
56  fh2PtCorrSubFacV2[i] = 0;
57  fh2NConstSubFacV2[i] = 0;
58  }
59 
60 }
61 
62 //________________________________________________________________________
65  fM1st(0),
66  fM2nd(0),
67  fDeriv1st(0),
68  fDeriv2nd(0),
69  fPartialExclusion(0),
70  fh2MSubPtSubAll(0x0),
71  fh2PtTrueSubFacV1(0x0),
72  fh2PtRawSubFacV1(0x0),
73  fh2PtCorrSubFacV1(0x0),
74  fh2NConstSubFacV1(0x0),
75  fh2PtTrueSubFacV2(0x0),
76  fh2PtRawSubFacV2(0x0),
77  fh2PtCorrSubFacV2(0x0),
78  fh2NConstSubFacV2(0x0)
79 
80 {
81  // Standard constructor.
82 
83  fh2MSubPtSubAll = new TH2F*[fNcentBins];
84  fh2PtTrueSubFacV1 = new TH2F*[fNcentBins];
85  fh2PtRawSubFacV1 = new TH2F*[fNcentBins];
86  fh2PtCorrSubFacV1 = new TH2F*[fNcentBins];
87  fh2NConstSubFacV1 = new TH2F*[fNcentBins];
88  fh2PtTrueSubFacV2 = new TH2F*[fNcentBins];
89  fh2PtRawSubFacV2 = new TH2F*[fNcentBins];
90  fh2PtCorrSubFacV2 = new TH2F*[fNcentBins];
91  fh2NConstSubFacV2 = new TH2F*[fNcentBins];
92 
93  for (Int_t i = 0; i < fNcentBins; i++) {
94  fh2MSubPtSubAll[i] = 0;
95  fh2PtTrueSubFacV1[i] = 0;
96  fh2PtRawSubFacV1[i] = 0;
97  fh2PtCorrSubFacV1[i] = 0;
98  fh2NConstSubFacV1[i] = 0;
99  fh2PtTrueSubFacV2[i] = 0;
100  fh2PtRawSubFacV2[i] = 0;
101  fh2PtCorrSubFacV2[i] = 0;
102  fh2NConstSubFacV2[i] = 0;
103  }
104 
105 }
106 
107 //________________________________________________________________________
109 {
110  // Destructor.
111 }
112 
113 //________________________________________________________________________
115 {
116  // Create user output.
117 
119 
120  Bool_t oldStatus = TH1::AddDirectoryStatus();
121  TH1::AddDirectory(kFALSE);
122 
123  const Int_t nBinsPt = 200;
124  const Double_t minPt = -50.;
125  const Double_t maxPt = 150.;
126 
127  Int_t nBinsM = 100;
128  Double_t minM = -20.;
129  Double_t maxM = 80.;
130  if(fSmallSyst) maxM = 40.;
131  if(fJetMassVarType==kRatMPt) {
132  nBinsM = 100;
133  minM = -0.2;
134  maxM = 0.8;
135  }
136 
137  Int_t nBinsDM = 100;
138  Double_t minDM = -25.;
139  Double_t maxDM = 25.;
140  if(fJetMassVarType==kRatMPt) {
141  nBinsDM = 100;
142  minDM = -0.5;
143  maxDM = 0.5;
144  }
145  Int_t nBinsDpT = 100;
146  Double_t minDpT = -50.;
147  Double_t maxDpT = 50.;
148 
149  const Int_t nBinsDRToLJ = 20; //distance to leading jet in Pb-Pb only event
150  const Double_t minDRToLJ = 0.;
151  const Double_t maxDRToLJ = 1.;
152 
153  const Int_t nBinsPtLead = 20;
154  const Double_t minPtLead = 0.;
155  const Double_t maxPtLead = 20.;
156 
157  const Int_t nBinsV1 = 60;
158  const Double_t minV1 = -60.;
159  const Double_t maxV1 = 0.;
160 
161  const Int_t nBinsV2 = 60;
162  const Double_t minV2 = -30.;
163  const Double_t maxV2 = 0.;
164 
165  const Int_t nBinsdMr = 200;
166  const Double_t mindMr = -2.;
167  const Double_t maxdMr = 2.;
168  Double_t *binsdMr = new Double_t[nBinsdMr+1];
169  for(Int_t i=0; i<=nBinsdMr; i++) binsdMr[i]=(Double_t)mindMr + (maxdMr-mindMr)/nBinsdMr*(Double_t)i ;
170 
171  //These are good for pPb
172  Int_t nBinsRho = 50;
173  Double_t minRho = 0.;
174  Double_t maxRho = 20.;
175  Int_t nBinsRhom = 50;
176  Double_t minRhom = 0.;
177  Double_t maxRhom = 1.;
178 
179 
180  const Int_t nBinsSparse2 = 8;
181  //#it{M}_{det} - #it{M}_{part}; #it{p}_{T,det} - #it{p}_{T,part}; #it{M}_{det}; #it{M}_{unsub}; #it{p}_{T,det}; #it{p}_{T,unsub}; #rho ; #rho_{m}
182  const Int_t nBins2[nBinsSparse2] = {nBinsDM, nBinsDpT, nBinsM, nBinsM, nBinsPt, nBinsPt, nBinsRho, nBinsRhom};
183  const Double_t xmin2[nBinsSparse2] = {minDM, minDpT, minM, minM, minPt, minPt, minRho, minRhom};
184  const Double_t xmax2[nBinsSparse2] = {maxDM, maxDpT, maxM, maxM, maxPt, maxPt, maxRho, maxRhom};
185 
186  TString histName = "";
187  TString histTitle = "";
188  TString varName = "#it{M}_{jet}";
189  if(fJetMassVarType==kRatMPt) varName = "#it{M}_{jet}/#it{p}_{T,jet}";
190 
191  for(Int_t i = 0; i < fNcentBins; i++){
192  histName = Form("fh2MSubPtSubAll_%d",i);
193  histTitle = Form("fh2MSubPtSubAll_%d;%s;#it{p}_{T, sub}",i,varName.Data());
194 
195  fh2MSubPtSubAll[i] = new TH2F(histName.Data(),histTitle.Data(),nBinsM,minM,maxM,nBinsPt,minPt,maxPt);
196  fOutput->Add(fh2MSubPtSubAll[i]);
197 
198  //derivative histograms
199  histName = Form("fh2PtTrueSubFacV1_%d",i);
200  histTitle = Form("fh2PtTrueSubFacV1_%d;#it{p}_{T,true};-(#rho+#rho_{m})V_{1}",i);
201  fh2PtTrueSubFacV1[i] = new TH2F(histName.Data(),histTitle.Data(),nBinsPt,minPt,maxPt,nBinsV1,minV1,maxV1);
202  fOutput->Add(fh2PtTrueSubFacV1[i]);
203 
204  histName = Form("fh2PtRawSubFacV1_%d",i);
205  histTitle = Form("fh2PtRawSubFacV1_%d;#it{p}_{T,raw};-(#rho+#rho_{m})V_{1}",i);
206  fh2PtRawSubFacV1[i] = new TH2F(histName.Data(),histTitle.Data(),nBinsPt,minPt,maxPt,nBinsV1,minV1,maxV1);
207  fOutput->Add(fh2PtRawSubFacV1[i]);
208 
209  histName = Form("fh2PtCorrSubFacV1_%d",i);
210  histTitle = Form("fh2PtCorrSubFacV1_%d;#it{p}_{T,corr};-(#rho+#rho_{m})V_{1}",i);
211  fh2PtCorrSubFacV1[i] = new TH2F(histName.Data(),histTitle.Data(),nBinsPt,minPt,maxPt,nBinsV1,minV1,maxV1);
212  fOutput->Add(fh2PtCorrSubFacV1[i]);
213 
214  histName = Form("fh2NConstSubFacV1_%d",i);
215  histTitle = Form("fh2NConstSubFacV1_%d;#it{N}_{const};-(#rho+#rho_{m})V_{1}",i);
216  fh2NConstSubFacV1[i] = new TH2F(histName.Data(),histTitle.Data(),nBinsPt,minPt,maxPt,100,0.,200.);
217  fOutput->Add(fh2NConstSubFacV1[i]);
218 
219  histName = Form("fh2PtTrueSubFacV2_%d",i);
220  histTitle = Form("fh2PtTrueSubFacV2_%d;#it{p}_{T,true};0.5(#rho+#rho_{m})^{2}V_{2}",i);
221  fh2PtTrueSubFacV2[i] = new TH2F(histName.Data(),histTitle.Data(),nBinsPt,minPt,maxPt,nBinsV2,minV2,maxV2);
222  fOutput->Add(fh2PtTrueSubFacV2[i]);
223 
224  histName = Form("fh2PtRawSubFacV2_%d",i);
225  histTitle = Form("fh2PtRawSubFacV2_%d;#it{p}_{T,raw};0.5(#rho+#rho_{m})^{2}V_{2}",i);
226  fh2PtRawSubFacV2[i] = new TH2F(histName.Data(),histTitle.Data(),nBinsPt,minPt,maxPt,nBinsV2,minV2,maxV2);
227  fOutput->Add(fh2PtRawSubFacV2[i]);
228 
229  histName = Form("fh2PtCorrSubFacV2_%d",i);
230  histTitle = Form("fh2PtCorrSubFacV2_%d;#it{p}_{T,corr};0.5(#rho+#rho_{m})^{2}V_{2}",i);
231  fh2PtCorrSubFacV2[i] = new TH2F(histName.Data(),histTitle.Data(),nBinsPt,minPt,maxPt,nBinsV2,minV2,maxV2);
232  fOutput->Add(fh2PtCorrSubFacV2[i]);
233 
234  histName = Form("fh2NConstSubFacV2_%d",i);
235  histTitle = Form("fh2NConstSubFacV2_%d;#it{N}_{const};0.5(#rho+#rho_{m})^{2}V_{2}",i);
236  fh2NConstSubFacV2[i] = new TH2F(histName.Data(),histTitle.Data(),nBinsPt,minPt,maxPt,100,0.,200.);
237  fOutput->Add(fh2NConstSubFacV2[i]);
238  }
239  PostData(1, fOutput); // Post data for ALL output slots > 0 here.
240 }
241 
242 //________________________________________________________________________
243 //Bool_t AliAnalysisTaskJetShapeDeriv::Run()
244 //{
245 // // Run analysis code here, if needed. It will be executed before FillHistograms().
246 //
247 // return kTRUE;
248 //}
249 
250 //________________________________________________________________________
252 {
253  // Fill histograms.
254  AliEmcalJet *jet1 = NULL; //AA jet
255  AliEmcalJet *jet2 = NULL; //Embedded Pythia jet
256  AliEmcalJet *jetR = NULL; //true jet for response matrix
257  AliEmcalJet *jetO = NULL; //hard-ish jet to avoid overlap of single track with
258  AliVParticle *vpe = NULL; //embedded particle
259 
261  if(!jetCont){
262  Printf("Jet Container %d not found, return", fContainerBase);
263  return kFALSE;
264  }
265  //Printf("FillHistograms::Jet container %p", jetCont);
267 
268  if(fOverlap && !jetContO){
269  Printf("Jet Container %d not found, return", fContainerOverlap);
270  return kFALSE;
271  }
273  //if(trackCont) Printf("Ci sono");
274 
275 
276  for(Int_t i=0; i<trackCont->GetNParticles(); i++){
277  AliVParticle *vp= static_cast<AliVParticle*>(trackCont->GetAcceptParticle(i));
278  if(!vp) continue;
279  fhpTTracksCont->Fill(vp->Pt());
280  }
281 
282  //rho
283  AliRhoParameter* rhoParam = dynamic_cast<AliRhoParameter*>(InputEvent()->FindListObject(jetCont->GetRhoName()));
284  fRho = 0;
285  if (!rhoParam) {
286  AliError(Form("%s: Could not retrieve rho %s (some histograms will be filled with zero)!", GetName(), jetCont->GetRhoName().Data()));
287 
288  } else fRho = rhoParam->GetVal();
289  //rhom
290  AliRhoParameter* rhomParam = dynamic_cast<AliRhoParameter*>(InputEvent()->FindListObject(jetCont->GetRhoMassName()));
291  fRhoM = 0;
292  if (!rhomParam) {
293  AliError(Form("%s: Could not retrieve rho_m %s (some histograms will be filled with zero)!", GetName(), jetCont->GetRhoMassName().Data()));
294 
295  } else fRhoM = rhomParam->GetVal();
296 
297  //Get leading jet in Pb-Pb event without embedded objects
299  AliEmcalJet *jetL = NULL;
300  if(jetContNoEmb) jetL = jetContNoEmb->GetLeadingJet("rho");
301 
302  jetCont->ResetCurrentID();
303  while((jet1 = jetCont->GetNextAcceptJet())) {
304  jet2 = NULL;
305  if(jet1->GetTagStatus()<1 || !jet1->GetTaggedJet())
306  continue;
307  //print constituents of different jet containers
308  //jet1
309 
310  for(Int_t i=0; i<jet1->GetNumberOfTracks(); i++) {
311  AliVParticle *vp = static_cast<AliVParticle*>(jet1->TrackAt(i, jetCont->GetParticleContainer()->GetArray()));
312  // if (vp->TestBits(TObject::kBitMask) != (Int_t)(TObject::kBitMask) ) continue;
313  //Int_t lab = TMath::Abs(vp->GetLabel());
314  if(vp) fhpTTracksJet1 -> Fill(vp->Pt());
315  }
316  Double_t mjet1 = jet1->GetShapeProperties()->GetSecondOrderSubtracted();
317  Double_t mUnsubjet1 = jet1->M();
318  Double_t ptjet1 = jet1->Pt()-fRho*jet1->Area();
319  Double_t ptUnsubjet1 = jet1->Pt();
320  Double_t var = mjet1;
321 
322  Double_t rhofactor = GetRhoFactor(ptjet1, fRho); // the pt used in the mass task is the one subtracted with area based method
323  if(fJetMassVarType==kRatMPt) {
324  if(ptjet1>0. || ptjet1<0.) var = mjet1/ptjet1;
325  else var = -999.;
326  }
327 
328  //Fill histograms for all AA jets
329  fh2MSubPtRawAll[fCentBin]->Fill(var,ptUnsubjet1);
330  fh2MSubPtSubAll[fCentBin]->Fill(var,ptjet1);
332  fh2PtCorrSubFacV1[fCentBin]->Fill(jet1->Pt()-fRho*jet1->Area(),-1.*(fRho+fRhoM)*jet1->GetShapeProperties()->GetFirstDerivative());
335  fh2PtCorrSubFacV2[fCentBin]->Fill(jet1->Pt()-fRho*jet1->Area(),0.5*(fRho+fRhoM)*(fRho+fRhoM)*jet1->GetShapeProperties()->GetSecondDerivative());
337 
338  Double_t fraction = 0.;
339  fMatch = 0;
340  fJet2Vec->SetPtEtaPhiM(0.,0.,0.,0.);
341  if(fSingleTrackEmb) {
342  vpe = GetEmbeddedConstituent(jet1);
343  if(vpe) {
344  Bool_t reject = kFALSE;
345  if(fPartialExclusion) {
346 
347  TRandom3 rnd;
348  rnd.SetSeed(0);
349 
350  Double_t ncoll = 6.88; //GetNColl(); //check it out from AliAnalysisTaskDeltaPt and possibly refine
351 
352  Double_t prob = 0.;
353  if(ncoll>0)
354  prob = 1./ncoll;
355 
356  if(rnd.Rndm()<=prob) reject = kTRUE; //reject cone
357  }
358  if(fOverlap){
359  Int_t Njets = jetContO->GetNAcceptedJets();
360  fhNJetsSelEv->Fill(Njets);
361  jetContO->ResetCurrentID();
362  while((jetO = jetContO->GetNextAcceptJet())){
363  //print constituents of different jet containers
364  //jetO
365  //Printf("N particle %d",jetO->GetNumberOfTracks());
366  for(Int_t i=0; i<jetO->GetNumberOfTracks(); i++) {
367  AliVParticle* vp = static_cast<AliVParticle*>(jetO->TrackAt(i, jetContO->GetParticleContainer()->GetArray()));
368  // if (vp->TestBits(TObject::kBitMask) != (Int_t)(TObject::kBitMask) ) continue;
369  //Int_t lab = TMath::Abs(vp->GetLabel());
370  if(vp) fhpTTracksJetO -> Fill(vp->Pt());
371  }
372 
373  Double_t deltaR = jetO->DeltaR(vpe);
374  fhRjetTrvspTj->Fill(deltaR, jetO->Pt());
375  fhJetEtaPhiOvl->Fill(jetO->Eta(), jetO->Phi());
376  if( deltaR < fRadius) {
377  reject = kTRUE;
378  break;
379  }
380  }
381  }
382  if(!reject){
383  fJet2Vec->SetPxPyPzE(vpe->Px(),vpe->Py(),vpe->Pz(),vpe->E());
384  fMatch = 1;
385  }
386  }
387  } else {
388 
389  jet2 = jet1->ClosestJet();
390  fraction = jetCont->GetFractionSharedPt(jet1);
391  fMatch = 1;
392  if(fMinFractionShared>0.) {
393  if(fraction>fMinFractionShared) {
394  fJet2Vec->SetPxPyPzE(jet2->Px(),jet2->Py(),jet2->Pz(),jet2->E());
395  fMatch = 1;
396 
397  //choose jet type for true axis of response matrix
399  jetR = jet2;
400  else if(fResponseReference==kPart)
401  jetR = jet2->GetTaggedJet();
402  } else
403  fMatch = 0;
404  }
405  }
406 
407  //Fill histograms for matched jets
408  fh2MSubMatch[fCentBin]->Fill(var,fMatch);
409  if(fMatch==1) {
410  fhJetSubMatchEtaPhiPt->Fill(jet1->Eta(), jet1->Phi(), ptjet1);
411  Double_t drToLJ = -1.;
412  if(jetL) drToLJ = jet1->DeltaR(jetL);
413  if(fSingleTrackEmb && vpe)
414  drToLJ = jet1->DeltaR(vpe);
415  fh3MSubPtRawDRMatch[fCentBin]->Fill(var,ptjet1,drToLJ);
416  Double_t var2 = 0.;
417  Double_t mJetR = 0.;
418  Double_t ptJetR = 0.;
419  if(jetR) {
420  mJetR = jetR->M();
421  var2 = jetR->M();
422  ptJetR = jetR->Pt();
423  }
424  if(fSingleTrackEmb && vpe) {
425  if(fFromTree){
426  Int_t exit = MatchEmbeddedConstituentWithParticleLevel(); //here is GetEntry
427 
428  if(exit>0) {
429  //mJetR = fVecP->M();
430  var2 = fVecP->M();
431  ptJetR = fVecP->Pt();
432  }
433  } else{
434  //mJetR = vpe->M();
435  var2 = vpe->M();
436  ptJetR = vpe->Pt();
437  }
438  }
439 
440  if(fJetMassVarType==kRatMPt) {
441  if(ptJetR>0. || ptJetR<0.) var2 /= ptJetR;
442  }
443  fh3MSubPtTrueLeadPt[fCentBin]->Fill(var,ptJetR,jet1->MaxTrackPt());
444  fh3MTruePtTrueLeadPt[fCentBin]->Fill(var2,ptJetR,jet1->MaxTrackPt());
445  fh3PtTrueDeltaMLeadPt[fCentBin]->Fill(ptJetR,var-var2,jet1->MaxTrackPt());
446  if(var2>0.) fh3PtTrueDeltaMRelLeadPt[fCentBin]->Fill(ptJetR,(var-var2)/var2,jet1->MaxTrackPt());
447  fRhoFactorQA->Fill(rhofactor);
448  if(fFromTree){
449  Double_t varsp[8] = {var,var2,ptjet1,ptJetR, fVecD->M(), fVecD->Pt(), fRho, fRhoM};
450  fhnMassResponse[fCentBin]->Fill(varsp, rhofactor);
451  } else {
452  Double_t varsp[7] = {var,var2,ptjet1,ptJetR,jet1->MaxTrackPt()};//MRec,MTrue,PtRec,PtTrue,PtLeadRec
453  fhnMassResponse[fCentBin]->Fill(varsp);
454  }
455  Double_t varsp1[6];
456  varsp1[0] = var-var2;
457  varsp1[1] = ptjet1-ptJetR;
458  varsp1[2] = var;
459  varsp1[3] = var2;
460  varsp1[4] = ptjet1;
461  varsp1[5] = ptJetR;
462 
463  fhnDeltaMass[fCentBin]->Fill(varsp1);
464 
465  //#it{M}_{det} - #it{M}_{part}; #it{p}_{T,det} - #it{p}_{T,part}; #it{M}_{det}; #it{M}_{unsub}; #it{p}_{T,det}; #it{p}_{T,unsub}; #rho ; #rho_{m}
466  Double_t varsp2[8] = {var-var2, ptjet1-ptJetR, var2, mUnsubjet1, ptjet1, ptUnsubjet1, fRho, fRhoM};
467  fhnDeltaMassAndBkgInfo->Fill(varsp2);
468  }
469 
470  if(fCreateTree) {
471  fJet1Vec->SetPxPyPzE(jet1->Px(),jet1->Py(),jet1->Pz(),jet1->E());
472  fArea = (Float_t)jet1->Area();
473  fAreaPhi = (Float_t)jet1->AreaPhi();
474  fAreaEta = (Float_t)jet1->AreaEta();
475  fNConst = (Int_t)jet1->GetNumberOfTracks();
476  fM1st = (Float_t)jet1->GetShapeProperties()->GetFirstOrderSubtracted();
477  fM2nd = (Float_t)jet1->GetShapeProperties()->GetSecondOrderSubtracted();
478  fDeriv1st = (Float_t)jet1->GetShapeProperties()->GetFirstDerivative();
479  fDeriv2nd = (Float_t)jet1->GetShapeProperties()->GetSecondDerivative();
480  fTreeJetBkg->Fill();
481  }
482  }
483  return kTRUE;
484 }
485 
486 //________________________________________________________________________
487 //AliVParticle* AliAnalysisTaskJetShapeDeriv::GetEmbeddedConstituent(AliEmcalJet *jet) {
488 //
489 // AliJetContainer *jetCont = GetJetContainer(fContainerBase);
490 // //Printf("JEt container %p", jetCont);
491 // AliVParticle *vp = 0x0;
492 // AliVParticle *vpe = 0x0; //embedded particle
493 // Int_t nc = 0;
494 // for(Int_t i=0; i<jet->GetNumberOfTracks(); i++) {
495 // vp = static_cast<AliVParticle*>(jet->TrackAt(i, jetCont->GetParticleContainer()->GetArray()));
496 // // if (vp->TestBits(TObject::kBitMask) != (Int_t)(TObject::kBitMask) ) continue;
497 // //Printf("vp %p", vp);
498 // if(!vp) continue;
499 // Int_t lab = TMath::Abs(vp->GetLabel());
500 // if (lab < fMinLabelEmb || lab > fMaxLabelEmb)
501 // continue;
502 // if(!vpe) vpe = vp;
503 // else if(vp->Pt()>vpe->Pt()) vpe = vp;
504 // nc++;
505 // }
506 //
507 // AliDebug(11,Form("Found %d embedded particles",nc));
508 // return vpe;
509 //}
510 
511 
TH3F ** fh3PtTrueDeltaMLeadPt
! true jet pT vs (Msub - Mtrue) vs LeadPt for matched jets
TH1D * fRhoFactorQA
! actual rho weighting factors used
Double_t Area() const
Definition: AliEmcalJet.h:97
const TString & GetRhoName() const
AliEmcalJet * GetTaggedJet() const
Definition: AliEmcalJet.h:203
TH2F ** fh2PtCorrSubFacV2
! subtracted pT vs 0.5(rho+rhom)^2*V2
AliEmcalJet * ClosestJet() const
Definition: AliEmcalJet.h:193
AliJetContainer * GetJetContainer(Int_t i=0) const
Int_t GetTagStatus() const
Definition: AliEmcalJet.h:204
TH2F ** fh2NConstSubFacV1
! N constituents vs -(rho+rhom)*V1
Double_t Eta() const
Definition: AliEmcalJet.h:88
Bool_t fSmallSyst
flag for the axes ranges in pPb
Double_t Py() const
Definition: AliEmcalJet.h:74
Double_t Phi() const
Definition: AliEmcalJet.h:84
Int_t GetNParticles() const
TH2F ** fh2PtCorrSubFacV1
! subtracted pT vs -(rho+rhom)*V1
THnSparse * fhnDeltaMassAndBkgInfo
! DeltaM, DeltapT bkg-unsubtracted M and pT, rho and rhom
TH2F ** fh2PtTrueSubFacV2
! true pT vs 0.5(rho+rhom)^2*V2
Int_t fCentBin
!event centrality bin
TH3F * fhJetSubMatchEtaPhiPt
! eta, phi, pt distribution of jet subtracted and matched
Double_t E() const
Definition: AliEmcalJet.h:86
ClassImp(AliAnalysisTaskJetShapeDeriv) AliAnalysisTaskJetShapeDeriv
Bool_t fPartialExclusion
randomly esclude areas according to Ncoll
Container for particles within the EMCAL framework.
Float_t fM2nd
2nd order subtracted jet mass
UShort_t GetNumberOfTracks() const
Definition: AliEmcalJet.h:106
TH3F ** fh3MSubPtTrueLeadPt
! subtracted jet mass vs true jet pT vs LeadPt for matched jets for matched jets
Double_t Px() const
Definition: AliEmcalJet.h:73
TH2F * fhJetEtaPhiOvl
! eta-phi distribution of the selected signal jets
Double_t GetRhoFactor(Double_t ptdet, Double_t rhoCurrent)
AliParticleContainer * GetParticleContainer(Int_t i=0) const
const TString & GetRhoMassName() const
Int_t fContainerOverlap
jets (jetO) with a pT cut selection to reject overlapping embedded single track (used only in single ...
AliParticleContainer * GetParticleContainer() const
AliEmcalJet * GetLeadingJet(const char *opt="")
TLorentzVector * fVecD
! vector with detector level jet
TH2F ** fh2NConstSubFacV2
! N constituents vs 0.5(rho+rhom)^2*V2
Double_t AreaEta() const
Definition: AliEmcalJet.h:99
TH2F ** fh2PtTrueSubFacV1
! true pT vs -(rho+rhom)*V1
Double_t fRadius
Radius that define overlap.
TLorentzVector * fJet1Vec
jet1(AA) vector
Int_t fNcentBins
how many centrality bins
Double_t MaxTrackPt() const
Definition: AliEmcalJet.h:122
virtual AliVParticle * GetAcceptParticle(Int_t i=-1) const
ResponseReference fResponseReference
true axis of response matrix
TH2F ** fh2MSubPtSubAll
! subtracted jet mass vs subtracted jet pT
TH3F ** fh3MSubPtRawDRMatch
! subtracted jet mass vs subtracted jet pT vs distance to leading Pb-Pb jet
TH2F ** fh2PtRawSubFacV1
! raw pT vs -(rho+rhom)*V1
THnSparse ** fhnDeltaMass
! deltaM vs deltapT
AliEmcalJet * GetNextAcceptJet()
Double_t DeltaR(const AliVParticle *part) const
Double_t AreaPhi() const
Definition: AliEmcalJet.h:100
THnSparse ** fhnMassResponse
! Msub vs Mtrue vs PtCorr vs PtTrue vs DR
Double_t fMinFractionShared
only fill histos for jets if shared fraction larger than X
Double_t Pt() const
Definition: AliEmcalJet.h:76
TH1F * fhNJetsSelEv
! number of selected signal jets per event
Bool_t fOverlap
activate the check on overlap between single particle embedded and jetO (jet with a pT of at least 5 ...
TH3F ** fh3MTruePtTrueLeadPt
! true jet mass vs true jet pT vs LeadPt for matched jets for matched jets
JetMassVarType fJetMassVarType
observable to use
TH2F ** fh2MSubMatch
! subtracted jet mass vs match index (0: no match; 1:match)
AliEmcalList * fOutput
!output list
Float_t fM1st
1st order subtracted jet mass
Int_t fMatch
1: matched to MC jet; 0: no match
Short_t TrackAt(Int_t idx) const
Definition: AliEmcalJet.h:127
TTree * fTreeJetBkg
! tree with jet and bkg variables
TH2F ** fh2MSubPtRawAll
! subtracted jet mass vs subtracted jet pT
Represent a jet reconstructed using the EMCal jet framework.
Definition: AliEmcalJet.h:44
AliVParticle * GetEmbeddedConstituent(AliEmcalJet *jet)
Double_t Pz() const
Definition: AliEmcalJet.h:75
Int_t fNConst
N constituents in jet1.
Background fluctuation studies: dMdpT spectrum for PYTHIA and single track embedding for derivative s...
Double_t GetFractionSharedPt(const AliEmcalJet *jet, AliParticleContainer *cont2=0x0) const
TH2F * fhRjetTrvspTj
! distance in R between each jetO and embedded single track (those below fRadius are rejected) ...
TH2F ** fh2PtRawSubFacV2
! raw pT vs 0.5(rho+rhom)^2*V2
AliEmcalJetShapeProperties * GetShapeProperties() const
Definition: AliEmcalJet.h:227
Bool_t fFromTree
Input embedding from tree.
TLorentzVector * fJet2Vec
jet2(probe) vector
TLorentzVector * fVecP
! vector with particle level jet
Bool_t fCreateTree
create output tree
Double_t M() const
Definition: AliEmcalJet.h:87
Int_t fContainerNoEmb
subtracted jets from Pb-Pb only events
Bool_t fSingleTrackEmb
single track embedding
Background fluctuation studies: dMdpT spectrum for PYTHIA and single track embedding.
Container for jet within the EMCAL jet framework.
Int_t fContainerBase
jets to be analyzed
TH3F ** fh3PtTrueDeltaMRelLeadPt
! true jet pT vs (Msub - Mtrue)/Mtrue vs LeadPt for matched jets
Bool_t reject