]> git.uio.no Git - u/mrichter/AliRoot.git/commitdiff
Fall back to the SPD vertex if there is not primary one
authorakisiel <akisiel@f7af4fe6-9843-0410-8265-dc069ae4e863>
Thu, 5 Feb 2009 11:06:51 +0000 (11:06 +0000)
committerakisiel <akisiel@f7af4fe6-9843-0410-8265-dc069ae4e863>
Thu, 5 Feb 2009 11:06:51 +0000 (11:06 +0000)
PWG2/FEMTOSCOPY/AliFemto/AliFemtoEventReaderESDChainKine.cxx

index baaa762227a88df305b758a9566738d764ea22ea..c9d2b82a11392871e27ee80642f76f1e4db4a0b6 100644 (file)
@@ -26,6 +26,8 @@
 #include "AliFemtoModelGlobalHiddenInfo.h"
 #include "AliGenHijingEventHeader.h"
 
+#include "AliVertexerTracks.h"
+
 ClassImp(AliFemtoEventReaderESDChainKine)
 
 #if !(ST_NO_NAMESPACES)
@@ -156,8 +158,21 @@ AliFemtoEvent* AliFemtoEventReaderESDChainKine::ReturnHbtEvent()
   else {
     fEvent->GetPrimaryVertex()->GetXYZ(fV1);
     fEvent->GetPrimaryVertex()->GetCovMatrix(fVCov);
-    if (!fEvent->GetPrimaryVertex()->GetStatus())
-      fVCov[4] = -1001.0;
+
+    if (!fEvent->GetPrimaryVertex()->GetStatus()) {
+      // Get the vertex from SPD
+      fEvent->GetPrimaryVertexSPD()->GetXYZ(fV1);
+      fEvent->GetPrimaryVertexSPD()->GetCovMatrix(fVCov);
+      
+      
+      if (!fEvent->GetPrimaryVertexSPD()->GetStatus())
+       fVCov[4] = -1001.0;
+      else {
+       fEvent->GetPrimaryVertexSPD()->GetXYZ(fV1);
+       fEvent->GetPrimaryVertexSPD()->GetCovMatrix(fVCov);
+      }
+    }
+    
   }
 
   AliFmThreeVectorF vertex(fV1[0],fV1[1],fV1[2]);
@@ -356,6 +371,11 @@ AliFemtoEvent* AliFemtoEventReaderESDChainKine::ReturnHbtEvent()
       AliFemtoModelGlobalHiddenInfo *tInfo = new AliFemtoModelGlobalHiddenInfo();
       tInfo->SetGlobalEmissionPoint(fpx, fpy, fpz);
 
+      fpx *= 1e13;
+      fpy *= 1e13;
+      fpz *= 1e13;
+      fpt *= 1e13*3e10;
+
       if (motherids[TMath::Abs(esdtrack->GetLabel())]>0) {
        TParticle *mother = fStack->Particle(motherids[TMath::Abs(esdtrack->GetLabel())]);
        // Check if this is the same particle stored twice on the stack