CMS 3D CMS Logo

List of all members | Public Member Functions | Private Member Functions | Private Attributes
RPCPointProducer Class Reference

#include <Analysis/RPCPointProducer/src/RPCPointProducer.cc>

Inheritance diagram for RPCPointProducer:
edm::global::EDProducer<> edm::global::EDProducerBase edm::ProducerBase edm::EDConsumerBase edm::ProductRegistryHelper

Public Member Functions

 RPCPointProducer (const edm::ParameterSet &)
 
- Public Member Functions inherited from edm::global::EDProducer<>
 EDProducer ()=default
 
bool hasAbilityToProduceInBeginLumis () const final
 
bool hasAbilityToProduceInBeginRuns () const final
 
bool hasAbilityToProduceInEndLumis () const final
 
bool hasAbilityToProduceInEndRuns () const final
 
bool wantsGlobalLuminosityBlocks () const final
 
bool wantsGlobalRuns () const final
 
bool wantsStreamLuminosityBlocks () const final
 
bool wantsStreamRuns () const final
 
- Public Member Functions inherited from edm::global::EDProducerBase
 EDProducerBase ()
 
ModuleDescription const & moduleDescription () const
 
 ~EDProducerBase () override
 
- 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 ()
 
std::vector< edm::ProductResolverIndex > const & putTokenIndexToProductResolverIndex () const
 
std::vector< bool > const & recordProvenanceList () const
 
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, ModuleToResolverIndicies const &iIndicies, std::string const &moduleLabel)
 
TypeLabelList const & typeLabelList () const
 used by the fwk to register the list of products of this module More...
 
 ~ProducerBase () noexcept(false) override
 
- 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 &&)=default
 
 EDConsumerBase (EDConsumerBase const &)=delete
 
ESProxyIndex const * esGetTokenIndices (edm::Transition iTrans) const
 
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
 
EDConsumerBaseoperator= (EDConsumerBase &&)=default
 
EDConsumerBase const & operator= (EDConsumerBase const &)=delete
 
bool registeredToConsume (ProductResolverIndex, bool, BranchType) const
 
bool registeredToConsumeMany (TypeID const &, BranchType) const
 
ProductResolverIndexAndSkipBit uncheckedIndexFrom (EDGetToken) const
 
void updateLookup (BranchType iBranchType, ProductResolverIndexHelper const &, bool iPrefetchMayGet)
 
void updateLookup (eventsetup::ESRecordsToProxyIndices const &)
 
virtual ~EDConsumerBase () noexcept(false)
 

Private Member Functions

void produce (edm::StreamID, edm::Event &, const edm::EventSetup &) const override
 

Private Attributes

const edm::EDGetTokenT< CSCSegmentCollectioncscSegments
 
const bool debug
 
const edm::EDGetTokenT< DTRecSegment4DCollectiondt4DSegments
 
const double ExtrapolatedRegion
 
const bool inclcsc
 
const bool incldt
 
const bool incltrack
 
const double MaxD
 
const double MaxDrb4
 
const double MinCosAng
 
const edm::EDGetTokenT< reco::TrackCollectiontracks
 
const edm::InputTag tracks_
 
const edm::ParameterSet trackTransformerParam
 

Additional Inherited Members

- Public Types inherited from edm::global::EDProducerBase
typedef EDProducerBase ModuleType
 
- Public Types inherited from edm::ProducerBase
using ModuleToResolverIndicies = std::unordered_multimap< std::string, std::tuple< edm::TypeID const *, const char *, edm::ProductResolverIndex > >
 
typedef ProductRegistryHelper::TypeLabelList TypeLabelList
 
- Public Types inherited from edm::EDConsumerBase
typedef ProductLabels Labels
 
- Static Public Member Functions inherited from edm::global::EDProducerBase
static const std::string & baseType ()
 
static void fillDescriptions (ConfigurationDescriptions &descriptions)
 
static void prevalidate (ConfigurationDescriptions &descriptions)
 
- Protected Member Functions inherited from edm::ProducerBase
template<class ProductType >
BranchAliasSetterT< ProductType > produces ()
 declare what type of product will make and with which optional label More...
 
template<typename ProductType , BranchType B>
BranchAliasSetterT< ProductType > produces ()
 
template<typename ProductType , Transition B>
BranchAliasSetterT< ProductType > produces ()
 
BranchAliasSetter produces (const TypeID &id, std::string instanceName=std::string(), bool recordProvenance=true)
 
template<BranchType B>
BranchAliasSetter produces (const TypeID &id, std::string instanceName=std::string(), bool recordProvenance=true)
 
template<Transition B>
BranchAliasSetter produces (const TypeID &id, std::string instanceName=std::string(), bool recordProvenance=true)
 
template<typename ProductType , Transition B>
BranchAliasSetterT< ProductType > produces (std::string instanceName)
 
