From: hristov Date: Tue, 8 Mar 2011 17:41:20 +0000 (+0000) Subject: Correct treatment of the best hypothesys (Ruben) X-Git-Url: http://git.uio.no/git/?p=u%2Fmrichter%2FAliRoot.git;a=commitdiff_plain;h=eea518572eb44f5f00994cae36abc77d45f3fb8c Correct treatment of the best hypothesys (Ruben) --- diff --git a/ITS/AliITStrackMI.cxx b/ITS/AliITStrackMI.cxx index 991040668ce..36c2c90cfc7 100644 --- a/ITS/AliITStrackMI.cxx +++ b/ITS/AliITStrackMI.cxx @@ -91,7 +91,7 @@ fExpQ(t.fExpQ), fChi22(t.fChi22), fdEdxMismatch(t.fdEdxMismatch), fConstrain(t.fConstrain), -fWinner(t.fWinner), +fWinner(0), fGoldV0(t.fGoldV0) { //------------------------------------------------------------------ //Copy constructor diff --git a/ITS/AliITStrackMI.h b/ITS/AliITStrackMI.h index 91654ec9aba..3c928980528 100644 --- a/ITS/AliITStrackMI.h +++ b/ITS/AliITStrackMI.h @@ -39,6 +39,7 @@ public: AliITStrackMI(); AliITStrackMI(AliESDtrack& t,Bool_t c=kFALSE); AliITStrackMI(const AliITStrackMI& t); + virtual ~AliITStrackMI() {if (fWinner) fWinner->fWinner = 0;} // release associated seed Int_t GetProlongationFast(Double_t alpha, Double_t xr,Double_t &y, Double_t &z); Bool_t UpdateMI(const AliCluster *c, Double_t chi2, Int_t i); @@ -99,7 +100,7 @@ public: void SetDeadZoneProbability(Int_t ilayer,Float_t d) {fDeadZoneProbability[ilayer]=d;} // AliITStrackMI* GetWinner() const {return fWinner;} - void SetWinner(AliITStrackMI* p) {fWinner = p;} + void SetWinner(AliITStrackMI* p); // Double_t GetPredictedChi2MI(Double_t cy, Double_t cz, Double_t cerry, Double_t cerrz, Double_t covyz=0.) const; Bool_t IsGoldPrimary(); @@ -137,6 +138,14 @@ protected: ClassDef(AliITStrackMI,4) //ITS reconstructed track }; +inline void AliITStrackMI::SetWinner(AliITStrackMI* p) +{ + // connect winning hypothesis with the seed + if (fWinner) fWinner->fWinner = 0; // release previous winner + fWinner = p; + if (p) p->fWinner = this; +} + #endif