From 515f302fe76e025e32f4e53a43203475ec0eefa6 Mon Sep 17 00:00:00 2001 From: gconesab Date: Tue, 28 Oct 2014 16:26:05 +0100 Subject: [PATCH] put different cluster parameters (time, n cells, n SM) in the AOD particle, recover it in different analysis task --- .../CaloTrackCorrelations/AliAnaElectron.cxx | 4 + .../AliAnaParticleIsolation.cxx | 46 ++--- .../AliAnaParticleIsolation.h | 2 +- .../AliAnaParticleJetFinderCorrelation.cxx | 160 ++++++++++-------- PWGGA/CaloTrackCorrelations/AliAnaPhoton.cxx | 7 +- PWGGA/CaloTrackCorrelations/AliAnaPi0.cxx | 124 ++++++++------ PWGGA/CaloTrackCorrelations/AliAnaPi0.h | 2 + PWGGA/CaloTrackCorrelations/AliAnaPi0EbE.cxx | 7 +- .../AliAnaRandomTrigger.cxx | 5 +- .../macros/AddTaskCaloTrackCorr.C | 2 +- 10 files changed, 205 insertions(+), 154 deletions(-) diff --git a/PWGGA/CaloTrackCorrelations/AliAnaElectron.cxx b/PWGGA/CaloTrackCorrelations/AliAnaElectron.cxx index 4bdc166575b..e7008ac2fda 100755 --- a/PWGGA/CaloTrackCorrelations/AliAnaElectron.cxx +++ b/PWGGA/CaloTrackCorrelations/AliAnaElectron.cxx @@ -1360,6 +1360,10 @@ void AliAnaElectron::MakeAnalysisFillAOD() aodpart.SetM02(calo->GetM02()); aodpart.SetNLM(nMaxima); + aodpart.SetTime(calo->GetTOF()*1e9); + aodpart.SetNCells(calo->GetNCells()); + Int_t nSM = GetModuleNumber(calo); + aodpart.SetSModNumber(nSM); //............................................... //Set bad channel distance bit diff --git a/PWGGA/CaloTrackCorrelations/AliAnaParticleIsolation.cxx b/PWGGA/CaloTrackCorrelations/AliAnaParticleIsolation.cxx index aa4af4996c8..33ceadf4ad9 100755 --- a/PWGGA/CaloTrackCorrelations/AliAnaParticleIsolation.cxx +++ b/PWGGA/CaloTrackCorrelations/AliAnaParticleIsolation.cxx @@ -1074,31 +1074,31 @@ void AliAnaParticleIsolation::CalculateTrackSignalInCone(AliAODPWG4ParticleCorre } -//_________________________________________________________________ -void AliAnaParticleIsolation::FillPileUpHistograms(Int_t clusterID) +//_____________________________________________________________________________ +void AliAnaParticleIsolation::FillPileUpHistograms(Float_t energy, Float_t time)//Int_t clusterID) { // Fill some histograms to understand pile-up - if ( clusterID < 0 ) - { - AliWarning(Form("ID of cluster = %d, not possible!", clusterID)); - return; - } - - Int_t iclus = -1; - TObjArray* clusters = 0x0; - if (GetCalorimeter() == kEMCAL) clusters = GetEMCALClusters(); - else if(GetCalorimeter() == kPHOS ) clusters = GetPHOSClusters(); - - Float_t energy = 0; - Float_t time = -1000; - - if(clusters) - { - AliVCluster *cluster = FindCluster(clusters,clusterID,iclus); - energy = cluster->E(); - time = cluster->GetTOF()*1e9; - } +// if ( clusterID < 0 ) +// { +// AliWarning(Form("ID of cluster = %d, not possible!", clusterID)); +// return; +// } + +// Int_t iclus = -1; +// TObjArray* clusters = 0x0; +// if (GetCalorimeter() == kEMCAL) clusters = GetEMCALClusters(); +// else if(GetCalorimeter() == kPHOS ) clusters = GetPHOSClusters(); +// +// Float_t energy = 0; +// Float_t time = -1000; +// +// if(clusters) +// { +// AliVCluster *cluster = FindCluster(clusters,clusterID,iclus); +// energy = cluster->E(); +// time = cluster->GetTOF()*1e9; +// } //printf("E %f, time %f\n",energy,time); AliVEvent * event = GetReader()->GetInputEvent(); @@ -4137,7 +4137,7 @@ void AliAnaParticleIsolation::MakeAnalysisFillHistograms() // Fill histograms to undertand pile-up before other cuts applied // Remember to relax time cuts in the reader - FillPileUpHistograms(aod->GetCaloLabel(0)); + FillPileUpHistograms(energy,aod->GetTime());//aod->GetCaloLabel(0)); } }//Isolated histograms diff --git a/PWGGA/CaloTrackCorrelations/AliAnaParticleIsolation.h b/PWGGA/CaloTrackCorrelations/AliAnaParticleIsolation.h index 286f850a96a..c576152cc45 100755 --- a/PWGGA/CaloTrackCorrelations/AliAnaParticleIsolation.h +++ b/PWGGA/CaloTrackCorrelations/AliAnaParticleIsolation.h @@ -64,7 +64,7 @@ class AliAnaParticleIsolation : public AliAnaCaloTrackCorrBaseClass { //Analysis specific methods - void FillPileUpHistograms(Int_t clusterID) ; + void FillPileUpHistograms(Float_t energy, Float_t time) ; //Int_t clusterID) ; void FillAcceptanceHistograms(); diff --git a/PWGGA/CaloTrackCorrelations/AliAnaParticleJetFinderCorrelation.cxx b/PWGGA/CaloTrackCorrelations/AliAnaParticleJetFinderCorrelation.cxx index 836f2d0fe20..a6a609662fc 100644 --- a/PWGGA/CaloTrackCorrelations/AliAnaParticleJetFinderCorrelation.cxx +++ b/PWGGA/CaloTrackCorrelations/AliAnaParticleJetFinderCorrelation.cxx @@ -916,16 +916,18 @@ Int_t AliAnaParticleJetFinderCorrelation::SelectJet(AliAODPWG4Particle * partic Double_t particlePt=particle->Pt(); if(fUseBackgroundSubtractionGamma) { - Int_t clusterIDtmp = particle->GetCaloLabel(0) ; - Int_t nCells=0; - AliVCluster *cluster=0; - if(!(clusterIDtmp<0) ){ - Int_t iclustmp = -1; - TObjArray* clusters = GetEMCALClusters(); - cluster = FindCluster(clusters,clusterIDtmp,iclustmp); - nCells = cluster->GetNCells(); - } - particlePt-=(fGamRho*nCells); + particlePt-=(fGamRho*particle->GetNCells()); + +// Int_t clusterIDtmp = particle->GetCaloLabel(0) ; +// Int_t nCells=0; +// AliVCluster *cluster=0; +// if(!(clusterIDtmp<0) ){ +// Int_t iclustmp = -1; +// TObjArray* clusters = GetEMCALClusters(); +// cluster = FindCluster(clusters,clusterIDtmp,iclustmp); +// nCells = cluster->GetNCells(); +// } +// particlePt-=(fGamRho*nCells); } if(particlePt<=0) { //printf("Particle with negative or 0 pt\n"); @@ -1094,10 +1096,10 @@ void AliAnaParticleJetFinderCorrelation::MakeAnalysisFillAOD() //calculate average cell energy without most energetic photon // Double_t medianPhotonRho=0.; - TObjArray* clusters = GetEMCALClusters(); - Int_t clusterIDtmp; - Int_t iclustmp = -1; - AliVCluster *cluster=0; + //TObjArray* clusters = GetEMCALClusters(); + //Int_t clusterIDtmp; + //Int_t iclustmp = -1; + //AliVCluster *cluster=0; if(IsBackgroundSubtractionGamma()){ // @@ -1124,11 +1126,14 @@ void AliAnaParticleJetFinderCorrelation::MakeAnalysisFillAOD() for(Int_t iaod = 0; iaod < ntrig ; iaod++){ particlecorr = (AliAODPWG4ParticleCorrelation*) (GetInputAODBranch()->At(iaod)); if(iaod==maxIndex) continue; - clusterIDtmp = particlecorr->GetCaloLabel(0) ; - if(clusterIDtmp < 0) continue; - cluster = FindCluster(clusters,clusterIDtmp,iclustmp); - photonRhoArr[photonRhoArrayIndex]=particlecorr->Pt()/ cluster->GetNCells(); - numberOfcells+=cluster->GetNCells(); +// clusterIDtmp = particlecorr->GetCaloLabel(0) ; +// if(clusterIDtmp < 0) continue; +// cluster = FindCluster(clusters,clusterIDtmp,iclustmp); +// photonRhoArr[photonRhoArrayIndex]=particlecorr->Pt()/ cluster->GetNCells(); +// numberOfcells+=cluster->GetNCells(); + photonRhoArr[photonRhoArrayIndex]=particlecorr->Pt()/ particlecorr->GetNCells(); + numberOfcells+=particlecorr->GetNCells(); + photonRhoArrayIndex++; } if(photonRhoArrayIndex>0) medianPhotonRho=TMath::Median(photonRhoArrayIndex,photonRhoArr); @@ -1149,15 +1154,17 @@ void AliAnaParticleJetFinderCorrelation::MakeAnalysisFillAOD() Int_t indexMostEnePhoton=-1; AliAODPWG4ParticleCorrelation* particle =0; Double_t ptCorrect=0.; - Int_t nCells=0; +// Int_t nCells=0; for(Int_t iaod = 0; iaod < ntrig ; iaod++){ particle = (AliAODPWG4ParticleCorrelation*) (GetInputAODBranch()->At(iaod)); - clusterIDtmp = particle->GetCaloLabel(0) ; - if(!(clusterIDtmp<0)){ - cluster = FindCluster(clusters,clusterIDtmp,iclustmp); - nCells = cluster->GetNCells(); - } - ptCorrect = particle->Pt() - medianPhotonRho * nCells; +// clusterIDtmp = particle->GetCaloLabel(0) ; +// if(!(clusterIDtmp<0)){ +// cluster = FindCluster(clusters,clusterIDtmp,iclustmp); +// nCells = cluster->GetNCells(); +// } +// ptCorrect = particle->Pt() - medianPhotonRho * nCells; + ptCorrect = particle->Pt() - medianPhotonRho * particle->GetNCells(); + if( ptCorrect > mostEnePhotonPt ){ mostEnePhotonPt = ptCorrect; indexMostEnePhoton = iaod ; @@ -1491,13 +1498,13 @@ void AliAnaParticleJetFinderCorrelation::MakeAnalysisFillHistograms() } fGamAvEne=0; - TObjArray* clusters = GetEMCALClusters(); + //TObjArray* clusters = GetEMCALClusters(); //printf("calculate median bkg energy for photons "); Double_t medianPhotonRho=0.; - Int_t clusterID; - Int_t iclustmp = -1; + //Int_t clusterID; + //Int_t iclustmp = -1; Int_t numberOfcells=0; - AliVCluster *cluster = 0; + //AliVCluster *cluster = 0; if(ntrig>1){ Double_t *photonRhoArr=new Double_t[ntrig-1]; fhPhotonPtMostEne->Fill(maxPt); @@ -1519,11 +1526,13 @@ void AliAnaParticleJetFinderCorrelation::MakeAnalysisFillHistograms() if( particlecorr->Pt() > (sumPt-maxPt)/(ntrig-1) ) counterGammaMinus1++; if(iaod==maxIndex) continue; - clusterID = particlecorr->GetCaloLabel(0) ; - if(clusterID < 0) continue; - cluster = FindCluster(clusters,clusterID,iclustmp); - photonRhoArr[photonRhoArrayIndex]=particlecorr->Pt()/ cluster->GetNCells(); - numberOfcells+=cluster->GetNCells(); +// clusterID = particlecorr->GetCaloLabel(0) ; +// if(clusterID < 0) continue; +// cluster = FindCluster(clusters,clusterID,iclustmp); +// photonRhoArr[photonRhoArrayIndex]=particlecorr->Pt()/ cluster->GetNCells(); +// numberOfcells+=cluster->GetNCells(); + photonRhoArr[photonRhoArrayIndex]=particlecorr->Pt()/ particlecorr->GetNCells(); + numberOfcells+=particlecorr->GetNCells(); photonRhoArrayIndex++; } if(photonRhoArrayIndex>0) medianPhotonRho=TMath::Median(photonRhoArrayIndex,photonRhoArr); @@ -1538,7 +1547,7 @@ void AliAnaParticleJetFinderCorrelation::MakeAnalysisFillHistograms() fhPhotonBkgRhoVsNcells->Fill(numberOfcells,medianPhotonRho); - AliVCluster *cluster2 = 0; + //AliVCluster *cluster2 = 0; Double_t photon2Corrected=0; Double_t sumPtTmp=0.; Double_t sumPtCorrectTmp=0.; @@ -1547,18 +1556,19 @@ void AliAnaParticleJetFinderCorrelation::MakeAnalysisFillHistograms() for(Int_t iaod = 0; iaod < ntrig ; iaod++){ AliAODPWG4ParticleCorrelation* particlecorr = (AliAODPWG4ParticleCorrelation*) (GetInputAODBranch()->At(iaod)); - clusterID = particlecorr->GetCaloLabel(0) ; - if(clusterID < 0) continue; - cluster = FindCluster(clusters,clusterID,iclustmp); +// clusterID = particlecorr->GetCaloLabel(0) ; +// if(clusterID < 0) continue; +// cluster = FindCluster(clusters,clusterID,iclustmp); +// Int_t ncells = cluster->GetNCells(); + Int_t ncells = particlecorr->GetNCells(); fhPhotonPt->Fill(particlecorr->Pt()); - fhPhotonPtCorrected->Fill(particlecorr->Pt() - cluster->GetNCells() * medianPhotonRho); - fhPhotonPtDiff->Fill(cluster->GetNCells() * medianPhotonRho); - fhPhotonPtDiffVsCentrality->Fill(GetEventCentrality(),cluster->GetNCells() * medianPhotonRho); - fhPhotonPtDiffVsNcells->Fill(numberOfcells,cluster->GetNCells() * medianPhotonRho); - fhPhotonPtDiffVsNtracks->Fill(GetCTSTracks()->GetEntriesFast(),cluster->GetNCells() * medianPhotonRho); - fhPhotonPtDiffVsNclusters->Fill(ntrig,cluster->GetNCells() * medianPhotonRho); - - fhPhotonPtCorrectedZoom->Fill(particlecorr->Pt() - cluster->GetNCells() * medianPhotonRho); + fhPhotonPtCorrected->Fill(particlecorr->Pt() - ncells * medianPhotonRho); + fhPhotonPtDiff->Fill(ncells * medianPhotonRho); + fhPhotonPtDiffVsCentrality->Fill(GetEventCentrality(),ncells * medianPhotonRho); + fhPhotonPtDiffVsNcells->Fill(numberOfcells,ncells * medianPhotonRho); + fhPhotonPtDiffVsNtracks->Fill(GetCTSTracks()->GetEntriesFast(),ncells * medianPhotonRho); + fhPhotonPtDiffVsNclusters->Fill(ntrig,ncells * medianPhotonRho); + fhPhotonPtCorrectedZoom->Fill(particlecorr->Pt() - ncells * medianPhotonRho); //test: sum_pt in the cone 0.3 for each photon //should be: random fake gamma from MB @@ -1569,11 +1579,12 @@ void AliAnaParticleJetFinderCorrelation::MakeAnalysisFillHistograms() for(Int_t iaod2 = 0; iaod2 < ntrig ; iaod2++){ if(iaod==iaod2) continue; AliAODPWG4ParticleCorrelation* particlecorr2 = (AliAODPWG4ParticleCorrelation*) (GetInputAODBranch()->At(iaod2)); - clusterID = particlecorr2->GetCaloLabel(0) ; - if(clusterID < 0) continue; - cluster2 = FindCluster(clusters,clusterID,iclustmp); - photon2Corrected = particlecorr2->Pt() - cluster2->GetNCells() * medianPhotonRho; - +// clusterID = particlecorr2->GetCaloLabel(0) ; +// if(clusterID < 0) continue; +// cluster2 = FindCluster(clusters,clusterID,iclustmp); +// photon2Corrected = particlecorr2->Pt() - cluster2->GetNCells() * medianPhotonRho; + photon2Corrected = particlecorr2->Pt() - particlecorr2->GetNCells() * medianPhotonRho; + //if(Pt()<0.5) continue; //<Eta()-particlecorr2->Eta())*(particlecorr->Eta()-particlecorr2->Eta()) + (particlecorr->Phi()-particlecorr2->Phi())*(particlecorr->Phi()-particlecorr2->Phi()) )GetCaloLabel(0) ; - if(!(clusterID<0)){ - cluster = FindCluster(clusters,clusterID,iclustmp); - //fill tree variables - fGamNcells = cluster->GetNCells(); - } +// clusterID = particlecorr->GetCaloLabel(0) ; +// if(!(clusterID<0)){ +// cluster = FindCluster(clusters,clusterID,iclustmp); +// //fill tree variables +// fGamNcells = cluster->GetNCells(); +// } + + fGamNcells = particlecorr->GetNCells(); + Double_t ptTrig = particlecorr->Pt() - medianPhotonRho * fGamNcells;//<<---changed here Double_t ptJet = jet->Pt() - rhoEvent * jet->EffectiveAreaCharged();//<<---changed here Double_t phiTrig = particlecorr->Phi(); @@ -1696,24 +1710,24 @@ void AliAnaParticleJetFinderCorrelation::MakeAnalysisFillHistograms() fhSelectedNtracks->Fill(GetCTSTracks()->GetEntriesFast());//to be checked fhSelectedPhotonNLMVsPt->Fill(ptTrig,particlecorr->GetNLM()); - - if(clusterID < 0 ){ - fhSelectedPhotonLambda0VsPt->Fill(ptTrig,-1); - //fill tree variables - fGamLambda0 = -1; - fGamTime = -1; - fGamNcells = 0; - fGamSumPtNeu=0; - } - else{ +// if(clusterID < 0 ){ +// fhSelectedPhotonLambda0VsPt->Fill(ptTrig,-1); +// //fill tree variables +// fGamLambda0 = -1; +// fGamTime = -1; +// fGamNcells = 0; +// fGamSumPtNeu=0; +// } +// else +// { //Int_t iclus = -1; - // TObjArray* clusters = GetEMCALClusters(); + TObjArray* clusters = GetEMCALClusters(); //cluster = FindCluster(clusters,clusterID,iclustmp); - Double_t lambda0=cluster->GetM02(); + Double_t lambda0=particlecorr->GetM02(); fhSelectedPhotonLambda0VsPt->Fill(ptTrig,lambda0); //fill tree variables fGamLambda0 = lambda0; - fGamTime = cluster->GetTOF(); + fGamTime = particlecorr->GetTime(); //fGamNcells = cluster->GetNCells(); fGamSumPtNeu=0; @@ -1723,7 +1737,7 @@ void AliAnaParticleJetFinderCorrelation::MakeAnalysisFillHistograms() //Double_t vectorLength=particlecorr->P(); for(Int_t icalo=0; icalo GetEntriesFast(); icalo++){ AliVCluster* calo = (AliVCluster *) clusters->At(icalo); - if(clusterID==calo->GetID()) continue;//the same cluster as trigger + //if(clusterID==calo->GetID()) continue;//the same cluster as trigger calo->GetMomentum(fMomentum,vertex) ;//Assume that come from vertex in straight line //printf("min pt %f\n",GetMinPt()); if(fMomentum.Pt()GetM02()); aodph.SetNLM(nMaxima); - + aodph.SetTime(calo->GetTOF()*1e9); + aodph.SetNCells(calo->GetNCells()); + Int_t nSM = GetModuleNumber(calo); + aodph.SetSModNumber(nSM); + //------------------------------------- // PID selection or bit setting //------------------------------------- @@ -2409,7 +2413,6 @@ void AliAnaPhoton::MakeAnalysisFillAOD() fhClusterCutsE [9]->Fill(calo->E()); fhClusterCutsPt[9]->Fill(fMomentum.Pt()); - Int_t nSM = GetModuleNumber(calo); if(nSM < GetCaloUtils()->GetNumberOfSuperModulesUsed() && nSM >=0) { fhEPhotonSM ->Fill(fMomentum.E (),nSM); diff --git a/PWGGA/CaloTrackCorrelations/AliAnaPi0.cxx b/PWGGA/CaloTrackCorrelations/AliAnaPi0.cxx index 7002617aee5..3dd18bed2dc 100755 --- a/PWGGA/CaloTrackCorrelations/AliAnaPi0.cxx +++ b/PWGGA/CaloTrackCorrelations/AliAnaPi0.cxx @@ -113,7 +113,8 @@ fhMCPi0PtOrigin(0x0), fhMCEtaPtOrigin(0x0), fhMCPi0ProdVertex(0), fhMCEtaProdVertex(0), fhPrimPi0ProdVertex(0), fhPrimEtaProdVertex(0), fhReMCFromConversion(0), fhReMCFromNotConversion(0), fhReMCFromMixConversion(0), -fhCosThStarPrimPi0(0), fhCosThStarPrimEta(0)//, +fhCosThStarPrimPi0(0), fhCosThStarPrimEta(0), + fhEPairDiffTime(0) { //Default Ctor @@ -321,7 +322,10 @@ TList * AliAnaPi0::GetCreateOutputObjects() Int_t ntrmbins = GetHistogramRanges()->GetHistoTrackMultiplicityBins(); Int_t ntrmmax = GetHistogramRanges()->GetHistoTrackMultiplicityMax(); Int_t ntrmmin = GetHistogramRanges()->GetHistoTrackMultiplicityMin(); - + Int_t tdbins = GetHistogramRanges()->GetHistoDiffTimeBins() ; + Float_t tdmax = GetHistogramRanges()->GetHistoDiffTimeMax(); + Float_t tdmin = GetHistogramRanges()->GetHistoDiffTimeMin(); + if(fCheckConversion) { fhReConv = new TH2F("hReConv","Real Pair with one recombined conversion ",nptbins,ptmin,ptmax,nmassbins,massmin,massmax) ; @@ -486,6 +490,11 @@ TList * AliAnaPi0::GetCreateOutputObjects() } } + fhEPairDiffTime = new TH2F("hEPairDiffTime","cluster pair time difference vs #it{p}_{T}",nptbins,ptmin,ptmax, tdbins,tdmin,tdmax); + fhEPairDiffTime->SetXTitle("#it{p}_{T,pair} (GeV/#it{c})"); + fhEPairDiffTime->SetYTitle("#Delta t (ns)"); + outputContainer->Add(fhEPairDiffTime); + if(fFillAsymmetryHisto) { fhRePtAsym = new TH2F("hRePtAsym","#it{Asymmetry} vs #it{p}_{T} , for pairs",nptbins,ptmin,ptmax,nasymbins,asymmin,asymmax) ; @@ -1963,9 +1972,9 @@ void AliAnaPi0::MakeAnalysisFillHistograms() } //Get shower shape information of clusters - TObjArray *clusters = 0; - if (GetCalorimeter()==kEMCAL) clusters = GetEMCALClusters(); - else if(GetCalorimeter()==kPHOS ) clusters = GetPHOSClusters() ; +// TObjArray *clusters = 0; +// if (GetCalorimeter()==kEMCAL) clusters = GetEMCALClusters(); +// else if(GetCalorimeter()==kPHOS ) clusters = GetPHOSClusters() ; //--------------------------------- //First loop on photons/clusters @@ -2004,13 +2013,13 @@ void AliAnaPi0::MakeAnalysisFillHistograms() fPhotonMom1.SetPxPyPzE(p1->Px(),p1->Py(),p1->Pz(),p1->E()); //Get (Super)Module number of this cluster - module1 = GetModuleNumber(p1); + module1 = p1->GetSModNumber();// GetModuleNumber(p1); //------------------------------------------ // Recover original cluster - Int_t iclus1 = -1 ; - AliVCluster * cluster1 = FindCluster(clusters,p1->GetCaloLabel(0),iclus1); - if(!cluster1) AliWarning("Cluster1 not found!"); +// Int_t iclus1 = -1 ; +// AliVCluster * cluster1 = FindCluster(clusters,p1->GetCaloLabel(0),iclus1); +// if(!cluster1) AliWarning("Cluster1 not found!"); //--------------------------------- //Second loop on photons/clusters @@ -2029,45 +2038,60 @@ void AliAnaPi0::MakeAnalysisFillHistograms() if (GetMixedEvent() && (evtIndex1 == evtIndex2)) continue ; - //------------------------------------------ - // Recover original cluster - Int_t iclus2 = -1; - AliVCluster * cluster2 = FindCluster(clusters,p2->GetCaloLabel(0),iclus2,iclus1+1); - // start new loop from iclus1+1 to gain some time - if(!cluster2) AliWarning("Cluster2 not found!"); - - // Get the TOF,l0 and ncells from the clusters - Float_t tof1 = -1; - Float_t l01 = -1; - Int_t ncell1 = 0; - if(cluster1) - { - tof1 = cluster1->GetTOF()*1e9; - l01 = cluster1->GetM02(); - ncell1 = cluster1->GetNCells(); - //printf("cluster1: E %2.2f (%2.2f), l0 %2.2f, tof %2.2f\n",cluster1->E(),p1->E(),l01,tof1); - } - //else printf("cluster1 not available: calo label %d / %d, cluster ID %d\n", - // p1->GetCaloLabel(0),(GetReader()->GetInputEvent())->GetNumberOfCaloClusters()-1,cluster1->GetID()); - - Float_t tof2 = -1; - Float_t l02 = -1; - Int_t ncell2 = 0; - if(cluster2) - { - tof2 = cluster2->GetTOF()*1e9; - l02 = cluster2->GetM02(); - ncell2 = cluster2->GetNCells(); - //printf("cluster2: E %2.2f (%2.2f), l0 %2.2f, tof %2.2f\n",cluster2->E(),p2->E(),l02,tof2); - } - //else printf("cluster2 not available: calo label %d / %d, cluster ID %d\n", - // p2->GetCaloLabel(0),(GetReader()->GetInputEvent())->GetNumberOfCaloClusters()-1,cluster2->GetID()); - - if(cluster1 && cluster2) - { - Double_t t12diff = tof1-tof2; - if(TMath::Abs(t12diff) > GetPairTimeCut()) continue; - } +// //------------------------------------------ +// // Recover original cluster +// Int_t iclus2 = -1; +// AliVCluster * cluster2 = FindCluster(clusters,p2->GetCaloLabel(0),iclus2,iclus1+1); +// // start new loop from iclus1+1 to gain some time +// if(!cluster2) AliWarning("Cluster2 not found!"); +// +// // Get the TOF,l0 and ncells from the clusters +// Float_t tof1 = -1; +// Float_t l01 = -1; +// Int_t ncell1 = 0; +// if(cluster1) +// { +// tof1 = cluster1->GetTOF()*1e9; +// l01 = cluster1->GetM02(); +// ncell1 = cluster1->GetNCells(); +// //printf("cluster1: E %2.2f (%2.2f), l0 %2.2f, tof %2.2f\n",cluster1->E(),p1->E(),l01,tof1); +// } +// //else printf("cluster1 not available: calo label %d / %d, cluster ID %d\n", +// // p1->GetCaloLabel(0),(GetReader()->GetInputEvent())->GetNumberOfCaloClusters()-1,cluster1->GetID()); +// +// Float_t tof2 = -1; +// Float_t l02 = -1; +// Int_t ncell2 = 0; +// if(cluster2) +// { +// tof2 = cluster2->GetTOF()*1e9; +// l02 = cluster2->GetM02(); +// ncell2 = cluster2->GetNCells(); +// //printf("cluster2: E %2.2f (%2.2f), l0 %2.2f, tof %2.2f\n",cluster2->E(),p2->E(),l02,tof2); +// } +// //else printf("cluster2 not available: calo label %d / %d, cluster ID %d\n", +// // p2->GetCaloLabel(0),(GetReader()->GetInputEvent())->GetNumberOfCaloClusters()-1,cluster2->GetID()); +// +// if(cluster1 && cluster2) +// { +// Double_t t12diff = tof1-tof2; +// if(TMath::Abs(t12diff) > GetPairTimeCut()) continue; +// } + + Float_t tof1 = p1->GetTime(); + Float_t l01 = p1->GetM02(); + Int_t ncell1 = p1->GetNCells(); + //printf("cluster1: E %2.2f, l0 %2.2f, tof %2.2f\n",p1->E(),l01,tof1); + + Float_t tof2 = p2->GetTime(); + Float_t l02 = p2->GetM02(); + Int_t ncell2 = p2->GetNCells(); + //printf("cluster2: E %2.2f, l0 %2.2f, tof %2.2f\n",p2->E(),l02,tof2); + + Double_t t12diff = tof1-tof2; + fhEPairDiffTime->Fill((fPhotonMom1 + fPhotonMom2).Pt(),t12diff); + if(TMath::Abs(t12diff) > GetPairTimeCut()) continue; + //------------------------------------------ //printf("AliAnaPi0::MakeAnalysisFillHistograms(): Photon 2 Evt %d Vertex : %f,%f,%f\n",evtIndex2, GetVertex(evtIndex2)[0] ,GetVertex(evtIndex2)[1],GetVertex(evtIndex2)[2]); @@ -2076,7 +2100,7 @@ void AliAnaPi0::MakeAnalysisFillHistograms() fPhotonMom2.SetPxPyPzE(p2->Px(),p2->Py(),p2->Pz(),p2->E()); //Get module number - module2 = GetModuleNumber(p2); + module2 = p2->GetSModNumber(); //GetModuleNumber(p2); //--------------------------------- // Get pair kinematics @@ -2152,7 +2176,7 @@ void AliAnaPi0::MakeAnalysisFillHistograms() if(fFillSSCombinations) { if ( l01 > 0.01 && l01 < 0.4 && - l02 > 0.01 && l02 < 0.4 ) fhReSS[0]->Fill(pt,m); // Tight + l02 > 0.01 && l02 < 0.4 ) fhReSS[0]->Fill(pt,m); // Tight else if( l01 > 0.4 && l02 > 0.4 ) fhReSS[1]->Fill(pt,m); // Loose else if( l01 > 0.01 && l01 < 0.4 && l02 > 0.4 ) fhReSS[2]->Fill(pt,m); // Both else if( l02 > 0.01 && l02 < 0.4 && l01 > 0.4 ) fhReSS[2]->Fill(pt,m); // Both diff --git a/PWGGA/CaloTrackCorrelations/AliAnaPi0.h b/PWGGA/CaloTrackCorrelations/AliAnaPi0.h index 9e17c54dce0..2adee49e78a 100755 --- a/PWGGA/CaloTrackCorrelations/AliAnaPi0.h +++ b/PWGGA/CaloTrackCorrelations/AliAnaPi0.h @@ -322,6 +322,8 @@ class AliAnaPi0 : public AliAnaCaloTrackCorrBaseClass { TH2F * fhCosThStarPrimPi0; //! cos(theta*) plots vs E for primary pi0, same as asymmetry ... TH2F * fhCosThStarPrimEta; //! cos(theta*) plots vs E for primary eta, same as asymmetry ... + TH2F * fhEPairDiffTime; //! E pair vs Pair of clusters time difference vs E + AliAnaPi0( const AliAnaPi0 & api0) ; // cpy ctor AliAnaPi0 & operator = (const AliAnaPi0 & api0) ; // cpy assignment diff --git a/PWGGA/CaloTrackCorrelations/AliAnaPi0EbE.cxx b/PWGGA/CaloTrackCorrelations/AliAnaPi0EbE.cxx index bc8c7e803bf..ebddf0bd469 100755 --- a/PWGGA/CaloTrackCorrelations/AliAnaPi0EbE.cxx +++ b/PWGGA/CaloTrackCorrelations/AliAnaPi0EbE.cxx @@ -3646,9 +3646,12 @@ void AliAnaPi0EbE::MakeShowerShapeIdentification() // Check if cluster is pi0 via cluster splitting aodpi0.SetIdentifiedParticleType(idPartType); - // Add number of local maxima to AOD, method name in AOD to be FIXED + aodpi0.SetM02(l0); aodpi0.SetNLM(nMaxima); - + aodpi0.SetTime(tofcluster); + aodpi0.SetNCells(calo->GetNCells()); + aodpi0.SetSModNumber(nSM); + aodpi0.SetTag(tag); //Add AOD with pi0 object to aod branch diff --git a/PWGGA/CaloTrackCorrelations/AliAnaRandomTrigger.cxx b/PWGGA/CaloTrackCorrelations/AliAnaRandomTrigger.cxx index 9199be2cc67..059a49d3353 100755 --- a/PWGGA/CaloTrackCorrelations/AliAnaRandomTrigger.cxx +++ b/PWGGA/CaloTrackCorrelations/AliAnaRandomTrigger.cxx @@ -267,9 +267,10 @@ void AliAnaRandomTrigger::MakeAnalysisFillAOD() AliAODPWG4Particle trigger = AliAODPWG4Particle(fMomentum); trigger.SetDetectorTag(fTriggerDetector); + trigger.SetSModNumber(GetModuleNumber(&trigger)); - AliDebug(1,Form("iRandom %d, Trigger e %2.2f pt %2.2f, phi %2.2f, eta %2.2f", - irandom, trigger.E(), trigger.Pt(), trigger.Phi(), trigger.Eta())); + AliDebug(1,Form("iRandom %d, Trigger e %2.2f pt %2.2f, phi %2.2f, eta %2.2f, SM %d", + irandom, trigger.E(), trigger.Pt(), trigger.Phi(), trigger.Eta(), trigger.GetSModNumber())); AddAODParticle(trigger); } diff --git a/PWGGA/CaloTrackCorrelations/macros/AddTaskCaloTrackCorr.C b/PWGGA/CaloTrackCorrelations/macros/AddTaskCaloTrackCorr.C index f577450b48c..f00cc1905f4 100644 --- a/PWGGA/CaloTrackCorrelations/macros/AddTaskCaloTrackCorr.C +++ b/PWGGA/CaloTrackCorrelations/macros/AddTaskCaloTrackCorr.C @@ -824,7 +824,7 @@ AliAnaRandomTrigger* ConfigureRandomTriggerAnalysis(TString detector = "") ana->SetDebug(kDebug); //10 for lots of messages if(detector=="") detector = kCalorimeter; - ana->SetDetector(detector); + ana->SetTriggerDetector(detector); // selection cuts ana->SetMinPt(4.); -- 2.43.0