]> git.uio.no Git - u/mrichter/AliRoot.git/commitdiff
get the clusters list from default or re-clusterized list when analyzing trigger...
authorgconesab <gconesab@f7af4fe6-9843-0410-8265-dc069ae4e863>
Sun, 9 Jun 2013 10:52:23 +0000 (10:52 +0000)
committergconesab <gconesab@f7af4fe6-9843-0410-8265-dc069ae4e863>
Sun, 9 Jun 2013 10:52:23 +0000 (10:52 +0000)
PWG/CaloTrackCorrBase/AliCaloTrackReader.cxx
PWGGA/CaloTrackCorrelations/AliAnaPhoton.cxx
PWGGA/CaloTrackCorrelations/AliAnaPhoton.h
PWGGA/CaloTrackCorrelations/AliAnaPi0EbE.cxx
PWGGA/CaloTrackCorrelations/AliAnaPi0EbE.h

index ca7b3900075fc07436209d01bdda2e1ade226c8b..999cd1e27de74e82e2d47caf05e31a97f920738f 100755 (executable)
@@ -2009,9 +2009,20 @@ void  AliCaloTrackReader::RejectTriggeredEventsByPileUp(TArrayI patches)
     fIsTriggerEventOutBC = 0;
     return;
   }
+    
+  TClonesArray * clusterList = 0;
+  if      (fInputEvent->FindListObject(fEMCALClustersListName))
+  {
+    clusterList = dynamic_cast<TClonesArray*> (fInputEvent->FindListObject(fEMCALClustersListName));
+  }
+  else if(fOutputEvent)
+  {
+    clusterList = dynamic_cast<TClonesArray*> (fOutputEvent->FindListObject(fEMCALClustersListName));
+  }
   
-  Int_t nclusters  = fInputEvent->GetNumberOfCaloClusters();
-  
+  Int_t nclusters = fInputEvent->GetNumberOfCaloClusters();
+  if(clusterList) nclusters = clusterList->GetEntriesFast();
+
   // simple method, just count how many exotics and how many high energy clusters
   // over the trigger threshold there are
   
@@ -2025,7 +2036,11 @@ void  AliCaloTrackReader::RejectTriggeredEventsByPileUp(TArrayI patches)
     for (Int_t iclus = 0 ; iclus <  nclusters; iclus++)
     {
       AliVCluster * clus = 0;
-      if ( (clus = fInputEvent->GetCaloCluster(iclus)) )
+      
+      if(clusterList) clus = (AliVCluster*) clusterList->At(iclus);
+      else            clus = fInputEvent->GetCaloCluster(iclus);
+      
+      if ( clus )
       {
         if (IsEMCALCluster(clus) && clus->E() > fTriggerEventThreshold)
         {
@@ -2036,10 +2051,12 @@ void  AliCaloTrackReader::RejectTriggeredEventsByPileUp(TArrayI patches)
           
           if(bad || exotic || clus->E() < 1) continue;
           
-          Double_t tof   = clus->GetTOF();
-          Float_t frac   = -1;
+          Float_t frac = -1;
           Int_t absIdMax = GetCaloUtils()->GetMaxEnergyCell(fInputEvent->GetEMCALCells(), clus,frac);
-          GetCaloUtils()->GetEMCALRecoUtils()->RecalibrateCellTime(absIdMax,fInputEvent->GetBunchCrossNumber(),tof);
+          
+          Double_t tof   = clus->GetTOF();
+          if(GetCaloUtils()->GetEMCALRecoUtils()->IsTimeRecalibrationOn())
+            GetCaloUtils()->GetEMCALRecoUtils()->RecalibrateCellTime(absIdMax,fInputEvent->GetBunchCrossNumber(),tof);
           tof *=1.e9;
           
           if ( TMath::Abs(tof) > 25 )
@@ -2051,12 +2068,12 @@ void  AliCaloTrackReader::RejectTriggeredEventsByPileUp(TArrayI patches)
               eBCN       = clus->E();
             }
             
-            printf("Simple: Large time:  E %f, tof %f, absId %d\n",clus->E(),tofcluster, absIdMax);
+            //printf("Simple: Large time:  E %f, tof %f, absId %d\n",clus->E(),tofcluster, absIdMax);
             
           }
           else
           {
-            printf("Simple: OK cluster E %f, tof %f\n",clus->E(),tofcluster);
+            //printf("Simple: OK cluster E %f, tof %f\n",clus->E(),tofcluster);
             nOfHighECl++;
           }
           
@@ -2064,7 +2081,7 @@ void  AliCaloTrackReader::RejectTriggeredEventsByPileUp(TArrayI patches)
       }// cluster exists
     }// cluster loop
     
