CMS 3D CMS Logo

List of all members | Public Types | Public Member Functions | Private Attributes
RPCandIRPCDigiProducer Class Reference

#include <RPCandIRPCDigiProducer.h>

Inheritance diagram for RPCandIRPCDigiProducer:
edm::stream::EDProducer<>

Public Types

typedef RPCDigitizer::RPCDigiSimLinks RPCDigitizerSimLinks
 
- 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, GlobalCacheLuminosityBlockContext
 
typedef CacheTypes::LuminosityBlockSummaryCache LuminosityBlockSummaryCache
 
typedef CacheTypes::RunCache RunCache
 
typedef RunContextT< RunCache, GlobalCacheRunContext
 
typedef CacheTypes::RunSummaryCache RunSummaryCache
 

Public Member Functions

void beginRun (const edm::Run &, const edm::EventSetup &) override
 
void produce (edm::Event &e, const edm::EventSetup &c) override
 
 RPCandIRPCDigiProducer (const edm::ParameterSet &ps)
 
void setRPCSetUp (const std::vector< RPCStripNoises::NoiseItem > &, const std::vector< double > &)
 
 ~RPCandIRPCDigiProducer () override
 
- Public Member Functions inherited from edm::stream::EDProducer<>
 EDProducer ()=default
 
bool hasAbilityToProduceInBeginLumis () const final
 
bool hasAbilityToProduceInBeginProcessBlocks () const final
 
bool hasAbilityToProduceInBeginRuns () const final
 
bool hasAbilityToProduceInEndLumis () const final
 
bool hasAbilityToProduceInEndProcessBlocks () const final
 
bool hasAbilityToProduceInEndRuns () const final
 

Private Attributes

const RPCGeometry_pGeom
 
edm::ESGetToken< RPCClusterSize, RPCClusterSizeRcdclsToken
 
std::string collection_for_XF
 
edm::EDGetTokenT< CrossingFrame< PSimHit > > crossingFrameToken
 
edm::ESGetToken< RPCGeometry, MuonGeometryRecordgeomToken
 
std::string mix_
 
edm::ESGetToken< RPCStripNoises, RPCStripNoisesRcdnoiseToken
 
IRPCDigitizertheIRPCDigitizer
 
RPCDigitizertheRPCDigitizer
 
RPCSimSetUptheRPCSimSetUpIRPC
 
RPCSimSetUptheRPCSimSetUpRPC
 

Detailed Description

Definition at line 24 of file RPCandIRPCDigiProducer.h.

Member Typedef Documentation

◆ RPCDigitizerSimLinks

Definition at line 27 of file RPCandIRPCDigiProducer.h.

Constructor & Destructor Documentation

◆ RPCandIRPCDigiProducer()

RPCandIRPCDigiProducer::RPCandIRPCDigiProducer ( const edm::ParameterSet ps)
explicit

Definition at line 39 of file RPCandIRPCDigiProducer.cc.

39  {
40  produces<RPCDigiCollection>();
41  produces<RPCDigitizerSimLinks>("RPCDigiSimLink");
42 
43  //Name of Collection used for create the XF
44  mix_ = ps.getParameter<std::string>("mixLabel");
45  collection_for_XF = ps.getParameter<std::string>("InputCollection");
46 
48  if (!rng.isAvailable()) {
49  throw cms::Exception("Configuration")
50  << "RPCDigitizer requires the RandomNumberGeneratorService\n"
51  "which is not present in the configuration file. You must add the service\n"
52  "in the configuration file or remove the modules that require it.";
53  };
54 
57  theRPCDigitizer = new RPCDigitizer(ps);
59  crossingFrameToken = consumes<CrossingFrame<PSimHit>>(edm::InputTag(mix_, collection_for_XF));
60  geomToken = esConsumes<RPCGeometry, MuonGeometryRecord, edm::Transition::BeginRun>();
61  noiseToken = esConsumes<RPCStripNoises, RPCStripNoisesRcd, edm::Transition::BeginRun>();
62  clsToken = esConsumes<RPCClusterSize, RPCClusterSizeRcd, edm::Transition::BeginRun>();
63 }

