CMS 3D CMS Logo

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

#include <MuonSeedProducer.h>

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

Public Member Functions

 MuonSeedProducer (const edm::ParameterSet &)
 Constructor. More...
 
void produce (edm::Event &, const edm::EventSetup &) override
 Get event properties to send to builder to fill seed collection. More...
 
 ~MuonSeedProducer () override
 Destructor. More...
 
- 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

bool debug
 
edm::ESGetToken< MagneticField, IdealMagneticFieldRecordmagFieldToken_
 
edm::ESGetToken< MuonDetLayerGeometry, MuonRecoGeometryRecordmuonLayersToken_
 
MuonSeedBuildermuonSeedBuilder_
 Builder where seeds are formed. More...
 

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

This EDProducer produces a collection of muon seeds.
To do so, it forms pairs of CSC and/or DT segments and look at the properties of the segment pair (eta, dphi) first to estimate the properties of the muon, and segment direction in case where there is only one segment available.

Author
Dominique Fortin - UCR

Definition at line 30 of file MuonSeedProducer.h.

Constructor & Destructor Documentation

◆ MuonSeedProducer()

MuonSeedProducer::MuonSeedProducer ( const edm::ParameterSet pset)

Constructor.

See header file for a description of this class.

Author
Dominique Fortin - UCR

Definition at line 29 of file MuonSeedProducer.cc.

29  {
30  // Register what this produces
31  produces<TrajectorySeedCollection>();
32 
33  // Local Debug flag
34  debug = pset.getParameter<bool>("DebugMuonSeed");
35 
36  edm::ConsumesCollector iC = consumesCollector();
37 
38  // Builder which returns seed collection
40 
41  muonLayersToken_ = esConsumes<MuonDetLayerGeometry, MuonRecoGeometryRecord>();
42  magFieldToken_ = esConsumes<MagneticField, IdealMagneticFieldRecord>();
43 }

References debug, magFieldToken_, muonLayersToken_, muonSeedBuilder_, and muonDTDigis_cfi::pset.

◆ ~MuonSeedProducer()

MuonSeedProducer::~MuonSeedProducer ( )
override

Destructor.

Definition at line 48 of file MuonSeedProducer.cc.

48 { delete muonSeedBuilder_; }

References muonSeedBuilder_.

Member Function Documentation

◆ produce()

void MuonSeedProducer::produce ( edm::Event event,
const edm::EventSetup eSetup 
)
override

Get event properties to send to builder to fill seed collection.

Definition at line 53 of file MuonSeedProducer.cc.

53  {
54  // Muon Geometry
56  const MuonDetLayerGeometry* lgeom = &*muonLayers;
58 
59  // Magnetic field
61  const MagneticField* theField = &*field;
62  muonSeedBuilder_->setBField(theField);
63 
64  // Create pointer to the seed container
65 
66  auto output = std::make_unique<TrajectorySeedCollection>();
67 
68  //UNUED: int nSeeds = 0;
69  //UNUSED: nSeeds =
70  muonSeedBuilder_->build(event, eSetup, *output);
71 
72  // Append muon seed collection to event
73  event.put(std::move(output));
74 }

References MuonSeedBuilder::build(), edm::EventSetup::getHandle(), magFieldToken_, eostools::move(), muonLayersToken_, muonSeedBuilder_, convertSQLitetoXML_cfg::output, MuonSeedBuilder::setBField(), and MuonSeedBuilder::setGeometry().

Member Data Documentation

◆ debug

bool MuonSeedProducer::debug
private

◆ magFieldToken_

edm::ESGetToken<MagneticField, IdealMagneticFieldRecord> MuonSeedProducer::magFieldToken_
private

Definition at line 51 of file MuonSeedProducer.h.

Referenced by MuonSeedProducer(), and produce().

◆ muonLayersToken_

edm::ESGetToken<MuonDetLayerGeometry, MuonRecoGeometryRecord> MuonSeedProducer::muonLayersToken_
private

Definition at line 50 of file MuonSeedProducer.h.

Referenced by MuonSeedProducer(), and produce().

◆ muonSeedBuilder_

MuonSeedBuilder* MuonSeedProducer::muonSeedBuilder_
private

Builder where seeds are formed.

Definition at line 48 of file MuonSeedProducer.h.

Referenced by MuonSeedProducer(), produce(), and ~MuonSeedProducer().

convertSQLitetoXML_cfg.output
output
Definition: convertSQLitetoXML_cfg.py:72
MuonSeedBuilder::setGeometry
void setGeometry(const MuonDetLayerGeometry *lgeom)
Cache pointer to geometry.
Definition: MuonSeedBuilder.h:44
MuonSeedProducer::magFieldToken_
edm::ESGetToken< MagneticField, IdealMagneticFieldRecord > magFieldToken_
Definition: MuonSeedProducer.h:51
MuonDetLayerGeometry
Definition: MuonDetLayerGeometry.h:21
MuonSeedProducer::debug
bool debug
Definition: MuonSeedProducer.h:45
MuonSeedBuilder
Definition: MuonSeedBuilder.h:30
MuonSeedBuilder::setBField
void setBField(const MagneticField *theField)
Cache pointer to Magnetic field.
Definition: MuonSeedBuilder.h:47
edm::ESHandle< MuonDetLayerGeometry >
MuonSeedProducer::muonLayersToken_
edm::ESGetToken< MuonDetLayerGeometry, MuonRecoGeometryRecord > muonLayersToken_
Definition: MuonSeedProducer.h:50
edm::EventSetup::getHandle
ESHandle< T > getHandle(const ESGetToken< T, R > &iToken) const
Definition: EventSetup.h:155
eostools.move
def move(src, dest)
Definition: eostools.py:511
MuonSeedProducer::muonSeedBuilder_
MuonSeedBuilder * muonSeedBuilder_
Builder where seeds are formed.
Definition: MuonSeedProducer.h:48
MuonSeedBuilder::build
int build(edm::Event &event, const edm::EventSetup &eventSetup, TrajectorySeedCollection &seeds)
Build seed collection.
Definition: MuonSeedBuilder.cc:119
event
Definition: event.py:1
MagneticField
Definition: MagneticField.h:19
edm::ConsumesCollector
Definition: ConsumesCollector.h:45
muonDTDigis_cfi.pset
pset
Definition: muonDTDigis_cfi.py:27