CMS 3D CMS Logo

MuonSeedProducer.cc
Go to the documentation of this file.
1 
9 
10 // Data Formats
12 
13 // Geometry
16 
17 // Framework
23 // C++
24 #include <vector>
25 
26 /*
27  * Constructor
28  */
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 }
44 
45 /*
46  * Destructor
47  */
49 
50 /*
51  * Producer (the main)
52  */
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 }
Handle.h
ESHandle.h
convertSQLitetoXML_cfg.output
output
Definition: convertSQLitetoXML_cfg.py:72
MuonSeedProducer.h
MuonSeedBuilder::setGeometry
void setGeometry(const MuonDetLayerGeometry *lgeom)
Cache pointer to geometry.
Definition: MuonSeedBuilder.h:44
MuonSeedProducer::~MuonSeedProducer
~MuonSeedProducer() override
Destructor.
Definition: MuonSeedProducer.cc:48
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::MuonSeedProducer
MuonSeedProducer(const edm::ParameterSet &)
Constructor.
Definition: MuonSeedProducer.cc:29
edm::ParameterSet
Definition: ParameterSet.h:47
Event.h
MuonSeedBuilder.h
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
edm::EventSetup
Definition: EventSetup.h:58
TrajectorySeedCollection.h
GeomDet.h
eostools.move
def move(src, dest)
Definition: eostools.py:511
DetLayer.h
EventSetup.h
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
ParameterSet.h
event
Definition: event.py:1
edm::Event
Definition: Event.h:73
MagneticField
Definition: MagneticField.h:19
edm::ConsumesCollector
Definition: ConsumesCollector.h:45
muonDTDigis_cfi.pset
pset
Definition: muonDTDigis_cfi.py:27
MuonSeedProducer::produce
void produce(edm::Event &, const edm::EventSetup &) override
Get event properties to send to builder to fill seed collection.
Definition: MuonSeedProducer.cc:53