Add the possibility to select the trigger type via the event selection mask
authorprino <prino@f7af4fe6-9843-0410-8265-dc069ae4e863>
Thu, 8 Dec 2011 15:28:39 +0000 (15:28 +0000)
committerprino <prino@f7af4fe6-9843-0410-8265-dc069ae4e863>
Thu, 8 Dec 2011 15:28:39 +0000 (15:28 +0000)
PWG3/vertexingHF/AliRDHFCuts.cxx
PWG3/vertexingHF/AliRDHFCuts.h

index c69edbc..16ab673 100644 (file)
@@ -53,7 +53,7 @@ fMinVtxContr(1),
 fMaxVtxRedChi2(1e6),\r
 fMaxVtxZ(10.),\r
 fMinSPDMultiplicity(0),\r
-fTriggerMask(0),\r
+fTriggerMask(AliVEvent::kAnyINT),\r
 fTriggerClass("CINT1"),\r
 fTrackCuts(0),\r
 fnPtBins(1),\r
@@ -308,7 +308,7 @@ Bool_t AliRDHFCuts::IsEventSelected(AliVEvent *event) {
 \r
   // physics selection requirements\r
   if(fUsePhysicsSelection){\r
-    Bool_t isSelected = (((AliInputEventHandler*)(AliAnalysisManager::GetAnalysisManager()->GetInputEventHandler()))->IsEventSelected() & AliVEvent::kMB);\r
+    Bool_t isSelected = (((AliInputEventHandler*)(AliAnalysisManager::GetAnalysisManager()->GetInputEventHandler()))->IsEventSelected() & fTriggerMask);\r
     if(!isSelected) {\r
       if(accept) fWhyRejection=7;\r
       fEvRejectionBits+=1<<kPhysicsSelection;\r
index 7b0921b..961e7c0 100644 (file)
@@ -48,7 +48,18 @@ class AliRDHFCuts : public AliAnalysisCuts
   void SetMaxVtxRdChi2(Float_t chi2=1e6) {fMaxVtxRedChi2=chi2;}  \r
   void SetMaxVtxZ(Float_t z=1e6) {fMaxVtxZ=z;}  \r
   void SetMinSPDMultiplicity(Int_t mult=0) {fMinSPDMultiplicity=mult;}  \r
-  void SetTriggerMask(ULong64_t mask=0) {fTriggerMask=mask;} \r
+\r
+  void SetTriggerMask(ULong64_t mask=0) {fTriggerMask=mask;}\r
+  void SetUseAnyTrigger(){fTriggerMask=AliVEvent::kAny;}\r
+  void SetUseMBTrigger(){fTriggerMask|=AliVEvent::kMB;}\r
+  void SetUseMBTriggerOnly(){fTriggerMask=AliVEvent::kMB;}\r
+  void SetUseCentralTrigger(){fTriggerMask|=AliVEvent::kCentral;}\r
+  void SetUseCentralTriggerOnly(){fTriggerMask=AliVEvent::kCentral;}\r
+  void SetUseSemiCentralTrigger(){fTriggerMask|=AliVEvent::kSemiCentral;}\r
+  void SetUseSemiCentralTriggerOnly(){fTriggerMask=AliVEvent::kSemiCentral;}\r
+  void SetUseEMCALTrigger(){fTriggerMask|=(AliVEvent::kEMCEJE|AliVEvent::kEMCEGA);}\r
+  void SetUseEMCALTriggerOnly(){fTriggerMask=(AliVEvent::kEMCEJE|AliVEvent::kEMCEGA);}\r
+\r
   void SetTriggerClass(TString trclass) {fTriggerClass=trclass;} \r
   void SetVarsForOpt(Int_t nVars,Bool_t *forOpt);\r
   void SetGlobalIndex(){fGlobalIndex=fnVars*fnPtBins;}\r
@@ -237,7 +248,6 @@ class AliRDHFCuts : public AliAnalysisCuts
   Bool_t fIsCandTrackSPDFirst; // flag to select the track kFirst criteria for pt < ptlimit\r
   Double_t fMaxPtCandTrackSPDFirst; // maximum pt of the candidate for which to check if the daughters fulfill kFirst criteria\r
 \r
-\r
   ClassDef(AliRDHFCuts,20);  // base class for cuts on AOD reconstructed heavy-flavour decays\r
 };\r
 \r