]> git.uio.no Git - u/mrichter/AliRoot.git/commitdiff
put different cluster parameters (time, n cells, n SM) in the AOD particle, recover...
authorgconesab <gustavo.conesa.balbastre@cern.ch>
Tue, 28 Oct 2014 15:26:05 +0000 (16:26 +0100)
committermivanov <marian.ivanov@cern.ch>
Tue, 28 Oct 2014 21:32:49 +0000 (22:32 +0100)
PWGGA/CaloTrackCorrelations/AliAnaElectron.cxx
PWGGA/CaloTrackCorrelations/AliAnaParticleIsolation.cxx
PWGGA/CaloTrackCorrelations/AliAnaParticleIsolation.h
PWGGA/CaloTrackCorrelations/AliAnaParticleJetFinderCorrelation.cxx
PWGGA/CaloTrackCorrelations/AliAnaPhoton.cxx
PWGGA/CaloTrackCorrelations/AliAnaPi0.cxx
PWGGA/CaloTrackCorrelations/AliAnaPi0.h
PWGGA/CaloTrackCorrelations/AliAnaPi0EbE.cxx
PWGGA/CaloTrackCorrelations/AliAnaRandomTrigger.cxx
PWGGA/CaloTrackCorrelations/macros/AddTaskCaloTrackCorr.C

index 4bdc166575b8871a6547e2fc20985bfad53cfa58..e7008ac2fdab6cbcfc9777a3998ad2d7448cf379 100755 (executable)
@@ -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
index aa4af4996c8552915e8580148baafcc2b6435c7b..33ceadf4ad91af0443c9ce6ac8bfbfe7d573801b 100755 (executable)
@@ -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
index 286f850a96aef0abb16a095b7b299eaf7549921a..c576152cc4593774d7dd71694c053ef0e530963d 100755 (executable)
@@ -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();
  
index 836f2d0fe2022a2ec3ddfea21dcaeefb649471bb..a6a609662fc51712ac26c6dcbb1f9d4e378a07bc 100644 (file)
@@ -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; //<<hardcoded here //FIXME
       if( TMath::Sqrt((particlecorr->Eta()-particlecorr2->Eta())*(particlecorr->Eta()-particlecorr2->Eta()) +
                       (particlecorr->Phi()-particlecorr2->Phi())*(particlecorr->Phi()-particlecorr2->Phi()) )<fGammaConeSize ){//if(/*cone is correct*/){
@@ -1660,12 +1671,15 @@ void  AliAnaParticleJetFinderCorrelation::MakeAnalysisFillHistograms()
     //
     //Fill Correlation Histograms
     //
-    clusterID = particlecorr->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 <clusters->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()<GetMinPt()) continue; //<<hardcoded here //FIXME 0.5 check if correct
@@ -1739,7 +1753,7 @@ void  AliAnaParticleJetFinderCorrelation::MakeAnalysisFillHistograms()
           fGamNclusters++;
         }
       }
-    }
+//    }
     
     //sum pt of charged tracks in the gamma isolation cone
     //starts here
index 6068fb46c6afad2f973f034155be15e389c672e8..41def4aa60950a5d5db463349feea6dd8d7e95a9 100755 (executable)
@@ -2371,7 +2371,11 @@ void  AliAnaPhoton::MakeAnalysisFillAOD()
     
     aodph.SetM02(calo->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);
index 7002617aee5a3f71eac417795cea53954948937d..3dd18bed2dc72d12d418eb04d0c7624915d70acf 100755 (executable)
@@ -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
index 9e17c54dce021a629201451efe1a3d57f8e6f521..2adee49e78a0bc8ca778e9212ae64babaf2a785e 100755 (executable)
@@ -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
   
index bc8c7e803bf4b7bd3a92caae8080cf4aadf94bdd..ebddf0bd4697329873ce031461a956da2b56adab 100755 (executable)
@@ -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
index 9199be2cc6786386398f11aed2a79be6d1591fc5..059a49d3353fd79c5676522fc67a43a7973d8f18 100755 (executable)
@@ -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);
   }
index f577450b48cfeab4336825d059039a146d92f447..f00cc1905f428957f081ca569a1a2eb98fe3dedb 100644 (file)
@@ -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.);