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

Public Member Functions

 MuonSeedGenerator (const edm::ParameterSet &)
 Constructor. More...
 
void produce (edm::Event &, const edm::EventSetup &) override
 reconstruct muon's seeds More...
 
 ~MuonSeedGenerator () override
 Destructor. More...
 
- Public Member Functions inherited from edm::stream::EDProducer<>
 EDProducer ()=default
 
bool hasAbilityToProduceInBeginLumis () const final
 
bool hasAbilityToProduceInBeginRuns () const final
 
bool hasAbilityToProduceInEndLumis () const final
 
bool hasAbilityToProduceInEndRuns () const final
 

Static Public Member Functions

static void fillDescriptions (edm::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
 

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 53 of file MuonSeedGenerator.cc.

References beamspotToken, theBeamSpotTag, and thePatternRecognition.

54  : theSeedFinder(new MuonSeedFinder(pset)),
56  theBeamSpotTag(pset.getParameter<edm::InputTag>("beamSpotTag")) {
57  produces<TrajectorySeedCollection>();
58 
59  edm::ConsumesCollector iC = consumesCollector();
61 
62  beamspotToken = consumes<reco::BeamSpot>(theBeamSpotTag);
63 }
T getParameter(std::string const &) const
MuonSeedVCleaner * theSeedCleaner
edm::EDGetTokenT< reco::BeamSpot > beamspotToken
MuonSeedVFinder * theSeedFinder
MuonSeedVPatternRecognition * thePatternRecognition
edm::InputTag theBeamSpotTag
MuonSeedGenerator::~MuonSeedGenerator ( )
override

Destructor.

Definition at line 66 of file MuonSeedGenerator.cc.

References thePatternRecognition, theSeedCleaner, and theSeedFinder.

66  {
67  delete thePatternRecognition;
68  delete theSeedFinder;
69  delete theSeedCleaner;
70 }
MuonSeedVCleaner * theSeedCleaner
MuonSeedVFinder * theSeedFinder
MuonSeedVPatternRecognition * thePatternRecognition

Member Function Documentation

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

Definition at line 108 of file MuonSeedGenerator.cc.

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

108  {
110  desc.setAllowAnything();
111  desc.add<bool>("EnableDTMeasurement", true);
112  desc.add<bool>("EnableCSCMeasurement", true);
113  desc.add<bool>("EnableME0Measurement", false);
114  descriptions.add("produceMuons", desc);
115 }
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 
)
override

reconstruct muon's seeds

Definition at line 73 of file MuonSeedGenerator.cc.

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

73  {
74  // create the pointer to the Seed container
75  auto output = std::make_unique<TrajectorySeedCollection>();
76 
78  eSetup.get<IdealMagneticFieldRecord>().get(field);
79  theSeedFinder->setBField(&*field);
80 
82  edm::Handle<reco::BeamSpot> beamSpotHandle;
83  event.getByToken(beamspotToken, beamSpotHandle);
84  if (beamSpotHandle.isValid()) {
85  beamSpot = *beamSpotHandle;
86 
87  } else {
88  edm::LogInfo("MuonSeedGenerator") << "No beam spot available from EventSetup \n";
89  }
90 
91  // make it a vector so we can subtract it from position vectors
92  GlobalVector gv(beamSpot.x0(), beamSpot.y0(), beamSpot.z0());
94 
95  std::vector<MuonRecHitContainer> patterns;
96  thePatternRecognition->produce(event, eSetup, patterns);
97 
98  for (std::vector<MuonRecHitContainer>::const_iterator seedSegments = patterns.begin(); seedSegments != patterns.end();
99  ++seedSegments) {
100  theSeedFinder->seeds(*seedSegments, *output);
101  }
102 
104 
105  event.put(std::move(output));
106 }
void setBeamSpot(const GlobalVector &gv)
double z0() const
z coordinate
Definition: BeamSpot.h:65
virtual void produce(const edm::Event &event, const edm::EventSetup &eSetup, std::vector< MuonRecHitContainer > &result)=0
MuonSeedVCleaner * theSeedCleaner
edm::EDGetTokenT< reco::BeamSpot > beamspotToken
bool isValid() const
Definition: HandleBase.h:70
virtual void seeds(const MuonTransientTrackingRecHit::MuonRecHitContainer &hits, std::vector< TrajectorySeed > &result)=0
virtual void clean(TrajectorySeedCollection &seeds)=0
virtual void setBField(const MagneticField *field)=0
T get() const
Definition: EventSetup.h:73
double y0() const
y coordinate
Definition: BeamSpot.h:63
MuonSeedVFinder * theSeedFinder
MuonSeedVPatternRecognition * thePatternRecognition
def move(src, dest)
Definition: eostools.py:511
double x0() const
x coordinate
Definition: BeamSpot.h:61

Member Data Documentation

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

Definition at line 44 of file MuonSeedGenerator.h.

Referenced by MuonSeedGenerator(), and produce().

edm::InputTag MuonSeedGenerator::theBeamSpotTag
protected

Definition at line 43 of file MuonSeedGenerator.h.

Referenced by MuonSeedGenerator().

MuonSeedVPatternRecognition* MuonSeedGenerator::thePatternRecognition
protected

Definition at line 39 of file MuonSeedGenerator.h.

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

MuonSeedVCleaner* MuonSeedGenerator::theSeedCleaner
protected

Definition at line 41 of file MuonSeedGenerator.h.

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

MuonSeedVFinder* MuonSeedGenerator::theSeedFinder
protected

Definition at line 40 of file MuonSeedGenerator.h.

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