CMS 3D CMS Logo

Public Member Functions | Protected Attributes

MuonSeedGenerator Class Reference

#include <MuonSeedGenerator.h>

Inheritance diagram for MuonSeedGenerator:
edm::EDProducer edm::ProducerBase edm::ProductRegistryHelper

List of all members.

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
MuonSeedVPatternRecognitionthePatternRecognition
MuonSeedVCleanertheSeedCleaner
MuonSeedVFindertheSeedFinder

Detailed Description

No description available.

Date:
2010/11/28 23:20:26
Revision:
1.2
Author:
R. Bellan - INFN Torino

Definition at line 21 of file MuonSeedGenerator.h.


Constructor & Destructor Documentation

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;
}

Member Function Documentation

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 SiPixelRawToDigiRegional_cfi::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);
}

Member Data Documentation

Definition at line 41 of file MuonSeedGenerator.h.

Referenced by produce().

Definition at line 37 of file MuonSeedGenerator.h.

Referenced by produce(), and ~MuonSeedGenerator().

Definition at line 39 of file MuonSeedGenerator.h.

Referenced by produce(), and ~MuonSeedGenerator().

Definition at line 38 of file MuonSeedGenerator.h.

Referenced by produce(), and ~MuonSeedGenerator().