26 #include "G4RunManagerKernel.hh"
27 #include "G4TransportationManager.hh"
33 std::vector<boost::shared_ptr<SimWatcher> >& oWatchers,
34 std::vector<boost::shared_ptr<SimProducer> >& oProds)
38 vector<ParameterSet> watchers;
39 try { watchers = iP.
getParameter<vector<ParameterSet> >(
"Watchers"); }
42 for(vector<ParameterSet>::iterator itWatcher = watchers.begin();
43 itWatcher != watchers.end(); ++itWatcher)
45 std::auto_ptr<SimWatcherMakerBase>
47 if(maker.get()==0) {
throw SimG4Exception(
"Unable to find the requested Watcher"); }
49 boost::shared_ptr<SimWatcher> watcherTemp;
50 boost::shared_ptr<SimProducer> producerTemp;
51 maker->make(*itWatcher,iReg,watcherTemp,producerTemp);
52 oWatchers.push_back(watcherTemp);
53 if(producerTemp) oProds.push_back(producerTemp);
59 m_pUseMagneticField(p.getParameter<bool>(
"UseMagneticField")),
60 m_pField(p.getParameter<edm::
ParameterSet>(
"MagneticField")),
61 m_pUseSensitiveDetectors(p.getParameter<bool>(
"UseSensitiveDetectors")),
82 {
std::cout <<
" GeometryProducer terminating " << std::endl; }
86 m_kernel = G4RunManagerKernel::GetRunManagerKernel();
88 std::cout <<
" GeometryProducer initializing " << std::endl;
104 std::cout <<
"B-field(T) at (0,0,0)(cm): " << pMF->inTesla(g) << std::endl;
114 std::cout <<
" instantiating sensitive detectors " << std::endl;
119 std::pair< std::vector<SensitiveTkDetector*>,
120 std::vector<SensitiveCaloDetector*> >
129 <<
" Calo type producers " << std::endl;
132 ++itProd) { (*itProd)->produce(e,es); }
T getParameter(std::string const &) const
std::pair< std::vector< SensitiveTkDetector * >, std::vector< SensitiveCaloDetector * > > create(const DDDWorld &w, const DDCompactView &cpv, SensitiveDetectorCatalog &clg, edm::ParameterSet const &p, const SimTrackManager *m, SimActivityRegistry ®) const
GeometryProducer(edm::ParameterSet const &p)
edm::ParameterSet m_pField
#define DEFINE_FWK_MODULE(type)
bool m_pUseSensitiveDetectors
std::auto_ptr< SimTrackManager > m_trackManager
The Signals That Services Can Subscribe To This is based on ActivityRegistry and is current per Services can connect to the signals distributed by the ActivityRegistry in order to monitor the activity of the application Each possible callback has some defined which we here list in angle e g
virtual ~GeometryProducer()
edm::serviceregistry::AllArgsMaker< DTDataMonitorInterface, DTDataIntegrityTask > maker
G4RunManagerKernel * m_kernel
SimActivityRegistry m_registry
std::vector< SensitiveTkDetector * > m_sensTkDets
std::vector< boost::shared_ptr< SimWatcher > > m_watchers
DDDWorldSignal dddWorldSignal_
std::auto_ptr< sim::FieldBuilder > m_fieldBuilder
std::vector< boost::shared_ptr< SimProducer > > m_producers
static void createWatchers(const edm::ParameterSet &iP, SimActivityRegistry &iReg, std::vector< boost::shared_ptr< SimWatcher > > &oWatchers, std::vector< boost::shared_ptr< SimProducer > > &oProds)
void connect(SimActivityRegistry &iOther)
forwards our signals to slots connected to iOther
virtual void produce(edm::Event &e, const edm::EventSetup &c)
T get(const Candidate &c)
std::vector< SensitiveCaloDetector * > m_sensCaloDets