-    printf("- n OutBC %d, n high energy %d\n", nOutBC,nOfHighECl);
+    //printf("- n OutBC %d, n high energy %d\n", nOutBC,nOfHighECl);
     
     Double_t tofclusterUS = TMath::Abs(tofcluster);
     if ( ( nOutBC > 0 ) && ( nOfHighECl == 0 ) )
@@ -2088,7 +2105,7 @@ void  AliCaloTrackReader::RejectTriggeredEventsByPileUp(TArrayI patches)
       fIsTriggerEventOutBC = 0;
     }
 
-    printf("*** Simple: Trigger tag BC %d, tof %2.2f, E %2.2f\n",fIsTriggerEventOutBC, tofcluster, eBCN);
+    //printf("*** Simple: Trigger tag BC %d, tof %2.2f, E %2.2f\n",fIsTriggerEventOutBC, tofcluster, eBCN);
 
   }
   //Check if there is any trigger patch that has an associated exotic cluster
@@ -2109,9 +2126,11 @@ void  AliCaloTrackReader::RejectTriggeredEventsByPileUp(TArrayI patches)
     for (Int_t iclus =  0; iclus <  nclusters; iclus++)
     {
       AliVCluster * clus = 0;
-      if ( (clus = fInputEvent->GetCaloCluster(iclus)) && IsEMCALCluster(clus))
+      if(clusterList) clus = (AliVCluster*) clusterList->At(iclus);
+      else            clus = fInputEvent->GetCaloCluster(iclus);
+      
+      if ( clus )
       {
-        
         Bool_t bad    = GetCaloUtils()->GetEMCALRecoUtils()->ClusterContainsBadChannel(GetCaloUtils()->GetEMCALGeometry(),
                                                                                        clus->GetCellsAbsId(),clus->GetNCells());
         
@@ -2119,13 +2138,15 @@ void  AliCaloTrackReader::RejectTriggeredEventsByPileUp(TArrayI patches)
         
         if(bad || exotic || clus->E() < 1) continue;
 
-        
-        Double_t tof   = clus->GetTOF();
         Float_t frac   = -1;
         Int_t absIdMax = GetCaloUtils()->GetMaxEnergyCell(fInputEvent->GetEMCALCells(), clus,frac);
-        GetCaloUtils()->GetEMCALRecoUtils()->RecalibrateCellTime(absIdMax,fInputEvent->GetBunchCrossNumber(),tof);
-        tof *=1.e9;
         
+        Double_t tof   = clus->GetTOF();
+        
+        if(GetCaloUtils()->GetEMCALRecoUtils()->IsTimeRecalibrationOn())
+          GetCaloUtils()->GetEMCALRecoUtils()->RecalibrateCellTime(absIdMax,fInputEvent->GetBunchCrossNumber(),tof);
+        tof *=1.e9;
+
         // in case no final match with the trigger, check if there was a high energy cluster
         // with the timing of BC=0
         if(clus->E() > fTriggerEventThreshold)
index ba57df083a75f88de14aac4c862c0c4aba7281c5..94570e78897e02fa766aa9446b1568a768311f1c 100755 (executable)
@@ -212,7 +212,7 @@ AliAnaPhoton::AliAnaPhoton() :
      fhClusterMultNoPileUp [i] = 0;
    }
    
-   for(Int_t i = 0; i < 12; i++)
+   for(Int_t i = 0; i < 13; i++)
    {
      fhEtaPhiTriggerEMCALBC[i] = 0 ;
      fhTimeTriggerEMCALBC  [i] = 0 ;
@@ -1533,7 +1533,7 @@ TList *  AliAnaPhoton::GetCreateOutputObjects()
     fhEtaPhiEMCALBCN->SetXTitle("#eta");
     outputContainer->Add(fhEtaPhiEMCALBCN) ;
     
-    for(Int_t i = 0; i < 12; i++)
+    for(Int_t i = 0; i < 13; i++)
     {
       fhEtaPhiTriggerEMCALBC[i] = new TH2F
       (Form("hEtaPhiTriggerEMCALBC%d",i-5),
@@ -1591,24 +1591,24 @@ TList *  AliAnaPhoton::GetCreateOutputObjects()
   if(fCalorimeter=="EMCAL" && fFillEMCALBCHistograms)
   {
     fhEtaPhiPhotonEMCALBC0  = new TH2F
-    ("hEtaPhiEMCALBC0","identified photon, E > 2 GeV, #eta vs #phi, for clusters with |time| < 25 ns, EMCAL-BC=0",netabins,etamin,etamax,nphibins,phimin,phimax);
+    ("hEtaPhiPhotonEMCALBC0","identified photon, E > 2 GeV, #eta vs #phi, for clusters with |time| < 25 ns, EMCAL-BC=0",netabins,etamin,etamax,nphibins,phimin,phimax);
     fhEtaPhiPhotonEMCALBC0->SetYTitle("#phi (rad)");
     fhEtaPhiPhotonEMCALBC0->SetXTitle("#eta");
     outputContainer->Add(fhEtaPhiPhotonEMCALBC0) ;
     
     fhEtaPhiPhotonEMCALBC1  = new TH2F
-    ("hEtaPhiEMCALBC1","identified photon, E > 2 GeV, #eta vs #phi, for clusters with 25 < |time| < 75 ns, EMCAL-BC=1",netabins,etamin,etamax,nphibins,phimin,phimax);
+    ("hEtaPhiPhotonEMCALBC1","identified photon, E > 2 GeV, #eta vs #phi, for clusters with 25 < |time| < 75 ns, EMCAL-BC=1",netabins,etamin,etamax,nphibins,phimin,phimax);
     fhEtaPhiPhotonEMCALBC1->SetYTitle("#phi (rad)");
     fhEtaPhiPhotonEMCALBC1->SetXTitle("#eta");
     outputContainer->Add(fhEtaPhiPhotonEMCALBC1) ;
     
     fhEtaPhiPhotonEMCALBCN  = new TH2F
-    ("hEtaPhiEMCALBCN","identified photon, E > 2 GeV, #eta vs #phi, for clusters with |time| > 75 ns, EMCAL-BC>1",netabins,etamin,etamax,nphibins,phimin,phimax);
+    ("hEtaPhiPhotonEMCALBCN","identified photon, E > 2 GeV, #eta vs #phi, for clusters with |time| > 75 ns, EMCAL-BC>1",netabins,etamin,etamax,nphibins,phimin,phimax);
     fhEtaPhiPhotonEMCALBCN->SetYTitle("#phi (rad)");
     fhEtaPhiPhotonEMCALBCN->SetXTitle("#eta");
     outputContainer->Add(fhEtaPhiPhotonEMCALBCN) ;
     
-    for(Int_t i = 0; i < 12; i++)
+    for(Int_t i = 0; i < 13; i++)
     {
       fhEtaPhiPhotonTriggerEMCALBC[i] = new TH2F
       (Form("hEtaPhiPhotonTriggerEMCALBC%d",i-5),
index 72bd02f54c5adcacce2f4eb6cfca012205f61fb6..05d6a71dbbe0ceed19cf1765c9da18dad9555933 100755 (executable)
@@ -156,9 +156,9 @@ class AliAnaPhoton : public AliAnaCaloTrackCorrBaseClass {
   TH2F * fhEtaPhiEMCALBC1  ;             //! Pseudorapidity vs Phi of clusters for E > 0.5
   TH2F * fhEtaPhiEMCALBCN  ;             //! Pseudorapidity vs Phi of clusters for E > 0.5
 
-  TH2F * fhEtaPhiTriggerEMCALBC[12] ;     //! Pseudorapidity vs Phi of clusters for E > 0.5
-  TH2F * fhTimeTriggerEMCALBC  [12] ;     //! Time distribution of clusters, when trigger is in a given BC
-  TH2F * fhTimeTriggerEMCALBCPileUpSPD[12]; //! Time distribution of clusters, when trigger is in a given BC, tagged as pile-up SPD
+  TH2F * fhEtaPhiTriggerEMCALBC[13] ;     //! Pseudorapidity vs Phi of clusters for E > 0.5
+  TH2F * fhTimeTriggerEMCALBC  [13] ;     //! Time distribution of clusters, when trigger is in a given BC
+  TH2F * fhTimeTriggerEMCALBCPileUpSPD[13]; //! Time distribution of clusters, when trigger is in a given BC, tagged as pile-up SPD
 
   TH1F * fhEPhoton    ;                  //! Number of identified photon vs energy
   TH1F * fhPtPhoton   ;                  //! Number of identified photon vs transerse momentum 
@@ -169,9 +169,9 @@ class AliAnaPhoton : public AliAnaCaloTrackCorrBaseClass {
   TH2F * fhEtaPhiPhotonEMCALBC0  ;       //! Pseudorapidity vs Phi of identified  photon for E > 0.5
   TH2F * fhEtaPhiPhotonEMCALBC1  ;       //! Pseudorapidity vs Phi of identified  photon for E > 0.5
   TH2F * fhEtaPhiPhotonEMCALBCN  ;       //! Pseudorapidity vs Phi of identified  photon for E > 0.5
-  TH2F * fhEtaPhiPhotonTriggerEMCALBC[12]; //! Pseudorapidity vs Phi of photons for E > 0.5
-  TH2F * fhTimePhotonTriggerEMCALBC  [12]; //! Time distribution of photons, when trigger is in a given BC
-  TH2F * fhTimePhotonTriggerEMCALBCPileUpSPD[12] ; //! Time distribution of photons, when trigger is in a given BC, tagged as pile-up SPD
+  TH2F * fhEtaPhiPhotonTriggerEMCALBC[13]; //! Pseudorapidity vs Phi of photons for E > 0.5
+  TH2F * fhTimePhotonTriggerEMCALBC  [13]; //! Time distribution of photons, when trigger is in a given BC
+  TH2F * fhTimePhotonTriggerEMCALBCPileUpSPD[13] ; //! Time distribution of photons, when trigger is in a given BC, tagged as pile-up SPD
   TH2F * fhPtCentralityPhoton    ;       //! centrality  vs photon pT
   TH2F * fhPtEventPlanePhoton    ;       //! event plane vs photon pT
   
index 6fd6309a92d3b913dd3c74cdb52c91c2e356cd66..37b555f8ad9ce50d660122ea4d3581563a42e684 100755 (executable)
@@ -186,7 +186,7 @@ AliAnaPi0EbE::AliAnaPi0EbE() :
     if(i<8)fhMassPairLocMax[i] = 0;
   }
   
-  for(Int_t i = 0; i < 12; i++)
+  for(Int_t i = 0; i < 13; i++)
   {
     fhEtaPhiTriggerEMCALBC[i] = 0 ;
     fhTimeTriggerEMCALBC  [i] = 0 ;
@@ -725,7 +725,7 @@ TList *  AliAnaPi0EbE::GetCreateOutputObjects()
     fhEtaPhiEMCALBCN->SetXTitle("#eta");
     outputContainer->Add(fhEtaPhiEMCALBCN) ;
     
-    for(Int_t i = 0; i < 12; i++)
+    for(Int_t i = 0; i < 13; i++)
     {
       fhEtaPhiTriggerEMCALBC[i] = new TH2F
       (Form("hEtaPhiTriggerEMCALBC%d",i-5),
index a607d8795a87a1e63089211c2c2403fbe5af6e62..feb5b55a24889fea47534664b548fc4084e94450 100755 (executable)
@@ -162,9 +162,9 @@ class AliAnaPi0EbE : public AliAnaCaloTrackCorrBaseClass {
   TH2F         * fhEtaPhiEMCALBC1  ;       //! Pseudorapidity vs Phi of clusters 
   TH2F         * fhEtaPhiEMCALBCN  ;       //! Pseudorapidity vs Phi of clusters 
 
-  TH2F         * fhEtaPhiTriggerEMCALBC[12]  ;    //! Pseudorapidity vs Phi of pi0 for E > 0.5
-  TH2F         * fhTimeTriggerEMCALBC  [12]  ;    //! Time distribution of pi0, when trigger is in a given BC
-  TH2F         * fhTimeTriggerEMCALBCPileUpSPD[12] ; //! Time distribution of pi0, when trigger is in a given BC, tagged as pile-up SPD
+  TH2F         * fhEtaPhiTriggerEMCALBC[13]  ;    //! Pseudorapidity vs Phi of pi0 for E > 0.5
+  TH2F         * fhTimeTriggerEMCALBC  [13]  ;    //! Time distribution of pi0, when trigger is in a given BC
+  TH2F         * fhTimeTriggerEMCALBCPileUpSPD[13] ; //! Time distribution of pi0, when trigger is in a given BC, tagged as pile-up SPD
 
   TH2F         * fhPtCentrality ;          //! centrality  vs pi0/eta pT
   TH2F         * fhPtEventPlane ;          //! event plane vs pi0/eta pT