CMS 3D CMS Logo

 All Classes Namespaces Files Functions Variables Typedefs Enumerations Enumerator Properties Friends Macros Pages
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
 
- Public Member Functions inherited from edm::global::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 ()
 

Private Member Functions

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

Private Attributes

const edm::EDGetTokenT
< CSCSegmentCollection
cscSegments
 
const bool debug
 
const edm::EDGetTokenT
< DTRecSegment4DCollection
dt4DSegments
 
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::TrackCollection
tracks
 
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
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
overrideprivatevirtual

Implements edm::global::EDProducerBase.

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(), 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(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(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(TrackClass.thePoints(), "RPCTrackExtrapolatedPoints");
76  }else{
77  if(debug) std::cout<<"RPCHLT Invalid Tracks collection"<<std::endl;
78  }
79  }
80 
81 }
const double ExtrapolatedRegion
const bool incltrack
bool getByToken(EDGetToken token, Handle< PROD > &result) const
Definition: Event.h:457
const edm::ParameterSet trackTransformerParam
const edm::EDGetTokenT< reco::TrackCollection > tracks
OrphanHandle< PROD > put(std::auto_ptr< PROD > product)
Put a new product.
Definition: Event.h:115
bool isValid() const
Definition: HandleBase.h:75
const edm::InputTag tracks_
T const * product() const
Definition: Handle.h:81
const edm::EDGetTokenT< CSCSegmentCollection > cscSegments
const edm::EDGetTokenT< DTRecSegment4DCollection > dt4DSegments
tuple cout
Definition: gather_cfg.py:121

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

Definition at line 37 of file RPCPointProducer.h.

Referenced by produce().

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().