Decide whenever to run or not the vertex-finder on tracks accoring to the found ITS...
authorcvetan <cvetan@f7af4fe6-9843-0410-8265-dc069ae4e863>
Thu, 21 Aug 2008 12:44:11 +0000 (12:44 +0000)
committercvetan <cvetan@f7af4fe6-9843-0410-8265-dc069ae4e863>
Thu, 21 Aug 2008 12:44:11 +0000 (12:44 +0000)
STEER/AliReconstruction.cxx

index d6d3743..d1862eb 100644 (file)
@@ -1549,13 +1549,14 @@ Bool_t AliReconstruction::ProcessEvent(Int_t iEvent)
     //
     // Improve the reconstructed primary vertex position using the tracks
     //
-    TObject *obj = fOptions.FindObject("ITS");
-    if (obj) {
-      TString optITS = obj->GetTitle();
-      if (optITS.Contains("cosmics") || optITS.Contains("COSMICS")) 
-       fRunVertexFinderTracks=kFALSE;
+    Bool_t runVertexFinderTracks = fRunVertexFinderTracks;
+    if(fesd->GetPrimaryVertexSPD()) {
+      TString vtitle = fesd->GetPrimaryVertexSPD()->GetTitle();
+      if(vtitle.Contains("cosmics")) {
+       runVertexFinderTracks=kFALSE;
+      }
     }
-    if (fRunVertexFinderTracks) {
+    if (runVertexFinderTracks) { 
        // TPC + ITS primary vertex
        ftVertexer->SetITSMode();
        if(fDiamondProfile && fMeanVertexConstraint) {