]> git.uio.no Git - u/mrichter/AliRoot.git/commitdiff
new version of trigger patch-cluster matching more detailed histograms
authorgconesab <gconesab@f7af4fe6-9843-0410-8265-dc069ae4e863>
Wed, 12 Jun 2013 17:40:00 +0000 (17:40 +0000)
committergconesab <gconesab@f7af4fe6-9843-0410-8265-dc069ae4e863>
Wed, 12 Jun 2013 17:40:00 +0000 (17:40 +0000)
PWG/CaloTrackCorrBase/AliAnaCaloTrackCorrMaker.cxx
PWG/CaloTrackCorrBase/AliAnaCaloTrackCorrMaker.h
PWG/CaloTrackCorrBase/AliCaloTrackReader.cxx
PWG/CaloTrackCorrBase/AliCaloTrackReader.h
PWGGA/CaloTrackCorrelations/AliAnaPhoton.cxx
PWGGA/CaloTrackCorrelations/AliAnaPhoton.h
PWGGA/CaloTrackCorrelations/AliAnaPi0EbE.cxx
PWGGA/CaloTrackCorrelations/AliAnaPi0EbE.h

index a3288520ec15ca7d8695d92b97eb4c2894d5d0fa..5cd8c2eb5cadfc10881b68e5ea3ac85de2dc4835 100755 (executable)
@@ -50,6 +50,7 @@ fMakeHisto(kFALSE),           fMakeAOD(kFALSE),
 fAnaDebug(0),                 fCuts(new TList), 
 fScaleFactor(-1),
 fhNEvents(0),                 fhNExoticEvents(0),
+fhNEventsNoTriggerFound(0),
 fhNPileUpEvents(0),           fhNPileUpEventsTriggerBC0(0),
 fhZVertex(0),                 
 fhPileUpClusterMult(0),       fhPileUpClusterMultAndSPDPileUp(0),
@@ -60,7 +61,8 @@ fhEMCalBCEvent(0),            fhEMCalBCEventCut(0),
 fhTrackBCEvent(0),            fhTrackBCEventCut(0),
 fhPrimaryVertexBC(0),         fhTimeStampFraction(0),
 fhNPileUpVertSPD(0),          fhNPileUpVertTracks(0),
