Skip to content

Commit e34b574

Browse files
committed
TVirtualMCSensitiveDetector: example/Tutorial1 fixup
Removed the IsSensitive() function. Increase the number of events to run in the MT mode to 20.
1 parent 17b1c99 commit e34b574

File tree

3 files changed

+10
-11
lines changed

3 files changed

+10
-11
lines changed

examples/simulation/Tutorial1/macros/CMakeLists.txt

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,5 @@
11
################################################################################
2-
# Copyright (C) 2014-2019 GSI Helmholtzzentrum fuer Schwerionenforschung GmbH #
2+
# Copyright (C) 2014-2023 GSI Helmholtzzentrum fuer Schwerionenforschung GmbH #
33
# #
44
# This software is distributed under the terms of the #
55
# GNU Lesser General Public Licence (LGPL) version 3, #
@@ -52,7 +52,7 @@ foreach(mcEngine IN LISTS mcEngine_list)
5252
endforeach()
5353

5454
add_test(NAME ex_tutorial1_Geant4MT
55-
COMMAND ${CMAKE_CURRENT_BINARY_DIR}/run_tutorial1.sh 10 \"TGeant4\" true false)
55+
COMMAND ${CMAKE_CURRENT_BINARY_DIR}/run_tutorial1.sh 20 \"TGeant4\" true false)
5656
set_tests_properties(ex_tutorial1_Geant4MT PROPERTIES
5757
TIMEOUT ${maxTestTime}
5858
PASS_REGULAR_EXPRESSION "Simulation successful."

examples/simulation/Tutorial1/src/FairTutorialDet1.cxx

Lines changed: 7 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,5 @@
11
/********************************************************************************
2-
* Copyright (C) 2014-2022 GSI Helmholtzzentrum fuer Schwerionenforschung GmbH *
2+
* Copyright (C) 2014-2023 GSI Helmholtzzentrum fuer Schwerionenforschung GmbH *
33
* *
44
* This software is distributed under the terms of the *
55
* GNU Lesser General Public Licence (LGPL) version 3, *
@@ -120,11 +120,9 @@ TClonesArray* FairTutorialDet1::GetCollection(Int_t iColl) const
120120
}
121121
}
122122

123-
void FairTutorialDet1::Reset() { fFairTutorialDet1PointCollection->Clear(); }
124-
125-
Bool_t FairTutorialDet1::IsSensitive(const std::string& name)
123+
void FairTutorialDet1::Reset()
126124
{
127-
return name.find("tutdet") != std::string::npos;
125+
fFairTutorialDet1PointCollection->Clear();
128126
}
129127

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

152-
FairModule* FairTutorialDet1::CloneModule() const { return new FairTutorialDet1(*this); }
150+
FairModule* FairTutorialDet1::CloneModule() const
151+
{
152+
return new FairTutorialDet1(*this);
153+
}
153154

154155
ClassImp(FairTutorialDet1);

examples/simulation/Tutorial1/src/FairTutorialDet1.h

Lines changed: 1 addition & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,5 @@
11
/********************************************************************************
2-
* Copyright (C) 2014-2022 GSI Helmholtzzentrum fuer Schwerionenforschung GmbH *
2+
* Copyright (C) 2014-2023 GSI Helmholtzzentrum fuer Schwerionenforschung GmbH *
33
* *
44
* This software is distributed under the terms of the *
55
* GNU Lesser General Public Licence (LGPL) version 3, *
@@ -79,8 +79,6 @@ class FairTutorialDet1 : public FairDetector
7979

8080
FairModule* CloneModule() const override;
8181

82-
Bool_t IsSensitive(const std::string& name) override;
83-
8482
private:
8583
/** Track information to be stored until the track leaves the
8684
active volume.

0 commit comments

Comments
 (0)