References clsToken, collection_for_XF, crossingFrameToken, Exception, geomToken, edm::ParameterSet::getParameter(), HLT_FULL_cff::InputTag, mix_, noiseToken, AlCaHLTBitMon_QueryRunRegistry::string, theIRPCDigitizer, theRPCDigitizer, theRPCSimSetUpIRPC, and theRPCSimSetUpRPC.

◆ ~RPCandIRPCDigiProducer()

RPCandIRPCDigiProducer::~RPCandIRPCDigiProducer ( )
override

Definition at line 65 of file RPCandIRPCDigiProducer.cc.

65  {
66  delete theRPCDigitizer;
67  delete theIRPCDigitizer;
68  delete theRPCSimSetUpRPC;
69  delete theRPCSimSetUpIRPC;
70 }

References theIRPCDigitizer, theRPCDigitizer, theRPCSimSetUpIRPC, and theRPCSimSetUpRPC.

Member Function Documentation

◆ beginRun()

void RPCandIRPCDigiProducer::beginRun ( const edm::Run r,
const edm::EventSetup eventSetup 
)
override

◆ produce()

void RPCandIRPCDigiProducer::produce ( edm::Event e,
const edm::EventSetup c 
)
override

Produces the EDM products,

Definition at line 94 of file RPCandIRPCDigiProducer.cc.

94  {
96  CLHEP::HepRandomEngine* engine = &rng->getEngine(e.streamID());
97 
98  LogDebug("RPCandIRPCDigiProducer") << "[RPCandIRPCDigiProducer::produce] got the CLHEP::HepRandomEngine engine from "
99  "the edm::Event.streamID() and edm::Service<edm::RandomNumberGenerator>";
100  LogDebug("RPCandIRPCDigiProducer") << "[RPCandIRPCDigiProducer::produce] test the CLHEP::HepRandomEngine by firing "
101  "once RandFlat ---- this must be the first time in SimMuon/RPCDigitizer";
102  LogDebug("RPCandIRPCDigiProducer") << "[RPCandIRPCDigiProducer::produce] to activate the test go in "
103  "RPCandIRPCDigiProducer.cc and uncomment the line below";
104 
106  e.getByToken(crossingFrameToken, cf);
107 
108  std::unique_ptr<MixCollection<PSimHit>> hits(new MixCollection<PSimHit>(cf.product()));
109 
110  // Create empty output
111  std::unique_ptr<RPCDigiCollection> pDigis(new RPCDigiCollection());
112  std::unique_ptr<RPCDigitizerSimLinks> RPCDigitSimLink(new RPCDigitizerSimLinks());
113 
114  theRPCDigitizer->doAction(*hits, *pDigis, *RPCDigitSimLink, engine); //make "bakelite RPC" digitizer do the action
115  theIRPCDigitizer->doAction(*hits, *pDigis, *RPCDigitSimLink, engine); //make "IRPC" digitizer do the action
116 
117  e.put(std::move(pDigis));
118  //store the SimDigiLinks in the event
119  e.put(std::move(RPCDigitSimLink), "RPCDigiSimLink");
120 }

References crossingFrameToken, RPCDigitizer::doAction(), IRPCDigitizer::doAction(), MillePedeFileConverter_cfg::e, edm::RandomNumberGenerator::getEngine(), hfClusterShapes_cfi::hits, LogDebug, eostools::move(), edm::Handle< T >::product(), theIRPCDigitizer, and theRPCDigitizer.

◆ setRPCSetUp()

void RPCandIRPCDigiProducer::setRPCSetUp ( const std::vector< RPCStripNoises::NoiseItem > &  ,
const std::vector< double > &   
)

Member Data Documentation

◆ _pGeom

const RPCGeometry* RPCandIRPCDigiProducer::_pGeom
private

Definition at line 52 of file RPCandIRPCDigiProducer.h.

Referenced by beginRun().

◆ clsToken

