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 
50 
51  // Builder which returns seed collection
52  muonSeedBuilder_ = new MuonSeedBuilder( pset,iC );
53 
54 }
55 
56 
57 /*
58  * Destructor
59  */
61 
62  delete muonSeedBuilder_;
63 
64 }
65 
66 
67 /*
68  * Producer (the main)
69  */
71 
72  // Muon Geometry
74  eSetup.get<MuonRecoGeometryRecord>().get(muonLayers);
75  const MuonDetLayerGeometry* lgeom = &*muonLayers;
76  muonSeedBuilder_->setGeometry( lgeom );
77 
78  // Magnetic field
80  eSetup.get<IdealMagneticFieldRecord>().get(field);
81  const MagneticField* theField = &*field;
82  muonSeedBuilder_->setBField( theField );
83 
84  // Create pointer to the seed container
85 
86  std::auto_ptr<TrajectorySeedCollection> output(new TrajectorySeedCollection() );
87 
88  //UNUED: int nSeeds = 0;
89  //UNUSED: nSeeds =
90  muonSeedBuilder_->build( event, eSetup, *output);
91 
92  // Append muon seed collection to event
93  event.put( output );
94 
95 }
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.
tuple field
Definition: statics.py:62
virtual void produce(edm::Event &, const edm::EventSetup &)
Get event properties to send to builder to fill seed collection.
std::vector< TrajectorySeed > TrajectorySeedCollection
ConsumesCollector consumesCollector()
Use a ConsumesCollector to gather consumes information from helper functions.
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.