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 }
MuonSeedProducer(const edm::ParameterSet &)
Constructor.
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:151
void produce(edm::Event &, const edm::EventSetup &) override
Get event properties to send to builder to fill seed collection.
edm::ESGetToken< MagneticField, IdealMagneticFieldRecord > magFieldToken_
void setGeometry(const MuonDetLayerGeometry *lgeom)
Cache pointer to geometry.
~MuonSeedProducer() override
Destructor.
def move(src, dest)
Definition: eostools.py:511
edm::ESGetToken< MuonDetLayerGeometry, MuonRecoGeometryRecord > muonLayersToken_
Definition: event.py:1