CMS 3D CMS Logo

 All Classes Namespaces Files Functions Variables Typedefs Enumerations Enumerator Properties Friends Macros Pages
MuonSeedProducer.cc
Go to the documentation of this file.
1 
10 
11 
12 // Data Formats
14 
15 // Magnetic Field
18 
19 // Geometry
22 
25 
26 // Framework
32 // C++
33 #include <vector>
34 
35 
36 
37 /*
38  * Constructor
39  */
41 
42  // Register what this produces
43  produces<TrajectorySeedCollection>();
44 
45  // Local Debug flag
46  debug = pset.getParameter<bool>("DebugMuonSeed");
47 
48  // Builder which returns seed collection
49  muonSeedBuilder_ = new MuonSeedBuilder( pset );
50 
51 }
52 
53 
54 /*
55  * Destructor
56  */
58 
59  delete muonSeedBuilder_;
60 
61 }
62 
63 
64 /*
65  * Producer (the main)
66  */
68 
69  // Muon Geometry
71  eSetup.get<MuonRecoGeometryRecord>().get(muonLayers);
72  const MuonDetLayerGeometry* lgeom = &*muonLayers;
73  muonSeedBuilder_->setGeometry( lgeom );
74 
75  // Magnetic field
77  eSetup.get<IdealMagneticFieldRecord>().get(field);
78  const MagneticField* theField = &*field;
79  muonSeedBuilder_->setBField( theField );
80 
81  // Create pointer to the seed container
82 
83  std::auto_ptr<TrajectorySeedCollection> output(new TrajectorySeedCollection() );
84 
85  //UNUED: int nSeeds = 0;
86  //UNUSED: nSeeds =
87  muonSeedBuilder_->build( event, eSetup, *output);
88 
89  // Append muon seed collection to event
90  event.put( output );
91 
92 }
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.
virtual void produce(edm::Event &, const edm::EventSetup &)
Get event properties to send to builder to fill seed collection.
std::vector< TrajectorySeed > TrajectorySeedCollection
How EventSelector::AcceptEvent() decides whether to accept an event for output otherwise it is excluding the probing of A single or multiple positive and the trigger will pass if any such matching triggers are PASS or EXCEPTION[A criterion thatmatches no triggers at all is detected and causes a throw.] A single negative with an expectation of appropriate bit checking in the decision and the trigger will pass if any such matching triggers are FAIL or EXCEPTION A wildcarded negative criterion that matches more than one trigger in the trigger but the state exists so we define the behavior If all triggers are the negative crieriion will lead to accepting the event(this again matches the behavior of"!*"before the partial wildcard feature was incorporated).The per-event"cost"of each negative criterion with multiple relevant triggers is about the same as!*was in the past
void setBField(const MagneticField *theField)
Cache pointer to Magnetic field.
const T & get() const
Definition: EventSetup.h:55
void setGeometry(const MuonDetLayerGeometry *lgeom)
Cache pointer to geometry.
virtual ~MuonSeedProducer()
Destructor.