-fhPileUpClusterTrigger(0)
+fhClusterTriggerBC(0),        fhClusterTriggerBCExotic(0),        fhClusterTriggerBCBad(0),
+fhClusterTriggerBCUnMatch(0), fhClusterTriggerBCExoticUnMatch(0), fhClusterTriggerBCBadUnMatch(0)
 {
   //Default Ctor
   if(fAnaDebug > 1 ) printf("*** Analysis Maker Constructor *** \n");
@@ -80,6 +82,7 @@ fAnaDebug(maker.fAnaDebug),    fCuts(new TList()),
 fScaleFactor(maker.fScaleFactor),
 fhNEvents(maker.fhNEvents),
 fhNExoticEvents(maker.fhNExoticEvents),
+fhNEventsNoTriggerFound(maker.fhNEventsNoTriggerFound),
 fhNPileUpEvents(maker.fhNPileUpEvents),
 fhNPileUpEventsTriggerBC0(maker.fhNPileUpEventsTriggerBC0),
 fhZVertex(maker.fhZVertex),
@@ -98,7 +101,12 @@ fhPrimaryVertexBC(maker.fhPrimaryVertexBC),
 fhTimeStampFraction(maker.fhTimeStampFraction),
 fhNPileUpVertSPD(maker.fhNPileUpVertSPD),
 fhNPileUpVertTracks(maker.fhNPileUpVertTracks),
-fhPileUpClusterTrigger(maker.fhPileUpClusterTrigger)
+fhClusterTriggerBC(maker.fhClusterTriggerBC),
+fhClusterTriggerBCExotic(maker.fhClusterTriggerBCExotic),
+fhClusterTriggerBCBad(maker.fhClusterTriggerBCBad),
+fhClusterTriggerBCUnMatch(maker.fhClusterTriggerBCUnMatch),
+fhClusterTriggerBCExoticUnMatch(maker.fhClusterTriggerBCExoticUnMatch),
+fhClusterTriggerBCBadUnMatch(maker.fhClusterTriggerBCBadUnMatch)
 {
   // cpy ctor
 }
@@ -195,8 +203,10 @@ void AliAnaCaloTrackCorrMaker::FillControlHistograms()
   if( fReader->IsPileUpFromNotSPDAndNotEMCal() )
     fhNPileUpEvents->Fill(7.5);
   
-  if(fReader->IsPileUpClusterTriggeredEvent() == 0 ||
-     fReader->IsPileUpClusterTriggeredEvent() == 6   )
+  Int_t triggerBC = fReader->GetTriggerClusterBC() ;
+  if( triggerBC == 0            &&
+     !fReader->IsExoticEvent()  &&
+     !fReader->IsBadCellTriggerEvent())
   {
     if( fReader->IsPileUpFromSPD())
       fhNPileUpEventsTriggerBC0->Fill(0.5);
@@ -309,15 +319,60 @@ TList *AliAnaCaloTrackCorrMaker::GetOutputContainer()
   fhNExoticEvents      = new TH1F("hNExoticEvents",   "Number of analyzed events triggered by exotic cluster"     , 1 , 0 , 1  ) ;
   fhNExoticEvents->SetYTitle("# exotic events");
   fOutputContainer->Add(fhNExoticEvents);
+
+  fhNEventsNoTriggerFound      = new TH1F("hNEventsNoTriggerFound",   "Number of analyzed events triggered but no trigger found"     , 1 , 0 , 1  ) ;
+  fhNEventsNoTriggerFound->SetYTitle("# exotic events");
+  fOutputContainer->Add(fhNEventsNoTriggerFound);
+  
+  fhClusterTriggerBC              = new TH1F("hClusterTriggerBC",
+                                             "Number of analyzed events triggered by a cluster in a given BC",
+                                             11 , -5 , 5  ) ;
+  fhClusterTriggerBC->SetYTitle("# events");
+  for(Int_t i = 1; i < 12; i++)
+    fhClusterTriggerBC->GetXaxis()->SetBinLabel(i ,Form("BC%d",i-6));
+  fOutputContainer->Add(fhClusterTriggerBC);
+  
+  fhClusterTriggerBCExotic        = new TH1F("hClusterTriggerBCExotic",
+                                             "Number of analyzed events triggered by a exotic cluster in a given BC",
+                                             11 , -5 , 5  ) ;
+  fhClusterTriggerBCExotic->SetYTitle("# events");
+  for(Int_t i = 1; i < 12; i++)
+    fhClusterTriggerBCExotic->GetXaxis()->SetBinLabel(i ,Form("BC%d",i-6));
+  fOutputContainer->Add(fhClusterTriggerBCExotic);
+  
+  fhClusterTriggerBCBad           = new TH1F("hClusterTriggerBCBad",
+                                             "Number of analyzed events triggered by a bad cluster in a given BC",
+                                             11 , -5 , 5  ) ;
+  fhClusterTriggerBCBad->SetYTitle("# events");
+  for(Int_t i = 1; i < 12; i++)
+    fhClusterTriggerBCBad->GetXaxis()->SetBinLabel(i ,Form("BC%d",i-6));
+  fOutputContainer->Add(fhClusterTriggerBCBad);
   
-  fhPileUpClusterTrigger      = new TH1F("hNPileUpClusterTriggerEvents",   "Number of analyzed events triggered by a cluster in a BC"     , 13 , -5 , 8  ) ;
-  fhPileUpClusterTrigger->SetYTitle("# events");
-  //fhPileUpClusterTrigger->SetXTitle("# BC");
+  
+  fhClusterTriggerBCUnMatch       = new TH1F("hClusterTriggerBCUnMatch",
+                                             "Number of analyzed events triggered by a cluster (no trigger patch match) in a given BC",
+                                             11 , -5 , 5  ) ;
+  fhClusterTriggerBCUnMatch->SetYTitle("# events");
+  for(Int_t i = 1; i < 12; i++)
+    fhClusterTriggerBCUnMatch->GetXaxis()->SetBinLabel(i ,Form("BC%d",i-6));
+  fOutputContainer->Add(fhClusterTriggerBCUnMatch);
+  
+  fhClusterTriggerBCExoticUnMatch = new TH1F("hClusterTriggerBCExoticUnMatch",
+                                             "Number of analyzed events triggered by a exotic cluster (no trigger patch match) in a given BC",
+                                             11 , -5 , 5  ) ;
+  fhClusterTriggerBCExoticUnMatch->SetYTitle("# events");
   for(Int_t i = 1; i < 12; i++)
-    fhPileUpClusterTrigger->GetXaxis()->SetBinLabel(i ,Form("BC%d",i-6));
-  fhPileUpClusterTrigger->GetXaxis()->SetBinLabel(12 ,"No Match,High E, BC0");
-  fhPileUpClusterTrigger->GetXaxis()->SetBinLabel(13 ,"No Match");
-  fOutputContainer->Add(fhPileUpClusterTrigger);
+    fhClusterTriggerBCExoticUnMatch->GetXaxis()->SetBinLabel(i ,Form("BC%d",i-6));
+  fOutputContainer->Add(fhClusterTriggerBCExoticUnMatch);
+  
+  fhClusterTriggerBCBadUnMatch    = new TH1F("hClusterTriggerBCBadUnMatch",
+                                             "Number of analyzed events triggered by a bad cluster  (no trigger patch match) in a given BC",
+                                             11 , -5 , 5  ) ;
+  fhClusterTriggerBCBadUnMatch->SetYTitle("# events");
+  for(Int_t i = 1; i < 12; i++)
+    fhClusterTriggerBCBadUnMatch->GetXaxis()->SetBinLabel(i ,Form("BC%d",i-6));
+  fOutputContainer->Add(fhClusterTriggerBCBadUnMatch);
+
   
   fhNPileUpEvents      = new TH1F("hNPileUpEvents",   "Number of events considered as pile-up", 8 , 0 , 8 ) ;
   fhNPileUpEvents->SetYTitle("# events");
@@ -589,13 +644,40 @@ void AliAnaCaloTrackCorrMaker::ProcessEvent(const Int_t iEntry,
   //Tell the reader to fill the data in the 3 detector lists
   Bool_t ok = fReader->FillInputEvent(iEntry, currentFileName);
   
-  if(fReader->IsExoticEvent())
-    fhNExoticEvents->Fill(0) ;
+  Int_t  triggerBC   = fReader->GetTriggerClusterBC() ;
+  Bool_t exotic      = fReader->IsExoticEvent();
+  Bool_t badCell     = fReader->IsBadCellTriggerEvent();
+  Bool_t triggerMatch= fReader->IsTriggerMatched();
+  Bool_t triggerBCOK = kTRUE;
+  Int_t  triggerId   = fReader->GetTriggerClusterId() ;
+  if(triggerId < 0)
+  {
+    //printf("Trigger id %d\n",triggerId);
+    if(triggerId == -2)fhNEventsNoTriggerFound->Fill(0);
+    triggerBCOK = kFALSE;
+  }
+  
+  if(exotic) fhNExoticEvents->Fill(0) ;
   //if(fReader->IsExoticEvent()) printf("Maker: EXOTIC Cluster trigger\n");
   
-  if(fReader->IsPileUpClusterTriggeredEvent() != -10000)
-    fhPileUpClusterTrigger->Fill(fReader->IsPileUpClusterTriggeredEvent());
-  //if(!ok)printf("Maker: Cluster trigger BC = %d\n",fReader->IsPileUpClusterTriggeredEvent());
+  if(triggerBCOK)
+  {
+    if(triggerMatch)
+    {
+      if     (!exotic && !badCell) fhClusterTriggerBC      ->Fill(triggerBC);
+      else if(exotic)              fhClusterTriggerBCExotic->Fill(triggerBC);
+      else if(badCell)             fhClusterTriggerBCBad   ->Fill(triggerBC);
+      
+    }
+    else
+    {
+      if     (!exotic && !badCell) fhClusterTriggerBCUnMatch      ->Fill(triggerBC);
+      else if(exotic)              fhClusterTriggerBCExoticUnMatch->Fill(triggerBC);
+      else if(badCell)             fhClusterTriggerBCBadUnMatch   ->Fill(triggerBC);
+    }
+  }
+  
+  if(!ok && triggerBC > -9999) printf("Maker: Cluster trigger BC = %d\n",triggerBC);
 
   if(!ok)
   {    
index 9d454c9e81974a67fc1b7bcd7ff6e570840f9fe6..75196ebc4d9a109eb806c8ac9aa864c6858c879e 100755 (executable)
@@ -96,6 +96,7 @@ class AliAnaCaloTrackCorrMaker : public TObject {
   // Control histograms
   TH1F *   fhNEvents;           //! Number of events counter histogram
   TH1F *   fhNExoticEvents;     //! Number of events triggered by exotic, counter histogram
+  TH1F *   fhNEventsNoTriggerFound; //! number of events where whaetever was done, no trigger is found
   TH1F *   fhNPileUpEvents;     //! N events pasing pile up cut
   TH1F *   fhNPileUpEventsTriggerBC0; //! N events pasing pile up cut
   TH1F *   fhZVertex;           //! Vertex of accepted event
@@ -114,11 +115,16 @@ class AliAnaCaloTrackCorrMaker : public TObject {
   TH1F *   fhTimeStampFraction; //! event fraction depending on Time Stamp, only if activated on reader
   TH1F *   fhNPileUpVertSPD;    //! number of pile-up vertices from SPD
   TH1F *   fhNPileUpVertTracks; //! number of pile-up vertices from tracks
-  TH1F *   fhPileUpClusterTrigger; //! number of events triggered, depending on BC of the cluster
-  
+  TH1F *   fhClusterTriggerBC;       //! number of events triggered, depending on BC of the cluster
+  TH1F *   fhClusterTriggerBCExotic; //! number of events triggered, depending on BC of the cluster
+  TH1F *   fhClusterTriggerBCBad;    //! number of events triggered, depending on BC of the cluster
+  TH1F *   fhClusterTriggerBCUnMatch;       //! number of events triggered, depending on BC of the cluster
+  TH1F *   fhClusterTriggerBCExoticUnMatch; //! number of events triggered, depending on BC of the cluster
+  TH1F *   fhClusterTriggerBCBadUnMatch;    //! number of events triggered, depending on BC of the cluster
+
   AliAnaCaloTrackCorrMaker & operator = (const AliAnaCaloTrackCorrMaker & ) ; // cpy assignment
   
-  ClassDef(AliAnaCaloTrackCorrMaker,17)
+  ClassDef(AliAnaCaloTrackCorrMaker,18)
 } ;
  
 
index cca66b57b345c653591c6c50bf06c821b1b58f79..155af3fdca4cd82e1e9b2804ca8e2e1051423c0e 100755 (executable)
@@ -93,9 +93,13 @@ fLastMixedTracksEvent(-1),   fLastMixedCaloEvent(-1),
 fWriteOutputDeltaAOD(kFALSE),fOldAOD(kFALSE),                 fCaloFilterPatch(kFALSE),
 fEMCALClustersListName(""),  fZvtxCut(0.),                    
 fAcceptFastCluster(kFALSE),  fRemoveLEDEvents(kTRUE),
-fRemoveExoticEvents(kFALSE), fRemoveTriggerOutBCEvents(kFALSE),
-fTriggerPatchExoticRejection(1), fTriggerEventThreshold(3.),
-fIsExoticEvent(kFALSE),      fIsTriggerEventOutBC(0),         fForceExoticRejection(kFALSE),
+//Trigger rejection
+fRemoveBadTriggerEvents(0),  fTriggerPatchClusterMatch(0),
+fTriggerPatchTimeWindow(),   fTriggerEventThreshold(0),
+fTriggerClusterBC(0),        fTriggerClusterIndex(0),         fTriggerClusterId(0),
+fIsExoticEvent(0),           fIsBadCellEvent(0),
+fIsTriggerMatch(0),
+
 fDoEventSelection(kFALSE),   fDoV0ANDEventSelection(kFALSE),
 fDoVertexBCEventSelection(kFALSE),
 fDoRejectNoTrackEvents(kFALSE),
@@ -541,10 +545,14 @@ void AliCaloTrackReader::InitParameters()
     fTrackBCEventCut[i] = 0;
   }
   
+  // Trigger match-rejection
   fTriggerPatchTimeWindow[0] = 8;
   fTriggerPatchTimeWindow[1] = 9;
   
-  fIsTriggerEventOutBC = -10000 ;
+  fTriggerClusterBC      = -10000 ;
+  fTriggerEventThreshold =  2.;
+  fTriggerClusterIndex   = -1;
+  fTriggerClusterId      = -1;
 
 }
 
@@ -680,9 +688,13 @@ Bool_t AliCaloTrackReader::FillInputEvent(const Int_t iEntry,
   //Fill the event counter and input lists that are needed, called by the analysis maker.
   
   fEventNumber         = iEntry;
-  fIsTriggerEventOutBC = -10000 ;
-  fIsExoticEvent       = kFALSE ;
-
+  fTriggerClusterIndex = -1;
+  fTriggerClusterId    = -1;
+  fIsTriggerMatch      = kFALSE;
+  fTriggerClusterBC    = -10000;
+  fIsExoticEvent       = kFALSE;
+  fIsBadCellEvent      = kFALSE;
+  
   //fCurrentFileName = TString(currentFileName);
   if(!fInputEvent)
   {
@@ -893,15 +905,14 @@ Bool_t AliCaloTrackReader::FillInputEvent(const Int_t iEntry,
     //printf("Selected triggered event : %s\n",GetFiredTriggerClasses().Data());
   }
   
-  
-  //Get Patches that triggered
-  TArrayI patches = GetL0TriggerPatches();
-  
   //----------------------------------------------------------------------
   // Do not count events that where likely triggered by an exotic cluster
   // or out BC cluster
   //----------------------------------------------------------------------
-  
+
+  //Get Patches that triggered
+  TArrayI patches = GetL0TriggerPatches();
+/*
   if(fRemoveExoticEvents)
   {
     RejectExoticEvents(patches);
@@ -913,16 +924,28 @@ Bool_t AliCaloTrackReader::FillInputEvent(const Int_t iEntry,
   }
   
   RejectTriggeredEventsByPileUp(patches);
-  //printf("AliCaloTrackReader::FillInputEvent(), Trigger BC = %d\n",fIsTriggerEventOutBC);
+  //printf("AliCaloTrackReader::FillInputEvent(), Trigger BC = %d\n",fTriggerClusterBC);
   
   if(fRemoveTriggerOutBCEvents)
   {
-    if(fIsTriggerEventOutBC != 0 && fIsTriggerEventOutBC != 6)
+    if(fTriggerClusterBC != 0 && fTriggerClusterBC != 6)
     {
       //printf("\t REJECT, bad trigger cluster BC\n");
       return kFALSE;
     }
   }
+*/
+  MatchTriggerCluster(patches);
+  
+  if(fRemoveBadTriggerEvents)
+  {
+    printf("ACCEPT triggered event? - exotic? %d - bad cell %d - BC %d  - Matched %d\n",fIsExoticEvent,fIsBadCellEvent,fTriggerClusterBC,fIsTriggerMatch);
+    if     (fIsExoticEvent)         return kFALSE;
+    else if(fIsBadCellEvent)        return kFALSE;
+    else if(fTriggerClusterBC == 0) return kFALSE;
+    printf("\t *** YES\n");
+  }
   
   patches.Reset();
   
@@ -942,7 +965,7 @@ Bool_t AliCaloTrackReader::FillInputEvent(const Int_t iEntry,
   {
     if(fVertexBC!=0 && fVertexBC!=AliVTrack::kTOFBCNA) return kFALSE ;
   }
-    
+  
   if(fFillEMCALCells)
     FillInputEMCALCells();
   
@@ -1866,7 +1889,7 @@ TArrayI AliCaloTrackReader::GetL0TriggerPatches()
 }
 
 
-
+/*
 //___________________________________________________________
 void  AliCaloTrackReader::RejectExoticEvents(TArrayI patches)
 {
@@ -2004,7 +2027,9 @@ void  AliCaloTrackReader::RejectExoticEvents(TArrayI patches)
   }// exotic and trigger patch event flag
   
 }
+*/
 
+/*
 //______________________________________________________________________
 void  AliCaloTrackReader::RejectTriggeredEventsByPileUp(TArrayI patches)
 {
@@ -2012,7 +2037,7 @@ void  AliCaloTrackReader::RejectTriggeredEventsByPileUp(TArrayI patches)
   
   if(!GetFiredTriggerClasses().Contains("EMC") && !fForceExoticRejection)
   {
-    fIsTriggerEventOutBC = 0;
+    fTriggerClusterBC = 0;
     return;
   }
     
@@ -2092,26 +2117,26 @@ void  AliCaloTrackReader::RejectTriggeredEventsByPileUp(TArrayI patches)
     Double_t tofclusterUS = TMath::Abs(tofcluster);
     if ( ( nOutBC > 0 ) && ( nOfHighECl == 0 ) )
     {
-      if     (tofclusterUS < 75 ) fIsTriggerEventOutBC = 1 ;
-      else if(tofclusterUS < 125) fIsTriggerEventOutBC = 2 ;
-      else if(tofclusterUS < 175) fIsTriggerEventOutBC = 3 ;
-      else if(tofclusterUS < 225) fIsTriggerEventOutBC = 4 ;
-      else if(tofclusterUS < 275) fIsTriggerEventOutBC = 5 ;
-      else                        fIsTriggerEventOutBC = 6 ;
+      if     (tofclusterUS < 75 ) fTriggerClusterBC = 1 ;
+      else if(tofclusterUS < 125) fTriggerClusterBC = 2 ;
+      else if(tofclusterUS < 175) fTriggerClusterBC = 3 ;
+      else if(tofclusterUS < 225) fTriggerClusterBC = 4 ;
+      else if(tofclusterUS < 275) fTriggerClusterBC = 5 ;
+      else                        fTriggerClusterBC = 6 ;
       
-      if(tofcluster < 0) fIsTriggerEventOutBC*=-1;
+      if(tofcluster < 0) fTriggerClusterBC*=-1;
 
     }
     else if(( nOutBC == 0 ) && ( nOfHighECl == 0 ) )
     {
-      fIsTriggerEventOutBC = 7 ;
+      fTriggerClusterBC = 7 ;
     }
     else
     {
-      fIsTriggerEventOutBC = 0;
+      fTriggerClusterBC = 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",fTriggerClusterBC, tofcluster, eBCN);
 
   }
   //Check if there is any trigger patch that has an associated exotic cluster
@@ -2195,27 +2220,203 @@ void  AliCaloTrackReader::RejectTriggeredEventsByPileUp(TArrayI patches)
     
     if     (tofcluster == 1000)
     {
-      if(ok) fIsTriggerEventOutBC = 6 ; // no trigger match but high energy cluster with time at BC=0
-      else   fIsTriggerEventOutBC = 7 ; // no trigger match and no likely good cluster
+      if(ok) fTriggerClusterBC = 6 ; // no trigger match but high energy cluster with time at BC=0
+      else   fTriggerClusterBC = 7 ; // no trigger match and no likely good cluster
     }
-    else if(tofclusterUS < 25 ) fIsTriggerEventOutBC = 0 ;
-    else if(tofclusterUS < 75 ) fIsTriggerEventOutBC = 1 ;
-    else if(tofclusterUS < 125) fIsTriggerEventOutBC = 2 ;
-    else if(tofclusterUS < 175) fIsTriggerEventOutBC = 3 ;
-    else if(tofclusterUS < 225) fIsTriggerEventOutBC = 4 ;
-    else                        fIsTriggerEventOutBC = 5 ;
+    else if(tofclusterUS < 25 ) fTriggerClusterBC = 0 ;
+    else if(tofclusterUS < 75 ) fTriggerClusterBC = 1 ;
+    else if(tofclusterUS < 125) fTriggerClusterBC = 2 ;
+    else if(tofclusterUS < 175) fTriggerClusterBC = 3 ;
+    else if(tofclusterUS < 225) fTriggerClusterBC = 4 ;
+    else                        fTriggerClusterBC = 5 ;
     
     //printf(" selected tof %f\n",tofcluster);
     
-    if(tofcluster < 0) fIsTriggerEventOutBC*=-1;
+    if(tofcluster < 0) fTriggerClusterBC*=-1;
     
-    //if(fIsTriggerEventOutBC != 0) printf("*** Patches: Trigger out of BC %d, tof %2.2f, E %2.2f\n",fIsTriggerEventOutBC,tofcluster,eBCN);
+    //if(fTriggerClusterBC != 0) printf("*** Patches: Trigger out of BC %d, tof %2.2f, E %2.2f\n",fTriggerClusterBC,tofcluster,eBCN);
     
-    //if(fIsTriggerEventOutBC==7) printf("*** No trigger match, high energy cluster? %d\n",ok2);
-    //if(fIsTriggerEventOutBC==6) printf("*** No trigger match, but high energy cluster in BC0\n");
+    //if(fTriggerClusterBC==7) printf("*** No trigger match, high energy cluster? %d\n",ok2);
+    //if(fTriggerClusterBC==6) printf("*** No trigger match, but high energy cluster in BC0\n");
     
   }// exotic and trigger patch event flag
   
+}
+*/
+
+//______________________________________________________________________
+void  AliCaloTrackReader::MatchTriggerCluster(TArrayI patches)
+{
+  // Finds the cluster that triggered
+  
+  // Init info from previous event
+  fTriggerClusterIndex = -1;
+  fTriggerClusterId    = -1;
+  fIsTriggerMatch      = kFALSE;
+  fTriggerClusterBC    = -10000;
+  fIsExoticEvent       = kFALSE;
+  fIsBadCellEvent      = kFALSE;
+  
+  // Do only analysis for triggered events
+  if(!GetFiredTriggerClasses().Contains("EMC"))
+  {
+    fTriggerClusterBC    = 0;
+    return;
+  }
+  
+  //Recover the list of clusters
+  TClonesArray * clusterList = 0;
+  if      (fInputEvent->FindListObject(fEMCALClustersListName))
+  {
+    clusterList = dynamic_cast<TClonesArray*> (fInputEvent->FindListObject(fEMCALClustersListName));
+  }
+  else if(fOutputEvent)
+  {
+    clusterList = dynamic_cast<TClonesArray*> (fOutputEvent->FindListObject(fEMCALClustersListName));
+  }
+  
+  // Get number of clusters and of trigger patches
+  Int_t nclusters = fInputEvent->GetNumberOfCaloClusters();
+  if(clusterList) nclusters = clusterList->GetEntriesFast();
+
+  Int_t nPatch = patches.GetSize();
+  
+  
+  //Init some variables used in the cluster loop
+  Float_t tofPatchMax = 100000;
+  Float_t ePatchMax   =-1;
+  
+  Float_t tofMax      = 100000;
+  Float_t eMax        =-1;
+  
+  Int_t   clusMax     =-1;
+  Int_t   idclusMax   =-1;
+  Bool_t  badMax      = kFALSE;
+  Bool_t  exoMax      = kFALSE;
+  
+  Int_t   nOfHighECl  = 0 ;
+
+  // Loop on the clusters, check if there is any that falls into one of the patches
+  for (Int_t iclus =  0; iclus <  nclusters; iclus++)
+  {
+    AliVCluster * clus = 0;
+    if(clusterList) clus = (AliVCluster*) clusterList->At(iclus);
+    else            clus = fInputEvent->GetCaloCluster(iclus);
+    
+    if ( !clus )                continue ;
+    
+    if ( !IsEMCALCluster(clus)) continue ;
+      
+    if ( clus->E() < 1 )        continue ;
+    
+    Bool_t bad    = GetCaloUtils()->GetEMCALRecoUtils()->ClusterContainsBadChannel(GetCaloUtils()->GetEMCALGeometry(),
+                                                                                   clus->GetCellsAbsId(),clus->GetNCells());
+    
+    Bool_t exotic = GetCaloUtils()->GetEMCALRecoUtils()->IsExoticCluster(clus, fInputEvent->GetEMCALCells());
+    
+    Float_t  energy = clus->E();
+    Int_t    idclus = clus->GetID();
+    
+    Float_t frac   = -1;
+    Int_t absIdMax = GetCaloUtils()->GetMaxEnergyCell(fInputEvent->GetEMCALCells(), clus,frac);
+    
+    Double_t tof   = clus->GetTOF();
+    if(GetCaloUtils()->GetEMCALRecoUtils()->IsTimeRecalibrationOn())
+      GetCaloUtils()->GetEMCALRecoUtils()->RecalibrateCellTime(absIdMax,fInputEvent->GetBunchCrossNumber(),tof);
+    tof *=1.e9;
+    
+    //printf("cluster %d, ID %d, E %2.2f, tof %2.2f, AbsId max %d, exotic %d, bad %d\n",iclus,idclus, energy,tof,absIdMax, exotic, bad);
+
+    // Find the highest energy cluster, avobe trigger threshold
+    // in the event in case no match to trigger is found
+    if( energy > eMax )// && energy > fTriggerEventThreshold )
+    {
+      tofMax    = tof;
+      eMax      = energy;
+      badMax    = bad;
+      exoMax    = exotic;
+      clusMax   = iclus;
+      idclusMax = idclus;
+    }
+    
+    // count the good clusters in the event avobe the trigger threshold
+    // to check the exotic events 
+    if(!bad && !exotic)// && energy > fTriggerEventThreshold)
+      nOfHighECl++;
+    
+    // Find match to trigger
+    if(fTriggerPatchClusterMatch)
+    {
+      for(Int_t iabsId =0; iabsId < nPatch; iabsId++)
+      {
+        Int_t absIDCell[4];
+        GetCaloUtils()->GetEMCALGeometry()->GetCellIndexFromFastORIndex(patches.At(iabsId), absIDCell);
+        //if(tof > 75 ) printf("E %2.2f TOF %2.2f Trigger patch %d, cells : %d, %d, %d, %d\n",
+        //                     clus->E(),tof,patches.At(iabsId), absIDCell[0],absIDCell[1],absIDCell[2],absIDCell[3]);
+        
+        for(Int_t ipatch = 0; ipatch < 4; ipatch++)
+        {
+          if(absIdMax == absIDCell[ipatch])
+          {
+            //printf("*** Patches : absId %d, E %2.1f, tof %f \n",absIdMax,clus->E(), tof);
+            if(energy > ePatchMax)
+            {
+              tofPatchMax          = tof;
+              ePatchMax            = energy;
+              fIsBadCellEvent      = bad;
+              fIsExoticEvent       = exotic;
+              fTriggerClusterIndex = iclus;
+              fTriggerClusterId    = idclus;
+              fIsTriggerMatch      = kTRUE;
+            }
+          }
+        }// cell patch loop
+      }// trigger patch loop
+    } // Do trigger patch matching
+    
+  }// Cluster loop
+
+  // If there was no match, assign as trigger
+  // the highest energy cluster in the event
+  if(!fIsTriggerMatch)
+  {
+    tofPatchMax          = tofMax;
+    ePatchMax            = eMax;
+    fIsBadCellEvent      = badMax;
+    fIsExoticEvent       = exoMax;
+    fTriggerClusterIndex = clusMax;
+    fTriggerClusterId    = idclusMax;
+  }
+  
+  Double_t tofPatchMaxUS = TMath::Abs(tofPatchMax);
+    
+  if     (tofPatchMaxUS < 25 ) fTriggerClusterBC = 0 ;
+  else if(tofPatchMaxUS < 75 ) fTriggerClusterBC = 1 ;
+  else if(tofPatchMaxUS < 125) fTriggerClusterBC = 2 ;
+  else if(tofPatchMaxUS < 175) fTriggerClusterBC = 3 ;
+  else if(tofPatchMaxUS < 225) fTriggerClusterBC = 4 ;
+  else if(tofPatchMaxUS < 275) fTriggerClusterBC = 5 ;
+  else
+  {
+    //printf("AliCaloTrackReader::MatchTriggerCluster() - Large BC - tof %2.3f - Index %d\n",tofPatchMaxUS,fTriggerClusterIndex);
+    if(fTriggerClusterIndex >= 0) fTriggerClusterBC = 6 ;
+    else
+    {
+      fTriggerClusterIndex = -2;
+      fTriggerClusterId    = -2;
+    }
+  }
+  
+  if(tofPatchMax < 0) fTriggerClusterBC*=-1;
+  
+//  printf("AliCaloTrackReader::MatchTriggerCluster(TArrayI patches) - Trigger cluster: index %d, ID %d, E = %2.2f, tof = %2.2f (BC = %d), bad cell? %d, exotic? %d, patch match? %d, n High E cluster %d\n",
+//         fTriggerClusterIndex, fTriggerClusterId,ePatchMax, tofPatchMax,
+//         fTriggerClusterBC, fIsBadCellEvent,fIsExoticEvent, fIsTriggerMatch, nOfHighECl);
+//  
+//  if(!fIsTriggerMatch)  printf("\t highest energy cluster:  index %d, ID %d, E = %2.2f, tof = %2.2f, bad cell? %d, exotic? %d\n",clusMax, idclusMax, eMax,tofMax, badMax,exoMax);
+  
+  if(fIsBadCellEvent) fIsExoticEvent = kFALSE;
+  
 }
 
 //__________________________________________
index 1ef03d93a5d3d8607d234777500fe692593d693a..0b8baa4c9ffb0e1db433aec87f9c66c5865d4da4 100755 (executable)
@@ -236,7 +236,7 @@ public:
   Bool_t           IsFastClusterAccepted()           const { return fAcceptFastCluster       ; }   
   
   void             SwitchOnLEDEventsRemoval()              { fRemoveLEDEvents       = kTRUE  ; }
-  void             SwitchOffLEDEventsRemoval()             { fRemoveLEDEvents       = kFALSE ; } 
+  void             SwitchOffLEDEventsRemoval()             { fRemoveLEDEvents       = kFALSE ; }
   Bool_t           IsLEDEventRemoved()               const { return fRemoveLEDEvents         ; }   
   Bool_t           RejectLEDEvents();
   
@@ -247,28 +247,31 @@ public:
   UInt_t           GetEventTriggerMask()             const { return fEventTriggerMask        ; }
   void             SetEventTriggerMaks(UInt_t evtTrig = AliVEvent::kAny) 
                                                            { fEventTriggerMask = evtTrig     ; }
-  TArrayI          GetL0TriggerPatches();
-  void             RejectExoticEvents(TArrayI patches);
-  Bool_t           IsExoticEvent()                         { return fIsExoticEvent           ; }
-  void             SwitchOffExoticEventsRemoval()          { fRemoveExoticEvents    = kFALSE ; }
-  void             SwitchOnExoticEventsRemoval(Bool_t all = kFALSE)
-                                                           { fRemoveExoticEvents    = kTRUE  ;
-                                                             fForceExoticRejection  = all    ; }
-  
-  Int_t            IsPileUpClusterTriggeredEvent()         { return fIsTriggerEventOutBC     ; }
-  void             SwitchOffTriggerOutBCEventsRemoval()    { fRemoveTriggerOutBCEvents = kFALSE ; }
-  void             SwitchOnTriggerOutBCEventsRemoval()     { fRemoveTriggerOutBCEvents = kTRUE  ; }
   
-  void             RejectTriggeredEventsByPileUp(TArrayI patches);
-  
-  void             SetEventTriggerThreshold(Float_t tr)    { fTriggerEventThreshold       = tr     ; }
+  TArrayI          GetL0TriggerPatches();
+  // void            RejectExoticEvents(TArrayI patches);
+  //void             RejectTriggeredEventsByPileUp(TArrayI patches);
+  void             MatchTriggerCluster(TArrayI patches);
+
+  Bool_t           IsExoticEvent()                         { return fIsExoticEvent           ; }  
+  Bool_t           IsBadCellTriggerEvent()                 { return fIsBadCellEvent          ; }
+  Bool_t           IsTriggerMatched()                      { return fIsTriggerMatch          ; }
+  Int_t            GetTriggerClusterBC()                   { return fTriggerClusterBC        ; }
+  Int_t            GetTriggerClusterIndex()                { return fTriggerClusterIndex     ; }
+  Int_t            GetTriggerClusterId()                   { return fTriggerClusterId        ; }
   
-  void             SwitchOffExoticEventsFromTriggerPatch() { fTriggerPatchExoticRejection = kFALSE ; }
-  void             SwitchOnExoticEventsFromTriggerPatch()  { fTriggerPatchExoticRejection = kTRUE  ; }
+  Float_t          GetEventTriggerThreshold()              { return fTriggerEventThreshold   ; }
+  void             SetEventTriggerThreshold(Float_t tr)    { fTriggerEventThreshold   = tr   ; }
 
   void             SetTriggerPatchTimeWindow(Int_t min, Int_t max) { fTriggerPatchTimeWindow[0] = min ;
                                                                      fTriggerPatchTimeWindow[1] = max ; }
   
+  void             SwitchOffBadTriggerEventsRemoval()      { fRemoveBadTriggerEvents   = kFALSE ; }
+  void             SwitchOnBadTriggerEventsRemoval()       { fRemoveBadTriggerEvents   = kTRUE  ; }
+
+  void             SwitchOffTriggerPatchMatching()         { fTriggerPatchClusterMatch = kFALSE ; }
+  void             SwitchOnTriggerPatchMatching()          { fTriggerPatchClusterMatch = kTRUE  ; }
+
   UInt_t           GetMixEventTriggerMask()             const { return fMixEventTriggerMask  ; }
   void             SetMixEventTriggerMaks(UInt_t evtTrig = AliVEvent::kAnyINT) 
                                                            { fMixEventTriggerMask = evtTrig  ; }
@@ -615,14 +618,16 @@ public:
   Bool_t           fAcceptFastCluster;           // Accept events from fast cluster, exclude these events for LHC11a
   Bool_t           fRemoveLEDEvents;             // Remove events where LED was wrongly firing - EMCAL LHC11a
   
-  Bool_t           fRemoveExoticEvents;          // Remove events triggered by exotic cluster
-  Bool_t           fRemoveTriggerOutBCEvents;    // Remove events triggered by pile-up cluster
-  Bool_t           fTriggerPatchExoticRejection; // Search for the trigger patch and check if associated cluster was the trigger
+  Bool_t           fRemoveBadTriggerEvents;      // Remove triggered events because trigger was exotic, bad, or out of BC
+  Bool_t           fTriggerPatchClusterMatch;    // Search for the trigger patch and check if associated cluster was the trigger
   Int_t            fTriggerPatchTimeWindow[2];   // Trigger patch selection window
-  Float_t          fTriggerEventThreshold;       // Threshold to look for triggered events 
-  Bool_t           fIsExoticEvent;               // Exotic event flag
-  Int_t            fIsTriggerEventOutBC;         // Event triggered by pile-up in BC
-  Bool_t           fForceExoticRejection;        // Reject events triggered by exotic only on EMC triggered events, except in MC to study false rejections
+  Float_t          fTriggerEventThreshold;       // Threshold to look for triggered events
+  Int_t            fTriggerClusterBC;            // Event triggered by a cluster in BC -5 0 to 5
+  Int_t            fTriggerClusterIndex;         // Index in clusters array of trigger cluster
+  Int_t            fTriggerClusterId;            // Id of trigger cluster (cluster->GetID())
+  Bool_t           fIsExoticEvent;               // Exotic trigger event flag
+  Bool_t           fIsBadCellEvent;              // Bad cell triggered event flag
+  Int_t            fIsTriggerMatch;              // Could not match the event to a trigger patch
   
   Bool_t           fDoEventSelection;            // Select events depending on V0, pileup, vertex well reconstructed, at least 1 track ...
   Bool_t           fDoV0ANDEventSelection;       // Select events depending on V0, fDoEventSelection should be on
@@ -667,7 +672,7 @@ public:
   AliCaloTrackReader(              const AliCaloTrackReader & r) ; // cpy ctor
   AliCaloTrackReader & operator = (const AliCaloTrackReader & r) ; // cpy assignment
   
-  ClassDef(AliCaloTrackReader,53)
+  ClassDef(AliCaloTrackReader,54)
   
 } ;
 
index 27357e5c33d796be0096987bd09196544e9aa349..d38cbf2efc43534b9cebb1360e09a2ff64b6fde5 100755 (executable)
@@ -68,7 +68,23 @@ AliAnaPhoton::AliAnaPhoton() :
     fhMaxCellDiffClusterE(0),     fhTimeE(0),    // Control histograms
     fhEtaPhi(0),                  fhEtaPhiEMCALBC0(0),
     fhEtaPhiEMCALBC1(0),          fhEtaPhiEMCALBCN(0),
-    fhEPhoton(0),                 fhPtPhoton(0),  
+    fhEtaPhiTriggerEMCALBCClusterOverTh(0),
+    fhEtaPhiTriggerEMCALBCUMClusterOverTh(0),
+    fhEtaPhiTriggerEMCALBCClusterBelowTh1(0),
+    fhEtaPhiTriggerEMCALBCUMClusterBelowTh1(0),
+    fhEtaPhiTriggerEMCALBCClusterBelowTh2(0),
+    fhEtaPhiTriggerEMCALBCUMClusterBelowTh2(0),
+    fhEtaPhiTriggerEMCALBCExotic(0),             fhTimeTriggerEMCALBCExotic(0),
+    fhEtaPhiTriggerEMCALBCUMExotic(0),           fhTimeTriggerEMCALBCUMExotic(0), 
+    fhEtaPhiTriggerEMCALBCBad(0),                fhTimeTriggerEMCALBCBad(0), 
+    fhEtaPhiTriggerEMCALBCUMBad(0),              fhTimeTriggerEMCALBCUMBad(0), 
+    fhEtaPhiTriggerEMCALBCExoticCluster(0),      fhTimeTriggerEMCALBCExoticCluster(0), 
+    fhEtaPhiTriggerEMCALBCUMExoticCluster(0),    fhTimeTriggerEMCALBCUMExoticCluster(0), 
+    fhEtaPhiTriggerEMCALBCBadCluster(0),         fhTimeTriggerEMCALBCBadCluster(0),
+    fhEtaPhiTriggerEMCALBCUMBadCluster(0),       fhTimeTriggerEMCALBCUMBadCluster(0), 
+    fhEtaPhiNoTrigger(0),                        fhTimeNoTrigger(0),
+
+    fhEPhoton(0),                 fhPtPhoton(0),
     fhPhiPhoton(0),               fhEtaPhoton(0), 
     fhEtaPhiPhoton(0),            fhEtaPhi05Photon(0),
     fhEtaPhiPhotonEMCALBC0(0),    fhEtaPhiPhotonEMCALBC1(0),   fhEtaPhiPhotonEMCALBCN(0),
@@ -212,14 +228,26 @@ AliAnaPhoton::AliAnaPhoton() :
      fhClusterMultNoPileUp [i] = 0;
    }
    
-   for(Int_t i = 0; i < 13; i++)
+   for(Int_t i = 0; i < 11; i++)
    {
      fhEtaPhiTriggerEMCALBC             [i] = 0 ;
      fhTimeTriggerEMCALBC               [i] = 0 ;
+     fhEtaPhiTriggerEMCALBCUM           [i] = 0 ;
+     fhTimeTriggerEMCALBCUM             [i] = 0 ;
+
      fhEtaPhiPhotonTriggerEMCALBC       [i] = 0 ;
      fhTimePhotonTriggerEMCALBC         [i] = 0 ;
-     fhTimePhotonTriggerEMCALBCPileUpSPD[i] = 0;
-     fhTimeTriggerEMCALBCPileUpSPD      [i] = 0;
+     fhEtaPhiPhotonTriggerEMCALBCUM     [i] = 0 ;
+     fhTimePhotonTriggerEMCALBCUM       [i] = 0 ;
+     
+     fhTimePhotonTriggerEMCALBCPileUpSPD[i] = 0 ;
+     fhTimeTriggerEMCALBCPileUpSPD      [i] = 0 ;
+     
+     fhEtaPhiTriggerEMCALBCCluster      [i] = 0 ;
+     fhTimeTriggerEMCALBCCluster        [i] = 0 ;
+     fhEtaPhiTriggerEMCALBCUMCluster    [i] = 0 ;
+     fhTimeTriggerEMCALBCUMCluster      [i] = 0 ;
+
    }
    
   //Initialize parameters
@@ -243,7 +271,7 @@ Bool_t  AliAnaPhoton::ClusterSelected(AliVCluster* calo, TLorentzVector mom, Int
   
   
   if(GetDebug() > 2)
-    printf("AliAnaPhoton::ClusterSelected() Current Event %d; Before selection : E %2.2f, pT %2.2f, phi %2.2f, eta %2.2f\n",
+    printf("AliAnaPhoton::ClusterSelected() Current Event %d; Before selection : E %2.2f, pT %2.2f, phi %2.2f, eta %2.2f\n",
            GetReader()->GetEventNumber(),
            ecluster,ptcluster, phicluster*TMath::RadToDeg(),etacluster);
   
@@ -260,21 +288,123 @@ Bool_t  AliAnaPhoton::ClusterSelected(AliVCluster* calo, TLorentzVector mom, Int
       else                        fhEtaPhiEMCALBCN->Fill(etacluster, phicluster);
     }
     
-    Int_t bc = GetReader()->IsPileUpClusterTriggeredEvent();
-    if(bc > -6 && bc < 8)
+    Int_t bc = GetReader()->GetTriggerClusterBC();
+    Int_t id = GetReader()->GetTriggerClusterId();
+    
+    if(id==-2)
     {
-      if(ecluster > 2) fhEtaPhiTriggerEMCALBC[bc+5]->Fill(etacluster, phicluster);
-      fhTimeTriggerEMCALBC[bc+5]->Fill(ecluster, tofcluster);
-      if(GetReader()->IsPileUpFromSPD()) fhTimeTriggerEMCALBCPileUpSPD[bc+5]->Fill(ecluster, tofcluster);
-
+      //printf("AliAnaPhoton::ClusterSelected() - No trigger found bc=%d\n",bc);
+      fhEtaPhiNoTrigger->Fill(etacluster, phicluster);
+      fhTimeNoTrigger  ->Fill(ecluster, tofcluster);
     }
-    else printf("AliAnaPhoton::ClusterSelected() - Trigger BC not expected = %d\n",bc);
-    
+    else if(TMath::Abs(bc) < 6)
+    {
+      if(!GetReader()->IsBadCellTriggerEvent() && !GetReader()->IsExoticEvent() )
+      {
+        if(GetReader()->IsTriggerMatched())
+        {
+          if(ecluster > 2) fhEtaPhiTriggerEMCALBC[bc+5]->Fill(etacluster, phicluster);
+          fhTimeTriggerEMCALBC[bc+5]->Fill(ecluster, tofcluster);
+          if(GetReader()->IsPileUpFromSPD()) fhTimeTriggerEMCALBCPileUpSPD[bc+5]->Fill(ecluster, tofcluster);
+          
+          if(calo->GetID() ==  GetReader()->GetTriggerClusterId())
+          {
+            fhEtaPhiTriggerEMCALBCCluster[bc+5]->Fill(etacluster, phicluster);
+            fhTimeTriggerEMCALBCCluster[bc+5]  ->Fill(ecluster, tofcluster);
+            
+            if(bc==0)
+            {
+              Float_t threshold = GetReader()->GetEventTriggerThreshold() ;
+              if(ecluster > threshold)
+                fhEtaPhiTriggerEMCALBCClusterOverTh->Fill(etacluster, phicluster);
+              else if(ecluster > threshold-1)
+                fhEtaPhiTriggerEMCALBCClusterBelowTh1->Fill(etacluster, phicluster);
+              else 
+                fhEtaPhiTriggerEMCALBCClusterBelowTh2->Fill(etacluster, phicluster);
+            }
+          }
+        }
+        else
+        {
+          if(ecluster > 2) fhEtaPhiTriggerEMCALBCUM[bc+5]->Fill(etacluster, phicluster);
+          fhTimeTriggerEMCALBCUM[bc+5]->Fill(ecluster, tofcluster);
+          
+          if(calo->GetID() ==  GetReader()->GetTriggerClusterId())
+          {
+            fhEtaPhiTriggerEMCALBCUMCluster[bc+5]->Fill(etacluster, phicluster);
+            fhTimeTriggerEMCALBCUMCluster[bc+5]  ->Fill(ecluster, tofcluster);
+            if(bc==0)
+            {
+              Float_t threshold = GetReader()->GetEventTriggerThreshold() ;
+              if(ecluster > threshold)
+                fhEtaPhiTriggerEMCALBCUMClusterOverTh->Fill(etacluster, phicluster);
+              else if(ecluster > threshold-1)
+                fhEtaPhiTriggerEMCALBCUMClusterBelowTh1->Fill(etacluster, phicluster);
+              else
+                fhEtaPhiTriggerEMCALBCUMClusterBelowTh2->Fill(etacluster, phicluster);
+            }
+          }
+        }
+      }// neither bad nor exotic
+      else if(GetReader()->IsBadCellTriggerEvent() )
+      {
+        if(GetReader()->IsTriggerMatched())
+        {
+          if(ecluster > 2) fhEtaPhiTriggerEMCALBCBad->Fill(etacluster, phicluster);
+          fhTimeTriggerEMCALBCBad->Fill(ecluster, tofcluster);
+          
+          if(calo->GetID() ==  GetReader()->GetTriggerClusterId())
+          {
+            fhEtaPhiTriggerEMCALBCBadCluster->Fill(etacluster, phicluster);
+            fhTimeTriggerEMCALBCBadCluster  ->Fill(ecluster, tofcluster);
+          }
+        }
+        else
+        {
+          if(ecluster > 2) fhEtaPhiTriggerEMCALBCUMBad->Fill(etacluster, phicluster);
+          fhTimeTriggerEMCALBCUMBad->Fill(ecluster, tofcluster);
+          
+          if(calo->GetID() ==  GetReader()->GetTriggerClusterId())
+          {
+            fhEtaPhiTriggerEMCALBCUMBadCluster->Fill(etacluster, phicluster);
+            fhTimeTriggerEMCALBCUMBadCluster  ->Fill(ecluster, tofcluster);
+          }
+        }
+      }// Bad cluster trigger
+      else if(GetReader()->IsExoticEvent() )
+      {
+        if(GetReader()->IsTriggerMatched())
+        {
+          if(ecluster > 2) fhEtaPhiTriggerEMCALBCExotic->Fill(etacluster, phicluster);
+          fhTimeTriggerEMCALBCExotic->Fill(ecluster, tofcluster);
+          
+          if(calo->GetID() ==  GetReader()->GetTriggerClusterId())
+          {
+            fhEtaPhiTriggerEMCALBCExoticCluster->Fill(etacluster, phicluster);
+            fhTimeTriggerEMCALBCExoticCluster  ->Fill(ecluster, tofcluster);
+          }
+        }
+        else
+        {
+          if(ecluster > 2) fhEtaPhiTriggerEMCALBCUMExotic->Fill(etacluster, phicluster);
+          fhTimeTriggerEMCALBCUMExotic->Fill(ecluster, tofcluster);
+          
+          if(calo->GetID() ==  GetReader()->GetTriggerClusterId())
+          {
+            fhEtaPhiTriggerEMCALBCUMExoticCluster->Fill(etacluster, phicluster);
+            fhTimeTriggerEMCALBCUMExoticCluster  ->Fill(ecluster, tofcluster);
+          }
+        }
+      }
+    }
+    else if(TMath::Abs(bc) >= 6)
+      printf("AliAnaPhoton::ClusterSelected() - Trigger BC not expected = %d\n",bc);
+  
   }
   
   //.......................................
   //If too small or big energy, skip it
-  if(ecluster < GetMinEnergy() || ecluster > GetMaxEnergy() ) return kFALSE ; 
+  if(ecluster < GetMinEnergy() || ecluster > GetMaxEnergy() ) return kFALSE ;
   
   if(GetDebug() > 2) printf("\t Cluster %d Pass E Cut \n",calo->GetID());
   
@@ -1535,11 +1665,11 @@ TList *  AliAnaPhoton::GetCreateOutputObjects()
     fhEtaPhiEMCALBCN->SetXTitle("#eta");
     outputContainer->Add(fhEtaPhiEMCALBCN) ;
     
-    for(Int_t i = 0; i < 13; i++)
+    for(Int_t i = 0; i < 11; i++)
     {
       fhEtaPhiTriggerEMCALBC[i] = new TH2F
       (Form("hEtaPhiTriggerEMCALBC%d",i-5),
-       Form("cluster,E > 2 GeV, #eta vs #phi, Trigger EMCAL-BC=%d",i-5),
+       Form("cluster E > 2 GeV, #eta vs #phi, Trigger EMCAL-BC=%d",i-5),
        netabins,etamin,etamax,nphibins,phimin,phimax);
       fhEtaPhiTriggerEMCALBC[i]->SetYTitle("#phi (rad)");
       fhEtaPhiTriggerEMCALBC[i]->SetXTitle("#eta");
@@ -1547,7 +1677,7 @@ TList *  AliAnaPhoton::GetCreateOutputObjects()
       
       fhTimeTriggerEMCALBC[i] = new TH2F
       (Form("hTimeTriggerEMCALBC%d",i-5),
-       Form("time of cluster vs E of clusters, Trigger EMCAL-BC=%d",i-5),
+       Form("cluster time vs E of clusters, Trigger EMCAL-BC=%d",i-5),
        nptbins,ptmin,ptmax, ntimebins,timemin,timemax);
       fhTimeTriggerEMCALBC[i]->SetXTitle("E (GeV)");
       fhTimeTriggerEMCALBC[i]->SetYTitle("time (ns)");
@@ -1555,17 +1685,257 @@ TList *  AliAnaPhoton::GetCreateOutputObjects()
       
       fhTimeTriggerEMCALBCPileUpSPD[i] = new TH2F
       (Form("hTimeTriggerEMCALBC%dPileUpSPD",i-5),
-       Form("time of cluster vs E of clusters, Trigger EMCAL-BC=%d",i-5),
+       Form("cluster time vs E of clusters, Trigger EMCAL-BC=%d",i-5),
        nptbins,ptmin,ptmax, ntimebins,timemin,timemax);
       fhTimeTriggerEMCALBCPileUpSPD[i]->SetXTitle("E (GeV)");
       fhTimeTriggerEMCALBCPileUpSPD[i]->SetYTitle("time (ns)");
       outputContainer->Add(fhTimeTriggerEMCALBCPileUpSPD[i]);
-
+      
+      fhEtaPhiTriggerEMCALBCUM[i] = new TH2F
+      (Form("hEtaPhiTriggerEMCALBC%d_UnMatch",i-5),
+       Form("cluster E > 2 GeV, #eta vs #phi, unmatched trigger EMCAL-BC=%d",i-5),
+       netabins,etamin,etamax,nphibins,phimin,phimax);
+      fhEtaPhiTriggerEMCALBCUM[i]->SetYTitle("#phi (rad)");
+      fhEtaPhiTriggerEMCALBCUM[i]->SetXTitle("#eta");
+      outputContainer->Add(fhEtaPhiTriggerEMCALBCUM[i]) ;
+      
+      fhTimeTriggerEMCALBCUM[i] = new TH2F
+      (Form("hTimeTriggerEMCALBC%d_UnMatch",i-5),
+       Form("cluster time vs E of clusters, unmatched trigger EMCAL-BC=%d",i-5),
+       nptbins,ptmin,ptmax, ntimebins,timemin,timemax);
+      fhTimeTriggerEMCALBCUM[i]->SetXTitle("E (GeV)");
+      fhTimeTriggerEMCALBCUM[i]->SetYTitle("time (ns)");
+      outputContainer->Add(fhTimeTriggerEMCALBCUM[i]);
+      
+      fhEtaPhiTriggerEMCALBCCluster[i] = new TH2F
+      (Form("hEtaPhiTriggerEMCALBC%d_OnlyTrigger",i-5),
+       Form("trigger cluster, #eta vs #phi, Trigger EMCAL-BC=%d",i-5),
+       netabins,etamin,etamax,nphibins,phimin,phimax);
+      fhEtaPhiTriggerEMCALBCCluster[i]->SetYTitle("#phi (rad)");
+      fhEtaPhiTriggerEMCALBCCluster[i]->SetXTitle("#eta");
+      outputContainer->Add(fhEtaPhiTriggerEMCALBCCluster[i]) ;
+      
+      fhTimeTriggerEMCALBCCluster[i] = new TH2F
+      (Form("hTimeTriggerEMCALBC%d_OnlyTrigger",i-5),
+       Form("trigger cluster time vs E of clusters, Trigger EMCAL-BC=%d",i-5),
+       nptbins,ptmin,ptmax, ntimebins,timemin,timemax);
+      fhTimeTriggerEMCALBCCluster[i]->SetXTitle("E (GeV)");
+      fhTimeTriggerEMCALBCCluster[i]->SetYTitle("time (ns)");
+      outputContainer->Add(fhTimeTriggerEMCALBCCluster[i]);
+            
+      fhEtaPhiTriggerEMCALBCUMCluster[i] = new TH2F
+      (Form("hEtaPhiTriggerEMCALBC%d_OnlyTrigger_UnMatch",i-5),
+       Form("trigger cluster, #eta vs #phi, unmatched trigger EMCAL-BC=%d",i-5),
+       netabins,etamin,etamax,nphibins,phimin,phimax);
+      fhEtaPhiTriggerEMCALBCUMCluster[i]->SetYTitle("#phi (rad)");
+      fhEtaPhiTriggerEMCALBCUMCluster[i]->SetXTitle("#eta");
+      outputContainer->Add(fhEtaPhiTriggerEMCALBCUMCluster[i]) ;
+      
+      fhTimeTriggerEMCALBCUMCluster[i] = new TH2F
+      (Form("hTimeTriggerEMCALBC%d_OnlyTrigger_UnMatch",i-5),
+       Form("trigger cluster time vs E of clusters, unmatched trigger EMCAL-BC=%d",i-5),
+       nptbins,ptmin,ptmax, ntimebins,timemin,timemax);
+      fhTimeTriggerEMCALBCUMCluster[i]->SetXTitle("E (GeV)");
+      fhTimeTriggerEMCALBCUMCluster[i]->SetYTitle("time (ns)");
+      outputContainer->Add(fhTimeTriggerEMCALBCUMCluster[i]);
     }
+    
+    fhEtaPhiTriggerEMCALBCClusterOverTh = new TH2F
+    ("hEtaPhiTriggerEMCALBC0_OnlyTrigger_OverThreshold",
+     "trigger cluster E > trigger threshold, #eta vs #phi, Trigger EMCAL-BC=0",
+     netabins,etamin,etamax,nphibins,phimin,phimax);
+    fhEtaPhiTriggerEMCALBCClusterOverTh->SetYTitle("#phi (rad)");
+    fhEtaPhiTriggerEMCALBCClusterOverTh->SetXTitle("#eta");
+    outputContainer->Add(fhEtaPhiTriggerEMCALBCClusterOverTh) ;
+        
+    fhEtaPhiTriggerEMCALBCUMClusterOverTh = new TH2F
+    ("hEtaPhiTriggerEMCALBC0_OnlyTrigger_OverThreshold_UnMatch",
+     "trigger cluster E > trigger threshold, #eta vs #phi, unmatched trigger EMCAL-BC=0",
+     netabins,etamin,etamax,nphibins,phimin,phimax);
+    fhEtaPhiTriggerEMCALBCUMClusterOverTh->SetYTitle("#phi (rad)");
+    fhEtaPhiTriggerEMCALBCUMClusterOverTh->SetXTitle("#eta");
+    outputContainer->Add(fhEtaPhiTriggerEMCALBCUMClusterOverTh) ;
+
+    fhEtaPhiTriggerEMCALBCClusterBelowTh1 = new TH2F
+    ("hEtaPhiTriggerEMCALBC0_OnlyTrigger_BelowThreshold1",
+     "trigger cluster thresh-1 < E < thres, #eta vs #phi, Trigger EMCAL-BC=0",
+     netabins,etamin,etamax,nphibins,phimin,phimax);
+    fhEtaPhiTriggerEMCALBCClusterBelowTh1->SetYTitle("#phi (rad)");
+    fhEtaPhiTriggerEMCALBCClusterBelowTh1->SetXTitle("#eta");
+    outputContainer->Add(fhEtaPhiTriggerEMCALBCClusterBelowTh1) ;
+    
+    fhEtaPhiTriggerEMCALBCUMClusterBelowTh1 = new TH2F
+    ("hEtaPhiTriggerEMCALBC0_OnlyTrigger_BelowThreshold1_UnMatch",
+     "trigger cluster thresh-1 < E < thres, #eta vs #phi, unmatched trigger EMCAL-BC=0",
+     netabins,etamin,etamax,nphibins,phimin,phimax);
+    fhEtaPhiTriggerEMCALBCUMClusterBelowTh1->SetYTitle("#phi (rad)");
+    fhEtaPhiTriggerEMCALBCUMClusterBelowTh1->SetXTitle("#eta");
+    outputContainer->Add(fhEtaPhiTriggerEMCALBCUMClusterBelowTh1) ;
+
+    fhEtaPhiTriggerEMCALBCClusterBelowTh2 = new TH2F
+    ("hEtaPhiTriggerEMCALBC0_OnlyTrigger_BelowThreshold2",
+     "trigger cluster thresh-2 < E < thres, #eta vs #phi, Trigger EMCAL-BC=0",
+     netabins,etamin,etamax,nphibins,phimin,phimax);
+    fhEtaPhiTriggerEMCALBCClusterBelowTh2->SetYTitle("#phi (rad)");
+    fhEtaPhiTriggerEMCALBCClusterBelowTh2->SetXTitle("#eta");
+    outputContainer->Add(fhEtaPhiTriggerEMCALBCClusterBelowTh2) ;
+    
+    fhEtaPhiTriggerEMCALBCUMClusterBelowTh2 = new TH2F
+    ("hEtaPhiTriggerEMCALBC0_OnlyTrigger_BelowThreshold2_UnMatch",
+     "trigger cluster thresh-2 < E < thres, #eta vs #phi, unmatched trigger EMCAL-BC=0",
+     netabins,etamin,etamax,nphibins,phimin,phimax);
+    fhEtaPhiTriggerEMCALBCUMClusterBelowTh2->SetYTitle("#phi (rad)");
+    fhEtaPhiTriggerEMCALBCUMClusterBelowTh2->SetXTitle("#eta");
+    outputContainer->Add(fhEtaPhiTriggerEMCALBCUMClusterBelowTh2) ;
+
+    fhEtaPhiTriggerEMCALBCExotic = new TH2F
+    ("hEtaPhiTriggerExotic",
+     "cluster E > 2 GeV, #eta vs #phi, Trigger Exotic",
+     netabins,etamin,etamax,nphibins,phimin,phimax);
+    fhEtaPhiTriggerEMCALBCExotic->SetYTitle("#phi (rad)");
+    fhEtaPhiTriggerEMCALBCExotic->SetXTitle("#eta");
+    outputContainer->Add(fhEtaPhiTriggerEMCALBCExotic) ;
+    
+    fhTimeTriggerEMCALBCExotic = new TH2F
+    ("hTimeTriggerExotic",
+     "cluster time vs E of clusters, Trigger Exotic ",
+     nptbins,ptmin,ptmax, ntimebins,timemin,timemax);
+    fhTimeTriggerEMCALBCExotic->SetXTitle("E (GeV)");
+    fhTimeTriggerEMCALBCExotic->SetYTitle("time (ns)");
+    outputContainer->Add(fhTimeTriggerEMCALBCExotic);
+        
+    fhEtaPhiTriggerEMCALBCUMExotic = new TH2F
+    ("hEtaPhiTriggerExotic_UnMatch",
+     "cluster E > 2 GeV, #eta vs #phi, unmatched trigger Exotic",
+     netabins,etamin,etamax,nphibins,phimin,phimax);
+    fhEtaPhiTriggerEMCALBCUMExotic->SetYTitle("#phi (rad)");
+    fhEtaPhiTriggerEMCALBCUMExotic->SetXTitle("#eta");
+    outputContainer->Add(fhEtaPhiTriggerEMCALBCUMExotic) ;
+    
+    fhTimeTriggerEMCALBCUMExotic = new TH2F
+    ("hTimeTriggerExotic_UnMatch",
+     "cluster time vs E of clusters, unmatched trigger Exotic",
+     nptbins,ptmin,ptmax, ntimebins,timemin,timemax);
+    fhTimeTriggerEMCALBCUMExotic->SetXTitle("E (GeV)");
+    fhTimeTriggerEMCALBCUMExotic->SetYTitle("time (ns)");
+    outputContainer->Add(fhTimeTriggerEMCALBCUMExotic);
+    
+    fhEtaPhiTriggerEMCALBCExoticCluster = new TH2F
+    ("hEtaPhiTriggerExotic_OnlyTrigger",
+     "trigger cluster E > 2 GeV, #eta vs #phi, Trigger Exotic",
+     netabins,etamin,etamax,nphibins,phimin,phimax);
+    fhEtaPhiTriggerEMCALBCExoticCluster->SetYTitle("#phi (rad)");
+    fhEtaPhiTriggerEMCALBCExoticCluster->SetXTitle("#eta");
+    outputContainer->Add(fhEtaPhiTriggerEMCALBCExoticCluster) ;
+    
+    fhTimeTriggerEMCALBCExoticCluster = new TH2F
+    ("hTimeTriggerExotic_OnlyTrigger",
+     "trigger cluster time vs E of clusters, Trigger Exotic",
+     nptbins,ptmin,ptmax, ntimebins,timemin,timemax);
+    fhTimeTriggerEMCALBCExoticCluster->SetXTitle("E (GeV)");
+    fhTimeTriggerEMCALBCExoticCluster->SetYTitle("time (ns)");
+    outputContainer->Add(fhTimeTriggerEMCALBCExoticCluster);
+    
+    fhEtaPhiTriggerEMCALBCUMExoticCluster = new TH2F
+    ("hEtaPhiTriggerExotic_OnlyTrigger_UnMatch",
+     "trigger cluster E > 2 GeV, #eta vs #phi, unmatched trigger Exotic",
+     netabins,etamin,etamax,nphibins,phimin,phimax);
+    fhEtaPhiTriggerEMCALBCUMExoticCluster->SetYTitle("#phi (rad)");
+    fhEtaPhiTriggerEMCALBCUMExoticCluster->SetXTitle("#eta");
+    outputContainer->Add(fhEtaPhiTriggerEMCALBCUMExoticCluster) ;
+    
+    fhTimeTriggerEMCALBCUMExoticCluster = new TH2F
+    ("hTimeTriggerExotic_OnlyTrigger_UnMatch",
+     "trigger cluster time vs E of clusters, unmatched trigger Exotic",
+     nptbins,ptmin,ptmax, ntimebins,timemin,timemax);
+    fhTimeTriggerEMCALBCUMExoticCluster->SetXTitle("E (GeV)");
+    fhTimeTriggerEMCALBCUMExoticCluster->SetYTitle("time (ns)");
+    outputContainer->Add(fhTimeTriggerEMCALBCUMExoticCluster);
+    
+    fhEtaPhiTriggerEMCALBCBad = new TH2F
+    ("hEtaPhiTriggerBad",
+     "cluster E > 2 GeV, #eta vs #phi, Trigger Bad",
+     netabins,etamin,etamax,nphibins,phimin,phimax);
+    fhEtaPhiTriggerEMCALBCBad->SetYTitle("#phi (rad)");
+    fhEtaPhiTriggerEMCALBCBad->SetXTitle("#eta");
+    outputContainer->Add(fhEtaPhiTriggerEMCALBCBad) ;
+    
+    fhTimeTriggerEMCALBCBad = new TH2F
+    ("hTimeTriggerBad",
+     "cluster time vs E of clusters, Trigger Bad ",
+     nptbins,ptmin,ptmax, ntimebins,timemin,timemax);
+    fhTimeTriggerEMCALBCBad->SetXTitle("E (GeV)");
+    fhTimeTriggerEMCALBCBad->SetYTitle("time (ns)");
+    outputContainer->Add(fhTimeTriggerEMCALBCBad);
+    
+    fhEtaPhiTriggerEMCALBCUMBad = new TH2F
+    ("hEtaPhiTriggerBad_UnMatch",
+     "cluster E > 2 GeV, #eta vs #phi, unmatched trigger Bad",
+     netabins,etamin,etamax,nphibins,phimin,phimax);
+    fhEtaPhiTriggerEMCALBCUMBad->SetYTitle("#phi (rad)");
+    fhEtaPhiTriggerEMCALBCUMBad->SetXTitle("#eta");
+    outputContainer->Add(fhEtaPhiTriggerEMCALBCUMBad) ;
+    
+    fhTimeTriggerEMCALBCUMBad = new TH2F
+    ("hTimeTriggerBad_UnMatch",
+     "cluster time vs E of clusters, unmatched trigger Bad",
+     nptbins,ptmin,ptmax, ntimebins,timemin,timemax);
+    fhTimeTriggerEMCALBCUMBad->SetXTitle("E (GeV)");
+    fhTimeTriggerEMCALBCUMBad->SetYTitle("time (ns)");
+    outputContainer->Add(fhTimeTriggerEMCALBCUMBad);
+    
+    fhEtaPhiTriggerEMCALBCBadCluster = new TH2F
+    ("hEtaPhiTriggerBad_OnlyTrigger",
+     "trigger cluster E > 2 GeV, #eta vs #phi, Trigger Bad",
+     netabins,etamin,etamax,nphibins,phimin,phimax);
+    fhEtaPhiTriggerEMCALBCBadCluster->SetYTitle("#phi (rad)");
+    fhEtaPhiTriggerEMCALBCBadCluster->SetXTitle("#eta");
+    outputContainer->Add(fhEtaPhiTriggerEMCALBCBadCluster) ;
+    
+    fhTimeTriggerEMCALBCBadCluster = new TH2F
+    ("hTimeTriggerBad_OnlyTrigger",
+     "trigger cluster time vs E of clusters, Trigger Bad",
+     nptbins,ptmin,ptmax, ntimebins,timemin,timemax);
+    fhTimeTriggerEMCALBCBadCluster->SetXTitle("E (GeV)");
+    fhTimeTriggerEMCALBCBadCluster->SetYTitle("time (ns)");
+    outputContainer->Add(fhTimeTriggerEMCALBCBadCluster);
+    
+    fhEtaPhiTriggerEMCALBCUMBadCluster = new TH2F
+    ("hEtaPhiTriggerBad_OnlyTrigger_UnMatch",
+     "trigger cluster E > 2 GeV, #eta vs #phi, unmatched trigger Bad",
+     netabins,etamin,etamax,nphibins,phimin,phimax);
+    fhEtaPhiTriggerEMCALBCUMBadCluster->SetYTitle("#phi (rad)");
+    fhEtaPhiTriggerEMCALBCUMBadCluster->SetXTitle("#eta");
+    outputContainer->Add(fhEtaPhiTriggerEMCALBCUMBadCluster) ;
+    
+    fhTimeTriggerEMCALBCUMBadCluster = new TH2F
+    ("hTimeTriggerBad_OnlyTrigger_UnMatch",
+     "trigger cluster time vs E of clusters, unmatched trigger Bad",
+     nptbins,ptmin,ptmax, ntimebins,timemin,timemax);
+    fhTimeTriggerEMCALBCUMBadCluster->SetXTitle("E (GeV)");
+    fhTimeTriggerEMCALBCUMBadCluster->SetYTitle("time (ns)");
+    outputContainer->Add(fhTimeTriggerEMCALBCUMBadCluster);
+    
+    fhTimeNoTrigger = new TH2F
+    ("hTimeNoTrigger",
+     "events with no foundable trigger, time vs e of clusters",
+     nptbins,ptmin,ptmax, ntimebins,timemin,timemax);
+    fhTimeNoTrigger->SetXTitle("E (GeV)");
+    fhTimeNoTrigger->SetYTitle("time (ns)");
+    outputContainer->Add(fhTimeNoTrigger);
+
+    fhEtaPhiNoTrigger = new TH2F
+    ("hEtaPhiNoTrigger",
+     "events with no foundable trigger, eta vs phi of clusters",
+     netabins,etamin,etamax,nphibins,phimin,phimax);
+    fhEtaPhiNoTrigger->SetYTitle("#phi (rad)");
+    fhEtaPhiNoTrigger->SetXTitle("#eta");
+    outputContainer->Add(fhEtaPhiNoTrigger) ;
+
   }
   
   fhPhiPhoton  = new TH2F
-    ("hPhiPhoton","#phi_{#gamma} vs p_{T}",nptbins,ptmin,ptmax,nphibins,phimin,phimax); 
+    ("hPhiPhoton","#phi_{#gamma} vs p_{T}",nptbins,ptmin,ptmax,nphibins,phimin,phimax);
   fhPhiPhoton->SetYTitle("#phi (rad)");
   fhPhiPhoton->SetXTitle("p_{T #gamma} (GeV/c)");
   outputContainer->Add(fhPhiPhoton) ; 
@@ -1610,11 +1980,11 @@ TList *  AliAnaPhoton::GetCreateOutputObjects()
     fhEtaPhiPhotonEMCALBCN->SetXTitle("#eta");
     outputContainer->Add(fhEtaPhiPhotonEMCALBCN) ;
     
-    for(Int_t i = 0; i < 13; i++)
+    for(Int_t i = 0; i < 11; i++)
     {
       fhEtaPhiPhotonTriggerEMCALBC[i] = new TH2F
       (Form("hEtaPhiPhotonTriggerEMCALBC%d",i-5),
-       Form("cluster,E > 2 GeV, #eta vs #phi, PhotonTrigger EMCAL-BC=%d",i-5),
+       Form("photon E > 2 GeV, #eta vs #phi, PhotonTrigger EMCAL-BC=%d",i-5),
        netabins,etamin,etamax,nphibins,phimin,phimax);
       fhEtaPhiPhotonTriggerEMCALBC[i]->SetYTitle("#phi (rad)");
       fhEtaPhiPhotonTriggerEMCALBC[i]->SetXTitle("#eta");
@@ -1622,7 +1992,7 @@ TList *  AliAnaPhoton::GetCreateOutputObjects()
       
       fhTimePhotonTriggerEMCALBC[i] = new TH2F
       (Form("hTimePhotonTriggerEMCALBC%d",i-5),
-       Form("time of cluster vs E of clusters, PhotonTrigger EMCAL-BC=%d",i-5),
+       Form("photon time vs E of clusters, PhotonTrigger EMCAL-BC=%d",i-5),
        nptbins,ptmin,ptmax, ntimebins,timemin,timemax);
       fhTimePhotonTriggerEMCALBC[i]->SetXTitle("E (GeV)");
       fhTimePhotonTriggerEMCALBC[i]->SetYTitle("time (ns)");
@@ -1630,12 +2000,28 @@ TList *  AliAnaPhoton::GetCreateOutputObjects()
       
       fhTimePhotonTriggerEMCALBCPileUpSPD[i] = new TH2F
       (Form("hTimePhotonTriggerEMCALBC%dPileUpSPD",i-5),
-       Form("time of cluster vs E of clusters, PhotonTrigger EMCAL-BC=%d",i-5),
+       Form("photon time vs E, PhotonTrigger EMCAL-BC=%d",i-5),
        nptbins,ptmin,ptmax, ntimebins,timemin,timemax);
       fhTimePhotonTriggerEMCALBCPileUpSPD[i]->SetXTitle("E (GeV)");
       fhTimePhotonTriggerEMCALBCPileUpSPD[i]->SetYTitle("time (ns)");
       outputContainer->Add(fhTimePhotonTriggerEMCALBCPileUpSPD[i]);
       
+      fhEtaPhiPhotonTriggerEMCALBCUM[i] = new TH2F
+      (Form("hEtaPhiPhotonTriggerEMCALBC%d_UnMatch",i-5),
+       Form("photon E > 2 GeV, #eta vs #phi, unmatched trigger EMCAL-BC=%d",i-5),
+       netabins,etamin,etamax,nphibins,phimin,phimax);
+      fhEtaPhiPhotonTriggerEMCALBCUM[i]->SetYTitle("#phi (rad)");
+      fhEtaPhiPhotonTriggerEMCALBCUM[i]->SetXTitle("#eta");
+      outputContainer->Add(fhEtaPhiPhotonTriggerEMCALBCUM[i]) ;
+      
+      fhTimePhotonTriggerEMCALBCUM[i] = new TH2F
+      (Form("hTimePhotonTriggerEMCALBC%d_UnMatch",i-5),
+       Form("photon time vs E, unmatched trigger EMCAL-BC=%d",i-5),
+       nptbins,ptmin,ptmax, ntimebins,timemin,timemax);
+      fhTimePhotonTriggerEMCALBCUM[i]->SetXTitle("E (GeV)");
+      fhTimePhotonTriggerEMCALBCUM[i]->SetYTitle("time (ns)");
+      outputContainer->Add(fhTimePhotonTriggerEMCALBCUM[i]);
+      
     }
   }
   
@@ -2789,6 +3175,49 @@ void  AliAnaPhoton::MakeAnalysisFillAOD()
     }
   }
   
