#include <MuonSeedGenerator.h>
Public Member Functions | |
MuonSeedGenerator (const edm::ParameterSet &) | |
Constructor. | |
virtual void | produce (edm::Event &, const edm::EventSetup &) |
reconstruct muon's seeds | |
virtual | ~MuonSeedGenerator () |
Destructor. | |
Protected Attributes | |
edm::InputTag | theBeamSpotTag |
MuonSeedVPatternRecognition * | thePatternRecognition |
MuonSeedVCleaner * | theSeedCleaner |
MuonSeedVFinder * | theSeedFinder |
No description available.
Definition at line 21 of file MuonSeedGenerator.h.
MuonSeedGenerator::MuonSeedGenerator | ( | const edm::ParameterSet & | pset | ) |
Constructor.
Definition at line 58 of file MuonSeedGenerator.cc.
: thePatternRecognition(new MuonSeedOrcaPatternRecognition(pset)), theSeedFinder(new MuonSeedFinder(pset)), theSeedCleaner(new MuonSeedSimpleCleaner()), theBeamSpotTag(pset.getParameter<edm::InputTag>("beamSpotTag")) { produces<TrajectorySeedCollection>(); }
MuonSeedGenerator::~MuonSeedGenerator | ( | ) | [virtual] |
Destructor.
Definition at line 68 of file MuonSeedGenerator.cc.
References thePatternRecognition, theSeedCleaner, and theSeedFinder.
{ delete thePatternRecognition; delete theSeedFinder; delete theSeedCleaner; }
void MuonSeedGenerator::produce | ( | edm::Event & | event, |
const edm::EventSetup & | eSetup | ||
) | [virtual] |
reconstruct muon's seeds
Implements edm::EDProducer.
Definition at line 76 of file MuonSeedGenerator.cc.
References ExpressReco_HICollisions_FallBack::beamSpot, MuonSeedVCleaner::clean(), edm::EventSetup::get(), edm::HandleBase::isValid(), convertSQLitetoXML_cfg::output, MuonSeedVPatternRecognition::produce(), MuonSeedVFinder::seeds(), MuonSeedVFinder::setBeamSpot(), MuonSeedVFinder::setBField(), theBeamSpotTag, thePatternRecognition, theSeedCleaner, theSeedFinder, reco::BeamSpot::x0(), reco::BeamSpot::y0(), and reco::BeamSpot::z0().
{ // create the pointer to the Seed container auto_ptr<TrajectorySeedCollection> output(new TrajectorySeedCollection()); edm::ESHandle<MagneticField> field; eSetup.get<IdealMagneticFieldRecord>().get(field); theSeedFinder->setBField(&*field); reco::BeamSpot beamSpot; edm::Handle<reco::BeamSpot> beamSpotHandle; event.getByLabel(theBeamSpotTag, beamSpotHandle); if ( beamSpotHandle.isValid() ) { beamSpot = *beamSpotHandle; } else { edm::LogInfo("MuonSeedGenerator") << "No beam spot available from EventSetup \n"; } // make it a vector so we can subtract it from position vectors GlobalVector gv(beamSpot.x0(), beamSpot.y0(), beamSpot.z0()); theSeedFinder->setBeamSpot(gv); std::vector<MuonRecHitContainer> patterns; thePatternRecognition->produce(event, eSetup, patterns); for(std::vector<MuonRecHitContainer>::const_iterator seedSegments = patterns.begin(); seedSegments != patterns.end(); ++seedSegments) { theSeedFinder->seeds(*seedSegments, *output); } theSeedCleaner->clean(*output); event.put(output); }
edm::InputTag MuonSeedGenerator::theBeamSpotTag [protected] |
Definition at line 41 of file MuonSeedGenerator.h.
Referenced by produce().
Definition at line 37 of file MuonSeedGenerator.h.
Referenced by produce(), and ~MuonSeedGenerator().
MuonSeedVCleaner* MuonSeedGenerator::theSeedCleaner [protected] |
Definition at line 39 of file MuonSeedGenerator.h.
Referenced by produce(), and ~MuonSeedGenerator().
MuonSeedVFinder* MuonSeedGenerator::theSeedFinder [protected] |
Definition at line 38 of file MuonSeedGenerator.h.
Referenced by produce(), and ~MuonSeedGenerator().