CMS 3D CMS Logo

MuonSeedProducer.cc
Go to the documentation of this file.
1 
9 
10 // Data Formats
12 
13 // Magnetic Field
16 
17 // Geometry
20 
23 
24 // Framework
30 // C++
31 #include <vector>
32 
33 /*
34  * Constructor
35  */
37  // Register what this produces
38  produces<TrajectorySeedCollection>();
39 
40  // Local Debug flag
41  debug = pset.getParameter<bool>("DebugMuonSeed");
42 
43  edm::ConsumesCollector iC = consumesCollector();
44 
45  // Builder which returns seed collection
47 }
48 
49 /*
50  * Destructor
51  */
53 
54 /*
55  * Producer (the main)
56  */
58  // Muon Geometry
60  eSetup.get<MuonRecoGeometryRecord>().get(muonLayers);
61  const MuonDetLayerGeometry* lgeom = &*muonLayers;
63 
64  // Magnetic field
66  eSetup.get<IdealMagneticFieldRecord>().get(field);
67  const MagneticField* theField = &*field;
68  muonSeedBuilder_->setBField(theField);
69 
70  // Create pointer to the seed container
71 
72  auto output = std::make_unique<TrajectorySeedCollection>();
73 
74  //UNUED: int nSeeds = 0;
75  //UNUSED: nSeeds =
76  muonSeedBuilder_->build(event, eSetup, *output);
77 
78  // Append muon seed collection to event
79  event.put(std::move(output));
80 }
Handle.h
ESHandle.h
convertSQLitetoXML_cfg.output
output
Definition: convertSQLitetoXML_cfg.py:32
MuonSeedProducer.h
MuonDetLayerGeometry.h
MuonSeedBuilder::setGeometry
void setGeometry(const MuonDetLayerGeometry *lgeom)
Cache pointer to geometry.
Definition: MuonSeedBuilder.h:44
MuonSeedProducer::~MuonSeedProducer
~MuonSeedProducer() override
Destructor.
Definition: MuonSeedProducer.cc:52
IdealMagneticFieldRecord
Definition: IdealMagneticFieldRecord.h:11
MuonRecoGeometryRecord
Definition: MuonRecoGeometryRecord.h:17
MuonDetLayerGeometry
Definition: MuonDetLayerGeometry.h:21
edm::EventSetup::get
T get() const
Definition: EventSetup.h:73
MuonSeedProducer::debug
bool debug
Definition: MuonSeedProducer.h:40
MuonSeedBuilder
Definition: MuonSeedBuilder.h:30
MuonSeedBuilder::setBField
void setBField(const MagneticField *theField)
Cache pointer to Magnetic field.
Definition: MuonSeedBuilder.h:47
IdealMagneticFieldRecord.h
edm::ESHandle< MuonDetLayerGeometry >
MuonSeedProducer::MuonSeedProducer
MuonSeedProducer(const edm::ParameterSet &)
Constructor.
Definition: MuonSeedProducer.cc:36
edm::ParameterSet
Definition: ParameterSet.h:36
Event.h
MuonSeedBuilder.h
MuonRecoGeometryRecord.h
MagneticField.h
edm::EventSetup
Definition: EventSetup.h:57
get
#define get
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:43
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:39
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:57