+  // Fill some trigger related histograms
+  Int_t idTrig = GetReader()->GetTriggerClusterId();
+  if( fFillEMCALBCHistograms && fCalorimeter=="EMCAL" &&
+      ( GetReader()->IsBadCellTriggerEvent() || GetReader()->IsExoticEvent())  && idTrig >= 0)
+  {
+    AliVCluster * badClusTrig = GetReader()->GetInputEvent()->GetCaloCluster(GetReader()->GetTriggerClusterIndex());
+    TLorentzVector momBadClus;
+    badClusTrig->GetMomentum(momBadClus,GetVertex(0));
+  
+    Float_t etaclusterBad = momBadClus.Eta();
+    Float_t phiclusterBad = momBadClus.Phi();
+    if( phiclusterBad < 0 ) phiclusterBad+=TMath::TwoPi();
+    Float_t tofclusterBad = badClusTrig->GetTOF()*1.e9;
+    Float_t eclusterBad   = badClusTrig->E();
+    
+    if(GetReader()->IsBadCellTriggerEvent() )
+    {
+      if(GetReader()->IsTriggerMatched())
+      {
+        fhEtaPhiTriggerEMCALBCBadCluster->Fill(etaclusterBad, phiclusterBad);
+        fhTimeTriggerEMCALBCBadCluster  ->Fill(eclusterBad,   tofclusterBad);
+      }
+      else
+      {
+        fhEtaPhiTriggerEMCALBCUMBadCluster->Fill(etaclusterBad, phiclusterBad);
+        fhTimeTriggerEMCALBCUMBadCluster  ->Fill(eclusterBad,   tofclusterBad);
+      }
+    }// Bad cluster trigger
+    else if(GetReader()->IsExoticEvent() )
+    {
+      if(GetReader()->IsTriggerMatched())
+      {
+        fhEtaPhiTriggerEMCALBCExoticCluster->Fill(etaclusterBad, phiclusterBad);
+        fhTimeTriggerEMCALBCExoticCluster  ->Fill(eclusterBad, tofclusterBad);
+      }
+      else
+      {
+        fhEtaPhiTriggerEMCALBCUMExoticCluster->Fill(etaclusterBad, phiclusterBad);
+        fhTimeTriggerEMCALBCUMExoticCluster  ->Fill(eclusterBad, tofclusterBad);
+      }
+    }
+  }
+  
   //Init arrays, variables, get number of clusters
   TLorentzVector mom, mom2 ;
   Int_t nCaloClusters = pl->GetEntriesFast();
