CMS 3D CMS Logo

Public Member Functions | Private Attributes

MuonSeedProducer Class Reference

#include <MuonSeedProducer.h>

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

List of all members.

Public Member Functions

 MuonSeedProducer (const edm::ParameterSet &)
 Constructor.
virtual void produce (edm::Event &, const edm::EventSetup &)
 Get event properties to send to builder to fill seed collection.
virtual ~MuonSeedProducer ()
 Destructor.

Private Attributes

bool debug
MuonSeedBuildermuonSeedBuilder_
 Builder where seeds are formed.

Detailed Description

This EDProducer produces a collection of muon seeds. To do so, it forms pairs of CSC and/or DT segments and look at the properties of the segment pair (eta, dphi) first to estimate the properties of the muon, and segment direction in case where there is only one segment available.

Author:
Dominique Fortin - UCR

Definition at line 25 of file MuonSeedProducer.h.


Constructor & Destructor Documentation

MuonSeedProducer::MuonSeedProducer ( const edm::ParameterSet pset)

Constructor.

See header file for a description of this class.

Author:
Dominique Fortin - UCR

Definition at line 40 of file MuonSeedProducer.cc.

References debug, edm::ParameterSet::getParameter(), and muonSeedBuilder_.

                                                             {

  // Register what this produces
  produces<TrajectorySeedCollection>(); 

  // Local Debug flag
  debug              = pset.getParameter<bool>("DebugMuonSeed");

  // Builder which returns seed collection 
  muonSeedBuilder_   = new MuonSeedBuilder( pset ); 

}
MuonSeedProducer::~MuonSeedProducer ( ) [virtual]

Destructor.

Definition at line 57 of file MuonSeedProducer.cc.

References muonSeedBuilder_.

                                   {

  delete muonSeedBuilder_;

}

Member Function Documentation

void MuonSeedProducer::produce ( edm::Event event,
const edm::EventSetup eSetup 
) [virtual]

Get event properties to send to builder to fill seed collection.

Implements edm::EDProducer.

Definition at line 67 of file MuonSeedProducer.cc.

References MuonSeedBuilder::build(), edm::EventSetup::get(), muonSeedBuilder_, convertSQLitetoXML_cfg::output, MuonSeedBuilder::setBField(), and MuonSeedBuilder::setGeometry().

                                                                          {

  // Muon Geometry
  edm::ESHandle<MuonDetLayerGeometry> muonLayers;
  eSetup.get<MuonRecoGeometryRecord>().get(muonLayers);
  const MuonDetLayerGeometry* lgeom = &*muonLayers;
  muonSeedBuilder_->setGeometry( lgeom );

  // Magnetic field
  edm::ESHandle<MagneticField> field;
  eSetup.get<IdealMagneticFieldRecord>().get(field);
  const MagneticField* theField = &*field;
  muonSeedBuilder_->setBField( theField );

   // Create pointer to the seed container

  std::auto_ptr<TrajectorySeedCollection> output(new TrajectorySeedCollection() );

  int nSeeds = 0;
  nSeeds = muonSeedBuilder_->build( event, eSetup, *output);

  // Append muon seed collection to event
  event.put( output );

}

Member Data Documentation

bool MuonSeedProducer::debug [private]

Definition at line 42 of file MuonSeedProducer.h.

Referenced by MuonSeedProducer().

Builder where seeds are formed.

Definition at line 45 of file MuonSeedProducer.h.

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