Skip to content

Commit

Permalink
Remove the AddVolume from gGeoManager
Browse files Browse the repository at this point in the history
This eliminate the duplication of volNeuland volume
  • Loading branch information
YanzhaoW committed Jan 22, 2025
1 parent 771539a commit 3197eac
Show file tree
Hide file tree
Showing 6 changed files with 11 additions and 11 deletions.
1 change: 1 addition & 0 deletions .github/actions/ctest-cdash/action.yml
Original file line number Diff line number Diff line change
Expand Up @@ -27,6 +27,7 @@ runs:
- name: running ctest
run: |
source $GITHUB_WORKSPACE/util/generate_geo_test.sh
export PEDEDIR="~"
ctest -S cmake/CI_CD/CDash.cmake -DBUILD_J=${NUM_THREADS}\
-DTEST_MODEL=${TEST_MODEL}\
-DTEST_NAME=${{ env.TEST_NAME }}\
Expand Down
1 change: 1 addition & 0 deletions neuland/application/R3BNeulandApp.cxx
Original file line number Diff line number Diff line change
Expand Up @@ -5,6 +5,7 @@
#include <FairRootFileSink.h>
#include <FairRun.h>
#include <FairRuntimeDb.h>
#include <TGeoManager.h>
#include <fmt/format.h>
#include <gsl/span>
#ifdef HAS_MPI
Expand Down
9 changes: 4 additions & 5 deletions neuland/digitizing/R3BNeulandDigitizer.cxx
Original file line number Diff line number Diff line change
Expand Up @@ -11,15 +11,14 @@
* or submit itself to any jurisdiction. *
******************************************************************************/

#include "R3BNeulandDigitizer.h"
#include "FairRootManager.h"
#include "FairRunAna.h"
#include "FairRuntimeDb.h"
#include "NeulandPointFilter.h"
#include "R3BDataMonitor.h"
#include "R3BNeulandDigitizer.h"
#include <R3BShared.h>
#include <TFile.h>
#include <iostream>
#include <range/v3/view.hpp>
#include <utility>

Expand Down Expand Up @@ -124,7 +123,7 @@ void R3BNeulandDigitizer::Exec(Option_t* /*option*/)
digitizing_engine_->DepositLight(paddleID, point.GetTime(), point.GetLightYield() * GeVToMeVFac, dist);
paddleEnergyDeposit[paddleID] += point.GetEnergyLoss() * GeVToMeVFac;
} // eloss
} // points
} // points

const Double_t triggerTime = digitizing_engine_->GetTriggerTime();
const auto paddles = digitizing_engine_->ExtractPaddles();
Expand Down Expand Up @@ -176,7 +175,7 @@ void R3BNeulandDigitizer::Exec(Option_t* /*option*/)
<< ", tot_r = " << (signal.rightChannel->qdcUnSat * 15) + 14;
}
} // loop over all hits for each paddle
} // loop over paddles
} // loop over paddles

if (is_cal_output_)
{
Expand Down Expand Up @@ -216,7 +215,7 @@ void R3BNeulandDigitizer::fill_cal_data(const std::map<int, std::unique_ptr<R3B:
<< right.tot << '\n';
}
} // loop over all hits for each paddle
} // loop over paddles
} // loop over paddles

LOG(debug) << "R3BNeulandDigitizerCalData: produced " << cal_hits.size() << " hits";
}
Expand Down
4 changes: 2 additions & 2 deletions neuland/shared/R3BNeulandGeoPar.cxx
Original file line number Diff line number Diff line change
Expand Up @@ -58,14 +58,14 @@ Bool_t R3BNeulandGeoPar::getParams(FairParamList* l)

void R3BNeulandGeoPar::printParams()
{
std::cout << "R3BNeulandGeoPar: Neuland Paddle Positions ..." << std::endl;
std::cout << "R3BNeulandGeoPar: Neuland Paddle Positions ...\n";

fNeulandGeoNode->GetMatrix()->Print();

for (Int_t i = 0; i < fNeulandGeoNode->GetNdaughters(); i++)
{
TGeoNode* node = fNeulandGeoNode->GetDaughter(i);
std::cout << node->GetNumber() << std::endl;
std::cout << node->GetNumber() << "\n";
node->GetMatrix()->Print();
}
}
Expand Down
1 change: 0 additions & 1 deletion neuland/simulation/R3BNeuland.cxx
Original file line number Diff line number Diff line change
Expand Up @@ -282,7 +282,6 @@ void R3BNeuland::create_geo()
geo_loader = std::make_unique<FairGeoLoader>("TGeo", "FairGeoLoader").release();
}
auto* neuland_geo = geo_creator_.construct_volume(num_of_planes_, geo_loader);
gGeoManager->AddVolume(neuland_geo);
if (auto* top_volume = gGeoManager->GetTopVolume(); top_volume != nullptr)
{
// Use copy_id 0 since only one neuland is needed
Expand Down
6 changes: 3 additions & 3 deletions neuland/test/CMakeLists.txt
Original file line number Diff line number Diff line change
Expand Up @@ -38,7 +38,7 @@ set(simuPars
add_test(NeulandSimulation ${R3BROOT_BINARY_DIR}/bin/neuland sim ${simuPars})
set_tests_properties(NeulandSimulation PROPERTIES TIMEOUT "2000")
set_tests_properties(NeulandSimulation PROPERTIES PASS_REGULAR_EXPRESSION
"Macro finished successfully.")
"Neuland Application finished successfully.")

set(digiPars
-i
Expand All @@ -50,14 +50,14 @@ set(digiPars
--channel
tamex
-o
test_exe.digi.root
test.neul.root
-v
info)
add_test(NeulandDigitizer ${R3BROOT_BINARY_DIR}/bin/neuland ana ${digiPars})
set_tests_properties(NeulandDigitizer PROPERTIES DEPENDS NeulandSimulation)
set_tests_properties(NeulandDigitizer PROPERTIES TIMEOUT "1000")
set_tests_properties(NeulandDigitizer PROPERTIES PASS_REGULAR_EXPRESSION
"Macro finished successfully.")
"Neuland Application finished successfully.")

generate_root_test_script(${R3BROOT_SOURCE_DIR}/neuland/test/testNeulandSimulation.C)
add_test(NeulandSimulationMacro ${R3BROOT_BINARY_DIR}/neuland/test/testNeulandSimulation.sh)
Expand Down

0 comments on commit 3197eac

Please sign in to comment.