@@ -2816,7 +3245,8 @@ void  AliAnaPhoton::MakeAnalysisFillAOD()
     //Cluster selection, not charged, with photon id and in fiducial cut         
     if(GetReader()->GetDataType() != AliCaloTrackReader::kMC)
     {
-      calo->GetMomentum(mom,GetVertex(evtIndex)) ;}//Assume that come from vertex in straight line
+      calo->GetMomentum(mom,GetVertex(evtIndex)) ;
+    }//Assume that come from vertex in straight line
     else
     {
       Double_t vertex[]={0,0,0};
@@ -2922,7 +3352,7 @@ void  AliAnaPhoton::MakeAnalysisFillAOD()
     // Add number of local maxima to AOD, method name in AOD to be FIXED
     aodph.SetFiducialArea(nMaxima);
     
-    if(fFillEMCALBCHistograms && fCalorimeter=="EMCAL")
+    if(fFillEMCALBCHistograms && fCalorimeter=="EMCAL" && idTrig >= 0)
     {
       Double_t calotof   = calo->GetTOF()*1e9;
       Float_t  calotofUS = TMath::Abs(calotof);
@@ -2936,14 +3366,23 @@ void  AliAnaPhoton::MakeAnalysisFillAOD()
         else                     fhEtaPhiPhotonEMCALBCN->Fill(aodph.Eta(), phicluster);
       }
       
-      Int_t bc = GetReader()->IsPileUpClusterTriggeredEvent();
-      if(bc > -6 && bc < 8)
+      Int_t bc = GetReader()->GetTriggerClusterBC();
+      if(TMath::Abs(bc) < 6 && !GetReader()->IsBadCellTriggerEvent() && !GetReader()->IsExoticEvent())
       {
-        if(calo->E() > 2) fhEtaPhiPhotonTriggerEMCALBC[bc+5]->Fill(aodph.Eta(), phicluster);
-        fhTimePhotonTriggerEMCALBC[bc+5]->Fill(calo->E(), calotof);
-        if(GetReader()->IsPileUpFromSPD()) fhTimePhotonTriggerEMCALBCPileUpSPD[bc+5]->Fill(calo->E(), calotof);
+        if(GetReader()->IsTriggerMatched())
+        {
+          if(calo->E() > 2) fhEtaPhiPhotonTriggerEMCALBC[bc+5]->Fill(aodph.Eta(), phicluster);
+          fhTimePhotonTriggerEMCALBC[bc+5]->Fill(calo->E(), calotof);
+          if(GetReader()->IsPileUpFromSPD()) fhTimePhotonTriggerEMCALBCPileUpSPD[bc+5]->Fill(calo->E(), calotof);
+        }
+        else
+        {
+          if(calo->E() > 2) fhEtaPhiPhotonTriggerEMCALBCUM[bc+5]->Fill(aodph.Eta(), phicluster);
+          fhTimePhotonTriggerEMCALBCUM[bc+5]->Fill(calo->E(), calotof);
+        }
       }
-      else printf("AliAnaPhoton::MakeAnalysisFillAOD() - Trigger BC not expected = %d\n",bc);
+      else if(TMath::Abs(bc) >= 6)
+        printf("AliAnaPhoton::MakeAnalysisFillAOD() - Trigger BC not expected = %d\n",bc);
     }
     
     //Add AOD with photon object to aod branch
