Definition at line 56 of file larg4Main_module.cc.
larg4::larg4Main::larg4Main |
( |
fhicl::ParameterSet const & |
p | ) |
|
|
explicit |
Definition at line 128 of file larg4Main_module.cc.
130 ,
seed_(
p.get<
long>(
"seed", -1))
131 ,
macroPath_(
p.get<std::string>(
"macroPath",
"FW_SEARCH_PATH"))
cet::search_path pathFinder_
std::vector< art::InputTag > inputCollectionTags_
larg4::larg4Main::~larg4Main |
( |
| ) |
|
Definition at line 175 of file larg4Main_module.cc.
static std::unique_ptr< artg4tk::ArtG4RunManager > runManager_
void larg4::larg4Main::beginJob |
( |
| ) |
|
|
overrideprivate |
Definition at line 183 of file larg4Main_module.cc.
185 mf::LogDebug(
"Main_Run_Manager") <<
"In begin job";
static std::unique_ptr< artg4tk::ArtG4RunManager > runManager_
void larg4::larg4Main::beginRun |
( |
art::Run & |
r | ) |
|
|
overrideprivate |
Definition at line 193 of file larg4Main_module.cc.
200 art::ServiceHandle<artg4tk::PhysicsListHolderService const> physicsListHolder;
201 runManager_->SetUserInitialization(physicsListHolder->makePhysicsList());
205 auto detectorHolder = art::ServiceHandle<artg4tk::DetectorHolderService>().
get();
207 new artg4tk::ArtG4DetectorConstruction{detectorHolder->worldPhysicalVolume()});
210 auto actionHolder = art::ServiceHandle<artg4tk::ActionHolderService>().
get();
211 actionHolder->initialize();
214 actionHolder->setCurrArtRun(
r);
217 runManager_->SetUserAction(
new artg4tk::ArtG4PrimaryGeneratorAction{actionHolder});
224 runManager_->SetUserAction(
new artg4tk::ArtG4SteppingAction{actionHolder});
225 runManager_->SetUserAction(
new artg4tk::ArtG4StackingAction{actionHolder});
226 runManager_->SetUserAction(
new artg4tk::ArtG4EventAction{actionHolder, detectorHolder});
227 runManager_->SetUserAction(
new artg4tk::ArtG4TrackingAction{actionHolder});
230 physicsListHolder->initializePhysicsList();
233 UI_ = G4UImanager::GetUIpointer();
236 std::string macroLocation =
"";
238 mf::LogInfo(
"larg4Main") <<
"Finding path for " <<
g4MacroFile_ <<
"...\nSearch "
239 << (macroWasFound ?
"successful " :
"unsuccessful ") <<
"and path is: \n"
245 mf::LogInfo(
"larg4Main") <<
"Executing macro: " <<
g4MacroFile_;
246 std::string commandToExecute =
"/control/execute ";
247 commandToExecute.append(macroLocation);
248 UI_->ApplyCommand(commandToExecute);
251 mf::LogInfo(
"larg4Main") <<
"Unable to find " <<
g4MacroFile_ <<
" in the path(s) "
static std::atomic< int > processingRun_
static std::unique_ptr< artg4tk::ArtG4RunManager > runManager_
cet::search_path pathFinder_
void larg4::larg4Main::endRun |
( |
art::Run & |
r | ) |
|
|
overrideprivate |
Definition at line 291 of file larg4Main_module.cc.
static std::atomic< int > processingRun_
static std::unique_ptr< artg4tk::ArtG4RunManager > runManager_
std::vector< art::Handle< MCTruthCollection > > larg4::larg4Main::inputCollections |
( |
art::Event const & |
e | ) |
const |
|
private |
Definition at line 301 of file larg4Main_module.cc.
304 return e.getMany<std::vector<simb::MCTruth>>();
307 std::vector<art::Handle<MCTruthCollection>> result;
std::vector< simb::MCTruth > MCTruthCollection
std::vector< art::InputTag > inputCollectionTags_
bool empty(FixedBins< T, C > const &) noexcept
void larg4::larg4Main::produce |
( |
art::Event & |
e | ) |
|
|
overrideprivate |
Definition at line 268 of file larg4Main_module.cc.
271 art::ServiceHandle<artg4tk::ActionHolderService>()->setCurrArtEvent(
e);
272 art::ServiceHandle<artg4tk::DetectorHolderService>()->setCurrArtEvent(
e);
275 art::ServiceHandle<larg4::MCTruthEventActionService>()->setInputCollections(mclists);
277 art::ServiceHandle<larg4::ParticleListActionService> pla;
278 pla->setInputCollections(mclists);
279 auto const pid =
e.getProductID<std::vector<simb::MCParticle>>();
280 pla->setPtrInfo(pid,
e.productGetter(pid));
285 e.put(pla->ParticleCollection());
286 e.put(pla->AssnsMCTruthToMCParticle());
287 e.put(pla->DroppedTracksCollection());
static std::unique_ptr< artg4tk::ArtG4RunManager > runManager_
std::vector< art::Handle< MCTruthCollection > > inputCollections(art::Event const &e) const
std::string larg4::larg4Main::afterEvent_ |
|
private |
std::string larg4::larg4Main::g4MacroFile_ |
|
private |
bool larg4::larg4Main::initializeDetectors_ {true} |
|
staticprivate |
std::vector<art::InputTag> larg4::larg4Main::inputCollectionTags_ |
|
private |
std::string larg4::larg4Main::macroPath_ |
|
private |
cet::search_path larg4::larg4Main::pathFinder_ |
|
private |
bool larg4::larg4Main::pauseAfterEvent_ {false} |
|
private |
std::atomic< int > larg4::larg4Main::processingRun_ {0} |
|
staticprivate |
int larg4::larg4Main::rmvlevel_ |
|
private |
std::unique_ptr< artg4tk::ArtG4RunManager > larg4::larg4Main::runManager_ {nullptr} |
|
staticprivate |
long larg4::larg4Main::seed_ |
|
private |
G4UIsession* larg4::larg4Main::session_ {nullptr} |
|
private |
G4UImanager* larg4::larg4Main::UI_ {nullptr} |
|
private |
bool larg4::larg4Main::uiAtBeginRun_ |
|
private |
The documentation for this class was generated from the following file: