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.

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

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 }
T getParameter(std::string const &) const
Definition: ParameterSet.h:303
edm::ESGetToken< GEMGeometry, MuonGeometryRecord > gemGeomToken_
std::unique_ptr< GEMSegmentBuilder > segmentBuilder_
edm::EDGetTokenT< GEMRecHitCollection > 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.

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

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 }
edm::ESGetToken< GEMGeometry, MuonGeometryRecord > gemGeomToken_
std::unique_ptr< GEMSegmentBuilder > segmentBuilder_
edm::EDGetTokenT< GEMRecHitCollection > theGEMRecHitToken
def move(src, dest)
Definition: eostools.py:511
#define LogDebug(id)

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().