index 05d6a71dbbe0ceed19cf1765c9da18dad9555933..294782f4ebed1c72f8462ee641da07715f799824 100755 (executable)
@@ -156,10 +156,48 @@ 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[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
-
+  TH2F * fhEtaPhiTriggerEMCALBC[11] ;     //! Pseudorapidity vs Phi of clusters for E > 2
+  TH2F * fhTimeTriggerEMCALBC  [11] ;     //! Time distribution of clusters, when trigger is in a given BC
+  TH2F * fhTimeTriggerEMCALBCPileUpSPD[11]; //! Time distribution of clusters, when trigger is in a given BC, tagged as pile-up SPD
+
+  TH2F * fhEtaPhiTriggerEMCALBCUM[11] ;     //! Pseudorapidity vs Phi of clusters for E > 2, not matched to trigger
+  TH2F * fhTimeTriggerEMCALBCUM  [11] ;     //! Time distribution of clusters, when trigger is in a given BC, not matched to trigger
+  
+  TH2F * fhEtaPhiTriggerEMCALBCCluster  [11] ; //! Pseudorapidity vs Phi of trigger clusters
+  TH2F * fhTimeTriggerEMCALBCCluster    [11] ; //! Time distribution of clusters, when trigger cluster is in a given BC
+  TH2F * fhEtaPhiTriggerEMCALBCUMCluster[11] ; //! Pseudorapidity vs Phi of highest E cluster  in event, not matched to trigger
+  TH2F * fhTimeTriggerEMCALBCUMCluster  [11] ; //! Time distribution of highest energy cluster in event, when trigger is in a given BC, not
+  
+  TH2F * fhEtaPhiTriggerEMCALBCClusterOverTh     ; //! Pseudorapidity vs Phi of trigger clusters, over nominal threshold
+  TH2F * fhEtaPhiTriggerEMCALBCUMClusterOverTh   ; //! Pseudorapidity vs Phi of highest E cluster  in event, not matched to trigger, over nominal threshold
+  TH2F * fhEtaPhiTriggerEMCALBCClusterBelowTh1   ; //! Pseudorapidity vs Phi of trigger clusters, 1 GeV below nominal threshold
+  TH2F * fhEtaPhiTriggerEMCALBCUMClusterBelowTh1 ; //! Pseudorapidity vs Phi of highest E cluster  in event, not matched to trigger, 2 GeV below nominal threshold
+  TH2F * fhEtaPhiTriggerEMCALBCClusterBelowTh2   ; //! Pseudorapidity vs Phi of trigger clusters, 1 GeV below nominal threshold
+  TH2F * fhEtaPhiTriggerEMCALBCUMClusterBelowTh2 ; //! Pseudorapidity vs Phi of highest E cluster  in event, not matched to trigger, 2 GeV below nominal threshold
+
+  TH2F * fhEtaPhiTriggerEMCALBCExotic   ; //! Pseudorapidity vs Phi of trigger exotic clusters
+  TH2F * fhTimeTriggerEMCALBCExotic     ; //! Time distribution of clusters, when trigger exotic cluster is in a given BC
+  TH2F * fhEtaPhiTriggerEMCALBCUMExotic ; //! Pseudorapidity vs Phi of highest E exotic cluster  in event, not matched to trigger
+  TH2F * fhTimeTriggerEMCALBCUMExotic   ; //! Time distribution of highest energy exotic cluster in event, when trigger is in a given BC, not
+
+  TH2F * fhEtaPhiTriggerEMCALBCBad      ; //! Pseudorapidity vs Phi of trigger exotic clusters
+  TH2F * fhTimeTriggerEMCALBCBad        ; //! Time distribution of clusters, when trigger exotic cluster is in a given BC
+  TH2F * fhEtaPhiTriggerEMCALBCUMBad    ; //! Pseudorapidity vs Phi of highest E exotic cluster  in event, not matched to trigger
+  TH2F * fhTimeTriggerEMCALBCUMBad      ; //! Time distribution of highest energy exotic cluster in event, when trigger is in a given BC, not
+  
+  TH2F * fhEtaPhiTriggerEMCALBCExoticCluster   ; //! Pseudorapidity vs Phi of trigger exotic clusters
+  TH2F * fhTimeTriggerEMCALBCExoticCluster     ; //! Time distribution of clusters, when trigger exotic cluster is in a given BC
+  TH2F * fhEtaPhiTriggerEMCALBCUMExoticCluster ; //! Pseudorapidity vs Phi of highest E exotic cluster  in event, not matched to trigger
+  TH2F * fhTimeTriggerEMCALBCUMExoticCluster   ; //! Time distribution of highest energy exotic cluster in event, when trigger is in a given BC, not
+  
+  TH2F * fhEtaPhiTriggerEMCALBCBadCluster      ; //! Pseudorapidity vs Phi of trigger exotic clusters
+  TH2F * fhTimeTriggerEMCALBCBadCluster        ; //! Time distribution of clusters, when trigger exotic cluster is in a given BC
+  TH2F * fhEtaPhiTriggerEMCALBCUMBadCluster    ; //! Pseudorapidity vs Phi of highest E exotic cluster  in event, not matched to trigger
+  TH2F * fhTimeTriggerEMCALBCUMBadCluster      ; //! Time distribution of highest energy exotic cluster in event, when trigger is in a given BC, not
+
+  TH2F * fhEtaPhiNoTrigger ;             //! Pseudorapidity vs Phi of highest E exotic cluster  in event, no trigger at all
+  TH2F * fhTimeNoTrigger   ;             //! Time distribution of highest energy exotic cluster in event, no trigger at all
+  
   TH1F * fhEPhoton    ;                  //! Number of identified photon vs energy
   TH1F * fhPtPhoton   ;                  //! Number of identified photon vs transerse momentum 
   TH2F * fhPhiPhoton  ;                  //! Azimuthal angle of identified  photon vs transerse momentum 
@@ -169,9 +207,12 @@ 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[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 * fhEtaPhiPhotonTriggerEMCALBC[11]; //! Pseudorapidity vs Phi of photons for E > 0.5
+  TH2F * fhTimePhotonTriggerEMCALBC  [11]; //! Time distribution of photons, when trigger is in a given BC
+  TH2F * fhTimePhotonTriggerEMCALBCPileUpSPD[11] ; //! Time distribution of photons, when trigger is in a given BC, tagged as pile-up SPD
+  TH2F * fhEtaPhiPhotonTriggerEMCALBCUM[11]; //! Pseudorapidity vs Phi of photons for E > 2, not matched to trigger
+  TH2F * fhTimePhotonTriggerEMCALBCUM  [11]; //! Time distribution of photons, when trigger is in a given BC, not matched to trigger
+
   TH2F * fhPtCentralityPhoton    ;       //! centrality  vs photon pT
   TH2F * fhPtEventPlanePhoton    ;       //! event plane vs photon pT
   
@@ -338,7 +379,7 @@ class AliAnaPhoton : public AliAnaCaloTrackCorrBaseClass {
   AliAnaPhoton(              const AliAnaPhoton & g) ; // cpy ctor
   AliAnaPhoton & operator = (const AliAnaPhoton & g) ; // cpy assignment
   
-  ClassDef(AliAnaPhoton,30)
+  ClassDef(AliAnaPhoton,31)
 
 } ;
  
index 0b7891aa869f890506097a77e71948a670ab2706..75ff5be2721188c76cdaa192ff901153d4c23a39 100755 (executable)
@@ -186,11 +186,15 @@ AliAnaPi0EbE::AliAnaPi0EbE() :
     if(i<8)fhMassPairLocMax[i] = 0;
   }
   
-  for(Int_t i = 0; i < 13; i++)
+  for(Int_t i = 0; i < 11; i++)
   {
     fhEtaPhiTriggerEMCALBC       [i] = 0 ;
     fhTimeTriggerEMCALBC         [i] = 0 ;
     fhTimeTriggerEMCALBCPileUpSPD[i] = 0 ;
+    
+    fhEtaPhiTriggerEMCALBCUM     [i] = 0 ;
+    fhTimeTriggerEMCALBCUM       [i] = 0 ;
+
   }
   
   //Initialize parameters
@@ -726,11 +730,11 @@ TList *  AliAnaPi0EbE::GetCreateOutputObjects()
     fhEtaPhiEMCALBCN->SetXTitle("#eta");
     outputContainer->Add(fhEtaPhiEMCALBCN) ;
     
-    for(Int_t i = 0; i < 13; i++)
+    for(Int_t i = 0; i < 11; i++)
     {
       fhEtaPhiTriggerEMCALBC[i] = new TH2F
       (Form("hEtaPhiTriggerEMCALBC%d",i-5),
-       Form("cluster,E > 2 GeV, #eta vs #phi, Trigger EMCAL-BC=%d",i-5),
+       Form("meson E > 2 GeV, #eta vs #phi, Trigger EMCAL-BC=%d",i-5),
        netabins,etamin,etamax,nphibins,phimin,phimax);
       fhEtaPhiTriggerEMCALBC[i]->SetYTitle("#phi (rad)");
       fhEtaPhiTriggerEMCALBC[i]->SetXTitle("#eta");
@@ -738,7 +742,7 @@ TList *  AliAnaPi0EbE::GetCreateOutputObjects()
       
       fhTimeTriggerEMCALBC[i] = new TH2F
       (Form("hTimeTriggerEMCALBC%d",i-5),
-       Form("time of cluster vs E of clusters, Trigger EMCAL-BC=%d",i-5),
+       Form("meson time vs E, Trigger EMCAL-BC=%d",i-5),
        nptbins,ptmin,ptmax, ntimebins,timemin,timemax);
       fhTimeTriggerEMCALBC[i]->SetXTitle("E (GeV)");
       fhTimeTriggerEMCALBC[i]->SetYTitle("time (ns)");
@@ -746,11 +750,28 @@ TList *  AliAnaPi0EbE::GetCreateOutputObjects()
       
       fhTimeTriggerEMCALBCPileUpSPD[i] = new TH2F
       (Form("hTimeTriggerEMCALBC%dPileUpSPD",i-5),
-       Form("time of cluster vs E of clusters, Trigger EMCAL-BC=%d",i-5),
+       Form("meson time vs E, Trigger EMCAL-BC=%d",i-5),
        nptbins,ptmin,ptmax, ntimebins,timemin,timemax);
       fhTimeTriggerEMCALBCPileUpSPD[i]->SetXTitle("E (GeV)");
       fhTimeTriggerEMCALBCPileUpSPD[i]->SetYTitle("time (ns)");
       outputContainer->Add(fhTimeTriggerEMCALBCPileUpSPD[i]);
+      
+      fhEtaPhiTriggerEMCALBCUM[i] = new TH2F
+      (Form("hEtaPhiTriggerEMCALBC%d_UnMatch",i-5),
+       Form("meson E > 2 GeV, #eta vs #phi, unmatched trigger EMCAL-BC=%d",i-5),
+       netabins,etamin,etamax,nphibins,phimin,phimax);
+      fhEtaPhiTriggerEMCALBCUM[i]->SetYTitle("#phi (rad)");
+      fhEtaPhiTriggerEMCALBCUM[i]->SetXTitle("#eta");
+      outputContainer->Add(fhEtaPhiTriggerEMCALBCUM[i]) ;
+      
+      fhTimeTriggerEMCALBCUM[i] = new TH2F
+      (Form("hTimeTriggerEMCALBC%d_UnMatch",i-5),
+       Form("meson time vs E, unmatched trigger EMCAL-BC=%d",i-5),
+       nptbins,ptmin,ptmax, ntimebins,timemin,timemax);
+      fhTimeTriggerEMCALBCUM[i]->SetXTitle("E (GeV)");
+      fhTimeTriggerEMCALBCUM[i]->SetYTitle("time (ns)");
+      outputContainer->Add(fhTimeTriggerEMCALBCUM[i]);
+
     }
   }
   
