]> git.uio.no Git - u/mrichter/AliRoot.git/blobdiff - EVE/alice-macros/esd_V0.C
protection for weighted profile 3D
[u/mrichter/AliRoot.git] / EVE / alice-macros / esd_V0.C
index 414dcf118be73ddc4cda114991a4750bc9dbe55e..99800e0ef9fee61431bd12fe59d3fa9a22e7ff34 100644 (file)
@@ -7,7 +7,23 @@
  * full copyright notice.                                                 *
  **************************************************************************/
 
-void esd_v0_init_rectrack(TEveRecTrack& rt, AliExternalTrackParam* tp)
+#if !defined(__CINT__) || defined(__MAKECINT__)
+#include <TEveVSDStructs.h>
+#include <TEveTrackPropagator.h>
+#include <TEveManager.h>
+
+#include <AliExternalTrackParam.h>
+#include <AliPID.h>
+#include <AliESDEvent.h>
+#include <AliESDVertex.h>
+#include <AliESDtrack.h>
+#include <AliESDv0.h>
+#include <AliEveEventManager.h>
+#include <AliEveV0.h>
+#endif
+
+
+void esd_v0_init_rectrack(TEveRecTrack& rt, const AliExternalTrackParam* tp)
 {
   Double_t      pbuf[3], vbuf[3];
 
@@ -61,6 +77,59 @@ AliEveV0* esd_make_v0(TEveTrackPropagator* rnrStyle, AliESDVertex* primVtx,
   myV0->SetOnFlyStatus(v0->GetOnFlyStatus());
   myV0->SetDaughterDCA(v0->GetDcaV0Daughters());
 
+  Double_t negProbability[10], posProbability[10];
+  Double_t negP = 0.0, posP = 0.0;
+  neg->GetESDpid(negProbability);
+  pos->GetESDpid(posProbability);
+  negP = neg->P();
+  posP = pos->P();
+
+  // ****** Tentative particle type "concentrations"
+  Double_t c[5]={0.01, 0.01, 0.85, 0.10, 0.05};
+  AliPID::SetPriors(c);
+
+  AliPID negPid(negProbability);
+  AliPID posPid(posProbability);
+
+  Int_t   negMostProbPdg =  0;
+  Int_t   posMostProbPdg =  0;
+
+  switch (negPid.GetMostProbable()){
+  case 0:
+    negMostProbPdg =   11; break;
+  case 1:
+    negMostProbPdg =   13; break;
+  case 2:
+    negMostProbPdg =  211; break;
+  case 3:
+    negMostProbPdg =  321; break;
+  case 4:
+    negMostProbPdg = 2212; break;
+  default :
+    negMostProbPdg =  211; break;
+  }
+
+  switch (posPid.GetMostProbable()){
+  case 0:
+    posMostProbPdg =   11; break;
+  case 1:
+    posMostProbPdg =   13; break;
+  case 2:
+    posMostProbPdg =  211; break;
+  case 3:
+    posMostProbPdg =  321; break;
+  case 4:
+    posMostProbPdg = 2212; break;
+  default :
+    posMostProbPdg =  211; break;
+  }
+
+  Float_t negMaxProbPid  = negPid.GetProbability(negPid.GetMostProbable());
+  Float_t posMaxProbPid  = posPid.GetProbability(posPid.GetMostProbable());
+
+  myV0->SetMaxProbPdgPid(0,negMostProbPdg,negMaxProbPid);
+  myV0->SetMaxProbPdgPid(1,posMostProbPdg,posMaxProbPid);
+
   return myV0;
 }
 
@@ -105,19 +174,3 @@ AliEveV0List* esd_V0(Bool_t onFly=kFALSE)
 
   return cont;
 }
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-