AliPhysics  3abf71f (3abf71f)
AliAnalysisTaskSoftDrop.cxx
Go to the documentation of this file.
1 #include <TClonesArray.h>
2 #include <TH1F.h>
3 #include <TH2F.h>
4 #include <TH3F.h>
5 #include <TList.h>
6 #include <TLorentzVector.h>
7 
8 #include "AliVCluster.h"
9 #include "AliAODCaloCluster.h"
10 #include "AliESDCaloCluster.h"
11 #include "AliVTrack.h"
12 #include "AliEmcalJet.h"
13 #include "AliRhoParameter.h"
14 #include "AliLog.h"
15 #include "AliJetContainer.h"
16 #include "AliParticleContainer.h"
17 #include "AliClusterContainer.h"
18 #include "AliPicoTrack.h"
19 
20 #include "AliAnalysisManager.h"
22 
24 
25 //________________________________________________________________________
28  fHistTracksPt(0),
29  fHistClustersPt(0),
30  fHistLeadingJetPt(0),
31  fHistJetsPhiEta(0),
32  fHistJetsPtArea(0),
33  fHistJetsPtLeadHad(0),
34  fHistJetsCorrPtArea(0),
35  fHistPtDEtaDPhiTrackClus(0),
36  fHistPtDEtaDPhiClusTrack(0),
37  fHistNTracks(0),
38  fHistClustDx(0),
39  fHistClustDz(0),
40  fNAccJets(0),
41  fhZg(0),
42  fJetsCont(0),
43  fTracksCont(0),
44  fCaloClustersCont(0)
45 
46 {
47  // Default constructor.
48 
49  fHistTracksPt = new TH1*[fNcentBins];
50  fHistNTracks = new TH1*[fNcentBins];
51  fHistClustersPt = new TH1*[fNcentBins];
52  fHistLeadingJetPt = new TH1*[fNcentBins];
53  fHistJetsPhiEta = new TH2*[fNcentBins];
54  fHistJetsPtArea = new TH2*[fNcentBins];
55  fHistJetsPtLeadHad = new TH2*[fNcentBins];
56  fHistJetsCorrPtArea = new TH2*[fNcentBins];
57 
58  for (Int_t i = 0; i < fNcentBins; i++) {
59  fHistTracksPt[i] = 0;
60  fHistNTracks[i] = 0;
61  fHistClustersPt[i] = 0;
62  fHistLeadingJetPt[i] = 0;
63  fHistJetsPhiEta[i] = 0;
64  fHistJetsPtArea[i] = 0;
65  fHistJetsPtLeadHad[i] = 0;
66  fHistJetsCorrPtArea[i] = 0;
67  }
68 
69  SetMakeGeneralHistograms(kTRUE);
70 }
71 
72 //________________________________________________________________________
74  AliAnalysisTaskEmcalJet(name, kTRUE),
75  fHistTracksPt(0),
76  fHistClustersPt(0),
77  fHistLeadingJetPt(0),
78  fHistJetsPhiEta(0),
79  fHistJetsPtArea(0),
80  fHistJetsPtLeadHad(0),
81  fHistJetsCorrPtArea(0),
82  fHistPtDEtaDPhiTrackClus(0),
83  fHistPtDEtaDPhiClusTrack(0),
84  fHistNTracks(0),
85  fHistClustDx(0),
86  fHistClustDz(0),
87  fNAccJets(0),
88  fhZg(0),
89  fJetsCont(0),
90  fTracksCont(0),
91  fCaloClustersCont(0)
92 {
93  // Standard constructor.
94 
96  fHistNTracks = new TH1*[fNcentBins];
103 
104  for (Int_t i = 0; i < fNcentBins; i++) {
105  fHistTracksPt[i] = 0;
106  fHistNTracks[i] = 0;
107  fHistClustersPt[i] = 0;
108  fHistLeadingJetPt[i] = 0;
109  fHistJetsPhiEta[i] = 0;
110  fHistJetsPtArea[i] = 0;
111  fHistJetsPtLeadHad[i] = 0;
112  fHistJetsCorrPtArea[i] = 0;
113  }
114 
116 }
117 
118 //________________________________________________________________________
120 {
121  // Destructor.
122 }
123 
125  const char *ntracks,
126  const char *nclusters,
127  const char *njets,
128  const char *nrho,
130  Double_t jetradius,
131  Double_t jetptcut,
132  Double_t jetareacut,
133  const char *type,
134  Int_t leadhadtype,
135  const char *taskname
136 )
137 {
138  // Get the pointer to the existing analysis manager via the static access method.
139  //==============================================================================
140  AliAnalysisManager *mgr = AliAnalysisManager::GetAnalysisManager();
141  if (!mgr)
142  {
143  ::Error("AddTaskEmcalJetSample", "No analysis manager to connect to.");
144  return NULL;
145  }
146 
147  // Check the analysis type using the event handlers connected to the analysis manager.
148  //==============================================================================
149  if (!mgr->GetInputEventHandler())
150  {
151  ::Error("AddTaskEmcalJetSample", "This task requires an input event handler");
152  return NULL;
153  }
154 
155  //-------------------------------------------------------
156  // Init the task and do settings
157  //-------------------------------------------------------
158 
159  TString trackName(ntracks);
160  TString clusName(nclusters);
161 
162  TString name(taskname);
163  if (strcmp(njets,"")) {
164  name += "_";
165  name += njets;
166  }
167  if (strcmp(nrho,"")) {
168  name += "_";
169  name += nrho;
170  }
171  if (strcmp(type,"")) {
172  name += "_";
173  name += type;
174  }
175 
176  Printf("name: %s",name.Data());
177 
179  //jetTask->SetCentRange(0.,100.);
180  //jetTask->SetNCentBins(nCentBins);
181 
182  AliParticleContainer* partCont = 0;
183  if (trackName == "mcparticles") {
184  partCont = jetTask->AddMCParticleContainer(ntracks);
185  }
186  else if (trackName == "tracks" || trackName == "Tracks") {
187  partCont = jetTask->AddTrackContainer(ntracks);
188  }
189  else if (!trackName.IsNull()) {
190  partCont = new AliParticleContainer(trackName);
191  }
192 
193  AliClusterContainer *clusterCont = jetTask->AddClusterContainer(nclusters);
194 
195  TString strType(type);
196  AliJetContainer *jetCont = jetTask->AddJetContainer(njets,strType,jetradius);
197  if(jetCont) {
198  jetCont->SetRhoName(nrho);
199  jetCont->ConnectParticleContainer(partCont);
200  jetCont->ConnectClusterContainer(clusterCont);
201  //jetCont->SetZLeadingCut(0.98,0.98);
202  jetCont->SetPercAreaCut(jetareacut);
203  jetCont->SetJetPtCut(jetptcut);
204  jetCont->SetLeadingHadronType(leadhadtype);
205  }
206 
207  //-------------------------------------------------------
208  // Final settings, pass to manager and set the containers
209  //-------------------------------------------------------
210 
211  mgr->AddTask(jetTask);
212 
213  // Create containers for input/output
214  AliAnalysisDataContainer *cinput1 = mgr->GetCommonInputContainer() ;
215  TString contname(name);
216  contname += "_histos";
217  AliAnalysisDataContainer *coutput1 = mgr->CreateContainer(contname.Data(),
218  TList::Class(),AliAnalysisManager::kOutputContainer,
219  Form("%s", AliAnalysisManager::GetCommonFileName()));
220  mgr->ConnectInput (jetTask, 0, cinput1 );
221  mgr->ConnectOutput (jetTask, 1, coutput1 );
222 
223  return jetTask;
224 }
225 
226 //________________________________________________________________________
228 {
229  // Create user output.
230 
232 
234  if(fJetsCont) { //get particles and clusters connected to jets
237  } else { //no jets, just analysis tracks and clusters
240  }
241  if(fTracksCont) fTracksCont->SetClassName("AliVTrack");
242  if(fCaloClustersCont) fCaloClustersCont->SetClassName("AliVCluster");
243 
244  TString histname;
245 
246  for (Int_t i = 0; i < fNcentBins; i++) {
247  if (fParticleCollArray.GetEntriesFast()>0) {
248  histname = "fHistTracksPt_";
249  histname += i;
250  fHistTracksPt[i] = new TH1F(histname.Data(), histname.Data(), fNbins / 2, fMinBinPt, fMaxBinPt / 2);
251  fHistTracksPt[i]->GetXaxis()->SetTitle("p_{T,track} (GeV/c)");
252  fHistTracksPt[i]->GetYaxis()->SetTitle("counts");
253  fOutput->Add(fHistTracksPt[i]);
254 
255  histname = "fHistNTracks_";
256  histname += i;
257  fHistNTracks[i] = new TH1F(histname.Data(), histname.Data(), 200, 0., 199.);
258  fOutput->Add(fHistNTracks[i]);
259  }
260 
261  if (fClusterCollArray.GetEntriesFast()>0) {
262  histname = "fHistClustersPt_";
263  histname += i;
264  fHistClustersPt[i] = new TH1F(histname.Data(), histname.Data(), fNbins / 2, fMinBinPt, fMaxBinPt / 2);
265  fHistClustersPt[i]->GetXaxis()->SetTitle("p_{T,clus} (GeV/c)");
266  fHistClustersPt[i]->GetYaxis()->SetTitle("counts");
267  fOutput->Add(fHistClustersPt[i]);
268  }
269 
270  if (fJetCollArray.GetEntriesFast()>0) {
271  histname = "fHistLeadingJetPt_";
272  histname += i;
273  fHistLeadingJetPt[i] = new TH1F(histname.Data(), histname.Data(), fNbins, fMinBinPt, fMaxBinPt);
274  fHistLeadingJetPt[i]->GetXaxis()->SetTitle("p_{T}^{raw} (GeV/c)");
275  fHistLeadingJetPt[i]->GetYaxis()->SetTitle("counts");
276  fOutput->Add(fHistLeadingJetPt[i]);
277 
278  histname = "fHistJetsPhiEta_";
279  histname += i;
280  fHistJetsPhiEta[i] = new TH2F(histname.Data(), histname.Data(), 50, -1, 1, 101, 0, TMath::Pi()*2 + TMath::Pi()/200);
281  fHistJetsPhiEta[i]->GetXaxis()->SetTitle("#eta");
282  fHistJetsPhiEta[i]->GetYaxis()->SetTitle("#phi");
283  fOutput->Add(fHistJetsPhiEta[i]);
284 
285  histname = "fHistJetsPtArea_";
286  histname += i;
287  fHistJetsPtArea[i] = new TH2F(histname.Data(), histname.Data(), fNbins, fMinBinPt, fMaxBinPt, 50, 0, 1);
288  fHistJetsPtArea[i]->GetXaxis()->SetTitle("p_{T}^{raw} (GeV/c)");
289  fHistJetsPtArea[i]->GetYaxis()->SetTitle("area");
290  fOutput->Add(fHistJetsPtArea[i]);
291 
292  histname = "fHistJetsPtLeadHad_";
293  histname += i;
294  fHistJetsPtLeadHad[i] = new TH2F(histname.Data(), histname.Data(), fNbins, fMinBinPt, fMaxBinPt, fNbins / 2, fMinBinPt, fMaxBinPt / 2);
295  fHistJetsPtLeadHad[i]->GetXaxis()->SetTitle("p_{T}^{raw} (GeV/c)");
296  fHistJetsPtLeadHad[i]->GetYaxis()->SetTitle("p_{T,lead} (GeV/c)");
297  fHistJetsPtLeadHad[i]->GetZaxis()->SetTitle("counts");
298  fOutput->Add(fHistJetsPtLeadHad[i]);
299 
300  if (!(GetJetContainer()->GetRhoName().IsNull())) {
301  histname = "fHistJetsCorrPtArea_";
302  histname += i;
303  fHistJetsCorrPtArea[i] = new TH2F(histname.Data(), histname.Data(), fNbins*2, -fMaxBinPt, fMaxBinPt, 50, 0, 1);
304  fHistJetsCorrPtArea[i]->GetXaxis()->SetTitle("p_{T}^{corr} [GeV/c]");
305  fHistJetsCorrPtArea[i]->GetYaxis()->SetTitle("area");
306  fOutput->Add(fHistJetsCorrPtArea[i]);
307  }
308  }
309  }
310 
311  histname = "fHistPtDEtaDPhiTrackClus";
312  fHistPtDEtaDPhiTrackClus = new TH3F(histname.Data(),Form("%s;#it{p}_{T}^{track};#Delta#eta;#Delta#varphi",histname.Data()),100,0.,100.,100,-0.1,0.1,100,-0.1,0.1);
314 
315  histname = "fHistPtDEtaDPhiClusTrack";
316  fHistPtDEtaDPhiClusTrack = new TH3F(histname.Data(),Form("%s;#it{p}_{T}^{clus};#Delta#eta;#Delta#varphi",histname.Data()),100,0.,100.,100,-0.1,0.1,100,-0.1,0.1);
318 
319  fHistClustDx = new TH1F("fHistClustDx","fHistClustDx;Dx",1000,0.,1.);
320  fOutput->Add(fHistClustDx);
321 
322  fHistClustDz = new TH1F("fHistClustDz","fHistClustDz;Dz",1000,0.,1.);
323  fOutput->Add(fHistClustDz);
324 
325  fNAccJets = new TH1F("fNAccJets","fNAccJets;N/ev",11,-0.5, 9.5);
326  fOutput->Add(fNAccJets);
327 
328  fhZg = new TH1F("fhZg", "#it{Z}_{g}; #it{Z}_{g}; Entries", 200, 0., 0.5);
329  fOutput->Add(fhZg);
330 
331  fhCorrPtZg = new TH2F("fhCorrPtZg", "#it{Z}_{g}; p_{T}^{corr} [GeV/c]; #it{Z}_{g}", 16, 0, 160, 20, 0., 0.5);
332  fOutput->Add(fhCorrPtZg);
333 
334  fhCorrPtZg2 = new TH2F("fhCorrPtZg2", "#it{Z}_{g}; p_{T}^{corr} [GeV/c]; #it{Z}_{g}", 16, 0, 160, 20, 0., 0.5);
335  fOutput->Add(fhCorrPtZg2);
336 
337  fhCorrPtZgD = new TH2F("fhCorrPtZgD", "#it{Z}_{g}; p_{T}^{corr} [GeV/c]; #it{Z}_{g}", 16, 0, 160, 20, 0., 0.5);
338  fOutput->Add(fhCorrPtZgD);
339 
340  fhCorrPtRg = new TH2F("fhCorrPtRg", "R_{g}; p_{T}^{corr} [GeV/c]; R_{g}", 16, 0, 160, 40, 0., 0.5);
341  fOutput->Add(fhCorrPtRg);
342 
343  fhCorrPtRgD = new TH2F("fhCorrPtRgD", "R_{g}; p_{T}^{corr} [GeV/c]; R_{g}", 16, 0, 160, 40, 0., 0.5);
344  fOutput->Add(fhCorrPtRgD);
345 
346  fhCorrPtZgRg = new TH3F("fhCorrPtZgRg", "fhCorrPtZgRg", 8, 0, 160, 10, 0., 0.5, 10, 0, 0.5);
347  fOutput->Add(fhCorrPtZgRg);
348 
349  fhCorrPtZgSDstep = new TH3F("fhCorrPtZgSDstep", "fhCorrPtZgSDstep", 16, 0, 160, 20, 0., 0.5, 20, 0, 20);
351 
352  fhCorrPtRgSDstep = new TH3F("fhCorrPtRgSDstep", "fhCorrPtRgSDstep", 16, 0, 160, 20, 0., 0.5, 20, 0, 20);
354 
355  fhCorrPtPtfrac = new TH2F("fhCorrPtPtfrac", "#deltap_{T}; p_{T}^{corr} [GeV/c]; #deltap_{T}", 16, 0, 160, 80, 0., 1.0);
356  fOutput->Add(fhCorrPtPtfrac);
357 
358  fhCorrPtDropCount = new TH2F("fhCorrPtDropCount", "fhCorrPtDropCount; p_{T}^{corr} [GeV/c]; Counts", 16, 0, 160, 50, 0., 50);
360 
361  PostData(1, fOutput); // Post data for ALL output slots > 0 here.
362 }
363 
364 //________________________________________________________________________
366 {
367  // Fill histograms.
368 
369  if (fTracksCont) {
371  fTracksCont->ResetCurrentID();
372  AliVTrack *track = static_cast<AliVTrack*>(fTracksCont->GetNextAcceptParticle());
373  while(track) {
374  fHistTracksPt[fCentBin]->Fill(track->Pt());
375  track = static_cast<AliVTrack*>(fTracksCont->GetNextAcceptParticle());
376 
377  }
378  }
379 
380  if (fCaloClustersCont) {
381  AliVCluster *cluster = fCaloClustersCont->GetNextAcceptCluster();
382  while(cluster) {
383  TLorentzVector nPart;
384  cluster->GetMomentum(nPart, fVertex);
385  fHistClustersPt[fCentBin]->Fill(nPart.Pt());
386  Double_t dx = cluster->GetTrackDx();
387  Double_t dz = cluster->GetTrackDz();
388  fHistClustDx->Fill(dx);
389  fHistClustDz->Fill(dz);
391  }
392  }
393 
394  if (fJetsCont) {
395  Int_t count = 0;
396  for (auto jet : fJetsCont->accepted() ) {
397  count++;
398  fHistJetsPtArea[fCentBin]->Fill(jet->Pt(), jet->Area());
399  fHistJetsPhiEta[fCentBin]->Fill(jet->Eta(), jet->Phi());
400 
401  Float_t ptLeading = fJetsCont->GetLeadingHadronPt(jet);
402  fHistJetsPtLeadHad[fCentBin]->Fill(jet->Pt(), ptLeading);
403 
405  Float_t corrPt = jet->Pt() - fJetsCont->GetRhoVal() * jet->Area();
406  fHistJetsCorrPtArea[fCentBin]->Fill(corrPt, jet->Area());
407  }
408 
409  Double_t jetpt_ungrmd = jet->Pt() / ( jet->GetShapeProperties()->GetSoftDropPtfrac() );
410 
411  std::vector<fastjet::PseudoJet> particles;
412  UShort_t ntracks = jet->GetNumberOfTracks();
413  for (int j = 0; j < ntracks; j++) {
414  particles.push_back( fastjet::PseudoJet( jet->Track(j)->Px(), jet->Track(j)->Py(), jet->Track(j)->Pz(), jet->Track(j)->E() ) );
415  }
416  fastjet::JetDefinition jet_def(fastjet::cambridge_algorithm, 0.4, fastjet::E_scheme);
417  fastjet::ClusterSequence cs(particles, jet_def);
418  std::vector<fastjet::PseudoJet> jets = sorted_by_pt(cs.inclusive_jets());
419 
420  if (jets.size() > 0) {
421  fSDM = 0;
422  SoftDropDeepDeclustering( jets[0], jets[0].pt() );
423  fhCorrPtZg2->Fill( jets[0].pt(), SoftDropDeclustering(jets[0], 0.5, 1.5) );
424  }
425 
426  fhZg->Fill(jet->GetShapeProperties()->GetSoftDropZg());
427  fhCorrPtZg->Fill(jetpt_ungrmd - fJetsCont->GetRhoVal() * jet->Area(), jet->GetShapeProperties()->GetSoftDropZg() );
428  fhCorrPtRg->Fill(jetpt_ungrmd - fJetsCont->GetRhoVal() * jet->Area(), jet->GetShapeProperties()->GetSoftDropdR() );
429  fhCorrPtZgRg->Fill(jetpt_ungrmd - fJetsCont->GetRhoVal() * jet->Area(), jet->GetShapeProperties()->GetSoftDropZg(), jet->GetShapeProperties()->GetSoftDropdR() );
430  fhCorrPtPtfrac->Fill(jetpt_ungrmd - fJetsCont->GetRhoVal() * jet->Area(), jet->GetShapeProperties()->GetSoftDropPtfrac() );
431  fhCorrPtDropCount->Fill(jetpt_ungrmd - fJetsCont->GetRhoVal() * jet->Area(), jet->GetShapeProperties()->GetSoftDropDropCount() );
432  }
433  fNAccJets->Fill(count);
434  auto jet = (AliEmcalJet*)fJetsCont->GetLeadingJet();
435  if(jet) fHistLeadingJetPt[fCentBin]->Fill(jet->Pt());
436  }
437 
439 
440  return kTRUE;
441 }
442 
443 //________________________________________________________________________
445 {
446 
448  return;
449 
450  Double_t deta = 999;
451  Double_t dphi = 999;
452 
453  //Get closest cluster to track
454  AliVTrack *track = static_cast<AliVTrack*>(fTracksCont->GetNextAcceptParticle());
455  while(track) {
456  //Get matched cluster
457  Int_t emc1 = track->GetEMCALcluster();
458  if(fCaloClustersCont && emc1>=0) {
459  AliVCluster *clusMatch = fCaloClustersCont->GetCluster(emc1);
460  if(clusMatch) {
461  AliPicoTrack::GetEtaPhiDiff(track, clusMatch, dphi, deta);
462  fHistPtDEtaDPhiTrackClus->Fill(track->Pt(),deta,dphi);
463  }
464  }
465  track = static_cast<AliVTrack*>(fTracksCont->GetNextAcceptParticle());
466  }
467 
468  //Get closest track to cluster
469  AliVCluster *cluster = fCaloClustersCont->GetNextAcceptCluster();
470  while(cluster) {
471  TLorentzVector nPart;
472  cluster->GetMomentum(nPart, fVertex);
473  fHistClustersPt[fCentBin]->Fill(nPart.Pt());
474 
475  //Get matched track
476  AliVTrack *mt = NULL;
477  AliAODCaloCluster *acl = dynamic_cast<AliAODCaloCluster*>(cluster);
478  if(acl) {
479  if(acl->GetNTracksMatched()>1)
480  mt = static_cast<AliVTrack*>(acl->GetTrackMatched(0));
481  }
482  else {
483  AliESDCaloCluster *ecl = dynamic_cast<AliESDCaloCluster*>(cluster);
484  Int_t im = ecl->GetTrackMatchedIndex();
485  if(fTracksCont && im>=0) {
486  mt = static_cast<AliVTrack*>(fTracksCont->GetParticle(im));
487  }
488  }
489  if(mt) {
490  AliPicoTrack::GetEtaPhiDiff(mt, cluster, dphi, deta);
491  fHistPtDEtaDPhiClusTrack->Fill(nPart.Pt(),deta,dphi);
492 
493  /* //debugging
494  if(mt->IsEMCAL()) {
495  Int_t emc1 = mt->GetEMCALcluster();
496  Printf("current id: %d emc1: %d",fCaloClustersCont->GetCurrentID(),emc1);
497  AliVCluster *clm = fCaloClustersCont->GetCluster(emc1);
498  AliPicoTrack::GetEtaPhiDiff(mt, clm, dphi, deta);
499  Printf("deta: %f dphi: %f",deta,dphi);
500  }
501  */
502  }
504  }
505 }
506 
507 void AliAnalysisTaskSoftDrop::SoftDropDeepDeclustering(fastjet::PseudoJet jet, const Float_t inpt) {
508 
509  fastjet::PseudoJet jet1;
510  fastjet::PseudoJet jet2;
511 
512  if ( jet.has_parents(jet1, jet2) ) {
513 
514  Float_t pt1 = jet1.pt();
515  Float_t pt2 = jet2.pt();
516 
517  Float_t dr = TMath::Sqrt( jet1.plain_distance(jet2) );
518 
519  Float_t z;
520  if (pt1 < pt2) z = pt1/(pt1+pt2);
521  else z = pt2/(pt1+pt2);
522 
523  if (z > 0.1) {
524  fSDM++;
525  fhCorrPtZgD->Fill(inpt, z);
526  fhCorrPtRgD->Fill(inpt, dr);
527  fhCorrPtZgSDstep->Fill(inpt, z, fSDM);
528  fhCorrPtRgSDstep->Fill(inpt, dr, fSDM);
529  }
530 
531  if (pt1 > pt2) SoftDropDeepDeclustering(jet1, inpt);
532  else SoftDropDeepDeclustering(jet2, inpt);
533 
534  }
535 
536 }
537 
538 Float_t AliAnalysisTaskSoftDrop::SoftDropDeclustering(fastjet::PseudoJet jet, const Float_t zcut, const Float_t beta) {
539 
540  fastjet::PseudoJet jet1;
541  fastjet::PseudoJet jet2;
542 
543  if ( !(jet.has_parents(jet1, jet2)) ) {
544  return 0.0;
545  }
546  else {
547  Float_t pt1 = jet1.pt();
548  Float_t pt2 = jet2.pt();
549 
550  Float_t dr = TMath::Sqrt( jet1.plain_distance(jet2) );
551  Float_t angular_term = TMath::Power(dr/0.4, beta);
552 
553  Float_t z;
554  if (pt1 < pt2) z = pt1/(pt1+pt2);
555  else z = pt2/(pt1+pt2);
556 
557  if ( z > (zcut*angular_term) ) return z;
558  else {
559  if (pt1 > pt2) return SoftDropDeclustering(jet1, zcut, beta);
560  else return SoftDropDeclustering(jet2, zcut, beta);
561  }
562  }
563 
564 }
565 
566 //________________________________________________________________________
568 
570 
571  if (fJetsCont && fJetsCont->GetArray() == 0) fJetsCont = 0;
572  if (fTracksCont && fTracksCont->GetArray() == 0) fTracksCont = 0;
573  if (fCaloClustersCont && fCaloClustersCont->GetArray() == 0) fCaloClustersCont = 0;
574 
575 }
576 
577 //________________________________________________________________________
579 {
580  // Run analysis code here, if needed. It will be executed before FillHistograms().
581 
582  return kTRUE; // If return kFALSE FillHistogram() will NOT be executed.
583 }
584 
585 //________________________________________________________________________
587 {
588  // Called once at the end of the analysis.
589 }
TH2 * fhCorrPtZgD
! iterative SD, distribution of zg, jet pt-diff
TObjArray fClusterCollArray
cluster collection array
AliClusterContainer * fCaloClustersCont
Tracks.
virtual AliVParticle * GetNextAcceptParticle()
Double_t GetRhoVal() const
double Double_t
Definition: External.C:58
Definition: External.C:260
Definition: External.C:236
AliJetContainer * GetJetContainer(Int_t i=0) const
TH2 * fhCorrPtRgD
! iterative SD, distribution of Rg, jet pt-diff
const TString & GetRhoName(Int_t c=0) const
void SetLeadingHadronType(Int_t t)
TH3 * fhCorrPtZgSDstep
! iterative SD, distribution of zg, jet pt-diff, SD step diff
void SoftDropDeepDeclustering(fastjet::PseudoJet jet, const Float_t inpt)
TH3 * fHistPtDEtaDPhiClusTrack
track pt, delta eta, delta phi to matched cluster
Double_t fMinBinPt
min pt in histograms
AliClusterContainer * GetClusterContainer() const
static AliAnalysisTaskSoftDrop * AddTaskSoftDrop(const char *ntracks="usedefault", const char *nclusters="usedefault", const char *njets="Jets", const char *nrho="Rho", Int_t nCentBins=1, Double_t jetradius=0.2, Double_t jetptcut=1, Double_t jetareacut=0.6, const char *type="EMCAL", Int_t leadhadtype=0, const char *taskname="AliAnalysisTaskSoftDrop")
Int_t fCentBin
!event centrality bin
TH1 ** fHistLeadingJetPt
Cluster pt spectrum.
void SetPercAreaCut(Float_t p)
Int_t nCentBins
TH1 ** fHistNTracks
cluster pt, delta eta, delta phi to matched track
Container for particles within the EMCAL framework.
TObjArray fParticleCollArray
particle/track collection array
AliParticleContainer * GetParticleContainer(Int_t i=0) const
Get particle container attached to this task.
void SetRhoName(const char *n)
AliParticleContainer * GetParticleContainer() const
TH2 ** fHistJetsPtArea
Phi-Eta distribution of jets.
AliEmcalJet * GetLeadingJet(const char *opt="")
TH2 * fhCorrPtRg
! distribution of groomed jet radius, jet pt-diff
int Int_t
Definition: External.C:63
void SetJetPtCut(Float_t cut)
Double_t GetLeadingHadronPt(const AliEmcalJet *jet) const
float Float_t
Definition: External.C:68
void Terminate(Option_t *option)
virtual AliVParticle * GetParticle(Int_t i=-1) const
TH2 * fhCorrPtDropCount
! distribution of dropped branches number, jet pt-diff
Int_t fNcentBins
how many centrality bins
TH2 * fhCorrPtZg
! distribution of zg, jet pt-diff
AliClusterContainer * GetClusterContainer(Int_t i=0) const
Get cluster container attached to this task.
TH2 ** fHistJetsCorrPtArea
Jet pt vs. leading hadron.
TH1 * fhZg
number of jets per event
AliParticleContainer * fTracksCont
Jets.
AliVCluster * GetCluster(Int_t i) const
TObjArray fJetCollArray
jet collection array
Bool_t FillHistograms()
Function filling histograms.
Bool_t Run()
Run function. This is the core function of the analysis and contains the user code. Therefore users have to implement this function.
void ConnectParticleContainer(AliParticleContainer *c)
TH3 * fhCorrPtZgRg
! iterative SD, distribution of zg, jet pt-diff, Rg diff
Int_t fSDM
number of the SD iterations
AliEmcalList * fOutput
!output list
Double_t fMaxBinPt
max pt in histograms
TH1 * fHistClustDx
number of tracks per event
Definition: External.C:220
TH2 ** fHistJetsPhiEta
Leading jet pt spectrum.
Double_t fVertex[3]
!event vertex
TH2 * fhCorrPtPtfrac
! distribution of ptfrac, jet pt-diff
TH2 * fhCorrPtZg2
! other SD settings
void SetMakeGeneralHistograms(Bool_t g)
Base task in the EMCAL jet framework.
Represent a jet reconstructed using the EMCal jet framework.
Definition: AliEmcalJet.h:51
unsigned short UShort_t
Definition: External.C:28
const char Option_t
Definition: External.C:48
TH1 ** fHistClustersPt
Track pt spectrum.
void UserCreateOutputObjects()
Main initialization function on the worker.
static void GetEtaPhiDiff(const AliVTrack *t, const AliVCluster *v, Double_t &phidiff, Double_t &etadiff)
const AliJetIterableContainer accepted() const
bool Bool_t
Definition: External.C:53
TH3 * fHistPtDEtaDPhiTrackClus
Jet pt - bkg vs. area.
Int_t GetNAcceptedParticles() const
void ExecOnce()
Perform steps needed to initialize the analysis.
void ConnectClusterContainer(AliClusterContainer *c)
static Float_t SoftDropDeclustering(fastjet::PseudoJet jet, const Float_t zcut, const Float_t beta)
Container structure for EMCAL clusters.
AliVCluster * GetNextAcceptCluster()
Container for jet within the EMCAL jet framework.
TH2 ** fHistJetsPtLeadHad
Jet pt vs. area.
Definition: External.C:196
Int_t fNbins
no. of pt bins
TH3 * fhCorrPtRgSDstep
! iterative SD, distribution of zg, jet pt-diff, SD step diff