template<class ProductType >
BranchAliasSetterT< ProductType > produces (std::string instanceName)
 
template<typename ProductType , BranchType B>
BranchAliasSetterT< ProductType > produces (std::string instanceName)
 
ProducesCollector producesCollector ()
 
- Protected Member Functions inherited from edm::EDConsumerBase
EDGetToken consumes (const TypeToGet &id, edm::InputTag const &tag)
 
template<typename ProductType , BranchType B = InEvent>
EDGetTokenT< ProductType > consumes (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 ESProduct , typename ESRecord , Transition Tr = Transition::Event>
auto esConsumes ()
 
template<typename ESProduct , typename ESRecord , Transition Tr = Transition::Event>
auto esConsumes (ESInputTag const &tag)
 
EDGetToken mayConsume (const TypeToGet &id, edm::InputTag const &tag)
 
template<BranchType B>
EDGetToken mayConsume (const TypeToGet &id, edm::InputTag const &tag)
 
template<typename ProductType , BranchType B = InEvent>
EDGetTokenT< ProductType > mayConsume (edm::InputTag const &tag)
 

Detailed Description

Description: <one line="" class="" summary>="">

Implementation: <Notes on="" implementation>="">

Definition at line 22 of file RPCPointProducer.h.

Constructor & Destructor Documentation

◆ RPCPointProducer()

RPCPointProducer::RPCPointProducer ( const edm::ParameterSet iConfig)
explicit

Definition at line 28 of file RPCPointProducer.cc.

29  : cscSegments(consumes<CSCSegmentCollection>(iConfig.getParameter<edm::InputTag>("cscSegments"))),
30  dt4DSegments(consumes<DTRecSegment4DCollection>(iConfig.getParameter<edm::InputTag>("dt4DSegments"))),
31  tracks(consumes<reco::TrackCollection>(iConfig.getParameter<edm::InputTag>("tracks"))),
32  tracks_(iConfig.getParameter<edm::InputTag>("tracks")),
33  incldt(iConfig.getUntrackedParameter<bool>("incldt", true)),
34  inclcsc(iConfig.getUntrackedParameter<bool>("inclcsc", true)),
35  incltrack(iConfig.getUntrackedParameter<bool>("incltrack", true)),
36  debug(iConfig.getUntrackedParameter<bool>("debug", false)),
37  MinCosAng(iConfig.getUntrackedParameter<double>("MinCosAng", 0.95)),
38  MaxD(iConfig.getUntrackedParameter<double>("MaxD", 80.)),
39  MaxDrb4(iConfig.getUntrackedParameter<double>("MaxDrb4", 150.)),
40  ExtrapolatedRegion(iConfig.getUntrackedParameter<double>("ExtrapolatedRegion", 0.5)),
41  trackTransformerParam(iConfig.getParameter<edm::ParameterSet>("TrackTransformer")) {
42  produces<RPCRecHitCollection>("RPCDTExtrapolatedPoints");
43  produces<RPCRecHitCollection>("RPCCSCExtrapolatedPoints");
44  produces<RPCRecHitCollection>("RPCTrackExtrapolatedPoints");
45 }

Member Function Documentation

◆ produce()

void RPCPointProducer::produce ( edm::StreamID  ,
edm::Event iEvent,
const edm::EventSetup iSetup 
) const
overrideprivatevirtual

Implements edm::global::EDProducerBase.

Definition at line 47 of file RPCPointProducer.cc.

47  {
48  if (incldt) {
50  iEvent.getByToken(dt4DSegments, all4DSegments);
51  if (all4DSegments.isValid()) {
52  DTSegtoRPC DTClass(all4DSegments.product(), iSetup, debug, ExtrapolatedRegion);
53  iEvent.put(std::move(DTClass.thePoints()), "RPCDTExtrapolatedPoints");
54  } else {
55  if (debug)
56  std::cout << "RPCHLT Invalid DTSegments collection" << std::endl;
57  }
58  }
59 
60  if (inclcsc) {
61  edm::Handle<CSCSegmentCollection> allCSCSegments;
62  iEvent.getByToken(cscSegments, allCSCSegments);
63  if (allCSCSegments.isValid()) {
64  CSCSegtoRPC CSCClass(allCSCSegments.product(), iSetup, debug, ExtrapolatedRegion);
65  iEvent.put(std::move(CSCClass.thePoints()), "RPCCSCExtrapolatedPoints");
66  } else {
67  if (debug)
68  std::cout << "RPCHLT Invalid CSCSegments collection" << std::endl;
69  }
70  }
71  if (incltrack) {
73  iEvent.getByToken(tracks, alltracks);
74  if (!(alltracks->empty())) {
76  iEvent.put(std::move(TrackClass.thePoints()), "RPCTrackExtrapolatedPoints");
77  } else {
78  if (debug)
79  std::cout << "RPCHLT Invalid Tracks collection" << std::endl;
80  }
81  }
82 }

References gather_cfg::cout, cscSegments, debug, dt4DSegments, ExtrapolatedRegion, iEvent, inclcsc, incldt, incltrack, edm::HandleBase::isValid(), eostools::move(), edm::Handle< T >::product(), tracks, tracks_, and trackTransformerParam.

Member Data Documentation

◆ cscSegments

const edm::EDGetTokenT<CSCSegmentCollection> RPCPointProducer::cscSegments
private

Definition at line 29 of file RPCPointProducer.h.

Referenced by produce().

◆ debug

const bool RPCPointProducer::debug
private

◆ dt4DSegments

const edm::EDGetTokenT<DTRecSegment4DCollection> RPCPointProducer::dt4DSegments
private

Definition at line 30 of file RPCPointProducer.h.

Referenced by produce().

◆ ExtrapolatedRegion

const double RPCPointProducer::ExtrapolatedRegion
private

Definition at line 41 of file RPCPointProducer.h.

Referenced by produce().

◆ inclcsc

const bool RPCPointProducer::inclcsc
private

Definition at line 35 of file RPCPointProducer.h.

Referenced by produce().

◆ incldt

const bool RPCPointProducer::incldt
private

Definition at line 34 of file RPCPointProducer.h.

Referenced by produce().

◆ incltrack

const bool RPCPointProducer::incltrack
private

Definition at line 36 of file RPCPointProducer.h.

Referenced by produce().

◆ MaxD

const double RPCPointProducer::MaxD
private

Definition at line 39 of file RPCPointProducer.h.

◆ MaxDrb4

const double RPCPointProducer::MaxDrb4
private

Definition at line 40 of file RPCPointProducer.h.

◆ MinCosAng

const double RPCPointProducer::MinCosAng
private

Definition at line 38 of file RPCPointProducer.h.

◆ tracks

const edm::EDGetTokenT<reco::TrackCollection> RPCPointProducer::tracks
private

Definition at line 31 of file RPCPointProducer.h.

Referenced by produce().

◆ tracks_

const edm::InputTag RPCPointProducer::tracks_
private

Definition at line 32 of file RPCPointProducer.h.

Referenced by produce().

◆ trackTransformerParam

const edm::ParameterSet RPCPointProducer::trackTransformerParam
private

Definition at line 42 of file RPCPointProducer.h.

Referenced by produce().

RPCPointProducer::tracks_
const edm::InputTag tracks_
Definition: RPCPointProducer.h:32
edm::Handle::product
T const * product() const
Definition: Handle.h:70
gather_cfg.cout
cout
Definition: gather_cfg.py:144
RPCPointProducer::cscSegments
const edm::EDGetTokenT< CSCSegmentCollection > cscSegments
Definition: RPCPointProducer.h:29
edm::ParameterSet::getUntrackedParameter
T getUntrackedParameter(std::string const &, T const &) const
edm::Handle< DTRecSegment4DCollection >
RPCPointProducer::MaxDrb4
const double MaxDrb4
Definition: RPCPointProducer.h:40
DTSegtoRPC
Definition: DTSegtoRPC.h:13
RPCPointProducer::dt4DSegments
const edm::EDGetTokenT< DTRecSegment4DCollection > dt4DSegments
Definition: RPCPointProducer.h:30
TracktoRPC
Definition: TracktoRPC.h:58
TrackClass
TrackClass
Definition: L1MuBMTrackAssParam.h:21
edm::ParameterSet
Definition: ParameterSet.h:36
RPCPointProducer::incltrack
const bool incltrack
Definition: RPCPointProducer.h:36
iEvent
int iEvent
Definition: GenABIO.cc:224
RPCPointProducer::ExtrapolatedRegion
const double ExtrapolatedRegion
Definition: RPCPointProducer.h:41
RPCPointProducer::MaxD
const double MaxD
Definition: RPCPointProducer.h:39
edm::ParameterSet::getParameter
T getParameter(std::string const &) const
eostools.move
def move(src, dest)
Definition: eostools.py:511
RPCPointProducer::tracks
const edm::EDGetTokenT< reco::TrackCollection > tracks
Definition: RPCPointProducer.h:31
RPCPointProducer::inclcsc
const bool inclcsc
Definition: RPCPointProducer.h:35
RPCPointProducer::debug
const bool debug
Definition: RPCPointProducer.h:37
RPCPointProducer::incldt
const bool incldt
Definition: RPCPointProducer.h:34
CSCSegtoRPC
Definition: CSCSegtoRPC.h:13
RPCPointProducer::MinCosAng
const double MinCosAng
Definition: RPCPointProducer.h:38
RPCPointProducer::trackTransformerParam
const edm::ParameterSet trackTransformerParam
Definition: RPCPointProducer.h:42
edm::HandleBase::isValid
bool isValid() const
Definition: HandleBase.h:70
edm::InputTag
Definition: InputTag.h:15