CMS 3D CMS Logo

 All Classes Namespaces Files Functions Variables Typedefs Enumerations Enumerator Properties Friends Macros Pages
List of all members | Public Member Functions | Public Attributes | Private Member Functions | Private Attributes
RPCPointProducer Class Reference

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

Inheritance diagram for RPCPointProducer:
edm::EDProducer edm::ProducerBase edm::EDConsumerBase edm::ProductRegistryHelper

Public Member Functions

 RPCPointProducer (const edm::ParameterSet &)
 
 ~RPCPointProducer ()
 
- Public Member Functions inherited from edm::EDProducer
 EDProducer ()
 
ModuleDescription const & moduleDescription () const
 
virtual ~EDProducer ()
 
- Public Member Functions inherited from edm::ProducerBase
 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
 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
 
bool registeredToConsume (ProductHolderIndex, bool, BranchType) const
 
bool registeredToConsumeMany (TypeID const &, BranchType) const
 
void updateLookup (BranchType iBranchType, ProductHolderIndexHelper const &)
 
virtual ~EDConsumerBase ()
 

Public Attributes

edm::EDGetTokenT
< CSCSegmentCollection
cscSegments
 
edm::EDGetTokenT
< DTRecSegment4DCollection
dt4DSegments
 
edm::EDGetTokenT
< reco::TrackCollection
tracks
 
edm::InputTag tracks_
 

Private Member Functions

virtual void beginJob ()
 
virtual void endJob ()
 
virtual void produce (edm::Event &, const edm::EventSetup &)
 

Private Attributes

bool debug
 
double ExtrapolatedRegion
 
bool inclcsc
 
bool incldt
 
bool incltrack
 
double MaxD
 
double MaxDistanceBetweenSegments
 
double MaxDrb4
 
double MinCosAng
 
edm::ParameterSet serviceParameters
 
edm::ParameterSet trackTransformerParam
 

Additional Inherited Members

- Public Types inherited from edm::EDProducer
typedef EDProducer ModuleType
 
- Public Types inherited from edm::ProducerBase
typedef
ProductRegistryHelper::TypeLabelList 
TypeLabelList
 
- Static Public Member Functions inherited from edm::EDProducer
static const std::string & baseType ()
 
static void fillDescriptions (ConfigurationDescriptions &descriptions)
 
static void prevalidate (ConfigurationDescriptions &descriptions)
 
- Protected Member Functions inherited from edm::ProducerBase
void callWhenNewProductsRegistered (std::function< void(BranchDescription const &)> const &func)
 
- 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.

References cscSegments, debug, dt4DSegments, ExtrapolatedRegion, edm::ParameterSet::getParameter(), edm::ParameterSet::getUntrackedParameter(), inclcsc, incldt, incltrack, MaxD, MaxDrb4, MinCosAng, tracks, tracks_, and trackTransformerParam.

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

Definition at line 52 of file RPCPointProducer.cc.

52  {
53 
54 }

Member Function Documentation

void RPCPointProducer::beginJob ( void  )
privatevirtual

Reimplemented from edm::EDProducer.

Definition at line 105 of file RPCPointProducer.cc.

106 {
107 }
void RPCPointProducer::endJob ( void  )
privatevirtual

Reimplemented from edm::EDProducer.

Definition at line 111 of file RPCPointProducer.cc.

111  {
112 }
void RPCPointProducer::produce ( edm::Event iEvent,
const edm::EventSetup iSetup 
)
privatevirtual

Implements edm::EDProducer.

Definition at line 56 of file RPCPointProducer.cc.

References gather_cfg::cout, cscSegments, debug, dt4DSegments, ExtrapolatedRegion, edm::Event::getByToken(), inclcsc, incldt, incltrack, edm::HandleBase::isValid(), edm::Event::put(), DTSegtoRPC::thePoints(), CSCSegtoRPC::thePoints(), TracktoRPC::thePoints(), tracks, tracks_, and trackTransformerParam.

