Ignore events w/o physics selection
authordainese <dainese@f7af4fe6-9843-0410-8265-dc069ae4e863>
Tue, 8 Nov 2011 09:02:03 +0000 (09:02 +0000)
committerdainese <dainese@f7af4fe6-9843-0410-8265-dc069ae4e863>
Tue, 8 Nov 2011 09:02:03 +0000 (09:02 +0000)
PWG3/vertexingHF/AliNormalizationCounter.cxx

index 91b816b..c8e96be 100644 (file)
@@ -152,6 +152,11 @@ returns kTRUE if the event is to be counted for normalization
 void AliNormalizationCounter::StoreEvent(AliVEvent *event,AliRDHFCuts *rdCut,Bool_t mc){\r
   //\r
 \r
+  Bool_t isEventSelected = rdCut->IsEventSelected(event);\r
+\r
+  // events not passing physics selection. do nothing\r
+  if(rdCut->IsEventRejectedDuePhysicsSelection()) return;\r
+\r
   Bool_t v0A=kFALSE; \r
   Bool_t v0B=kFALSE;\r
   Bool_t flag03=kFALSE;\r
@@ -204,7 +209,7 @@ void AliNormalizationCounter::StoreEvent(AliVEvent *event,AliRDHFCuts *rdCut,Boo
   }\r
 \r
   //FindPrimary vertex  \r
-  if(rdCut->IsEventSelected(event)){\r
+  if(isEventSelected){\r
     if(fMultiplicity) \r
       fCounters.Count(Form("Event:PrimaryV/Run:%d/Multiplicity:%d",runNumber,multiplicity));\r
     else\r