CMS 3D CMS Logo

List of all members | Public Member Functions | Private Attributes
GEMSegmentProducer Class Reference
Inheritance diagram for GEMSegmentProducer:
edm::stream::EDProducer<>

Public Member Functions

 GEMSegmentProducer (const edm::ParameterSet &)
 Constructor. More...
 
void produce (edm::Event &, const edm::EventSetup &) override
 Produce the GEMSegment collection. More...
 
 ~GEMSegmentProducer () override
 Destructor. More...
 
- Public Member Functions inherited from edm::stream::EDProducer<>
 EDProducer ()=default
 
 EDProducer (const EDProducer &)=delete
 
bool hasAbilityToProduceInBeginLumis () const final
 
bool hasAbilityToProduceInBeginProcessBlocks () const final
 
bool hasAbilityToProduceInBeginRuns () const final
 
bool hasAbilityToProduceInEndLumis () const final
 
bool hasAbilityToProduceInEndProcessBlocks () const final
 
bool hasAbilityToProduceInEndRuns () const final
 
const EDProduceroperator= (const EDProducer &)=delete
 

Private Attributes

edm::ESGetToken< GEMGeometry, MuonGeometryRecordgemGeomToken_
 
int iev
 
std::unique_ptr< GEMSegmentBuildersegmentBuilder_
 
edm::EDGetTokenT< GEMRecHitCollectiontheGEMRecHitToken
 

Additional Inherited Members

- Public Types inherited from edm::stream::EDProducer<>
using CacheTypes = CacheContexts< T... >
 
using GlobalCache = typename CacheTypes::GlobalCache
 
using HasAbility = AbilityChecker< T... >
 
using InputProcessBlockCache = typename CacheTypes::InputProcessBlockCache
 
using LuminosityBlockCache = typename CacheTypes::LuminosityBlockCache
 
using LuminosityBlockContext = LuminosityBlockContextT< LuminosityBlockCache, RunCache, GlobalCache >
 
using LuminosityBlockSummaryCache = typename CacheTypes::LuminosityBlockSummaryCache
 
using RunCache = typename CacheTypes::RunCache
 
using RunContext = RunContextT< RunCache, GlobalCache >
 
using RunSummaryCache = typename CacheTypes::RunSummaryCache
 

Detailed Description

CSCSegmentProducer Produces a collection of GEMSegment's in endcap muon GEMs.

Author
Piet Verwilligen

Definition at line 24 of file GEMSegmentProducer.cc.

Constructor & Destructor Documentation

◆ GEMSegmentProducer()

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

Constructor.

Definition at line 40 of file GEMSegmentProducer.cc.

40  : iev(0) {
41  theGEMRecHitToken = consumes<GEMRecHitCollection>(ps.getParameter<edm::InputTag>("gemRecHitLabel"));
42  segmentBuilder_ = std::make_unique<GEMSegmentBuilder>(ps); // pass on the Parameter Set
43  gemGeomToken_ = esConsumes<GEMGeometry, MuonGeometryRecord>();
44  // register what this produces
45  produces<GEMSegmentCollection>();
46 }

References gemGeomToken_, edm::ParameterSet::getParameter(), segmentBuilder_, and theGEMRecHitToken.

◆ ~GEMSegmentProducer()

GEMSegmentProducer::~GEMSegmentProducer ( )
inlineoverride

Destructor.

Definition at line 29 of file GEMSegmentProducer.cc.

29 {}

Member Function Documentation

◆ produce()

void GEMSegmentProducer::produce ( edm::Event ev,
const edm::EventSetup setup 
)
override

Produce the GEMSegment collection.

Definition at line 48 of file GEMSegmentProducer.cc.

48  {
49  LogDebug("GEMSegmentProducer") << "start producing segments for " << ++iev << "th event with GEM data";
50 
51  // find the geometry (& conditions?) for this event & cache it in the builder
53  const GEMGeometry* mgeom = &*gemg;
54  segmentBuilder_->setGeometry(mgeom);
55 
56  // get the collection of GEMRecHit
58  ev.getByToken(theGEMRecHitToken, gemRecHits);
59 
60  // create empty collection of Segments
61  auto oc = std::make_unique<GEMSegmentCollection>();
62 
63  // fill the collection
64  segmentBuilder_->build(gemRecHits.product(), *oc); //@@ FILL oc
65 
66  // put collection in event
67  ev.put(std::move(oc));
68 }

References ev, gemGeomToken_, gemRecHits_cfi::gemRecHits, iev, LogDebug, eostools::move(), segmentBuilder_, singleTopDQM_cfi::setup, and theGEMRecHitToken.

Member Data Documentation

◆ gemGeomToken_

edm::ESGetToken<GEMGeometry, MuonGeometryRecord> GEMSegmentProducer::gemGeomToken_
private

Definition at line 37 of file GEMSegmentProducer.cc.

Referenced by GEMSegmentProducer(), and produce().

◆ iev

int GEMSegmentProducer::iev
private

Definition at line 34 of file GEMSegmentProducer.cc.

Referenced by produce().

◆ segmentBuilder_

std::unique_ptr<GEMSegmentBuilder> GEMSegmentProducer::segmentBuilder_
private

Definition at line 36 of file GEMSegmentProducer.cc.

Referenced by GEMSegmentProducer(), and produce().

◆ theGEMRecHitToken

edm::EDGetTokenT<GEMRecHitCollection> GEMSegmentProducer::theGEMRecHitToken
private

Definition at line 35 of file GEMSegmentProducer.cc.

Referenced by GEMSegmentProducer(), and produce().

edm::Handle< GEMRecHitCollection >
singleTopDQM_cfi.setup
setup
Definition: singleTopDQM_cfi.py:37
GEMSegmentProducer::gemGeomToken_
edm::ESGetToken< GEMGeometry, MuonGeometryRecord > gemGeomToken_
Definition: GEMSegmentProducer.cc:37
GEMSegmentProducer::iev
int iev
Definition: GEMSegmentProducer.cc:34
edm::ESHandle< GEMGeometry >
GEMSegmentProducer::segmentBuilder_
std::unique_ptr< GEMSegmentBuilder > segmentBuilder_
Definition: GEMSegmentProducer.cc:36
LogDebug
#define LogDebug(id)
Definition: MessageLogger.h:233
eostools.move
def move(src, dest)
Definition: eostools.py:511
ev
bool ev
Definition: Hydjet2Hadronizer.cc:97
edm::ParameterSet::getParameter
T getParameter(std::string const &) const
Definition: ParameterSet.h:303
GEMGeometry
Definition: GEMGeometry.h:24
gemRecHits_cfi.gemRecHits
gemRecHits
Definition: gemRecHits_cfi.py:7
edm::InputTag
Definition: InputTag.h:15
GEMSegmentProducer::theGEMRecHitToken
edm::EDGetTokenT< GEMRecHitCollection > theGEMRecHitToken
Definition: GEMSegmentProducer.cc:35