doesn't have to be a producer. Can act as an analyzer, too. More...
#include <SubsystemNeutronWriter.h>
Public Member Functions | |
virtual bool | accept (const edm::PSimHitContainer &cluster) const =0 |
decides whether this cluster is good enough to be included More... | |
virtual int | chamberId (int globalDetId) const =0 |
virtual int | chamberType (int globalDetId) const =0 |
void | initialize (int chamberType) |
good practice to do once for each chamber type More... | |
virtual int | localDetId (int globalDetId) const =0 |
void | printStats () |
void | produce (edm::Event &e, edm::EventSetup const &c) override |
SubsystemNeutronWriter (edm::ParameterSet const &pset) | |
~SubsystemNeutronWriter () override | |
destructor prints statistics on number of events written More... | |
Public Member Functions inherited from edm::stream::EDProducer<> | |
EDProducer ()=default | |
bool | hasAbilityToProduceInLumis () const final |
bool | hasAbilityToProduceInRuns () const final |
Protected Member Functions | |
void | adjust (PSimHit &h, float timeOffset, float smearing) |
helper to add time offsets and local det ID More... | |
void | updateCount (int chamberType) |
updates the counter More... | |
void | writeCluster (int chamberType, const edm::PSimHitContainer &cluster) |
virtual void | writeHits (int chamberType, edm::PSimHitContainer &chamberHits, CLHEP::HepRandomEngine *) |
Private Attributes | |
bool | initialized |
std::map< int, int > | theCountPerChamberType |
NeutronWriter * | theHitWriter |
edm::InputTag | theInputTag |
double | theNeutronTimeCut |
int | theNEvents |
double | theT0 |
double | theTimeWindow |
bool | useLocalDetId_ |
bool | useRandFlat |
Additional Inherited Members | |
Public Types inherited from edm::stream::EDProducer<> | |
typedef CacheContexts< T... > | CacheTypes |
typedef CacheTypes::GlobalCache | GlobalCache |
typedef AbilityChecker< T... > | HasAbility |
typedef CacheTypes::LuminosityBlockCache | LuminosityBlockCache |
typedef LuminosityBlockContextT< LuminosityBlockCache, RunCache, GlobalCache > | LuminosityBlockContext |
typedef CacheTypes::LuminosityBlockSummaryCache | LuminosityBlockSummaryCache |
typedef CacheTypes::RunCache | RunCache |
typedef RunContextT< RunCache, GlobalCache > | RunContext |
typedef CacheTypes::RunSummaryCache | RunSummaryCache |
doesn't have to be a producer. Can act as an analyzer, too.
Definition at line 28 of file SubsystemNeutronWriter.h.
|
explicit |
Definition at line 24 of file SubsystemNeutronWriter.cc.
References Exception, edm::ParameterSet::getParameter(), edm::Service< T >::isAvailable(), convertSQLitetoXML_cfg::output, theHitWriter, useLocalDetId_, useRandFlat, and cscNeutronWriter_cfi::writer.
|
override |
destructor prints statistics on number of events written
Definition at line 59 of file SubsystemNeutronWriter.cc.
References printStats(), and theHitWriter.
|
pure virtual |
decides whether this cluster is good enough to be included
Implemented in RPCNeutronWriter, CSCNeutronWriter, and DTNeutronWriter.
Referenced by Vispa.Gui.BoxContentDialog.BoxContentDialog::apply(), Vispa.Plugins.ConfigEditor.ToolDialog.ToolDialog::apply(), esMonitoring.FDJsonServer::handle_accept(), and writeCluster().
|
protected |
helper to add time offsets and local det ID
Definition at line 153 of file SubsystemNeutronWriter.cc.
References PSimHit::detUnitId(), PSimHit::energyLoss(), PSimHit::entryPoint(), PSimHit::exitPoint(), localDetId(), PSimHit::momentumAtEntry(), PSimHit::pabs(), PSimHit::particleType(), PV3DBase< T, PVType, FrameType >::phi(), PV3DBase< T, PVType, FrameType >::theta(), PSimHit::timeOfFlight(), PSimHit::trackId(), and useLocalDetId_.
Referenced by writeHits().
|
pure virtual |
Implemented in RPCNeutronWriter, CSCNeutronWriter, and DTNeutronWriter.
Referenced by produce().
|
pure virtual |
Implemented in RPCNeutronWriter, CSCNeutronWriter, and DTNeutronWriter.
Referenced by produce(), and writeHits().
void SubsystemNeutronWriter::initialize | ( | int | chamberType | ) |
good practice to do once for each chamber type
Definition at line 101 of file SubsystemNeutronWriter.cc.
References NeutronWriter::initialize(), and theHitWriter.
Referenced by CSCNeutronWriter::CSCNeutronWriter().
|
pure virtual |
Implemented in RPCNeutronWriter, CSCNeutronWriter, and DTNeutronWriter.
Referenced by adjust().
void SubsystemNeutronWriter::printStats | ( | ) |
Definition at line 64 of file SubsystemNeutronWriter.cc.
References theCountPerChamberType, and theNEvents.
Referenced by ~SubsystemNeutronWriter().
|
override |
Definition at line 73 of file SubsystemNeutronWriter.cc.
References NeutronWriter::beginEvent(), chamberId(), chamberType(), NeutronWriter::endEvent(), edm::Event::getByLabel(), edm::RandomNumberGenerator::getEngine(), hfClusterShapes_cfi::hits, edm::Event::streamID(), theHitWriter, theInputTag, theNEvents, useRandFlat, and writeHits().
|
protected |
updates the counter
Definition at line 172 of file SubsystemNeutronWriter.cc.
References mps_splice::entry, and theCountPerChamberType.
Referenced by writeCluster().
|
protected |
Definition at line 146 of file SubsystemNeutronWriter.cc.
References accept(), theHitWriter, updateCount(), and NeutronWriter::writeCluster().
Referenced by writeHits().
|
protectedvirtual |
Definition at line 107 of file SubsystemNeutronWriter.cc.
References adjust(), chamberType(), PSimHit::detUnitId(), mps_fire::i, LogDebug, PSimHit::pabs(), PSimHit::particleType(), theNeutronTimeCut, theT0, theTimeWindow, PSimHit::tof(), useRandFlat, and writeCluster().
Referenced by produce().
|
private |
Definition at line 70 of file SubsystemNeutronWriter.h.
|
private |
Definition at line 73 of file SubsystemNeutronWriter.h.
Referenced by printStats(), and updateCount().
|
private |
Definition at line 63 of file SubsystemNeutronWriter.h.
Referenced by initialize(), produce(), SubsystemNeutronWriter(), writeCluster(), and ~SubsystemNeutronWriter().
|
private |
Definition at line 65 of file SubsystemNeutronWriter.h.
Referenced by produce().
|
private |
Definition at line 66 of file SubsystemNeutronWriter.h.
Referenced by writeHits().
|
private |
Definition at line 69 of file SubsystemNeutronWriter.h.
Referenced by printStats(), and produce().
|
private |
Definition at line 68 of file SubsystemNeutronWriter.h.
Referenced by writeHits().
|
private |
Definition at line 67 of file SubsystemNeutronWriter.h.
Referenced by writeHits().
|
private |
Definition at line 72 of file SubsystemNeutronWriter.h.
Referenced by adjust(), and SubsystemNeutronWriter().
|
private |
Definition at line 64 of file SubsystemNeutronWriter.h.
Referenced by produce(), SubsystemNeutronWriter(), and writeHits().