Skip to content

Commit

Permalink
TVirtualMCSensitiveDetector: example/Tutorial1 fixup
Browse files Browse the repository at this point in the history
Removed the IsSensitive() function.
Increase the number of events to run in the MT mode to 20.
  • Loading branch information
karabowi committed Jan 30, 2023
1 parent 83bbbc6 commit 0612207
Show file tree
Hide file tree
Showing 3 changed files with 10 additions and 11 deletions.
4 changes: 2 additions & 2 deletions examples/simulation/Tutorial1/macros/CMakeLists.txt
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
################################################################################
# Copyright (C) 2014-2019 GSI Helmholtzzentrum fuer Schwerionenforschung GmbH #
# Copyright (C) 2014-2023 GSI Helmholtzzentrum fuer Schwerionenforschung GmbH #
# #
# This software is distributed under the terms of the #
# GNU Lesser General Public Licence (LGPL) version 3, #
Expand Down Expand Up @@ -52,7 +52,7 @@ foreach(mcEngine IN LISTS mcEngine_list)
endforeach()

add_test(NAME ex_tutorial1_Geant4MT
COMMAND ${CMAKE_CURRENT_BINARY_DIR}/run_tutorial1.sh 10 \"TGeant4\" true false)
COMMAND ${CMAKE_CURRENT_BINARY_DIR}/run_tutorial1.sh 20 \"TGeant4\" true false)
set_tests_properties(ex_tutorial1_Geant4MT PROPERTIES
TIMEOUT ${maxTestTime}
PASS_REGULAR_EXPRESSION "Simulation successful."
Expand Down
13 changes: 7 additions & 6 deletions examples/simulation/Tutorial1/src/FairTutorialDet1.cxx
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
/********************************************************************************
* Copyright (C) 2014-2022 GSI Helmholtzzentrum fuer Schwerionenforschung GmbH *
* Copyright (C) 2014-2023 GSI Helmholtzzentrum fuer Schwerionenforschung GmbH *
* *
* This software is distributed under the terms of the *
* GNU Lesser General Public Licence (LGPL) version 3, *
Expand Down Expand Up @@ -120,11 +120,9 @@ TClonesArray* FairTutorialDet1::GetCollection(Int_t iColl) const
}
}

void FairTutorialDet1::Reset() { fFairTutorialDet1PointCollection->Clear(); }

Bool_t FairTutorialDet1::IsSensitive(const std::string& name)
void FairTutorialDet1::Reset()
{
return name.find("tutdet") != std::string::npos;
fFairTutorialDet1PointCollection->Clear();
}

void FairTutorialDet1::ConstructGeometry()
Expand All @@ -149,6 +147,9 @@ FairTutorialDet1Point* FairTutorialDet1::AddHit(Int_t trackID,
return new (clref[size]) FairTutorialDet1Point(trackID, detID, pos, mom, time, length, eLoss);
}

FairModule* FairTutorialDet1::CloneModule() const { return new FairTutorialDet1(*this); }
FairModule* FairTutorialDet1::CloneModule() const
{
return new FairTutorialDet1(*this);
}

ClassImp(FairTutorialDet1);
4 changes: 1 addition & 3 deletions examples/simulation/Tutorial1/src/FairTutorialDet1.h
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
/********************************************************************************
* Copyright (C) 2014-2022 GSI Helmholtzzentrum fuer Schwerionenforschung GmbH *
* Copyright (C) 2014-2023 GSI Helmholtzzentrum fuer Schwerionenforschung GmbH *
* *
* This software is distributed under the terms of the *
* GNU Lesser General Public Licence (LGPL) version 3, *
Expand Down Expand Up @@ -79,8 +79,6 @@ class FairTutorialDet1 : public FairDetector

FairModule* CloneModule() const override;

Bool_t IsSensitive(const std::string& name) override;

private:
/** Track information to be stored until the track leaves the
active volume.
Expand Down

0 comments on commit 0612207

Please sign in to comment.