56  {
57  /*
58  struct timespec start_time, stop_time;
59  time_t fs;
60  time_t fn;
61  time_t ls;
62  time_t ln;
63  clock_gettime(CLOCK_REALTIME, &start_time);
64  */
65 
66  if(incldt){
68  iEvent.getByToken(dt4DSegments, all4DSegments);
69  if(all4DSegments.isValid()){
70  DTSegtoRPC DTClass(all4DSegments,iSetup,iEvent,debug,ExtrapolatedRegion);
71  std::auto_ptr<RPCRecHitCollection> TheDTPoints(DTClass.thePoints());
72  iEvent.put(TheDTPoints,"RPCDTExtrapolatedPoints");
73  }else{
74  if(debug) std::cout<<"RPCHLT Invalid DTSegments collection"<<std::endl;
75  }
76  }
77 
78  if(inclcsc){
79  edm::Handle<CSCSegmentCollection> allCSCSegments;
80  iEvent.getByToken(cscSegments, allCSCSegments);
81  if(allCSCSegments.isValid()){
82  CSCSegtoRPC CSCClass(allCSCSegments,iSetup,iEvent,debug,ExtrapolatedRegion);
83  std::auto_ptr<RPCRecHitCollection> TheCSCPoints(CSCClass.thePoints());
84  iEvent.put(TheCSCPoints,"RPCCSCExtrapolatedPoints");
85  }else{
86  if(debug) std::cout<<"RPCHLT Invalid CSCSegments collection"<<std::endl;
87  }
88  }
89  if(incltrack){
91  iEvent.getByToken(tracks,alltracks);
92  if(!(alltracks->empty())){
93  TracktoRPC TrackClass(alltracks,iSetup,iEvent,debug,trackTransformerParam,tracks_);
94  std::auto_ptr<RPCRecHitCollection> TheTrackPoints(TrackClass.thePoints());
95  iEvent.put(TheTrackPoints,"RPCTrackExtrapolatedPoints");
96  }else{
97  std::cout<<"RPCHLT Invalid Tracks collection"<<std::endl;
98  }
99  }
100 
101 }
edm::EDGetTokenT< CSCSegmentCollection > cscSegments
bool getByToken(EDGetToken token, Handle< PROD > &result) const
Definition: Event.h:434
edm::EDGetTokenT< DTRecSegment4DCollection > dt4DSegments
OrphanHandle< PROD > put(std::auto_ptr< PROD > product)
Put a new product.
Definition: Event.h:116
bool isValid() const
Definition: HandleBase.h:76
edm::EDGetTokenT< reco::TrackCollection > tracks
edm::ParameterSet trackTransformerParam
tuple cout
Definition: gather_cfg.py:121
edm::InputTag tracks_

Member Data Documentation

edm::EDGetTokenT<CSCSegmentCollection> RPCPointProducer::cscSegments

Definition at line 27 of file RPCPointProducer.h.

Referenced by produce(), and RPCPointProducer().

bool RPCPointProducer::debug
private

Definition at line 39 of file RPCPointProducer.h.

Referenced by produce(), and RPCPointProducer().

edm::EDGetTokenT<DTRecSegment4DCollection> RPCPointProducer::dt4DSegments

Definition at line 28 of file RPCPointProducer.h.

Referenced by produce(), and RPCPointProducer().

double RPCPointProducer::ExtrapolatedRegion
private

Definition at line 44 of file RPCPointProducer.h.

Referenced by produce(), and RPCPointProducer().

bool RPCPointProducer::inclcsc
private

Definition at line 37 of file RPCPointProducer.h.

Referenced by produce(), and RPCPointProducer().

bool RPCPointProducer::incldt
private

Definition at line 36 of file RPCPointProducer.h.

Referenced by produce(), and RPCPointProducer().

bool RPCPointProducer::incltrack
private

Definition at line 38 of file RPCPointProducer.h.

Referenced by produce(), and RPCPointProducer().

double RPCPointProducer::MaxD
private

Definition at line 41 of file RPCPointProducer.h.

Referenced by RPCPointProducer().

double RPCPointProducer::MaxDistanceBetweenSegments
private

Definition at line 43 of file RPCPointProducer.h.

double RPCPointProducer::MaxDrb4
private

Definition at line 42 of file RPCPointProducer.h.

Referenced by RPCPointProducer().

double RPCPointProducer::MinCosAng
private

Definition at line 40 of file RPCPointProducer.h.

Referenced by RPCPointProducer().

edm::ParameterSet RPCPointProducer::serviceParameters
private

Definition at line 46 of file RPCPointProducer.h.

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

Definition at line 30 of file RPCPointProducer.h.

Referenced by produce(), and RPCPointProducer().

edm::InputTag RPCPointProducer::tracks_

Definition at line 31 of file RPCPointProducer.h.

Referenced by produce(), and RPCPointProducer().

edm::ParameterSet RPCPointProducer::trackTransformerParam
private

Definition at line 45 of file RPCPointProducer.h.

Referenced by produce(), and RPCPointProducer().