]> git.uio.no Git - u/mrichter/AliRoot.git/commitdiff
Safer Initialization
authorddobrigk <david.dobrigkeit.chinellato@cern.ch>
Tue, 29 Jul 2014 07:58:08 +0000 (04:58 -0300)
committerddobrigk <david.dobrigkeit.chinellato@cern.ch>
Tue, 29 Jul 2014 07:58:08 +0000 (04:58 -0300)
PWGLF/STRANGENESS/Cascades/AliAnalysisTaskStrangenessVsMultiplicity.cxx

index 07b0e67e141985e15571876ebb20179d3665b878..cd0309fdf69270db775996454e8f10f643f217d3 100644 (file)
@@ -627,10 +627,11 @@ void AliAnalysisTaskStrangenessVsMultiplicity::UserExec(Option_t *)
     
     AliESDEvent *lESDevent = 0x0;
     
-    //Zero all booleans, etc
+    //Zero all booleans, etc: safe initialization per event
     fEvSel_HasAtLeastSPDVertex    = kFALSE;
     fEvSel_VtxZCut                = kFALSE;
     fEvSel_IsNotPileup            = kFALSE;
+    fEvSel_IsNotPileupMV          = kFALSE;
     fEvSel_IsNotPileupInMultBins  = kFALSE;
     fEvSel_Triggered              = kFALSE;
     
@@ -638,6 +639,9 @@ void AliAnalysisTaskStrangenessVsMultiplicity::UserExec(Option_t *)
     fEvSel_nSPDClusters = -1;
     fEvSel_nContributors = -1;
     fEvSel_nContributorsPileup = -1;
+    fEvSel_nSPDPrimVertices = -1;
+    fEvSel_distZ = -100;
+    fEvSel_VtxZ = -100;
     
     // Connect to the InputEvent
     // After these lines, we should have an ESD/AOD event + the number of V0s in it.
@@ -756,9 +760,6 @@ void AliAnalysisTaskStrangenessVsMultiplicity::UserExec(Option_t *)
     if( !lESDevent->IsPileupFromSPD()           ) fEvSel_IsNotPileup           = kTRUE;
     if( !lESDevent->IsPileupFromSPDInMultBins() ) fEvSel_IsNotPileupInMultBins = kTRUE;
     
-    fEvSel_nSPDPrimVertices = -1;
-    fEvSel_distZ = -1;
-    
     //Acquire information to compute residual pileup
     fEvSel_nSPDPrimVertices = lESDevent->GetNumberOfPileupVerticesSPD();