CMS 3D CMS Logo

 All Classes Namespaces Files Functions Variables Typedefs Enumerations Enumerator Properties Friends Macros Pages
List of all members | Public Member Functions | Protected Attributes
MuonSeedGenerator Class Reference

#include <MuonSeedGenerator.h>

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

Public Member Functions

 MuonSeedGenerator (const edm::ParameterSet &)
 Constructor. More...
 
virtual void produce (edm::Event &, const edm::EventSetup &)
 reconstruct muon's seeds More...
 
virtual ~MuonSeedGenerator ()
 Destructor. More...
 
- Public Member Functions inherited from edm::EDProducer
 EDProducer ()
 
virtual ~EDProducer ()
 
- Public Member Functions inherited from edm::ProducerBase
 ProducerBase ()
 
void registerProducts (ProducerBase *, ProductRegistry *, ModuleDescription const &)
 
boost::function< void(const
BranchDescription &)> 
registrationCallback () const
 used by the fwk to register list of products More...
 
virtual ~ProducerBase ()
 

Protected Attributes

edm::InputTag theBeamSpotTag
 
MuonSeedVPatternRecognitionthePatternRecognition
 
MuonSeedVCleanertheSeedCleaner
 
MuonSeedVFindertheSeedFinder
 

Additional Inherited Members

- Public Types inherited from edm::EDProducer
typedef EDProducer ModuleType
 
typedef WorkerT< EDProducerWorkerType
 
- Public Types inherited from edm::ProducerBase
typedef
ProductRegistryHelper::TypeLabelList 
TypeLabelList
 
- Static Public Member Functions inherited from edm::EDProducer
static const std::string & baseType ()
 
static void fillDescriptions (ConfigurationDescriptions &descriptions)
 
- Protected Member Functions inherited from edm::EDProducer
CurrentProcessingContext const * currentContext () const
 
- Protected Member Functions inherited from edm::ProducerBase
template<class TProducer , class TMethod >
void callWhenNewProductsRegistered (TProducer *iProd, TMethod iMethod)
 

Detailed Description

No description available.

Date:
2008/10/17 22:14:56
Revision:
1.1
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.

60  theSeedFinder(new MuonSeedFinder(pset)),
62  theBeamSpotTag(pset.getParameter<edm::InputTag>("beamSpotTag"))
63 {
64  produces<TrajectorySeedCollection>();
65 }
T getParameter(std::string const &) const
MuonSeedVCleaner * theSeedCleaner
MuonSeedVFinder * theSeedFinder
MuonSeedVPatternRecognition * thePatternRecognition
edm::InputTag theBeamSpotTag
MuonSeedGenerator::~MuonSeedGenerator ( )
virtual

Destructor.

Definition at line 68 of file MuonSeedGenerator.cc.

References thePatternRecognition, theSeedCleaner, and theSeedFinder.

68  {
69  delete thePatternRecognition;
70  delete theSeedFinder;
71  delete theSeedCleaner;
72 }
MuonSeedVCleaner * theSeedCleaner
MuonSeedVFinder * theSeedFinder
MuonSeedVPatternRecognition * thePatternRecognition

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 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().

77 {
78  // create the pointer to the Seed container
79  auto_ptr<TrajectorySeedCollection> output(new TrajectorySeedCollection());
80 
82  eSetup.get<IdealMagneticFieldRecord>().get(field);
83  theSeedFinder->setBField(&*field);
84 
85  reco::BeamSpot beamSpot;
86  edm::Handle<reco::BeamSpot> beamSpotHandle;
87  event.getByLabel(theBeamSpotTag, beamSpotHandle);
88  if ( beamSpotHandle.isValid() )
89  {
90  beamSpot = *beamSpotHandle;
91 
92  } else
93  {
94  edm::LogInfo("MuonSeedGenerator")
95  << "No beam spot available from EventSetup \n";
96  }
97 
98  // make it a vector so we can subtract it from position vectors
99  GlobalVector gv(beamSpot.x0(), beamSpot.y0(), beamSpot.z0());
101 
102  std::vector<MuonRecHitContainer> patterns;
103  thePatternRecognition->produce(event, eSetup, patterns);
104 
105  for(std::vector<MuonRecHitContainer>::const_iterator seedSegments = patterns.begin();
106  seedSegments != patterns.end(); ++seedSegments)
107  {
108  theSeedFinder->seeds(*seedSegments, *output);
109  }
110 
112 
113  event.put(output);
114 }
void setBeamSpot(const GlobalVector &gv)
double z0() const
z coordinate
Definition: BeamSpot.h:69
virtual void produce(const edm::Event &event, const edm::EventSetup &eSetup, std::vector< MuonRecHitContainer > &result)=0
MuonSeedVCleaner * theSeedCleaner
std::vector< TrajectorySeed > TrajectorySeedCollection
bool isValid() const
Definition: HandleBase.h:76
virtual void seeds(const MuonTransientTrackingRecHit::MuonRecHitContainer &hits, std::vector< TrajectorySeed > &result)=0
const T & get() const
Definition: EventSetup.h:55
virtual void clean(TrajectorySeedCollection &seeds)=0
virtual void setBField(const MagneticField *field)=0
double y0() const
y coordinate
Definition: BeamSpot.h:67
MuonSeedVFinder * theSeedFinder
MuonSeedVPatternRecognition * thePatternRecognition
edm::InputTag theBeamSpotTag
double x0() const
x coordinate
Definition: BeamSpot.h:65

Member Data Documentation

edm::InputTag MuonSeedGenerator::theBeamSpotTag
protected

Definition at line 41 of file MuonSeedGenerator.h.

Referenced by produce().

MuonSeedVPatternRecognition* MuonSeedGenerator::thePatternRecognition
protected

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().