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 hasAbilityToProduceInLumis () const final
 
bool hasAbilityToProduceInRuns () 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
 
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)
 
 ~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 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
 
ProductResolverIndexAndSkipBit uncheckedIndexFrom (EDGetToken) const
 
void updateLookup (BranchType iBranchType, ProductResolverIndexHelper const &, bool iPrefetchMayGet)
 
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::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

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

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

Definition at line 22 of file RPCPointProducer.h.

Constructor & Destructor Documentation

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

Definition at line 28 of file RPCPointProducer.cc.

28  :
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 {
43  produces<RPCRecHitCollection>("RPCDTExtrapolatedPoints");
44  produces<RPCRecHitCollection>("RPCCSCExtrapolatedPoints");
45  produces<RPCRecHitCollection>("RPCTrackExtrapolatedPoints");
46 }
const double ExtrapolatedRegion
T getParameter(std::string const &) const
T getUntrackedParameter(std::string const &, T const &) const
const double MaxD
const double MaxDrb4
const bool incltrack
const double MinCosAng
const edm::ParameterSet trackTransformerParam
const edm::EDGetTokenT< reco::TrackCollection > tracks
const edm::InputTag tracks_
const edm::EDGetTokenT< CSCSegmentCollection > cscSegments
const edm::EDGetTokenT< DTRecSegment4DCollection > dt4DSegments

Member Function Documentation

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

Definition at line 48 of file RPCPointProducer.cc.

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

48  {
49  if(incldt){
51  iEvent.getByToken(dt4DSegments, all4DSegments);
52  if(all4DSegments.isValid()){
53  DTSegtoRPC DTClass(all4DSegments.product(), iSetup, debug, ExtrapolatedRegion);
54  iEvent.put(std::move(DTClass.thePoints()), "RPCDTExtrapolatedPoints");
55  }else{
56  if(debug) 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) std::cout<<"RPCHLT Invalid CSCSegments collection"<<std::endl;
68  }
69  }
70  if(incltrack){
72  iEvent.getByToken(tracks,alltracks);
73  if(!(alltracks->empty())){
75  iEvent.put(std::move(TrackClass.thePoints()), "RPCTrackExtrapolatedPoints");
76  }else{
77  if(debug) std::cout<<"RPCHLT Invalid Tracks collection"<<std::endl;
78  }
79  }
80 
81 }
const double ExtrapolatedRegion
OrphanHandle< PROD > put(std::unique_ptr< PROD > product)
Put a new product.
Definition: Event.h:137
const bool incltrack
bool getByToken(EDGetToken token, Handle< PROD > &result) const
Definition: Event.h:579
const edm::ParameterSet trackTransformerParam
const edm::EDGetTokenT< reco::TrackCollection > tracks
bool isValid() const
Definition: HandleBase.h:74
const edm::InputTag tracks_
T const * product() const
Definition: Handle.h:81
const edm::EDGetTokenT< CSCSegmentCollection > cscSegments
const edm::EDGetTokenT< DTRecSegment4DCollection > dt4DSegments
def move(src, dest)
Definition: eostools.py:510

Member Data Documentation

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

Definition at line 29 of file RPCPointProducer.h.

Referenced by produce().

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

Definition at line 30 of file RPCPointProducer.h.

Referenced by produce().

const double RPCPointProducer::ExtrapolatedRegion
private

Definition at line 41 of file RPCPointProducer.h.

Referenced by produce().

const bool RPCPointProducer::inclcsc
private

Definition at line 35 of file RPCPointProducer.h.

Referenced by produce().

const bool RPCPointProducer::incldt
private

Definition at line 34 of file RPCPointProducer.h.

Referenced by produce().

const bool RPCPointProducer::incltrack
private

Definition at line 36 of file RPCPointProducer.h.

Referenced by produce().

const double RPCPointProducer::MaxD
private

Definition at line 39 of file RPCPointProducer.h.

const double RPCPointProducer::MaxDrb4
private

Definition at line 40 of file RPCPointProducer.h.

const double RPCPointProducer::MinCosAng
private

Definition at line 38 of file RPCPointProducer.h.

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

Definition at line 31 of file RPCPointProducer.h.

Referenced by produce().

const edm::InputTag RPCPointProducer::tracks_
private

Definition at line 32 of file RPCPointProducer.h.

Referenced by produce().

const edm::ParameterSet RPCPointProducer::trackTransformerParam
private

Definition at line 42 of file RPCPointProducer.h.

Referenced by produce().