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

Public Member Functions

 RPCPointProducer (const edm::ParameterSet &)
 
 ~RPCPointProducer ()
 
- Public Member Functions inherited from edm::EDProducer
 EDProducer ()
 
virtual ~EDProducer ()
 
- Public Member Functions inherited from edm::ProducerBase
 ProducerBase ()
 
void registerProducts (ProducerBase *, ProductRegistry *, ModuleDescription const &)
 
boost::function< void(const
BranchDescription &)> 
registrationCallback () const
 used by the fwk to register list of products More...
 
virtual ~ProducerBase ()
 

Public Attributes

edm::InputTag cscSegments
 
edm::InputTag dt4DSegments
 
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
 
typedef WorkerT< EDProducerWorkerType
 
- 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)
 
- Protected Member Functions inherited from edm::EDProducer
CurrentProcessingContext const * currentContext () const
 
- Protected Member Functions inherited from edm::ProducerBase
template<class TProducer , class TMethod >
void callWhenNewProductsRegistered (TProducer *iProd, TMethod iMethod)
 

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 29 of file RPCPointProducer.cc.

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

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

Definition at line 51 of file RPCPointProducer.cc.

51  {
52 
53 }

Member Function Documentation

void RPCPointProducer::beginJob ( void  )
privatevirtual

Reimplemented from edm::EDProducer.

Definition at line 104 of file RPCPointProducer.cc.

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

Reimplemented from edm::EDProducer.

Definition at line 110 of file RPCPointProducer.cc.

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

Implements edm::EDProducer.

Definition at line 55 of file RPCPointProducer.cc.

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

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

Member Data Documentation

edm::InputTag RPCPointProducer::cscSegments

Definition at line 26 of file RPCPointProducer.h.

Referenced by produce(), and RPCPointProducer().

bool RPCPointProducer::debug
private

Definition at line 36 of file RPCPointProducer.h.

Referenced by produce(), and RPCPointProducer().

edm::InputTag RPCPointProducer::dt4DSegments

Definition at line 27 of file RPCPointProducer.h.

Referenced by produce(), and RPCPointProducer().

double RPCPointProducer::ExtrapolatedRegion
private

Definition at line 41 of file RPCPointProducer.h.

Referenced by produce(), and RPCPointProducer().

bool RPCPointProducer::inclcsc
private

Definition at line 34 of file RPCPointProducer.h.

Referenced by produce(), and RPCPointProducer().

bool RPCPointProducer::incldt
private

Definition at line 33 of file RPCPointProducer.h.

Referenced by produce(), and RPCPointProducer().

bool RPCPointProducer::incltrack
private

Definition at line 35 of file RPCPointProducer.h.

Referenced by produce(), and RPCPointProducer().

double RPCPointProducer::MaxD
private

Definition at line 38 of file RPCPointProducer.h.

Referenced by RPCPointProducer().

double RPCPointProducer::MaxDistanceBetweenSegments
private

Definition at line 40 of file RPCPointProducer.h.

double RPCPointProducer::MaxDrb4
private

Definition at line 39 of file RPCPointProducer.h.

Referenced by RPCPointProducer().

double RPCPointProducer::MinCosAng
private

Definition at line 37 of file RPCPointProducer.h.

Referenced by RPCPointProducer().

edm::ParameterSet RPCPointProducer::serviceParameters
private

Definition at line 43 of file RPCPointProducer.h.

edm::InputTag RPCPointProducer::tracks

Definition at line 28 of file RPCPointProducer.h.

Referenced by produce(), and RPCPointProducer().

edm::ParameterSet RPCPointProducer::trackTransformerParam
private

Definition at line 42 of file RPCPointProducer.h.

Referenced by produce(), and RPCPointProducer().