3 #include "AliAnalysisTaskEMCALIsoPhoton.h"
11 #include <THnSparse.h>
12 #include <TLorentzVector.h>
15 #include "AliAnalysisManager.h"
16 #include "AliAnalysisTask.h"
17 #include "AliEMCALGeometry.h"
18 #include "AliEMCALRecoUtils.h"
19 #include "AliESDCaloCells.h"
20 #include "AliESDCaloCluster.h"
21 #include "AliESDEvent.h"
22 #include "AliESDHeader.h"
23 #include "AliESDInputHandler.h"
24 #include "AliESDUtils.h"
25 #include "AliESDtrack.h"
26 #include "AliESDtrackCuts.h"
27 #include "AliMCEvent.h"
28 #include "AliMCEventHandler.h"
30 #include "AliV0vertexer.h"
31 #include "AliVCluster.h"
33 ClassImp(AliAnalysisTaskEMCALIsoPhoton)
35 //________________________________________________________________________
36 AliAnalysisTaskEMCALIsoPhoton::AliAnalysisTaskEMCALIsoPhoton() :
44 fGeoName("EMCAL_COMPLETEV1"),
69 fMCDirPhotonPtEtaPhi(0),
77 fMCDirPhotonPtEtaPhiNoClus(0),
80 // Default constructor.
83 //________________________________________________________________________
84 AliAnalysisTaskEMCALIsoPhoton::AliAnalysisTaskEMCALIsoPhoton(const char *name) :
85 AliAnalysisTaskSE(name),
92 fGeoName("EMCAL_COMPLETEV1"),
117 fMCDirPhotonPtEtaPhi(0),
125 fMCDirPhotonPtEtaPhiNoClus(0),
130 // Define input and output slots here
131 // Input slot #0 works with a TChain
132 DefineInput(0, TChain::Class());
133 // Output slot #0 id reserved by the base class for AOD
134 // Output slot #1 writes into a TH1 container
135 DefineOutput(1, TList::Class());
138 //________________________________________________________________________
139 void AliAnalysisTaskEMCALIsoPhoton::UserCreateOutputObjects()
141 // Create histograms, called once.
143 fCaloClusters = new TRefArray();
144 fSelPrimTracks = new TObjArray();
147 fOutputList = new TList();
148 fOutputList->SetOwner();// Container cleans up all histos (avoids leaks in merging)
150 fGeom = AliEMCALGeometry::GetInstance(fGeoName.Data());
152 fEvtSel = new TH1F("hEvtSel","Event selection counter (0=all trg, 1=pvz cut) ;evt cut ;dN/dcut}",2,0,2);
153 fOutputList->Add(fEvtSel);
155 fNClusEt10 = new TH1F("hNClusEt10","# of cluster with E_{T}>10 per event;E;",101,-0.5,100.5);
156 fOutputList->Add(fNClusEt10);
158 fRecoPV = new TH1F("hRecoPV","Prim. vert. reconstruction (yes or no);reco (0=no, 1=yes) ;",2,-0.5,1.5);
159 fOutputList->Add(fRecoPV);
161 fPVtxZ = new TH1F("hPVtxZ","primary vertex Z before cut;prim-vz(cm) ;",200,-100,100);
162 fOutputList->Add(fPVtxZ);
164 fTrMultDist = new TH1F("fTrMultDist","track multiplicity;tracks/event;#events",200,0.5,200.5);
165 fOutputList->Add(fTrMultDist);
167 fMCDirPhotonPtEtaPhi = new TH3F("hMCDirPhotonPtEtaPhi","photon (gq->#gammaq) p_{T}, #eta, #phi;GeV/c;#eta;#phi",1000,0,100,154,-0.77,0.77,130,1.38,3.20);
168 fMCDirPhotonPtEtaPhi->Sumw2();
169 fOutputList->Add(fMCDirPhotonPtEtaPhi);
171 fDecayPhotonPtMC = new TH1F("hDecayPhotonPtMC","decay photon p_{T};GeV/c;dN/dp_{T} (c GeV^{-1})",1000,0,100);
172 fDecayPhotonPtMC->Sumw2();
173 fOutputList->Add(fDecayPhotonPtMC);
175 fCellAbsIdVsAmpl = new TH2F("hCellAbsIdVsAmpl","cell abs id vs cell amplitude (energy);E (GeV);ID",200,0,100,24*48*10,-0.5,24*48*10-0.5);
176 fOutputList->Add(fCellAbsIdVsAmpl);
178 fNClusHighClusE = new TH2F("hNClusHighClusE","total number of clusters vs. highest clus energy in the event;E (GeV);NClus",200,0,100,301,-0.5,300.5);
179 fOutputList->Add(fNClusHighClusE);
181 fHigherPtConeM02 = new TH2F("hHigherPtConeM02","#lambda_{0}^{2} vs. in-cone-p_{T}^{max};p_{T}^{max} (GeV/c, in the cone);#lambda_{0}^{2}",1000,0,100,400,0,4);
182 fOutputList->Add(fHigherPtConeM02);
184 fClusEtMcPt = new TH2F("hClusEtMcPt","E_{T}^{clus} vs. p_{T}^{mc}; p_{T}^{mc};E_{T}^{clus}",500,0,100,500,0,100);
185 fOutputList->Add(fClusEtMcPt);
187 fClusMcDetaDphi = new TH2F("hClusMcDetaDphi","#Delta#phi vs. #Delta#eta (reco-mc);#Delta#eta;#Delta#phi",100,-.7,.7,100,-.7,.7);
188 fOutputList->Add(fClusMcDetaDphi);
190 fNClusPerPho = new TH2F("hNClusPerPho","Number of clusters per prompt photon;p_{T}^{MC};N_{clus}",500,0,100,11,-0.5,10.5);
191 fOutputList->Add(fNClusPerPho);
193 fMCDirPhotonPtEtaPhiNoClus = new TH3F("hMCDirPhotonPhiEtaNoClus","p_{T}, #eta and #phi of prompt photons with no reco clusters;p_{T};#eta;#phi",1000,0,100,154,-0.77,0.77,130,1.38,3.20);
194 fOutputList->Add(fMCDirPhotonPtEtaPhiNoClus);
196 Int_t nEt=1000, nM02=400, nCeIso=1000, nTrIso=1000, nAllIso=1000, nCeIsoNoUE=1000, nAllIsoNoUE=1000, nTrClDphi=200, nTrClDeta=100, nClEta=140, nClPhi=128, nTime=60, nMult=100, nPhoMcPt=101;
197 Int_t bins[] = {nEt, nM02, nCeIso, nTrIso, nAllIso, nCeIsoNoUE, nAllIsoNoUE, nTrClDphi, nTrClDeta,nClEta,nClPhi,nTime,nMult,nPhoMcPt};
198 fNDimensions = sizeof(bins)/sizeof(Int_t);
199 const Int_t ndims = fNDimensions;
200 Double_t xmin[] = { 0., 0., -10., -10., -10., -10., -10., -0.1,-0.05, -0.7, 1.4,-0.15e-06,-0.5,-1.5};
201 Double_t xmax[] = { 100., 4., 190., 190., 190., 190., 190., 0.1, 0.05, 0.7, 3.192, 0.15e-06,99.5,99.5};
202 fHnOutput = new THnSparseF("fHnOutput","Output matrix: E_{T},M02,CeIso,TrIso,AllIso, CeIsoNoUESub, AllIsoNoUESub, d#phi_{trk},d#eta_{trk},#eta_{clus},#phi_{clus},T_{max},mult,mc-p_{T}^{#gamma}", ndims, bins, xmin, xmax);
203 fOutputList->Add(fHnOutput);
207 PostData(1, fOutputList);
210 //________________________________________________________________________
211 void AliAnalysisTaskEMCALIsoPhoton::UserExec(Option_t *)
213 // Main loop, called for each event.
215 // event trigger selection
216 Bool_t isSelected = 0;
217 if(fPeriod.Contains("11a")){
218 if(fTrigBit.Contains("kEMC"))
219 isSelected = (((AliInputEventHandler*)(AliAnalysisManager::GetAnalysisManager()->GetInputEventHandler()))->IsEventSelected() & AliVEvent::kEMC1);
221 isSelected = (((AliInputEventHandler*)(AliAnalysisManager::GetAnalysisManager()->GetInputEventHandler()))->IsEventSelected() & AliVEvent::kMB);
224 if(fTrigBit.Contains("kEMC"))
225 isSelected = (((AliInputEventHandler*)(AliAnalysisManager::GetAnalysisManager()->GetInputEventHandler()))->IsEventSelected() & AliVEvent::kEMC7);
227 if(fTrigBit.Contains("kMB"))
228 isSelected = (((AliInputEventHandler*)(AliAnalysisManager::GetAnalysisManager()->GetInputEventHandler()))->IsEventSelected() & AliVEvent::kMB);
230 isSelected = (((AliInputEventHandler*)(AliAnalysisManager::GetAnalysisManager()->GetInputEventHandler()))->IsEventSelected() & AliVEvent::kINT7);
235 printf("isSelected = %d, fIsMC=%d\n", isSelected, fIsMc);
239 TTree *tree = ((AliInputEventHandler*)(AliAnalysisManager::GetAnalysisManager()->GetInputEventHandler()))->GetTree();
240 TFile *file = (TFile*)tree->GetCurrentFile();
241 TString filename = file->GetName();
242 if(!filename.Contains(fPathStrOpt.Data()))
245 fESD = dynamic_cast<AliESDEvent*>(InputEvent());
247 printf("ERROR: fESD not available\n");
253 printf("fESD is ok\n");
255 AliESDVertex *pv = (AliESDVertex*)fESD->GetPrimaryVertex();
262 fPVtxZ->Fill(pv->GetZ());
263 if(TMath::Abs(pv->GetZ())>15)
266 printf("passed vertex cut\n");
270 fTracks = dynamic_cast<TClonesArray*>(InputEvent()->FindListObject("Tracks"));
272 AliError("Track array in event is NULL!");
275 // Track loop to fill a pT spectrum
276 const Int_t Ntracks = fTracks->GetEntriesFast();
277 for (Int_t iTracks = 0; iTracks < Ntracks; ++iTracks) {
278 // for (Int_t iTracks = 0; iTracks < fESD->GetNumberOfTracks(); iTracks++) {
279 //AliESDtrack* track = (AliESDtrack*)fESD->GetTrack(iTracks);
280 AliVTrack *track = static_cast<AliVTrack*>(fTracks->At(iTracks));
283 if (fPrTrCuts && fPrTrCuts->IsSelected(track)){
284 fSelPrimTracks->Add(track);
285 //printf("pt,eta,phi:%1.1f,%1.1f,%1.1f \n",track->Pt(),track->Eta(), track->Phi());
290 for(Int_t mod=0; mod < (fGeom->GetEMCGeometry())->GetNumberOfSuperModules(); mod++){
291 if(fGeoName=="EMCAL_FIRSTYEARV1" && mod>3)
293 fGeom->SetMisalMatrix(fESD->GetEMCALMatrix(mod), mod);
296 AliESDtrackCuts *fTrackCuts = new AliESDtrackCuts();
297 fTrackMult = fTrackCuts->GetReferenceMultiplicity(fESD);//kTrackletsITSTPC ,0.5);
298 fTrMultDist->Fill(fTrackMult);
300 fESD->GetEMCALClusters(fCaloClusters);
301 fEMCalCells = fESD->GetEMCALCells();
305 fMCEvent = MCEvent();
308 std::cout<<"MCevent exists\n";
309 fStack = (AliStack*)fMCEvent->Stack();
313 std::cout<<"ERROR: NO MC EVENT!!!!!!\n";
317 printf("passed calling of FollowGamma\n");
320 printf("passed calling of FillClusHists\n");
323 printf("passed calling of FillMcHists\n");
325 fCaloClusters->Clear();
326 fSelPrimTracks->Clear();
329 PostData(1, fOutputList);
332 //________________________________________________________________________
333 void AliAnalysisTaskEMCALIsoPhoton::FillClusHists()
335 // Fill cluster histograms.
339 const Int_t nclus = fCaloClusters->GetEntries();
343 printf("Inside FillClusHists and there are %d clusters\n",nclus);
347 for(Int_t ic=0;ic<nclus;ic++){
349 AliESDCaloCluster *c = static_cast<AliESDCaloCluster*>(fCaloClusters->At(ic));
357 Double_t Emax = GetMaxCellEnergy( c, id);
358 Double_t Ecross = GetCrossEnergy( c, id);
359 if((1-Ecross/Emax)>fExoticCut)
361 Float_t clsPos[3] = {0,0,0};
362 c->GetPosition(clsPos);
363 TVector3 clsVec(clsPos);
364 Double_t Et = c->E()*TMath::Sin(clsVec.Theta());
366 printf("\tcluster eta=%1.1f,phi=%1.1f,E=%1.1f\n",clsVec.Eta(),clsVec.Phi(),c->E());
369 Float_t ceiso, cephiband, cecore;
370 Float_t triso, trphiband, trcore;
371 Float_t alliso, allphiband, allcore;
372 Float_t phibandArea = (1.4 - 2*fIsoConeR)*2*fIsoConeR;
373 Float_t netConeArea = TMath::Pi()*(fIsoConeR*fIsoConeR - 0.04*0.04);
374 GetCeIso(clsVec, ceiso, cephiband, cecore);
375 GetTrIso(clsVec, triso, trphiband, trcore);
376 Double_t dr = TMath::Sqrt(c->GetTrackDx()*c->GetTrackDx() + c->GetTrackDz()*c->GetTrackDz());
377 if(Et>10 && Et<15 && dr>0.025){
378 fHigherPtConeM02->Fill(fHigherPtCone,c->GetM02());
380 printf("\t\tHigher track pt inside the cone: %1.1f GeV/c; M02=%1.2f\n",fHigherPtCone,c->GetM02());
382 alliso = ceiso + triso;
383 allphiband = cephiband + trphiband;
384 allcore = cecore + trcore;
385 Float_t ceisoue = cephiband/phibandArea*netConeArea;
386 Float_t trisoue = trphiband/phibandArea*netConeArea;
387 Float_t allisoue = allphiband/phibandArea*netConeArea;
388 const Int_t ndims = fNDimensions;
389 Double_t outputValues[ndims];
390 ptmc = GetClusSource(c);
391 outputValues[0] = Et;
392 outputValues[1] = c->GetM02();
393 outputValues[2] = ceiso-cecore-ceisoue;
394 outputValues[3] = triso-trisoue;
395 outputValues[4] = alliso-cecore-allisoue;
396 outputValues[5] = ceiso-Et;
397 outputValues[6] = alliso-Et;
398 outputValues[7] = c->GetTrackDx();
399 outputValues[8] = c->GetTrackDz();
400 outputValues[9] = clsVec.Eta();
401 outputValues[10] = clsVec.Phi();
402 outputValues[11] = fEMCalCells->GetCellTime(id);
403 outputValues[12] = fTrackMult;
404 outputValues[13] = ptmc;
405 fHnOutput->Fill(outputValues);
409 fNClusHighClusE->Fill(maxE,nclus);
410 fNClusEt10->Fill(nclus10);
411 fNClusPerPho->Fill(fDirPhoPt,fNClusForDirPho);
414 //________________________________________________________________________
415 void AliAnalysisTaskEMCALIsoPhoton::GetCeIso(TVector3 vec, Float_t &iso, Float_t &phiband, Float_t &core)
417 // Get cell isolation.
421 const Int_t ncells = fEMCalCells->GetNumberOfCells();
425 Float_t etacl = vec.Eta();
426 Float_t phicl = vec.Phi();
427 Float_t thetacl = vec.Theta();
429 phicl+=TMath::TwoPi();
431 Float_t eta=-1, phi=-1;
432 for(int icell=0;icell<ncells;icell++){
433 absid = TMath::Abs(fEMCalCells->GetCellNumber(icell));
434 Float_t celltime = fEMCalCells->GetCellTime(absid);
435 if(celltime>2e-8 || celltime<-2e-8)
439 fGeom->EtaPhiFromIndex(absid,eta,phi);
440 Float_t dphi = TMath::Abs(phi-phicl);
441 Float_t deta = TMath::Abs(eta-etacl);
442 Float_t R = TMath::Sqrt(deta*deta + dphi*dphi);
443 Float_t etcell = fEMCalCells->GetCellAmplitude(absid)*TMath::Sin(thetacl);
454 totband += fEMCalCells->GetCellAmplitude(absid)*TMath::Sin(thetacl);
462 //________________________________________________________________________
463 void AliAnalysisTaskEMCALIsoPhoton::GetTrIso(TVector3 vec, Float_t &iso, Float_t &phiband, Float_t &core)
465 // Get track isolation.
470 const Int_t ntracks = fSelPrimTracks->GetEntries();
474 Double_t etacl = vec.Eta();
475 Double_t phicl = vec.Phi();
477 phicl+=TMath::TwoPi();
478 for(int itrack=0;itrack<ntracks;itrack++){
479 AliVTrack *track = static_cast<AliVTrack*> (fSelPrimTracks->At(itrack));
482 Double_t dphi = TMath::Abs(track->Phi()-phicl);
483 Double_t deta = TMath::Abs(track->Eta()-etacl);
484 Double_t R = TMath::Sqrt(deta*deta + dphi*dphi);
485 Double_t pt = track->Pt();
489 totiso += track->Pt();
498 totband += track->Pt();
506 //________________________________________________________________________
507 Double_t AliAnalysisTaskEMCALIsoPhoton::GetCrossEnergy(const AliVCluster *cluster, Short_t &idmax)
509 // Calculate the energy of cross cells around the leading cell.
511 AliVCaloCells *cells = 0;
512 cells = fESD->GetEMCALCells();
528 Double_t crossEnergy = 0;
530 fGeom->GetCellIndex(idmax,iSupMod,iTower,iIphi,iIeta);
531 fGeom->GetCellPhiEtaIndexInSModule(iSupMod,iTower,iIphi, iIeta,iphis,ietas);
533 Int_t ncells = cluster->GetNCells();
534 for (Int_t i=0; i<ncells; i++) {
535 Int_t cellAbsId = cluster->GetCellAbsId(i);
536 fGeom->GetCellIndex(cellAbsId,iSupMod,iTower,iIphi,iIeta);
537 fGeom->GetCellPhiEtaIndexInSModule(iSupMod,iTower,iIphi, iIeta,iphi,ieta);
538 Int_t aphidiff = TMath::Abs(iphi-iphis);
541 Int_t aetadiff = TMath::Abs(ieta-ietas);
544 if ( (aphidiff==1 && aetadiff==0) ||
545 (aphidiff==0 && aetadiff==1) ) {
546 crossEnergy += cells->GetCellAmplitude(cellAbsId);
553 //________________________________________________________________________
554 Double_t AliAnalysisTaskEMCALIsoPhoton ::GetMaxCellEnergy(const AliVCluster *cluster, Short_t &id) const
556 // Get maximum energy of attached cell.
560 AliVCaloCells *cells = 0;
561 cells = fESD->GetEMCALCells();
566 Int_t ncells = cluster->GetNCells();
567 for (Int_t i=0; i<ncells; i++) {
568 Double_t e = cells->GetCellAmplitude(TMath::Abs(cluster->GetCellAbsId(i)));
571 id = cluster->GetCellAbsId(i);
577 //________________________________________________________________________
578 void AliAnalysisTaskEMCALIsoPhoton ::FillMcHists()
582 Int_t nTracks = fStack->GetNtrack();
584 printf("Inside FillMcHists and there are %d mcparts\n",nTracks);
585 for(Int_t iTrack=0;iTrack<nTracks;iTrack++){
586 TParticle *mcp = static_cast<TParticle*>(fStack->Particle(iTrack));
589 Int_t pdg = mcp->GetPdgCode();
592 if(TMath::Abs(mcp->Eta())>0.7 ||mcp->Phi()<1.4 || mcp->Phi()>3.2)
594 Int_t imom = mcp->GetMother(0);
595 if(imom<0 || imom>nTracks)
597 TParticle *mcmom = static_cast<TParticle*>(fStack->Particle(imom));
600 Int_t pdgMom = mcmom->GetPdgCode();
601 if((imom==6 || imom==7) && pdgMom==22) {
602 fMCDirPhotonPtEtaPhi->Fill(mcp->Pt(),mcp->Eta(),mcp->Phi());
603 if(fNClusForDirPho==0)
604 fMCDirPhotonPtEtaPhiNoClus->Fill(mcp->Pt(),mcp->Eta(),mcp->Phi());
606 printf("Found \"photonic\" parton at position %d, with pt=%1.1f, eta=%1.1f and phi=%1.1f, and status=%d,\n",imom,mcmom->Pt(), mcmom->Eta(), mcmom->Phi(), mcmom->GetStatusCode());
607 printf("with a final photon at position %d, with pt=%1.1f, eta=%1.1f and phi=%1.1f, and status=%d\n",iTrack,mcp->Pt(), mcp->Eta(), mcp->Phi(),mcp->GetStatusCode());
611 if(TMath::Abs(pdgMom)>100 && TMath::Abs(pdgMom)<1000)
612 fDecayPhotonPtMC->Fill(mcp->Pt());
616 //________________________________________________________________________
617 Float_t AliAnalysisTaskEMCALIsoPhoton::GetClusSource(const AliVCluster *c)
623 Int_t nmcp = fStack->GetNtrack();
624 Int_t clabel = c->GetLabel();
625 if(fDebug && fMcIdFamily.Contains(Form("%d",clabel)))
626 printf("\n\t ==== Label %d is a descendent of the prompt photon ====\n\n",clabel);
627 if(!fMcIdFamily.Contains(Form("%d",clabel)))
630 TString partonposstr = (TSubString)fMcIdFamily.operator()(0,1);
631 Int_t partonpos = partonposstr.Atoi();
633 printf("\t^^^^ parton position = %d ^^^^\n",partonpos);
634 if(clabel<0 || clabel>nmcp)
636 Float_t clsPos[3] = {0,0,0};
637 c->GetPosition(clsPos);
638 TVector3 clsVec(clsPos);
639 Double_t Et = c->E()*TMath::Sin(clsVec.Theta());
640 TParticle *mcp = static_cast<TParticle*>(fStack->Particle(partonpos));
644 printf("\tclus mc truth eta=%1.1f,phi=%1.1f,E=%1.1f, pdgcode=%d, stackpos=%d\n",mcp->Eta(),mcp->Phi(),mcp->Energy(),mcp->GetPdgCode(),clabel);
646 Int_t lab1 = mcp->GetFirstDaughter();
647 if(lab1<0 || lab1>nmcp)
649 TParticle *mcd = static_cast<TParticle*>(fStack->Particle(lab1));
653 printf("\t\tmom mc truth eta=%1.1f,phi=%1.1f,E=%1.1f, pdgcode=%d, stackpos=%d\n",mcd->Eta(),mcd->Phi(),mcd->Energy(),mcd->GetPdgCode(),lab1);
654 if(mcd->GetPdgCode()==22){
655 fClusEtMcPt->Fill(mcd->Pt(), Et);
656 fClusMcDetaDphi->Fill(clsVec.Eta() - mcd->Eta(), clsVec.Phi() - mcd->Phi());
659 printf("Warning: daughter of photon parton is not a photon\n");
664 //________________________________________________________________________
665 void AliAnalysisTaskEMCALIsoPhoton::FollowGamma()
670 TParticle *mcp = static_cast<TParticle*>(fStack->Particle(selfid));
673 if(mcp->GetPdgCode()!=22){
674 mcp = static_cast<TParticle*>(fStack->Particle(++selfid));
678 Int_t daug0f = mcp->GetFirstDaughter();
679 Int_t daug0l = mcp->GetLastDaughter();
680 Int_t nd0 = daug0l - daug0f;
682 printf("\n\tGenerated gamma (%d) eta=%1.1f,phi=%1.1f,E=%1.1f, pdgcode=%d, n-daug=%d\n",selfid,mcp->Eta(),mcp->Phi(),mcp->Energy(),mcp->GetPdgCode(),nd0+1);
683 fMcIdFamily = Form("%d,",selfid);
684 GetDaughtersInfo(daug0f,daug0l, selfid,"");
686 printf("\t---- end of the prompt gamma's family tree ----\n\n");
687 printf("Family id string = %s,\n\n",fMcIdFamily.Data());
689 TParticle *md = static_cast<TParticle*>(fStack->Particle(daug0f));
692 fDirPhoPt = md->Pt();
694 //________________________________________________________________________
695 void AliAnalysisTaskEMCALIsoPhoton::GetDaughtersInfo(int firstd, int lastd, int selfid, const char *inputind)
697 int nmcp = fStack->GetNtrack();
698 if(firstd<0 || firstd>nmcp)
700 if(lastd<0 || lastd>nmcp)
703 printf("WARNING: First daughter > last (%d,%d)\n",firstd,lastd);
706 TString indenter = Form("\t%s",inputind);
709 printf("\t%s--- Daughters of particle %d ---\n", indenter.Data(), selfid);
710 for(int id=firstd; id<lastd+1; id++){
711 dp = static_cast<TParticle*>(fStack->Particle(id));
714 Int_t dfd = dp->GetFirstDaughter();
715 Int_t dld = dp->GetLastDaughter();
716 Int_t dnd = dld - dfd + 1;
717 Float_t vr = TMath::Sqrt(dp->Vx()*dp->Vx()+dp->Vy()*dp->Vy());
719 printf("\t%sParticle daughter(%d) eta=%1.1f,phi=%1.1f,E=%1.1f, vR=%1.1f, pdgcode=%d, n-daug=%d(%d,%d)\n", indenter.Data(),id, dp->Eta(), dp->Phi(), dp->Energy(), vr, dp->GetPdgCode(), dnd, dfd, dld);
720 fMcIdFamily += Form("%d,",id);
721 GetDaughtersInfo(dfd,dld,id,indenter.Data());
724 //________________________________________________________________________
725 void AliAnalysisTaskEMCALIsoPhoton::Terminate(Option_t *)
727 // Called once at the end of the query.