edm::ESGetToken<RPCClusterSize, RPCClusterSizeRcd> RPCandIRPCDigiProducer::clsToken
private

Definition at line 57 of file RPCandIRPCDigiProducer.h.

Referenced by beginRun(), and RPCandIRPCDigiProducer().

◆ collection_for_XF

std::string RPCandIRPCDigiProducer::collection_for_XF
private

Definition at line 48 of file RPCandIRPCDigiProducer.h.

Referenced by RPCandIRPCDigiProducer().

◆ crossingFrameToken

edm::EDGetTokenT<CrossingFrame<PSimHit> > RPCandIRPCDigiProducer::crossingFrameToken
private

Definition at line 51 of file RPCandIRPCDigiProducer.h.

Referenced by produce(), and RPCandIRPCDigiProducer().

◆ geomToken

edm::ESGetToken<RPCGeometry, MuonGeometryRecord> RPCandIRPCDigiProducer::geomToken
private

Definition at line 55 of file RPCandIRPCDigiProducer.h.

Referenced by beginRun(), and RPCandIRPCDigiProducer().

◆ mix_

std::string RPCandIRPCDigiProducer::mix_
private

Definition at line 47 of file RPCandIRPCDigiProducer.h.

Referenced by RPCandIRPCDigiProducer().

◆ noiseToken

edm::ESGetToken<RPCStripNoises, RPCStripNoisesRcd> RPCandIRPCDigiProducer::noiseToken
private

Definition at line 56 of file RPCandIRPCDigiProducer.h.

Referenced by beginRun(), and RPCandIRPCDigiProducer().

◆ theIRPCDigitizer

IRPCDigitizer* RPCandIRPCDigiProducer::theIRPCDigitizer
private

◆ theRPCDigitizer

RPCDigitizer* RPCandIRPCDigiProducer::theRPCDigitizer
private

◆ theRPCSimSetUpIRPC

RPCSimSetUp* RPCandIRPCDigiProducer::theRPCSimSetUpIRPC
private

◆ theRPCSimSetUpRPC

