add correlation of event BC and trigger BC, differenciate bad clusters with main...
authorgconesab <gconesab@f7af4fe6-9843-0410-8265-dc069ae4e863>
Fri, 14 Jun 2013 12:32:49 +0000 (12:32 +0000)
committergconesab <gconesab@f7af4fe6-9843-0410-8265-dc069ae4e863>
Fri, 14 Jun 2013 12:32:49 +0000 (12:32 +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

index efa9b22..155f155 100755 (executable)
@@ -61,10 +61,15 @@ fhEMCalBCEvent(0),            fhEMCalBCEventCut(0),
 fhTrackBCEvent(0),            fhTrackBCEventCut(0),
 fhPrimaryVertexBC(0),         fhTimeStampFraction(0),
 fhNPileUpVertSPD(0),          fhNPileUpVertTracks(0),
-fhClusterTriggerBC(0),        fhClusterTriggerBCExotic(0),
-fhClusterTriggerBCBad(0),     fhClusterTriggerBCBadExotic(0),
-fhClusterTriggerBCUnMatch(0), fhClusterTriggerBCExoticUnMatch(0),
-fhClusterTriggerBCBadUnMatch(0), fhClusterTriggerBCBadExoticUnMatch(0)
+
+fhClusterTriggerBC(0),                  fhClusterTriggerBCExotic(0),
+fhClusterTriggerBCBadCell(0),           fhClusterTriggerBCBadCellExotic(0),
+fhClusterTriggerBCBadCluster(0),        fhClusterTriggerBCBadClusterExotic(0),
+fhClusterTriggerBCUnMatch(0),           fhClusterTriggerBCExoticUnMatch(0),
+fhClusterTriggerBCBadCellUnMatch(0),    fhClusterTriggerBCBadCellExoticUnMatch(0),
+fhClusterTriggerBCBadClusterUnMatch(0), fhClusterTriggerBCBadClusterExoticUnMatch(0),
+fhClusterTriggerBCEventBC(0),           fhClusterTriggerBCEventBCUnMatch(0),
+fhClusterTriggerBCExoticEventBC(0),     fhClusterTriggerBCExoticEventBCUnMatch(0)
 {
   //Default Ctor
   if(fAnaDebug > 1 ) printf("*** Analysis Maker Constructor *** \n");
@@ -105,12 +110,21 @@ fhNPileUpVertSPD(maker.fhNPileUpVertSPD),
 fhNPileUpVertTracks(maker.fhNPileUpVertTracks),
 fhClusterTriggerBC(maker.fhClusterTriggerBC),
 fhClusterTriggerBCExotic(maker.fhClusterTriggerBCExotic),
-fhClusterTriggerBCBad(maker.fhClusterTriggerBCBad),
-fhClusterTriggerBCBadExotic(maker.fhClusterTriggerBCBadExotic),
+fhClusterTriggerBCBadCell(maker.fhClusterTriggerBCBadCell),
+fhClusterTriggerBCBadCellExotic(maker.fhClusterTriggerBCBadCellExotic),
+fhClusterTriggerBCBadCluster(maker.fhClusterTriggerBCBadCluster),
+fhClusterTriggerBCBadClusterExotic(maker.fhClusterTriggerBCBadClusterExotic),
 fhClusterTriggerBCUnMatch(maker.fhClusterTriggerBCUnMatch),
 fhClusterTriggerBCExoticUnMatch(maker.fhClusterTriggerBCExoticUnMatch),
-fhClusterTriggerBCBadUnMatch(maker.fhClusterTriggerBCBadUnMatch),
-fhClusterTriggerBCBadExoticUnMatch(maker.fhClusterTriggerBCBadExoticUnMatch)
+fhClusterTriggerBCBadCellUnMatch(maker.fhClusterTriggerBCBadCellUnMatch),
+fhClusterTriggerBCBadCellExoticUnMatch(maker.fhClusterTriggerBCBadCellExoticUnMatch),
+fhClusterTriggerBCBadClusterUnMatch(maker.fhClusterTriggerBCBadClusterUnMatch),
+fhClusterTriggerBCBadClusterExoticUnMatch(maker.fhClusterTriggerBCBadClusterExoticUnMatch),
+fhClusterTriggerBCEventBC(maker.fhClusterTriggerBCEventBC),
+fhClusterTriggerBCEventBCUnMatch(maker.fhClusterTriggerBCEventBCUnMatch),
+fhClusterTriggerBCExoticEventBC(maker.fhClusterTriggerBCExoticEventBC),
+fhClusterTriggerBCExoticEventBCUnMatch(maker.fhClusterTriggerBCExoticEventBCUnMatch)
+
 {
   // cpy ctor
 }
@@ -328,10 +342,53 @@ TList *AliAnaCaloTrackCorrMaker::GetOutputContainer()
   fhNEventsNoTriggerFound->SetYTitle("# exotic events");
   fOutputContainer->Add(fhNEventsNoTriggerFound);
   
+  
   Int_t   nbin   = 11;
   Float_t minbin =-5.5;
   Float_t maxbin = 5.5;
-  Int_t  labelshift = 6;
+  Int_t  labelshift = 6;  
+  
+  fhClusterTriggerBCEventBC      = new TH2F("hClusterTriggerBCEventBC", "Found trigger BC and  Event BC",
+                                            nbin , minbin ,maxbin,4,0, 4) ;
+  fhClusterTriggerBCEventBC->SetXTitle("cluster trigger BC");
+  for(Int_t i = 1; i < 5; i++)
+    fhClusterTriggerBCEventBC->GetYaxis()->SetBinLabel(i ,Form("BC/4=%d",i));
+    fhClusterTriggerBCEventBC->SetXTitle("cluster trigger BC");
+  for(Int_t i = 1; i < 12; i++)
+    fhClusterTriggerBCEventBC->GetXaxis()->SetBinLabel(i ,Form("BC%d",i-labelshift));
+    fhClusterTriggerBCEventBC->SetYTitle("Event BC%4");
+  fOutputContainer->Add(fhClusterTriggerBCEventBC);
+  
+  fhClusterTriggerBCExoticEventBC      = new TH2F("hClusterTriggerBCExoticEventBC", "Found exotic trigger BC and  Event BC",
+                                                  nbin , minbin ,maxbin,4,1, 4) ;
+  for(Int_t i = 1; i < 5; i++)
+    fhClusterTriggerBCExoticEventBC->GetYaxis()->SetBinLabel(i ,Form("BC/4=%d",i));
+    fhClusterTriggerBCExoticEventBC->SetXTitle("cluster trigger BC");
+  for(Int_t i = 1; i < 12; i++)
+    fhClusterTriggerBCExoticEventBC->GetXaxis()->SetBinLabel(i ,Form("BC%d",i-labelshift));
+    fhClusterTriggerBCExoticEventBC->SetYTitle("Event BC%4");
+  fOutputContainer->Add(fhClusterTriggerBCExoticEventBC);
+
+  fhClusterTriggerBCEventBCUnMatch      = new TH2F("hClusterTriggerBCEventBCUnMatch", "Found unmatched trigger BC and  Event BC",
+                                                   nbin , minbin ,maxbin,4,1, 4) ;
+  for(Int_t i = 1; i < 5; i++)
+    fhClusterTriggerBCEventBCUnMatch->GetYaxis()->SetBinLabel(i ,Form("BC/4=%d",i));
+    fhClusterTriggerBCEventBCUnMatch->SetXTitle("cluster trigger BC");
+  for(Int_t i = 1; i < 12; i++)
+    fhClusterTriggerBCEventBCUnMatch->GetXaxis()->SetBinLabel(i ,Form("BC%d",i-labelshift));
+    fhClusterTriggerBCEventBCUnMatch->SetYTitle("Event BC%4");
+  fOutputContainer->Add(fhClusterTriggerBCEventBCUnMatch);
+  
+  fhClusterTriggerBCExoticEventBCUnMatch      = new TH2F("hClusterTriggerExoticBCEventBCUnMatch", "Found unmatched trigger BC and  Event BC",
+                                                         nbin , minbin ,maxbin,4,1, 4) ;
+  for(Int_t i = 1; i < 5; i++)
+    fhClusterTriggerBCExoticEventBCUnMatch->GetYaxis()->SetBinLabel(i ,Form("BC/4=%d",i));
+    fhClusterTriggerBCExoticEventBCUnMatch->SetXTitle("cluster trigger BC");
+  for(Int_t i = 1; i < 12; i++)
+    fhClusterTriggerBCExoticEventBCUnMatch->GetXaxis()->SetBinLabel(i ,Form("BC%d",i-labelshift));
+    fhClusterTriggerBCExoticEventBCUnMatch->SetYTitle("Event BC%4");
+  fOutputContainer->Add(fhClusterTriggerBCExoticEventBCUnMatch);
+  
   fhClusterTriggerBC              = new TH1F("hClusterTriggerBC",
                                              "Number of analyzed events triggered by a cluster in a given BC",
                                              nbin , minbin ,maxbin) ;
@@ -348,22 +405,42 @@ TList *AliAnaCaloTrackCorrMaker::GetOutputContainer()
     fhClusterTriggerBCExotic->GetXaxis()->SetBinLabel(i ,Form("BC%d",i-labelshift));
   fOutputContainer->Add(fhClusterTriggerBCExotic);
   
-  fhClusterTriggerBCBad           = new TH1F("hClusterTriggerBCBad",
-                                             "Number of analyzed events triggered by a bad cluster in a given BC",
+  
+  fhClusterTriggerBCBadCell         = new TH1F("hClusterTriggerBCBadCell",
+                                             "Number of analyzed events triggered by a bad cell in a given BC",
                                              nbin , minbin ,maxbin) ;
-  fhClusterTriggerBCBad->SetYTitle("# events");
+  fhClusterTriggerBCBadCell->SetYTitle("# events");
   for(Int_t i = 1; i < 12; i++)
-    fhClusterTriggerBCBad->GetXaxis()->SetBinLabel(i ,Form("BC%d",i-labelshift));
-  fOutputContainer->Add(fhClusterTriggerBCBad);
+    fhClusterTriggerBCBadCell->GetXaxis()->SetBinLabel(i ,Form("BC%d",i-labelshift));
+  fOutputContainer->Add(fhClusterTriggerBCBadCell);
   
+  fhClusterTriggerBCBadCellExotic    = new TH1F("hClusterTriggerBCBadCellExotic",
+                                            "Number of analyzed events triggered by a bad cell & exotic cluster in a given BC",
+                                            nbin , minbin ,maxbin) ;
+  fhClusterTriggerBCBadCellExotic->SetYTitle("# events");
+  for(Int_t i = 1; i < 12; i++)
+    fhClusterTriggerBCBadCellExotic->GetXaxis()->SetBinLabel(i ,Form("BC%d",i-labelshift));
+  fOutputContainer->Add(fhClusterTriggerBCBadCellExotic);
   
-  fhClusterTriggerBCBadExotic    = new TH1F("hClusterTriggerBCBadExotic",
-                                             "Number of analyzed events triggered by a bad&exotic cluster in a given BC",
+  fhClusterTriggerBCBadCluster           = new TH1F("hClusterTriggerBCBadCluster",
+                                             "Number of analyzed events triggered by a bad cluster in a given BC",
                                              nbin , minbin ,maxbin) ;
-  fhClusterTriggerBCBadExotic->SetYTitle("# events");
+  
+  fhClusterTriggerBCBadCluster->SetYTitle("# events");
+  for(Int_t i = 1; i < 12; i++)
+    fhClusterTriggerBCBadCluster->GetXaxis()->SetBinLabel(i ,Form("BC%d",i-labelshift));
+  fOutputContainer->Add(fhClusterTriggerBCBadCluster);
+  
+  
+  fhClusterTriggerBCBadClusterExotic    = new TH1F("hClusterTriggerBCBadClusterExotic",
+                                            "Number of analyzed events triggered by a bad cluster & exotic cluster in a given BC",
+                                            nbin , minbin ,maxbin) ;
+  
+  fhClusterTriggerBCBadClusterExotic->SetYTitle("# events");
   for(Int_t i = 1; i < 12; i++)
-    fhClusterTriggerBCBadExotic->GetXaxis()->SetBinLabel(i ,Form("BC%d",i-labelshift));
-  fOutputContainer->Add(fhClusterTriggerBCBadExotic);
+    fhClusterTriggerBCBadClusterExotic->GetXaxis()->SetBinLabel(i ,Form("BC%d",i-labelshift));
+  fOutputContainer->Add(fhClusterTriggerBCBadClusterExotic);
   
   fhClusterTriggerBCUnMatch       = new TH1F("hClusterTriggerBCUnMatch",
                                              "Number of analyzed events triggered by a cluster (no trigger patch match) in a given BC",
@@ -381,22 +458,41 @@ TList *AliAnaCaloTrackCorrMaker::GetOutputContainer()
     fhClusterTriggerBCExoticUnMatch->GetXaxis()->SetBinLabel(i ,Form("BC%d",i-labelshift));
   fOutputContainer->Add(fhClusterTriggerBCExoticUnMatch);
   
-  fhClusterTriggerBCBadUnMatch    = new TH1F("hClusterTriggerBCBadUnMatch",
+  
+  fhClusterTriggerBCBadCellUnMatch    = new TH1F("hClusterTriggerBCBadCellUnMatch",
                                              "Number of analyzed events triggered by a bad cluster  (no trigger patch match) in a given BC",
                                              nbin , minbin ,maxbin) ;
-  fhClusterTriggerBCBadUnMatch->SetYTitle("# events");
+  fhClusterTriggerBCBadCellUnMatch->SetYTitle("# events");
   for(Int_t i = 1; i < 12; i++)
-    fhClusterTriggerBCBadUnMatch->GetXaxis()->SetBinLabel(i ,Form("BC%d",i-labelshift));
-  fOutputContainer->Add(fhClusterTriggerBCBadUnMatch);
+    fhClusterTriggerBCBadCellUnMatch->GetXaxis()->SetBinLabel(i ,Form("BC%d",i-labelshift));
+  fOutputContainer->Add(fhClusterTriggerBCBadCellUnMatch);
 
   
-  fhClusterTriggerBCBadExoticUnMatch = new TH1F("hClusterTriggerBCBadExoticUnMatch",
+  fhClusterTriggerBCBadCellExoticUnMatch = new TH1F("hClusterTriggerBCBadCellExoticUnMatch",
                                                 "Number of analyzed events triggered by a bad&exotic cluster  (no trigger patch match) in a given BC",
                                              nbin , minbin ,maxbin) ;
-  fhClusterTriggerBCBadExoticUnMatch->SetYTitle("# events");
+  fhClusterTriggerBCBadCellExoticUnMatch->SetYTitle("# events");
+  for(Int_t i = 1; i < 12; i++)
+    fhClusterTriggerBCBadCellExoticUnMatch->GetXaxis()->SetBinLabel(i ,Form("BC%d",i-labelshift));
+  fOutputContainer->Add(fhClusterTriggerBCBadCellExoticUnMatch);
+
+  
+  fhClusterTriggerBCBadClusterUnMatch    = new TH1F("hClusterTriggerBCBadClusterUnMatch",
+                                             "Number of analyzed events triggered by a bad cluster  (no trigger patch match) in a given BC",
+                                             nbin , minbin ,maxbin) ;
+  fhClusterTriggerBCBadClusterUnMatch->SetYTitle("# events");
+  for(Int_t i = 1; i < 12; i++)
+    fhClusterTriggerBCBadClusterUnMatch->GetXaxis()->SetBinLabel(i ,Form("BC%d",i-labelshift));
+  fOutputContainer->Add(fhClusterTriggerBCBadClusterUnMatch);
+  
+  
+  fhClusterTriggerBCBadClusterExoticUnMatch = new TH1F("hClusterTriggerBCBadClusterExoticUnMatch",
+                                                "Number of analyzed events triggered by a bad&exotic cluster  (no trigger patch match) in a given BC",
+                                                nbin , minbin ,maxbin) ;
+  fhClusterTriggerBCBadClusterExoticUnMatch->SetYTitle("# events");
   for(Int_t i = 1; i < 12; i++)
-    fhClusterTriggerBCBadExoticUnMatch->GetXaxis()->SetBinLabel(i ,Form("BC%d",i-labelshift));
-  fOutputContainer->Add(fhClusterTriggerBCBadExoticUnMatch);
+    fhClusterTriggerBCBadClusterExoticUnMatch->GetXaxis()->SetBinLabel(i ,Form("BC%d",i-labelshift));
+  fOutputContainer->Add(fhClusterTriggerBCBadClusterExoticUnMatch);
 
   
   fhNPileUpEvents      = new TH1F("hNPileUpEvents",   "Number of events considered as pile-up", 8 , 0 , 8 ) ;
@@ -671,10 +767,12 @@ void AliAnaCaloTrackCorrMaker::ProcessEvent(const Int_t iEntry,
   
   Int_t  triggerBC   = fReader->GetTriggerClusterBC() ;
   Bool_t exotic      = fReader->IsExoticEvent();
-  Bool_t badCell     = fReader->IsBadCellTriggerEvent();
+  Bool_t badCluster  = fReader->IsBadCellTriggerEvent();
+  Bool_t badCell     = fReader->IsBadMaxCellTriggerEvent();
   Bool_t triggerMatch= fReader->IsTriggerMatched();
   Bool_t triggerBCOK = kTRUE;
   Int_t  triggerId   = fReader->GetTriggerClusterId() ;
+  
   if(triggerId < 0)
   {
     //printf("Trigger id %d\n",triggerId);
@@ -687,24 +785,48 @@ void AliAnaCaloTrackCorrMaker::ProcessEvent(const Int_t iEntry,
   
   if(triggerBCOK)
   {
+    Int_t eventBC = fReader->GetInputEvent()->GetBunchCrossNumber();
+    if(eventBC%4 < 0 || eventBC%4 > 3 )
+      printf("AliAnaCaloTrackCorrMaker::ProcessEvent() - STRANGE: Trigger BC %d - Event BC %d, modulo4 %d \n",triggerBC,eventBC,eventBC%4);
+    
     if(triggerMatch)
     {
-      if     (!exotic  && !badCell) fhClusterTriggerBC         ->Fill(triggerBC);
-      else if( exotic  &&  badCell) fhClusterTriggerBCBadExotic->Fill(triggerBC);
-      else if( exotic  && !badCell) fhClusterTriggerBCExotic   ->Fill(triggerBC);
-      else if( badCell && !exotic ) fhClusterTriggerBCBad      ->Fill(triggerBC);
+      if     (!exotic     && !badCluster) fhClusterTriggerBC->Fill(triggerBC);
+      else if( exotic     &&  badCluster)
+      {
+        fhClusterTriggerBCBadClusterExotic->Fill(triggerBC);
+        if(badCell) fhClusterTriggerBCBadCellExotic->Fill(triggerBC);
+      }
+      else if( exotic     && !badCluster) fhClusterTriggerBCExotic->Fill(triggerBC);
+      else if( badCluster && !exotic    )
+      {
+        fhClusterTriggerBCBadCluster ->Fill(triggerBC);
+        if(badCell) fhClusterTriggerBCBadCell->Fill(triggerBC);
+      }
+      
+      if(!exotic) fhClusterTriggerBCEventBC      ->Fill(triggerBC,eventBC%4);
+      else        fhClusterTriggerBCExoticEventBC->Fill(triggerBC,eventBC%4);
     }
     else
     {
-      if     (!exotic  && !badCell) fhClusterTriggerBCUnMatch         ->Fill(triggerBC);
-      else if( exotic  &&  badCell) fhClusterTriggerBCBadExoticUnMatch->Fill(triggerBC);
-      else if( exotic  && !badCell) fhClusterTriggerBCExoticUnMatch   ->Fill(triggerBC);
-      else if( badCell && !exotic ) fhClusterTriggerBCBadUnMatch      ->Fill(triggerBC);
+      if     (!exotic     && !badCluster) fhClusterTriggerBCUnMatch->Fill(triggerBC);
+      else if( exotic     &&  badCluster)
+      {
+        fhClusterTriggerBCBadClusterExoticUnMatch->Fill(triggerBC);
+        if(badCell)   fhClusterTriggerBCBadCellExoticUnMatch   ->Fill(triggerBC);
+      }
+      else if( exotic     && !badCluster) fhClusterTriggerBCExoticUnMatch->Fill(triggerBC);
+      else if( badCluster && !exotic )
+      {
+        fhClusterTriggerBCBadClusterUnMatch->Fill(triggerBC);
+        if(badCell)fhClusterTriggerBCBadCellUnMatch->Fill(triggerBC);
+      }
+      
+      if(!exotic) fhClusterTriggerBCEventBCUnMatch      ->Fill(triggerBC,eventBC%4);
+      else        fhClusterTriggerBCExoticEventBCUnMatch->Fill(triggerBC,eventBC%4);
     }
   }
   
-  if(!ok && triggerBC > -9999) printf("Maker: Cluster trigger BC = %d\n",triggerBC);
-
   if(!ok)
   {    
          if(fAnaDebug >= 1 )printf("*** Skip event *** %d \n",iEntry);
index 27410ae..d2b750e 100755 (executable)
@@ -115,15 +115,25 @@ 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 *   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 *   fhClusterTriggerBCBadExotic;     //! 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
-  TH1F *   fhClusterTriggerBCBadExoticUnMatch;//! 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 *   fhClusterTriggerBCBadCell;                //! number of events triggered, depending on BC of the cluster
+  TH1F *   fhClusterTriggerBCBadCellExotic;          //! number of events triggered, depending on BC of the cluster
+  TH1F *   fhClusterTriggerBCBadCluster;             //! number of events triggered, depending on BC of the cluster
+  TH1F *   fhClusterTriggerBCBadClusterExotic;       //! 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 *   fhClusterTriggerBCBadCellUnMatch;         //! number of events triggered, depending on BC of the cluster
+  TH1F *   fhClusterTriggerBCBadCellExoticUnMatch;   //! number of events triggered, depending on BC of the cluster
+  TH1F *   fhClusterTriggerBCBadClusterUnMatch;      //! number of events triggered, depending on BC of the cluster
+  TH1F *   fhClusterTriggerBCBadClusterExoticUnMatch;//! number of events triggered, depending on BC of the cluster
 
+  TH2F *   fhClusterTriggerBCEventBC;        // correlate the found BC in the trigger and the event BC
+  TH2F *   fhClusterTriggerBCEventBCUnMatch; // correlate the found BC in the trigger and the event BC, when there was no match with the trigger BC
+  TH2F *   fhClusterTriggerBCExoticEventBC;        // correlate the found BC in the exotic trigger and the event BC
+  TH2F *   fhClusterTriggerBCExoticEventBCUnMatch; // correlate the found BC in the exotic trigger and the event BC, when there was no match with the trigger BC
+  
   AliAnaCaloTrackCorrMaker & operator = (const AliAnaCaloTrackCorrMaker & ) ; // cpy assignment
   
   ClassDef(AliAnaCaloTrackCorrMaker,18)
index d1fd48e..267b5ed 100755 (executable)
@@ -97,7 +97,7 @@ fAcceptFastCluster(kFALSE),  fRemoveLEDEvents(kTRUE),
 fRemoveBadTriggerEvents(0),  fTriggerPatchClusterMatch(0),
 fTriggerPatchTimeWindow(),   fTriggerEventThreshold(0),
 fTriggerClusterBC(0),        fTriggerClusterIndex(0),         fTriggerClusterId(0),
-fIsExoticEvent(0),           fIsBadCellEvent(0),
+fIsExoticEvent(0),           fIsBadCellEvent(0),              fIsBadMaxCellEvent(0),
 fIsTriggerMatch(0),
 
 fDoEventSelection(kFALSE),   fDoV0ANDEventSelection(kFALSE),
@@ -694,6 +694,7 @@ Bool_t AliCaloTrackReader::FillInputEvent(const Int_t iEntry,
   fTriggerClusterBC    = -10000;
   fIsExoticEvent       = kFALSE;
   fIsBadCellEvent      = kFALSE;
+  fIsBadMaxCellEvent   = kFALSE;
   
   //fCurrentFileName = TString(currentFileName);
   if(!fInputEvent)
@@ -940,11 +941,12 @@ Bool_t AliCaloTrackReader::FillInputEvent(const Int_t iEntry,
   
   if(fRemoveBadTriggerEvents)
   {
-    printf("ACCEPT triggered event? - exotic? %d - bad cell %d - BC %d  - Matched %d\n",fIsExoticEvent,fIsBadCellEvent,fTriggerClusterBC,fIsTriggerMatch);
+    //printf("ACCEPT triggered event? - exotic? %d - bad cell %d - bad Max cell %d - BC %d  - Matched %d\n",
+    //       fIsExoticEvent,fIsBadCellEvent, fIsBadMaxCellEvent, fTriggerClusterBC,fIsTriggerMatch);
     if     (fIsExoticEvent)         return kFALSE;
     else if(fIsBadCellEvent)        return kFALSE;
     else if(fTriggerClusterBC == 0) return kFALSE;
-    printf("\t *** YES\n");
+    //printf("\t *** YES\n");
   }
   
   patches.Reset();
@@ -2256,11 +2258,12 @@ void  AliCaloTrackReader::MatchTriggerCluster(TArrayI patches)
   fTriggerClusterBC    = -10000;
   fIsExoticEvent       = kFALSE;
   fIsBadCellEvent      = kFALSE;
+  fIsBadMaxCellEvent   = kFALSE;
   
   // Do only analysis for triggered events
   if(!GetFiredTriggerClasses().Contains("EMC"))
   {
-    fTriggerClusterBC    = 0;
+    fTriggerClusterBC = 0;
     return;
   }
   
@@ -2276,12 +2279,13 @@ void  AliCaloTrackReader::MatchTriggerCluster(TArrayI patches)
   }
   
   // Get number of clusters and of trigger patches
-  Int_t nclusters = fInputEvent->GetNumberOfCaloClusters();
-  if(clusterList) nclusters = clusterList->GetEntriesFast();
+  Int_t   nclusters   = fInputEvent->GetNumberOfCaloClusters();
+  if(clusterList)
+         nclusters    = clusterList->GetEntriesFast();
+
+  Int_t   nPatch      = patches.GetSize();
+  Float_t exoDiffTime = GetCaloUtils()->GetEMCALRecoUtils()->GetExoticCellDiffTimeCut();
 
-  Int_t nPatch = patches.GetSize();
-  
-  
   //Init some variables used in the cluster loop
   Float_t tofPatchMax = 100000;
   Float_t ePatchMax   =-1;
@@ -2291,7 +2295,8 @@ void  AliCaloTrackReader::MatchTriggerCluster(TArrayI patches)
   
   Int_t   clusMax     =-1;
   Int_t   idclusMax   =-1;
-  Bool_t  badMax      = kFALSE;
+  Bool_t  badClMax    = kFALSE;
+  Bool_t  badCeMax    = kFALSE;
   Bool_t  exoMax      = kFALSE;
   
   Int_t   nOfHighECl  = 0 ;
@@ -2309,23 +2314,40 @@ void  AliCaloTrackReader::MatchTriggerCluster(TArrayI patches)
       
     if ( clus->E() < 1 )        continue ;
     
-    Bool_t bad    = GetCaloUtils()->GetEMCALRecoUtils()->ClusterContainsBadChannel(GetCaloUtils()->GetEMCALGeometry(),
+    Float_t  frac       = -1;
+    Int_t    absIdMax   = GetCaloUtils()->GetMaxEnergyCell(fInputEvent->GetEMCALCells(), clus,frac);
+    
+    Bool_t   badCluster = GetCaloUtils()->GetEMCALRecoUtils()->ClusterContainsBadChannel(GetCaloUtils()->GetEMCALGeometry(),
                                                                                    clus->GetCellsAbsId(),clus->GetNCells());
+    UShort_t cellMax[]  = {absIdMax};
+    Bool_t   badCell    = GetCaloUtils()->GetEMCALRecoUtils()->ClusterContainsBadChannel(GetCaloUtils()->GetEMCALGeometry(),cellMax,1);
+    
+    // if cell is bad, it can happen that time calibration is not available,
+    // when calculating if it is exotic, this can make it to be exotic by default
+    // open it temporarily for this cluster
+    if(badCell)
+     GetCaloUtils()->GetEMCALRecoUtils()->SetExoticCellDiffTimeCut(10000000);
+    
+    Bool_t   exotic     = GetCaloUtils()->GetEMCALRecoUtils()->IsExoticCluster(clus, fInputEvent->GetEMCALCells());
     
-    Bool_t exotic = GetCaloUtils()->GetEMCALRecoUtils()->IsExoticCluster(clus, fInputEvent->GetEMCALCells());
+    // Set back the time cut on exotics
+    if(badCell)
+      GetCaloUtils()->GetEMCALRecoUtils()->SetExoticCellDiffTimeCut(exoDiffTime);
     
-    Float_t  energy = clus->E();
-    Int_t    idclus = clus->GetID();
+    // Energy threshold for exotic Ecross typically at 4 GeV,
+    // for lower energy, check that there are more than 1 cell in the cluster
+    if(!exotic && clus->GetNCells() < 2) exotic = kTRUE;
     
-    Float_t frac   = -1;
-    Int_t absIdMax = GetCaloUtils()->GetMaxEnergyCell(fInputEvent->GetEMCALCells(), clus,frac);
+    Float_t  energy     = clus->E();
+    Int_t    idclus     = clus->GetID();
     
-    Double_t tof   = clus->GetTOF();
+    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);
+//    printf("cluster %d, ID %d, E %2.2f, tof %2.2f, AbsId max %d, exotic %d, bad Cluster %d, bad Cell %d\n",
+//           iclus,idclus, energy,tof,absIdMax, exotic, badCluster,badCell);
 
     // Find the highest energy cluster, avobe trigger threshold
     // in the event in case no match to trigger is found
@@ -2333,7 +2355,8 @@ void  AliCaloTrackReader::MatchTriggerCluster(TArrayI patches)
     {
       tofMax    = tof;
       eMax      = energy;
-      badMax    = bad;
+      badClMax  = badCluster;
+      badCeMax  = badCell;
       exoMax    = exotic;
       clusMax   = iclus;
       idclusMax = idclus;
@@ -2341,7 +2364,7 @@ void  AliCaloTrackReader::MatchTriggerCluster(TArrayI patches)
     
     // count the good clusters in the event avobe the trigger threshold
     // to check the exotic events 
-    if(!bad && !exotic)// && energy > fTriggerEventThreshold)
+    if(!badCluster && !exotic)// && energy > fTriggerEventThreshold)
       nOfHighECl++;
     
     // Find match to trigger
@@ -2363,7 +2386,8 @@ void  AliCaloTrackReader::MatchTriggerCluster(TArrayI patches)
             {
               tofPatchMax          = tof;
               ePatchMax            = energy;
-              fIsBadCellEvent      = bad;
+              fIsBadCellEvent      = badCluster;
+              fIsBadMaxCellEvent   = badCell;
               fIsExoticEvent       = exotic;
               fTriggerClusterIndex = iclus;
               fTriggerClusterId    = idclus;
@@ -2382,7 +2406,8 @@ void  AliCaloTrackReader::MatchTriggerCluster(TArrayI patches)
   {
     tofPatchMax          = tofMax;
     ePatchMax            = eMax;
-    fIsBadCellEvent      = badMax;
+    fIsBadCellEvent      = badClMax;
+    fIsBadMaxCellEvent   = badCeMax;
     fIsExoticEvent       = exoMax;
     fTriggerClusterIndex = clusMax;
     fTriggerClusterId    = idclusMax;
@@ -2409,14 +2434,12 @@ void  AliCaloTrackReader::MatchTriggerCluster(TArrayI patches)
   
   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",
+//  printf("AliCaloTrackReader::MatchTriggerCluster(TArrayI patches) - Trigger cluster: index %d, ID %d, E = %2.2f, tof = %2.2f (BC = %d), bad cluster? %d, bad cell? %d, exotic? %d, patch match? %d, n High E cluster %d\n",
 //         fTriggerClusterIndex, fTriggerClusterId,ePatchMax, tofPatchMax,
-//         fTriggerClusterBC, fIsBadCellEvent,fIsExoticEvent, fIsTriggerMatch, nOfHighECl);
+//         fTriggerClusterBC, fIsBadCellEvent,fIsBadMaxCellEvent,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;
-  
+//  if(!fIsTriggerMatch)  printf("\t highest energy cluster:  index %d, ID %d, E = %2.2f, tof = %2.2f, bad cluster? %d, bad cell? %d, exotic? %d\n",clusMax, idclusMax, eMax,tofMax, badClMax, badCeMax,exoMax);
+      
 }
 
 //__________________________________________
index 0b8baa4..0712980 100755 (executable)
@@ -255,6 +255,7 @@ public:
 
   Bool_t           IsExoticEvent()                         { return fIsExoticEvent           ; }  
   Bool_t           IsBadCellTriggerEvent()                 { return fIsBadCellEvent          ; }
+  Bool_t           IsBadMaxCellTriggerEvent()              { return fIsBadMaxCellEvent       ; }
   Bool_t           IsTriggerMatched()                      { return fIsTriggerMatch          ; }
   Int_t            GetTriggerClusterBC()                   { return fTriggerClusterBC        ; }
   Int_t            GetTriggerClusterIndex()                { return fTriggerClusterIndex     ; }
@@ -626,7 +627,8 @@ public:
   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
+  Bool_t           fIsBadCellEvent;              // Bad cell triggered event flag, any cell in cluster is bad
+  Bool_t           fIsBadMaxCellEvent;           // Bad cell triggered event flag, only max energy cell is bad
   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 ...
@@ -672,7 +674,7 @@ public:
   AliCaloTrackReader(              const AliCaloTrackReader & r) ; // cpy ctor
   AliCaloTrackReader & operator = (const AliCaloTrackReader & r) ; // cpy assignment
   
-  ClassDef(AliCaloTrackReader,54)
+  ClassDef(AliCaloTrackReader,55)
   
 } ;
 
index f3cdddb..80fbba2 100755 (executable)
@@ -86,6 +86,8 @@ AliAnaPhoton::AliAnaPhoton() :
     fhEtaPhiTriggerEMCALBCUMBadCluster(0),       fhTimeTriggerEMCALBCUMBadCluster(0),
     fhEtaPhiTriggerEMCALBCBadExoticCluster(0),   fhTimeTriggerEMCALBCBadExoticCluster(0),
     fhEtaPhiTriggerEMCALBCUMBadExoticCluster(0), fhTimeTriggerEMCALBCUMBadExoticCluster(0),
+    fhTimeTriggerEMCALBCBadMaxCell(0),           fhTimeTriggerEMCALBCUMBadMaxCell(0),
+    fhTimeTriggerEMCALBCBadMaxCellExotic(0),     fhTimeTriggerEMCALBCUMBadMaxCellExotic(0),
     fhEtaPhiNoTrigger(0),                        fhTimeNoTrigger(0),
 
     fhEPhoton(0),                 fhPtPhoton(0),
@@ -292,9 +294,10 @@ Bool_t  AliAnaPhoton::ClusterSelected(AliVCluster* calo, TLorentzVector mom, Int
       else                        fhEtaPhiEMCALBCN->Fill(etacluster, phicluster);
     }
     
-    Int_t bc = GetReader()->GetTriggerClusterBC();
-    Int_t id = GetReader()->GetTriggerClusterId();
-    
+    Int_t  bc     = GetReader()->GetTriggerClusterBC();
+    Int_t  id     = GetReader()->GetTriggerClusterId();
+    Bool_t badMax = GetReader()->IsBadMaxCellTriggerEvent();
+
     if(id==-2)
     {
       //printf("AliAnaPhoton::ClusterSelected() - No trigger found bc=%d\n",bc);
@@ -356,23 +359,14 @@ Bool_t  AliAnaPhoton::ClusterSelected(AliVCluster* calo, TLorentzVector mom, Int
         {
           if(ecluster > 2) fhEtaPhiTriggerEMCALBCBadExotic->Fill(etacluster, phicluster);
           fhTimeTriggerEMCALBCBadExotic->Fill(ecluster, tofcluster);
-          
-          if(calo->GetID() ==  GetReader()->GetTriggerClusterId())
-          {
-            fhEtaPhiTriggerEMCALBCBadExoticCluster->Fill(etacluster, phicluster);
-            fhTimeTriggerEMCALBCBadExoticCluster  ->Fill(ecluster, tofcluster);
-          }
+          if(badMax)  fhTimeTriggerEMCALBCBadMaxCellExotic->Fill(ecluster, tofcluster);
         }
         else
         {
           if(ecluster > 2) fhEtaPhiTriggerEMCALBCUMBadExotic->Fill(etacluster, phicluster);
           fhTimeTriggerEMCALBCUMBadExotic->Fill(ecluster, tofcluster);
-          
-          if(calo->GetID() ==  GetReader()->GetTriggerClusterId())
-          {
-            fhEtaPhiTriggerEMCALBCUMBadExoticCluster->Fill(etacluster, phicluster);
-            fhTimeTriggerEMCALBCUMBadExoticCluster  ->Fill(ecluster, tofcluster);
-          }
+          if(badMax)  fhTimeTriggerEMCALBCUMBadMaxCellExotic->Fill(ecluster, tofcluster);
+
         }
       }// Bad and exotic cluster trigger
       else if(GetReader()->IsBadCellTriggerEvent() )
@@ -381,23 +375,13 @@ Bool_t  AliAnaPhoton::ClusterSelected(AliVCluster* calo, TLorentzVector mom, Int
         {
           if(ecluster > 2) fhEtaPhiTriggerEMCALBCBad->Fill(etacluster, phicluster);
           fhTimeTriggerEMCALBCBad->Fill(ecluster, tofcluster);
-          
-          if(calo->GetID() ==  GetReader()->GetTriggerClusterId())
-          {
-            fhEtaPhiTriggerEMCALBCBadCluster->Fill(etacluster, phicluster);
-            fhTimeTriggerEMCALBCBadCluster  ->Fill(ecluster, tofcluster);
-          }
+          if(badMax)  fhTimeTriggerEMCALBCBadMaxCell->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);
-          }
+          if(badMax)  fhTimeTriggerEMCALBCUMBadMaxCell->Fill(ecluster, tofcluster);
         }
       }// Bad cluster trigger
       else if(GetReader()->IsExoticEvent() )
@@ -406,29 +390,17 @@ Bool_t  AliAnaPhoton::ClusterSelected(AliVCluster* calo, TLorentzVector mom, Int
         {
           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);
-  
+    
   }
   
   //.......................................
@@ -2009,6 +1981,39 @@ TList *  AliAnaPhoton::GetCreateOutputObjects()
     fhTimeTriggerEMCALBCUMBadExoticCluster->SetYTitle("time (ns)");
     outputContainer->Add(fhTimeTriggerEMCALBCUMBadExoticCluster);
     
+    fhTimeTriggerEMCALBCBadMaxCell = new TH2F
+    ("hTimeTriggerBadMaxCell",
+     "cluster time vs E of clusters, Trigger BadMaxCell",
+     nptbins,ptmin,ptmax, ntimebins,timemin,timemax);
+    fhTimeTriggerEMCALBCBadMaxCell->SetXTitle("E (GeV)");
+    fhTimeTriggerEMCALBCBadMaxCell->SetYTitle("time (ns)");
+    outputContainer->Add(fhTimeTriggerEMCALBCBadMaxCell);
+
+    fhTimeTriggerEMCALBCUMBadMaxCell = new TH2F
+    ("hTimeTriggerBadMaxCell_UnMatch",
+     "cluster time vs E of clusters, unmatched trigger BadMaxCell",
+     nptbins,ptmin,ptmax, ntimebins,timemin,timemax);
+    fhTimeTriggerEMCALBCUMBadMaxCell->SetXTitle("E (GeV)");
+    fhTimeTriggerEMCALBCUMBadMaxCell->SetYTitle("time (ns)");
+    outputContainer->Add(fhTimeTriggerEMCALBCUMBadMaxCell);
+    
+    
+    fhTimeTriggerEMCALBCBadMaxCellExotic = new TH2F
+    ("hTimeTriggerBadMaxCellExotic",
+     "cluster time vs E of clusters, Trigger BadMaxCell&Exotic",
+     nptbins,ptmin,ptmax, ntimebins,timemin,timemax);
+    fhTimeTriggerEMCALBCBadMaxCellExotic->SetXTitle("E (GeV)");
+    fhTimeTriggerEMCALBCBadMaxCellExotic->SetYTitle("time (ns)");
+    outputContainer->Add(fhTimeTriggerEMCALBCBadMaxCellExotic);
+    
+    fhTimeTriggerEMCALBCUMBadMaxCellExotic = new TH2F
+    ("hTimeTriggerBadMaxCellExotic_UnMatch",
+     "cluster time vs E of clusters, unmatched trigger BadMaxCell&Exotic",
+     nptbins,ptmin,ptmax, ntimebins,timemin,timemax);
+    fhTimeTriggerEMCALBCUMBadMaxCellExotic->SetXTitle("E (GeV)");
+    fhTimeTriggerEMCALBCUMBadMaxCellExotic->SetYTitle("time (ns)");
+    outputContainer->Add(fhTimeTriggerEMCALBCUMBadMaxCellExotic);
+
     fhTimeNoTrigger = new TH2F
     ("hTimeNoTrigger",
      "events with no foundable trigger, time vs e of clusters",
@@ -3161,7 +3166,7 @@ TList *  AliAnaPhoton::GetCreateOutputObjects()
     }// Fill SS MC histograms
     
   }//Histos with MC
-      
+  
   return outputContainer ;
   
 }
@@ -3269,9 +3274,9 @@ void  AliAnaPhoton::MakeAnalysisFillAOD()
   }
   
   // Fill some trigger related histograms
-  Int_t   idTrig = GetReader()->GetTriggerClusterIndex();
-  Float_t exotic = GetReader()->IsExoticEvent();
-  Float_t bad    = GetReader()->IsBadCellTriggerEvent();
+  Int_t  idTrig = GetReader()->GetTriggerClusterIndex();
+  Bool_t exotic = GetReader()->IsExoticEvent();
+  Bool_t bad    = GetReader()->IsBadCellTriggerEvent();
 
   if( fFillEMCALBCHistograms && fCalorimeter=="EMCAL" &&
       ( bad || exotic )  && idTrig >= 0)
@@ -3304,7 +3309,6 @@ void  AliAnaPhoton::MakeAnalysisFillAOD()
     if( phiclusterBad < 0 ) phiclusterBad+=TMath::TwoPi();
     Float_t tofclusterBad = badClusTrig->GetTOF()*1.e9;
     Float_t eclusterBad   = badClusTrig->E();
-    
 
     if( bad && exotic )
     {
index c591dfd..d9b50ab 100755 (executable)
@@ -175,35 +175,40 @@ class AliAnaPhoton : public AliAnaCaloTrackCorrBaseClass {
   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 * fhEtaPhiTriggerEMCALBCExotic            ; //! Pseudorapidity vs Phi of trigger exotic clusters
+  TH2F * fhTimeTriggerEMCALBCExotic              ; //! Time distribution of clusters, when trigger exotic cluster 
+  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, not matched to trigger
 
-  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 * fhEtaPhiTriggerEMCALBCBad               ; //! Pseudorapidity vs Phi of trigger exotic clusters
+  TH2F * fhTimeTriggerEMCALBCBad                 ; //! Time distribution of clusters, when trigger exotic 
+  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, not matched to trigger
   
-  TH2F * fhEtaPhiTriggerEMCALBCBadExotic  ; //! Pseudorapidity vs Phi of trigger exotic clusters
-  TH2F * fhTimeTriggerEMCALBCBadExotic    ; //! Time distribution of clusters, when trigger exotic cluster is in a given BC
-  TH2F * fhEtaPhiTriggerEMCALBCUMBadExotic; //! Pseudorapidity vs Phi of highest E exotic cluster  in event, not matched to trigger
-  TH2F * fhTimeTriggerEMCALBCUMBadExotic  ; //! Time distribution of highest energy exotic cluster in event, when trigger is in a given BC, not
+  TH2F * fhEtaPhiTriggerEMCALBCBadExotic         ; //! Pseudorapidity vs Phi of trigger exotic and bad clusters
+  TH2F * fhTimeTriggerEMCALBCBadExotic           ; //! Time distribution of clusters, when trigger exotic and bad cluster 
+  TH2F * fhEtaPhiTriggerEMCALBCUMBadExotic       ; //! Pseudorapidity vs Phi of highest E exotic cluster  in event, not matched to trigger
+  TH2F * fhTimeTriggerEMCALBCUMBadExotic         ; //! Time distribution of highest energy exotic cluster in event, not matched to trigger
   
   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 * fhTimeTriggerEMCALBCExoticCluster       ; //! Time distribution of clusters, when trigger exotic cluster 
   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 * fhEtaPhiTriggerEMCALBCBadExoticCluster  ; //! Pseudorapidity vs Phi of trigger exotic clusters
-  TH2F * fhTimeTriggerEMCALBCBadExoticCluster    ; //! Time distribution of clusters, when trigger exotic cluster is in a given BC
-  TH2F * fhEtaPhiTriggerEMCALBCUMBadExoticCluster; //! Pseudorapidity vs Phi of highest E exotic cluster  in event, not matched to trigger
-  TH2F * fhTimeTriggerEMCALBCUMBadExoticCluster  ; //! Time distribution of highest energy exotic cluster in event, when trigger is in a given BC, not
+  TH2F * fhTimeTriggerEMCALBCUMExoticCluster     ; //! Time distribution of highest energy exotic cluster in event, not matched to trigger
+  
+  TH2F * fhEtaPhiTriggerEMCALBCBadCluster        ; //! Pseudorapidity vs Phi of trigger bad clusters
+  TH2F * fhTimeTriggerEMCALBCBadCluster          ; //! Time distribution of clusters, when trigger bad cluster is in a given BC
+  TH2F * fhEtaPhiTriggerEMCALBCUMBadCluster      ; //! Pseudorapidity vs Phi of highest E bad cluster  in event, not matched to trigger
+  TH2F * fhTimeTriggerEMCALBCUMBadCluster        ; //! Time distribution of highest energy bad cluster in event, when trigger is in a given BC, not
+
+  TH2F * fhEtaPhiTriggerEMCALBCBadExoticCluster  ; //! Pseudorapidity vs Phi of trigger exotic and bad clusters
+  TH2F * fhTimeTriggerEMCALBCBadExoticCluster    ; //! Time distribution of clusters, when trigger exotic and bad cluster 
+  TH2F * fhEtaPhiTriggerEMCALBCUMBadExoticCluster; //! Pseudorapidity vs Phi of highest E exotic and bad cluster in event, not matched to trigger
+  TH2F * fhTimeTriggerEMCALBCUMBadExoticCluster  ; //! Time distribution of highest energy exotic and bad cluster in event, not matched to trigger
+  
+  TH2F * fhTimeTriggerEMCALBCBadMaxCell          ; //! Time distribution of trigger clusters, when trigger bad max cell
+  TH2F * fhTimeTriggerEMCALBCUMBadMaxCell        ; //! Time distribution of highest energy bad max cell cluster in event, when trigger is not found
+  TH2F * fhTimeTriggerEMCALBCBadMaxCellExotic    ; //! Time distribution of trigger clusters, when trigger exotic cluster with bad max cell
+  TH2F * fhTimeTriggerEMCALBCUMBadMaxCellExotic  ; //! Time distribution of highest energy exotic with bad max cell cluster in event, when trigger is not found
   
   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