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
 
 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

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<>
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

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.

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

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 }
MuonSeedBuilder * muonSeedBuilder_
Builder where seeds are formed.
edm::ESGetToken< MagneticField, IdealMagneticFieldRecord > magFieldToken_
edm::ESGetToken< MuonDetLayerGeometry, MuonRecoGeometryRecord > muonLayersToken_

◆ ~MuonSeedProducer()

MuonSeedProducer::~MuonSeedProducer ( )
override

Destructor.

Definition at line 48 of file MuonSeedProducer.cc.

References muonSeedBuilder_.

48 { delete muonSeedBuilder_; }
MuonSeedBuilder * muonSeedBuilder_
Builder where seeds are formed.

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.

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

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 }
int build(edm::Event &event, const edm::EventSetup &eventSetup, TrajectorySeedCollection &seeds)
Build seed collection.
MuonSeedBuilder * muonSeedBuilder_
Builder where seeds are formed.
void setBField(const MagneticField *theField)
Cache pointer to Magnetic field.
ESHandle< T > getHandle(const ESGetToken< T, R > &iToken) const
Definition: EventSetup.h:130
edm::ESGetToken< MagneticField, IdealMagneticFieldRecord > magFieldToken_
void setGeometry(const MuonDetLayerGeometry *lgeom)
Cache pointer to geometry.
def move(src, dest)
Definition: eostools.py:511
edm::ESGetToken< MuonDetLayerGeometry, MuonRecoGeometryRecord > muonLayersToken_
Definition: event.py:1

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