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::stream::EDProducer<> edm::stream::EDProducerBase edm::ProducerBase edm::EDConsumerBase edm::ProductRegistryHelper

Public Member Functions

 MuonSeedGenerator (const edm::ParameterSet &)
 Constructor. More...
 
virtual void produce (edm::Event &, const edm::EventSetup &) override
 reconstruct muon's seeds More...
 
virtual ~MuonSeedGenerator ()
 Destructor. More...
 
- Public Member Functions inherited from edm::stream::EDProducer<>
 EDProducer ()=default
 
- Public Member Functions inherited from edm::stream::EDProducerBase
 EDProducerBase ()
 
ModuleDescription const & moduleDescription () const
 
virtual ~EDProducerBase ()
 
- Public Member Functions inherited from edm::ProducerBase
void callWhenNewProductsRegistered (std::function< void(BranchDescription const &)> const &func)
 
 ProducerBase ()
 
void registerProducts (ProducerBase *, ProductRegistry *, ModuleDescription const &)
 
std::function< void(BranchDescription
const &)> 
registrationCallback () const
 used by the fwk to register list of products More...
 
virtual ~ProducerBase ()
 
- Public Member Functions inherited from edm::EDConsumerBase
std::vector< ConsumesInfoconsumesInfo () const
 
 EDConsumerBase ()
 
ProductHolderIndexAndSkipBit indexFrom (EDGetToken, BranchType, TypeID const &) const
 
void itemsMayGet (BranchType, std::vector< ProductHolderIndexAndSkipBit > &) const
 
void itemsToGet (BranchType, std::vector< ProductHolderIndexAndSkipBit > &) const
 
std::vector
< ProductHolderIndexAndSkipBit >
const & 
itemsToGetFromEvent () const
 
void labelsForToken (EDGetToken iToken, Labels &oLabels) const
 
void modulesDependentUpon (const std::string &iProcessName, std::vector< const char * > &oModuleLabels) const
 
void modulesWhoseProductsAreConsumed (std::vector< ModuleDescription const * > &modules, ProductRegistry const &preg, std::map< std::string, ModuleDescription const * > const &labelsToDesc, std::string const &processName) const
 
bool registeredToConsume (ProductHolderIndex, bool, BranchType) const
 
bool registeredToConsumeMany (TypeID const &, BranchType) const
 
void updateLookup (BranchType iBranchType, ProductHolderIndexHelper const &)
 
virtual ~EDConsumerBase ()
 

Protected Attributes

edm::EDGetTokenT< reco::BeamSpotbeamspotToken
 
edm::InputTag theBeamSpotTag
 
MuonSeedVPatternRecognitionthePatternRecognition
 
MuonSeedVCleanertheSeedCleaner
 
MuonSeedVFindertheSeedFinder
 

Additional Inherited Members

- Public Types inherited from edm::stream::EDProducer<>
typedef CacheContexts< T...> CacheTypes
 
typedef CacheTypes::GlobalCache GlobalCache
 
typedef AbilityChecker< T...> HasAbility
 
typedef
CacheTypes::LuminosityBlockCache 
LuminosityBlockCache
 
typedef
LuminosityBlockContextT
< LuminosityBlockCache,
RunCache, GlobalCache
LuminosityBlockContext
 
typedef
CacheTypes::LuminosityBlockSummaryCache 
LuminosityBlockSummaryCache
 
typedef CacheTypes::RunCache RunCache
 
typedef RunContextT< RunCache,
GlobalCache
RunContext
 
typedef CacheTypes::RunSummaryCache RunSummaryCache
 
- Public Types inherited from edm::stream::EDProducerBase
typedef EDProducerAdaptorBase ModuleType
 
- Public Types inherited from edm::ProducerBase
typedef
ProductRegistryHelper::TypeLabelList 
TypeLabelList
 
- Public Types inherited from edm::EDConsumerBase
typedef ProductLabels Labels
 
- Static Public Member Functions inherited from edm::stream::EDProducerBase
static const std::string & baseType ()
 
static void fillDescriptions (ConfigurationDescriptions &descriptions)
 
static void prevalidate (ConfigurationDescriptions &descriptions)
 
