From c0cbbda06cb964a5b33d48b142e2c3776560069d Mon Sep 17 00:00:00 2001 From: Shreya Roy <roy@physi.uni-heidelberg.de> Date: Fri, 6 Dec 2024 15:25:54 +0100 Subject: [PATCH] Bugfix: Fix conversion of unit - from mm to cm --- sim/transport/generators/CbmPlutoGenerator.cxx | 13 +++++-------- 1 file changed, 5 insertions(+), 8 deletions(-) diff --git a/sim/transport/generators/CbmPlutoGenerator.cxx b/sim/transport/generators/CbmPlutoGenerator.cxx index 9f9135d85d..27e7faecc3 100644 --- a/sim/transport/generators/CbmPlutoGenerator.cxx +++ b/sim/transport/generators/CbmPlutoGenerator.cxx @@ -1,6 +1,6 @@ -/* Copyright (C) 2004-2021 GSI Helmholtzzentrum fuer Schwerionenforschung, Darmstadt +/* Copyright (C) 2004-2024 GSI Helmholtzzentrum fuer Schwerionenforschung, Darmstadt SPDX-License-Identifier: GPL-3.0-only - Authors: Volker Friese, Denis Bertini [committer] */ + Authors: Volker Friese, Shreya Roy, Denis Bertini [committer] */ // ------------------------------------------------------------------------- // ----- CbmPlutoGenerator source file ----- @@ -62,7 +62,6 @@ CbmPlutoGenerator::CbmPlutoGenerator(std::vector<std::string> fileNames) : FairG fAvailableEvents = fInputChain->GetEntries(); } - // ----- Destructor --------------------------------------------------- CbmPlutoGenerator::~CbmPlutoGenerator() { @@ -73,7 +72,6 @@ CbmPlutoGenerator::~CbmPlutoGenerator() } // ------------------------------------------------------------------------ - // ----- Public method ReadEvent -------------------------------------- Bool_t CbmPlutoGenerator::ReadEvent(FairPrimaryGenerator* primGen) { @@ -141,9 +139,9 @@ Bool_t CbmPlutoGenerator::ReadEvent(FairPrimaryGenerator* primGen) Double_t ee = mom.E(); TVector3 vertex = part->getVertex(); - Double_t vx = vertex.x(); - Double_t vy = vertex.y(); - Double_t vz = vertex.z(); + Double_t vx = vertex.x() * 0.1; // conversion of unit from mm to cm + Double_t vy = vertex.y() * 0.1; // conversion of unit from mm to cm + Double_t vz = vertex.z() * 0.1; // conversion of unit from mm to cm Bool_t wanttracking = kTRUE; if (!found || idx > -1) wanttracking = kFALSE; // only tracking for decay products that are known @@ -159,7 +157,6 @@ Bool_t CbmPlutoGenerator::ReadEvent(FairPrimaryGenerator* primGen) } // ------------------------------------------------------------------------ - // ----- Private method CloseInput ------------------------------------ void CbmPlutoGenerator::CloseInput() { -- GitLab