CMS 3D CMS Logo

List of all members | Public Member Functions | Static 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)
 
std::vector< edm::ProductResolverIndex > const & indiciesForPutProducts (BranchType iBranchType) const
 
 ProducerBase ()
 
void registerProducts (ProducerBase *, ProductRegistry *, ModuleDescription const &)
 
std::function< void(BranchDescription const &)> registrationCallback () const
 used by the fwk to register list of products More...
 
void resolvePutIndicies (BranchType iBranchType, std::unordered_multimap< std::string, edm::ProductResolverIndex > const &iIndicies, std::string const &moduleLabel)
 
virtual ~ProducerBase () noexcept(false)
 
- Public Member Functions inherited from edm::EDConsumerBase
std::vector< ConsumesInfoconsumesInfo () const
 
void convertCurrentProcessAlias (std::string const &processName)
 Convert "@currentProcess" in InputTag process names to the actual current process name. More...
 
 EDConsumerBase ()
 
 EDConsumerBase (EDConsumerBase const &)=delete
 
 EDConsumerBase (EDConsumerBase &&)=default
 
ProductResolverIndexAndSkipBit indexFrom (EDGetToken, BranchType, TypeID const &) const
 
void itemsMayGet (BranchType, std::vector< ProductResolverIndexAndSkipBit > &) const
 
void itemsToGet (BranchType, std::vector< ProductResolverIndexAndSkipBit > &) const
 
std::vector< ProductResolverIndexAndSkipBit > const & itemsToGetFrom (BranchType iType) const
 
void labelsForToken (EDGetToken iToken, Labels &oLabels) const
 
void modulesWhoseProductsAreConsumed (std::vector< ModuleDescription const * > &modules, ProductRegistry const &preg, std::map< std::string, ModuleDescription const * > const &labelsToDesc, std::string const &processName) const
 
EDConsumerBase const & operator= (EDConsumerBase const &)=delete
 
EDConsumerBaseoperator= (EDConsumerBase &&)=default
 
bool registeredToConsume (ProductResolverIndex, bool, BranchType) const
 
bool registeredToConsumeMany (TypeID const &, BranchType) const
 
void updateLookup (BranchType iBranchType, ProductResolverIndexHelper const &, bool iPrefetchMayGet)
 
virtual ~EDConsumerBase () noexcept(false)
 

Static Public Member Functions

static void fillDescriptions (edm::ConfigurationDescriptions &descriptions)
 
- 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 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, GlobalCacheLuminosityBlockContext
 
typedef CacheTypes::LuminosityBlockSummaryCache LuminosityBlockSummaryCache
 
typedef CacheTypes::RunCache RunCache
 
typedef RunContextT< RunCache, GlobalCacheRunContext
 
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
 
- 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 23 of file MuonSeedGenerator.h.

Constructor & Destructor Documentation

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

Constructor.

Definition at line 57 of file MuonSeedGenerator.cc.

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

58 : theSeedFinder(new MuonSeedFinder(pset)),
60  theBeamSpotTag(pset.getParameter<edm::InputTag>("beamSpotTag"))
61 {
62  produces<TrajectorySeedCollection>();
63 
66 
67  beamspotToken = consumes<reco::BeamSpot>(theBeamSpotTag);
68 }
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 71 of file MuonSeedGenerator.cc.

References thePatternRecognition, theSeedCleaner, and theSeedFinder.

71  {
72  delete thePatternRecognition;
73  delete theSeedFinder;
74  delete theSeedCleaner;
75 }
MuonSeedVCleaner * theSeedCleaner
MuonSeedVFinder * theSeedFinder
MuonSeedVPatternRecognition * thePatternRecognition

Member Function Documentation

void MuonSeedGenerator::fillDescriptions ( edm::ConfigurationDescriptions descriptions)
static

Definition at line 120 of file MuonSeedGenerator.cc.

References edm::ConfigurationDescriptions::add(), edm::ParameterSetDescription::add(), and edm::ParameterSetDescription::setAllowAnything().

120  {
122  desc.setAllowAnything();
123  desc.add<bool>("EnableDTMeasurement",true);
124  desc.add<bool>("EnableCSCMeasurement",true);
125  desc.add<bool>("EnableME0Measurement",false);
126  descriptions.add("produceMuons", desc);
127 }
void setAllowAnything()
allow any parameter label/value pairs
ParameterDescriptionBase * add(U const &iLabel, T const &value)
void add(std::string const &label, ParameterSetDescription const &psetDescription)
void MuonSeedGenerator::produce ( edm::Event event,
const edm::EventSetup eSetup 
)
overridevirtual

reconstruct muon's seeds

Definition at line 79 of file MuonSeedGenerator.cc.

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

80 {
81  // create the pointer to the Seed container
82  auto output = std::make_unique<TrajectorySeedCollection>();
83 
85  eSetup.get<IdealMagneticFieldRecord>().get(field);
86  theSeedFinder->setBField(&*field);
87 
89  edm::Handle<reco::BeamSpot> beamSpotHandle;
90  event.getByToken(beamspotToken, beamSpotHandle);
91  if ( beamSpotHandle.isValid() )
92  {
93  beamSpot = *beamSpotHandle;
94 
95  } else
96  {
97  edm::LogInfo("MuonSeedGenerator")
98  << "No beam spot available from EventSetup \n";
99  }
100 
101  // make it a vector so we can subtract it from position vectors
102  GlobalVector gv(beamSpot.x0(), beamSpot.y0(), beamSpot.z0());
104 
105  std::vector<MuonRecHitContainer> patterns;
106  thePatternRecognition->produce(event, eSetup, patterns);
107 
108  for(std::vector<MuonRecHitContainer>::const_iterator seedSegments = patterns.begin();
109  seedSegments != patterns.end(); ++seedSegments)
110  {
111  theSeedFinder->seeds(*seedSegments, *output);
112  }
113 
115 
116  event.put(std::move(output));
117 }
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
const PhiMemoryImage patterns[9]
edm::EDGetTokenT< reco::BeamSpot > beamspotToken
bool isValid() const
Definition: HandleBase.h:74
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:66
MuonSeedVFinder * theSeedFinder
MuonSeedVPatternRecognition * thePatternRecognition
def move(src, dest)
Definition: eostools.py:510
double x0() const
x coordinate
Definition: BeamSpot.h:64

Member Data Documentation

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

Definition at line 46 of file MuonSeedGenerator.h.

Referenced by MuonSeedGenerator(), and produce().

edm::InputTag MuonSeedGenerator::theBeamSpotTag
protected

Definition at line 45 of file MuonSeedGenerator.h.

Referenced by MuonSeedGenerator().

MuonSeedVPatternRecognition* MuonSeedGenerator::thePatternRecognition
protected

Definition at line 41 of file MuonSeedGenerator.h.

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

MuonSeedVCleaner* MuonSeedGenerator::theSeedCleaner
protected

Definition at line 43 of file MuonSeedGenerator.h.

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

MuonSeedVFinder* MuonSeedGenerator::theSeedFinder
protected

Definition at line 42 of file MuonSeedGenerator.h.

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