@@ -2525,7 +2546,8 @@ void  AliAnaPi0EbE::MakeShowerShapeIdentification()
 
     FillPileUpHistograms(calo->E(),tofcluster);
  
-    if(fFillEMCALBCHistograms && fCalorimeter=="EMCAL")
+    Int_t id = GetReader()->GetTriggerClusterId();
+    if(fFillEMCALBCHistograms && fCalorimeter=="EMCAL" && id >=0 )
     {
       Float_t phicluster = aodpi0.Phi();
       if(phicluster < 0) phicluster+=TMath::TwoPi();
@@ -2537,14 +2559,23 @@ void  AliAnaPi0EbE::MakeShowerShapeIdentification()
         else                        fhEtaPhiEMCALBCN->Fill(aodpi0.Eta(), phicluster);
       }
       
-      Int_t bc = GetReader()->IsPileUpClusterTriggeredEvent();
-      if(bc > -7 && bc < 8)
+      Int_t bc = GetReader()->GetTriggerClusterBC();
+      if(TMath::Abs(bc) < 6  && !GetReader()->IsBadCellTriggerEvent() && !GetReader()->IsExoticEvent() )
       {
-        if(calo->E() > 2) fhEtaPhiTriggerEMCALBC[bc+5]->Fill(aodpi0.Eta(), phicluster);
-        fhTimeTriggerEMCALBC[bc+5]->Fill(calo->E(), tofcluster);
-        if(GetReader()->IsPileUpFromSPD()) fhTimeTriggerEMCALBCPileUpSPD[bc+5]->Fill(calo->E(), tofcluster);
+        if(GetReader()->IsTriggerMatched())
+        {
+          if(calo->E() > 2) fhEtaPhiTriggerEMCALBC[bc+5]->Fill(aodpi0.Eta(), phicluster);
+          fhTimeTriggerEMCALBC[bc+5]->Fill(calo->E(), tofcluster);
+          if(GetReader()->IsPileUpFromSPD()) fhTimeTriggerEMCALBCPileUpSPD[bc+5]->Fill(calo->E(), tofcluster);
+        }
+        else
+        {
+          if(calo->E() > 2) fhEtaPhiTriggerEMCALBCUM[bc+5]->Fill(aodpi0.Eta(), phicluster);
+          fhTimeTriggerEMCALBCUM[bc+5]->Fill(calo->E(), tofcluster);
+        }
       }
