diff --git a/core/data/CbmMCTrack.cxx b/core/data/CbmMCTrack.cxx index 03974b9178a567061e62f3e8bd9934ec15227cfd..40066d4ccaaa0fd8aa94a0743dc30da4286aee72 100644 --- a/core/data/CbmMCTrack.cxx +++ b/core/data/CbmMCTrack.cxx @@ -154,7 +154,10 @@ double CbmMCTrack::GetCharge() const TParticlePDG* particle = TDatabasePDG::Instance()->GetParticle(fPdgCode); // Particle found in TDatabasePDG - if (particle) return particle->Charge(); + if (particle) { + double electron_charge = abs(TDatabasePDG::Instance()->GetParticle(11)->Charge()); + return particle->Charge() / electron_charge; + } // Ions may not be in the TDatabasePDG, but their charge number is encoded // in the PDG code like 10LZZZAAAI, where L is strangeness, Z is charge, diff --git a/reco/L1/CbmCaMCModule.cxx b/reco/L1/CbmCaMCModule.cxx index 9d5525683704b587576b0939a068cb571f5941b1..2263509a63b89985b74b0d7d53927c0dbe542e80 100644 --- a/reco/L1/CbmCaMCModule.cxx +++ b/reco/L1/CbmCaMCModule.cxx @@ -730,10 +730,8 @@ void MCModule::ReadMCTracks() // in the data base, its mass is calculated as A times proton mass. aTrk.SetMass(pExtMCTrk->GetMass()); - // The charge in CbmMCTrack is similarly to mass defined from ROOT PDG data base. The value of charge there is - // given in the units of 1/3e (absolute value of d-quark charge). In ::ca::tools::MCTrack we recalculate this - // value to the units of e. - aTrk.SetCharge(pExtMCTrk->GetCharge() / 3.); + // The charge in CbmMCTrack is given in the units of e + aTrk.SetCharge(pExtMCTrk->GetCharge()); // Set index of mother track. We assume, that mother track was recorded into the internal array before int extMotherId = pExtMCTrk->GetMotherId(); diff --git a/reco/L1/CbmL1ReadEvent.cxx b/reco/L1/CbmL1ReadEvent.cxx index 5655a3fdc36435a572adeceaa85d0ab6ffc46999..f9c68efd9d8f8a31bbadea912dc4ca09f3d49ddf 100644 --- a/reco/L1/CbmL1ReadEvent.cxx +++ b/reco/L1/CbmL1ReadEvent.cxx @@ -1272,7 +1272,7 @@ void CbmL1::Fill_vMCTracks() //} // TODO: Add light nuclei (d, t, He3, He4): they are common in tracking but not accounted in TDatabasePDG (S.Zharko) - q = MCTrack->GetCharge() / 3.; + q = MCTrack->GetCharge(); mass = MCTrack->GetMass(); Int_t iTrack = fvMCTracks.size(); //or iMCTrack?