- Protected Member Functions inherited from edm::EDConsumerBase
template<typename ProductType , BranchType B = InEvent>
EDGetTokenT< ProductType > consumes (edm::InputTag const &tag)
 
EDGetToken consumes (const TypeToGet &id, edm::InputTag const &tag)
 
template<BranchType B>
EDGetToken consumes (TypeToGet const &id, edm::InputTag const &tag)
 
ConsumesCollector consumesCollector ()
 Use a ConsumesCollector to gather consumes information from helper functions. More...
 
template<typename ProductType , BranchType B = InEvent>
void consumesMany ()
 
void consumesMany (const TypeToGet &id)
 
template<BranchType B>
void consumesMany (const TypeToGet &id)
 
template<typename ProductType , BranchType B = InEvent>
EDGetTokenT< ProductType > mayConsume (edm::InputTag const &tag)
 
EDGetToken mayConsume (const TypeToGet &id, edm::InputTag const &tag)
 
template<BranchType B>
EDGetToken mayConsume (const TypeToGet &id, edm::InputTag const &tag)
 

Detailed Description

No description available.

Author
R. Bellan - INFN Torino

Definition at line 20 of file MuonSeedGenerator.h.

Constructor & Destructor Documentation

MuonSeedGenerator::MuonSeedGenerator ( const edm::ParameterSet pset)

Constructor.

Definition at line 55 of file MuonSeedGenerator.cc.

References beamspotToken, edm::EDConsumerBase::consumesCollector(), theBeamSpotTag, and thePatternRecognition.

56 : theSeedFinder(new MuonSeedFinder(pset)),
58  theBeamSpotTag(pset.getParameter<edm::InputTag>("beamSpotTag"))
59 {
60  produces<TrajectorySeedCollection>();
61 
64 
65  beamspotToken = consumes<reco::BeamSpot>(theBeamSpotTag);
66 }
T getParameter(std::string const &) const
MuonSeedVCleaner * theSeedCleaner
edm::EDGetTokenT< reco::BeamSpot > beamspotToken
ConsumesCollector consumesCollector()
Use a ConsumesCollector to gather consumes information from helper functions.
MuonSeedVFinder * theSeedFinder
MuonSeedVPatternRecognition * thePatternRecognition
edm::InputTag theBeamSpotTag
MuonSeedGenerator::~MuonSeedGenerator ( )
virtual

Destructor.

Definition at line 69 of file MuonSeedGenerator.cc.

References thePatternRecognition, theSeedCleaner, and theSeedFinder.

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

Member Function Documentation

void MuonSeedGenerator::produce ( edm::Event event,
const edm::EventSetup eSetup 
)
overridevirtual

reconstruct muon's seeds

Implements edm::stream::EDProducerBase.

Definition at line 77 of file MuonSeedGenerator.cc.

References SiPixelRawToDigiRegional_cfi::beamSpot, beamspotToken, MuonSeedVCleaner::clean(), edm::EventSetup::get(), edm::HandleBase::isValid(), convertSQLitetoXML_cfg::output, MuonSeedVPatternRecognition::produce(), MuonSeedVFinder::seeds(), MuonSeedVFinder::setBeamSpot(), MuonSeedVFinder::setBField(), thePatternRecognition, theSeedCleaner, theSeedFinder, reco::BeamSpot::x0(), reco::BeamSpot::y0(), and reco::BeamSpot::z0().

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

Member Data Documentation

edm::EDGetTokenT<reco::BeamSpot> MuonSeedGenerator::beamspotToken
protected

Definition at line 41 of file MuonSeedGenerator.h.

Referenced by MuonSeedGenerator(), and produce().

edm::InputTag MuonSeedGenerator::theBeamSpotTag
protected

Definition at line 40 of file MuonSeedGenerator.h.

Referenced by MuonSeedGenerator().

MuonSeedVPatternRecognition* MuonSeedGenerator::thePatternRecognition
protected

Definition at line 36 of file MuonSeedGenerator.h.

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

MuonSeedVCleaner* MuonSeedGenerator::theSeedCleaner
protected

Definition at line 38 of file MuonSeedGenerator.h.

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

MuonSeedVFinder* MuonSeedGenerator::theSeedFinder
protected

Definition at line 37 of file MuonSeedGenerator.h.

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