RPCSimSetUp* RPCandIRPCDigiProducer::theRPCSimSetUpRPC
private
RPCStripNoises::getVNoise
std::vector< NoiseItem > const & getVNoise() const
Definition: RPCStripNoises.h:24
RPCDigitizer::doAction
void doAction(MixCollection< PSimHit > &simHits, RPCDigiCollection &rpcDigis, RPCDigiSimLinks &rpcDigiSimLink, CLHEP::HepRandomEngine *)
Definition: RPCDigitizer.cc:19
edm::RandomNumberGenerator::getEngine
virtual CLHEP::HepRandomEngine & getEngine(StreamID const &)=0
Use this engine in event methods.
edm::Handle::product
T const * product() const
Definition: Handle.h:70
hfClusterShapes_cfi.hits
hits
Definition: hfClusterShapes_cfi.py:5
RPCandIRPCDigiProducer::theIRPCDigitizer
IRPCDigitizer * theIRPCDigitizer
Definition: RPCandIRPCDigiProducer.h:41
RPCandIRPCDigiProducer::clsToken
edm::ESGetToken< RPCClusterSize, RPCClusterSizeRcd > clsToken
Definition: RPCandIRPCDigiProducer.h:57
RPCClusterSizeRcd
Definition: RPCClusterSizeRcd.h:24
RPCClusterSize::getCls
std::vector< ClusterSizeItem > const & getCls() const
Definition: RPCClusterSize.h:23
HLT_FULL_cff.InputTag
InputTag
Definition: HLT_FULL_cff.py:89353
RPCDigitizer::setRPCSimSetUp
void setRPCSimSetUp(RPCSimSetUp *simsetup)
Definition: RPCDigitizer.h:48
RPCDigitizer
Definition: RPCDigitizer.h:33
RPCandIRPCDigiProducer::RPCDigitizerSimLinks
RPCDigitizer::RPCDigiSimLinks RPCDigitizerSimLinks
Definition: RPCandIRPCDigiProducer.h:27
RPCSimSetUp::setGeometry
void setGeometry(const RPCGeometry *geom)
sets geometry
Definition: RPCSimSetUp.h:47
edm::Handle
Definition: AssociativeIterator.h:50
edm::EventSetup::get
T get() const
Definition: EventSetup.h:80
IRPCDigitizer::setRPCSimSetUp
void setRPCSimSetUp(RPCSimSetUp *simsetup)
Definition: IRPCDigitizer.h:48
MixCollection
Definition: MixCollection.h:11
RPCandIRPCDigiProducer::geomToken
edm::ESGetToken< RPCGeometry, MuonGeometryRecord > geomToken
Definition: RPCandIRPCDigiProducer.h:55
IRPCDigitizer::setGeometry
void setGeometry(const RPCGeometry *geom)
sets geometry
Definition: IRPCDigitizer.h:46
RPCandIRPCDigiProducer::mix_
std::string mix_
Definition: RPCandIRPCDigiProducer.h:47
edm::ESHandle< RPCGeometry >
RPCandIRPCDigiProducer::crossingFrameToken
edm::EDGetTokenT< CrossingFrame< PSimHit > > crossingFrameToken
Definition: RPCandIRPCDigiProducer.h:51
RPCandIRPCDigiProducer::theRPCSimSetUpRPC
RPCSimSetUp * theRPCSimSetUpRPC
Definition: RPCandIRPCDigiProducer.h:42
AlCaHLTBitMon_QueryRunRegistry.string
string
Definition: AlCaHLTBitMon_QueryRunRegistry.py:256
RPCandIRPCDigiProducer::_pGeom
const RPCGeometry * _pGeom
Definition: RPCandIRPCDigiProducer.h:52
RPCandIRPCDigiProducer::noiseToken
edm::ESGetToken< RPCStripNoises, RPCStripNoisesRcd > noiseToken
Definition: RPCandIRPCDigiProducer.h:56
IRPCDigitizer
Definition: IRPCDigitizer.h:33
LogDebug
#define LogDebug(id)
Definition: MessageLogger.h:223
RPCDigiCollection
MuonDigiCollection< RPCDetId, RPCDigi > RPCDigiCollection
Definition: RPCDigiCollection.h:13
edm::Service< edm::RandomNumberGenerator >
edm::EventSetup::getHandle
ESHandle< T > getHandle(const ESGetToken< T, R > &iToken) const
Definition: EventSetup.h:148
get
#define get
eostools.move
def move(src, dest)
Definition: eostools.py:511
Exception
Definition: hltDiff.cc:246
RPCDigitizer::setGeometry
void setGeometry(const RPCGeometry *geom)
sets geometry
Definition: RPCDigitizer.h:46
RPCandIRPCDigiProducer::theRPCSimSetUpIRPC
RPCSimSetUp * theRPCSimSetUpIRPC
Definition: RPCandIRPCDigiProducer.h:43
edm::ParameterSet::getParameter
T getParameter(std::string const &) const
Definition: ParameterSet.h:303
RPCGeometry
Definition: RPCGeometry.h:20
RPCSimSetUp
Definition: RPCSimSetUp.h:28
RPCSimSetUp::setRPCSetUp
void setRPCSetUp(const std::vector< RPCStripNoises::NoiseItem > &vnoise, const std::vector< float > &vcls)
Definition: RPCSimSetUp.cc:42
IRPCDigitizer::doAction
void doAction(MixCollection< PSimHit > &simHits, RPCDigiCollection &rpcDigis, RPCDigiSimLinks &rpcDigiSimLink, CLHEP::HepRandomEngine *)
Definition: IRPCDigitizer.cc:20
RPCandIRPCDigiProducer::collection_for_XF
std::string collection_for_XF
Definition: RPCandIRPCDigiProducer.h:48
RPCandIRPCDigiProducer::theRPCDigitizer
RPCDigitizer * theRPCDigitizer
Definition: RPCandIRPCDigiProducer.h:40
MillePedeFileConverter_cfg.e
e
Definition: MillePedeFileConverter_cfg.py:37