-      else printf("AliAnaPi0EbE::MakeShowerShapeIdentification() - Trigger BC not expected = %d\n",bc);
+      else if(TMath::Abs(bc) >= 6)
+        printf("AliAnaPi0EbE::MakeShowerShapeIdentification() - Trigger BC not expected = %d\n",bc);
     }
     
     //Add AOD with pi0 object to aod branch
index feb5b55a24889fea47534664b548fc4084e94450..56adf2d0c6405c8a1b7c9381d415fba655ec1275 100755 (executable)
@@ -162,9 +162,11 @@ class AliAnaPi0EbE : public AliAnaCaloTrackCorrBaseClass {
   TH2F         * fhEtaPhiEMCALBC1  ;       //! Pseudorapidity vs Phi of clusters 
   TH2F         * fhEtaPhiEMCALBCN  ;       //! Pseudorapidity vs Phi of clusters 
 
-  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         * fhEtaPhiTriggerEMCALBC[11]  ;    //! Pseudorapidity vs Phi of pi0 for E > 2
+  TH2F         * fhTimeTriggerEMCALBC  [11]  ;    //! Time distribution of pi0, when trigger is in a given BC
+  TH2F         * fhTimeTriggerEMCALBCPileUpSPD[11] ; //! Time distribution of pi0, when trigger is in a given BC, tagged as pile-up SPD
+  TH2F         * fhEtaPhiTriggerEMCALBCUM[11]  ;  //! Pseudorapidity vs Phi of pi0 for E > 2, not matched to trigger
+  TH2F         * fhTimeTriggerEMCALBCUM[11]  ;    //! Time distribution of pi0, when trigger is in a given BC, not matched to trigger
 
   TH2F         * fhPtCentrality ;          //! centrality  vs pi0/eta pT
   TH2F         * fhPtEventPlane ;          //! event plane vs pi0/eta pT
@@ -322,7 +324,7 @@ class AliAnaPi0EbE : public AliAnaCaloTrackCorrBaseClass {
   AliAnaPi0EbE(              const AliAnaPi0EbE & pi0ebe) ; // cpy ctor
   AliAnaPi0EbE & operator = (const AliAnaPi0EbE & pi0ebe) ; // cpy assignment
   
-  ClassDef(AliAnaPi0EbE,26)
+  ClassDef(AliAnaPi0EbE,27)
 } ;