#include <L1Trigger/CSCTrackFinder/plugins/CSCTFTrackProducer.h>
Public Member Functions | |
void | beginJob (const edm::EventSetup &es) |
CSCTFTrackProducer (const edm::ParameterSet &) | |
void | produce (edm::Event &e, const edm::EventSetup &c) |
virtual | ~CSCTFTrackProducer () |
Private Attributes | |
edm::InputTag | dt_producer |
edm::InputTag | input_module |
unsigned long long | m_ptScaleCacheID |
unsigned long long | m_scalesCacheID |
CSCTFTrackBuilder * | my_builder |
edm::ParameterSet | sp_pset |
bool | TMB07 |
bool | useDT |
Definition at line 13 of file CSCTFTrackProducer.h.
CSCTFTrackProducer::CSCTFTrackProducer | ( | const edm::ParameterSet & | pset | ) |
Definition at line 25 of file CSCTFTrackProducer.cc.
References dt_producer, edm::ParameterSet::getParameter(), edm::ParameterSet::getUntrackedParameter(), input_module, m_ptScaleCacheID, m_scalesCacheID, my_builder, sp_pset, TMB07, and useDT.
00026 { 00027 input_module = pset.getUntrackedParameter<edm::InputTag>("SectorReceiverInput"); 00028 dt_producer = pset.getUntrackedParameter<edm::InputTag>("DTproducer"); 00029 sp_pset = pset.getParameter<edm::ParameterSet>("SectorProcessor"); 00030 useDT = pset.getParameter<bool>("useDT"); 00031 TMB07 = pset.getParameter<bool>("isTMB07"); 00032 m_scalesCacheID = 0ULL ; 00033 m_ptScaleCacheID = 0ULL ; 00034 my_builder = 0 ; 00035 produces<L1CSCTrackCollection>(); 00036 produces<CSCTriggerContainer<csctf::TrackStub> >(); 00037 }
CSCTFTrackProducer::~CSCTFTrackProducer | ( | ) | [virtual] |
Definition at line 39 of file CSCTFTrackProducer.cc.
References my_builder.
00040 { 00041 delete my_builder; 00042 my_builder = 0; 00043 }
void CSCTFTrackProducer::beginJob | ( | const edm::EventSetup & | es | ) | [virtual] |
void CSCTFTrackProducer::produce | ( | edm::Event & | e, | |
const edm::EventSetup & | c | |||
) | [virtual] |
Implements edm::EDProducer.
Definition at line 49 of file CSCTFTrackProducer.cc.
References CSCTFTrackBuilder::buildTracks(), dt_producer, edm::EventSetup::get(), edm::Event::getByLabel(), CSCTFTrackBuilder::initialize(), input_module, edm::InputTag::instance(), edm::InputTag::label(), m_ptScaleCacheID, m_scalesCacheID, my_builder, edm::ESHandle< T >::product(), edm::Handle< T >::product(), edm::Event::put(), CSCTriggerGeometry::setGeometry(), sp_pset, TMB07, and useDT.
00050 { 00051 // Update CSCTFTrackBuilder only if the scales have changed. Use the 00052 // EventSetup cacheIdentifier to tell when this has happened. 00053 if( c.get< L1MuTriggerScalesRcd >().cacheIdentifier() != m_scalesCacheID || 00054 c.get< L1MuTriggerPtScaleRcd >().cacheIdentifier() != m_ptScaleCacheID ) 00055 { 00056 if(my_builder) delete my_builder ; 00057 00058 edm::ESHandle< L1MuTriggerScales > scales ; 00059 c.get< L1MuTriggerScalesRcd >().get( scales ) ; 00060 00061 edm::ESHandle< L1MuTriggerPtScale > ptScale ; 00062 c.get< L1MuTriggerPtScaleRcd >().get( ptScale ) ; 00063 00064 my_builder = new CSCTFTrackBuilder(sp_pset,TMB07, 00065 scales.product(),ptScale.product()); 00066 my_builder->initialize(c); 00067 00068 m_scalesCacheID = c.get< L1MuTriggerScalesRcd >().cacheIdentifier() ; 00069 m_ptScaleCacheID = c.get< L1MuTriggerPtScaleRcd >().cacheIdentifier() ; 00070 } 00071 00072 // set geometry pointer 00073 edm::ESHandle<CSCGeometry> pDD; 00074 00075 c.get<MuonGeometryRecord>().get( pDD ); 00076 CSCTriggerGeometry::setGeometry(pDD); 00077 00078 edm::Handle<CSCCorrelatedLCTDigiCollection> LCTs; 00079 edm::Handle<L1MuDTChambPhContainer> dttrig; 00080 std::auto_ptr<L1CSCTrackCollection> track_product(new L1CSCTrackCollection); 00081 std::auto_ptr<CSCTriggerContainer<csctf::TrackStub> > dt_stubs(new CSCTriggerContainer<csctf::TrackStub>); 00082 00083 e.getByLabel(input_module.label(),input_module.instance(), LCTs); 00084 if(useDT) 00085 e.getByLabel(dt_producer.label(),dt_producer.instance(), dttrig); 00086 00087 my_builder->buildTracks(LCTs.product(), (useDT?dttrig.product():0), track_product.get(), dt_stubs.get()); 00088 00089 e.put(track_product); 00090 e.put(dt_stubs); 00091 }
edm::InputTag CSCTFTrackProducer::dt_producer [private] |
Definition at line 28 of file CSCTFTrackProducer.h.
Referenced by CSCTFTrackProducer(), and produce().
Definition at line 28 of file CSCTFTrackProducer.h.
Referenced by CSCTFTrackProducer(), and produce().
unsigned long long CSCTFTrackProducer::m_ptScaleCacheID [private] |
Definition at line 31 of file CSCTFTrackProducer.h.
Referenced by CSCTFTrackProducer(), and produce().
unsigned long long CSCTFTrackProducer::m_scalesCacheID [private] |
Definition at line 30 of file CSCTFTrackProducer.h.
Referenced by CSCTFTrackProducer(), and produce().
CSCTFTrackBuilder* CSCTFTrackProducer::my_builder [private] |
Definition at line 32 of file CSCTFTrackProducer.h.
Referenced by CSCTFTrackProducer(), produce(), and ~CSCTFTrackProducer().
edm::ParameterSet CSCTFTrackProducer::sp_pset [private] |
Definition at line 29 of file CSCTFTrackProducer.h.
Referenced by CSCTFTrackProducer(), and produce().
bool CSCTFTrackProducer::TMB07 [private] |
Definition at line 27 of file CSCTFTrackProducer.h.
Referenced by CSCTFTrackProducer(), and produce().
bool CSCTFTrackProducer::useDT [private] |
Definition at line 27 of file CSCTFTrackProducer.h.
Referenced by CSCTFTrackProducer(), and produce().