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
46  muonSeedBuilder_ = new MuonSeedBuilder(pset, iC);
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 }
T getParameter(std::string const &) const
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.
void produce(edm::Event &, const edm::EventSetup &) override
Get event properties to send to builder to fill seed collection.
void setGeometry(const MuonDetLayerGeometry *lgeom)
Cache pointer to geometry.
T get() const
Definition: EventSetup.h:73
~MuonSeedProducer() override
Destructor.
def move(src, dest)
Definition: eostools.py:511
Definition: event.py:1