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
 
bool hasAbilityToProduceInBeginLumis () const final
 
bool hasAbilityToProduceInBeginRuns () const final
 
bool hasAbilityToProduceInEndLumis () const final
 
bool hasAbilityToProduceInEndRuns () const final
 

Private Attributes

int iev
 
std::unique_ptr< GEMSegmentBuildersegmentBuilder_
 
edm::EDGetTokenT< GEMRecHitCollectiontheGEMRecHitToken
 

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

Detailed Description

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

Author
Piet Verwilligen

Definition at line 23 of file GEMSegmentProducer.cc.

Constructor & Destructor Documentation

◆ GEMSegmentProducer()

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

Constructor.

Definition at line 38 of file GEMSegmentProducer.cc.

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

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

◆ ~GEMSegmentProducer()

GEMSegmentProducer::~GEMSegmentProducer ( )
inlineoverride

Destructor.

Definition at line 28 of file GEMSegmentProducer.cc.

28 {}

Member Function Documentation

◆ produce()

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

Produce the GEMSegment collection.

Definition at line 46 of file GEMSegmentProducer.cc.

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

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

Member Data Documentation

◆ iev

int GEMSegmentProducer::iev
private

Definition at line 33 of file GEMSegmentProducer.cc.

Referenced by produce().

◆ segmentBuilder_

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

Definition at line 35 of file GEMSegmentProducer.cc.

Referenced by GEMSegmentProducer(), and produce().

◆ theGEMRecHitToken

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

Definition at line 34 of file GEMSegmentProducer.cc.

Referenced by GEMSegmentProducer(), and produce().

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