including a parameter to set the trigger bit option
authormcosenti <mcosenti@f7af4fe6-9843-0410-8265-dc069ae4e863>
Tue, 19 Jun 2012 14:36:26 +0000 (14:36 +0000)
committermcosenti <mcosenti@f7af4fe6-9843-0410-8265-dc069ae4e863>
Tue, 19 Jun 2012 14:36:26 +0000 (14:36 +0000)
PWGGA/EMCALTasks/AliAnalysisTaskEMCALIsoPhoton.cxx
PWGGA/EMCALTasks/AliAnalysisTaskEMCALIsoPhoton.h
PWGGA/EMCALTasks/macros/AddTaskEMCALIsoPhoton.C

index cd95650..a0a07d0 100644 (file)
@@ -87,6 +87,7 @@ AliAnalysisTaskEMCALIsoPhoton::AliAnalysisTaskEMCALIsoPhoton(const char *name) :
   fGeom(0x0),
   fGeoName("EMCAL_COMPLETEV1"),
   fPeriod("LHC11c"),
+  fTrigBit("kEMC7"),
   fIsTrain(0),
   fExoticCut(0.97),
   fIsoConeR(0.4),
@@ -274,10 +275,18 @@ void AliAnalysisTaskEMCALIsoPhoton::UserExec(Option_t *)
 
   // event trigger selection
   Bool_t isSelected = 0;
-  if(fPeriod.Contains("11a"))
-    isSelected =  (((AliInputEventHandler*)(AliAnalysisManager::GetAnalysisManager()->GetInputEventHandler()))->IsEventSelected() & AliVEvent::kEMC1);
-  else
-    isSelected =  (((AliInputEventHandler*)(AliAnalysisManager::GetAnalysisManager()->GetInputEventHandler()))->IsEventSelected() & AliVEvent::kEMC7);
+  if(fPeriod.Contains("11a")){
+    if(fTrigBit.Contains("kEMC"))
+      isSelected =  (((AliInputEventHandler*)(AliAnalysisManager::GetAnalysisManager()->GetInputEventHandler()))->IsEventSelected() & AliVEvent::kEMC1);
+    else
+      isSelected =  (((AliInputEventHandler*)(AliAnalysisManager::GetAnalysisManager()->GetInputEventHandler()))->IsEventSelected() & AliVEvent::kMB);
+  }
+  else{
+    if(fTrigBit.Contains("kEMC"))
+      isSelected =  (((AliInputEventHandler*)(AliAnalysisManager::GetAnalysisManager()->GetInputEventHandler()))->IsEventSelected() & AliVEvent::kEMC7);
+    else
+      isSelected =  (((AliInputEventHandler*)(AliAnalysisManager::GetAnalysisManager()->GetInputEventHandler()))->IsEventSelected() & AliVEvent::kINT7);
+  }
   if(!isSelected )
         return; 
 
index 4c14349..8e13312 100644 (file)
@@ -34,6 +34,7 @@ class AliAnalysisTaskEMCALIsoPhoton : public AliAnalysisTaskSE {
   void                   SetGeoName(const char *n)              { fGeoName            = n;       }
   void                   SetIsoConeR(Double_t r)                { fIsoConeR           = r;       }
   void                   SetPeriod(const char *n)               { fPeriod             = n;       }
+  void                   SetTriggerBit(const char *tb)          { fTrigBit            = tb;      }
   void                   SetPrimTrackCuts(AliESDtrackCuts *c)   { fPrTrCuts           = c;       }
   void                   SetTrainMode(Bool_t t)                 { fIsTrain            = t;       }
   
@@ -45,6 +46,7 @@ class AliAnalysisTaskEMCALIsoPhoton : public AliAnalysisTaskSE {
   AliEMCALGeometry      *fGeom;                  // geometry utils
   TString                fGeoName;               // geometry name (def = EMCAL_FIRSTYEARV1)
   TString                fPeriod;                // string to the LHC period
+  TString                fTrigBit;               // string to the trigger bit name
   Bool_t                 fIsTrain;               // variable to set train mode
   Double_t               fExoticCut;             // variable to set the cut on exotic clusters
   Double_t               fIsoConeR;              // variable to set the isolation cone radius
index 27d7f97..dcd5f9a 100644 (file)
@@ -1,8 +1,9 @@
 
 
 AliAnalysisTaskEMCALIsoPhoton *AddTaskEMCALIsoPhoton(
-TString period = "LHC11d"
-)
+                                                    TString period = "LHC11d",
+                                                    TString trigbitname = "kEMC7"
+                                                    )
 {
   // Get the pointer to the existing analysis manager via the static access method.
   //==============================================================================
@@ -23,7 +24,7 @@ TString period = "LHC11d"
   //ana->SetClusThreshold(clusTh);
   
   ana->SetTrainMode(kTRUE);
-  //ana->SetGridMode(kTRUE);
+  ana->SetTriggerBit(trigbitname);
   // ana->SetMcMode(isMC);
   
   AliESDtrackCuts *cutsp = new AliESDtrackCuts;