Add EMCal calo trigger esd loop
authorguernane <guernane@f7af4fe6-9843-0410-8265-dc069ae4e863>
Tue, 26 Jul 2011 17:33:05 +0000 (17:33 +0000)
committerguernane <guernane@f7af4fe6-9843-0410-8265-dc069ae4e863>
Tue, 26 Jul 2011 17:33:05 +0000 (17:33 +0000)
EMCAL/macros/TestESD.C

index c82a18e..7ed33ff 100644 (file)
@@ -16,6 +16,7 @@
 #include "AliESDVertex.h"
 #include "AliESDCaloCluster.h"
 #include "AliESDCaloCells.h"
+#include "AliESDCaloTrigger.h"
 #include "AliPID.h"
 #include "AliEMCALGeometry.h"
 
@@ -25,6 +26,7 @@
 // when all FALSE, prints minimum cluster information.
 Bool_t kPrintKine         = kFALSE; //Do not use for raw data.
 Bool_t kPrintCaloCells    = kFALSE;
+Bool_t kPrintCaloTrigger  = kFALSE;
 Bool_t kPrintTrackMatches = kFALSE;
 Bool_t kPrintClusterCells = kFALSE;
 Bool_t kPrintClusterPID   = kFALSE;
@@ -114,6 +116,30 @@ void TestESD() {
     }
     
     //------------------------------------------------------
+    // Calo Trigger 
+    //------------------------------------------------------
+       
+         if(kPrintCaloTrigger)
+         {  
+                 AliESDCaloTrigger& trg = *(esd->GetCaloTrigger("EMCAL"));
+                 
+                 trg.Reset();
+                 while (trg.Next())
+                 {
+                         int posX, posY;
+                         trg.GetPosition(posX, posY);
+                         
+                         if (posX > -1 && posY > -1) 
+                         {
+                                 Int_t ts = 0;
+                                 trg.GetL1TimeSum(ts);
+                                 
+                                 cout << "Position: " << posX << " " << posY << " L1 amplitude: " << ts << endl;
+                         }
+                 }
+         }
+
+    //------------------------------------------------------
     // Calo Clusters 
     //------------------------------------------------------