#include <L1GctInternJetProducer.h>
Public Member Functions | |
L1GctInternJetProducer (const edm::ParameterSet &) | |
~L1GctInternJetProducer () | |
Private Member Functions | |
virtual void | beginJob () |
virtual void | endJob () |
math::PtEtaPhiMLorentzVector | gctLorentzVector (const double &et, const L1GctCand &cand, const L1CaloGeometry *geom, bool central) |
virtual void | produce (edm::Event &, const edm::EventSetup &) |
Private Attributes | |
bool | centralBxOnly_ |
edm::InputTag | internalJetSource_ |
EventFilter/GctRawToDigi/plugins/L1GctInternJetProducer.cc
EventFilter/GctRawToDigi/plugins/L1GctInternJetProducer.h
Description: producer of L1Extra style internal GCT jets from Level-1 hardware objects.
Definition at line 29 of file L1GctInternJetProducer.h.
L1GctInternJetProducer::L1GctInternJetProducer | ( | const edm::ParameterSet & | iConfig | ) | [explicit] |
Definition at line 33 of file L1GctInternJetProducer.cc.
: internalJetSource_(iConfig.getParameter<edm::InputTag>("internalJetSource")), centralBxOnly_(iConfig.getParameter<bool>("centralBxOnly")) { using namespace l1extra ; produces< L1JetParticleCollection >( "Internal" ) ; }
L1GctInternJetProducer::~L1GctInternJetProducer | ( | ) |
Definition at line 43 of file L1GctInternJetProducer.cc.
{}
void L1GctInternJetProducer::beginJob | ( | void | ) | [private, virtual] |
void L1GctInternJetProducer::endJob | ( | void | ) | [private, virtual] |
math::PtEtaPhiMLorentzVector L1GctInternJetProducer::gctLorentzVector | ( | const double & | et, |
const L1GctCand & | cand, | ||
const L1CaloGeometry * | geom, | ||
bool | central | ||
) | [private] |
void L1GctInternJetProducer::produce | ( | edm::Event & | iEvent, |
const edm::EventSetup & | iSetup | ||
) | [private, virtual] |
Implements edm::EDProducer.
Definition at line 45 of file L1GctInternJetProducer.cc.
References centralBxOnly_, gather_cfg::cout, alignCSCRings::e, eta(), edm::EventSetup::get(), edm::Event::getByLabel(), i, internalJetSource_, LogDebug, phi, and edm::Event::put().
{ //std::cout << "ARGGHHH!" << std::endl; using namespace edm ; using namespace l1extra ; using namespace std ; auto_ptr< L1JetParticleCollection > internJetColl(new L1JetParticleCollection ); ESHandle< L1CaloGeometry > caloGeomESH ; iSetup.get< L1CaloGeometryRecord >().get( caloGeomESH ) ; const L1CaloGeometry* caloGeom = &( *caloGeomESH ) ; ESHandle< L1CaloEtScale > jetScale ; iSetup.get< L1JetEtScaleRcd >().get( jetScale ) ; double etSumLSB = jetScale->linearLsb() ; //std::cout << "Inside the Jet producer " << etSumLSB << std::endl; Handle< L1GctInternJetDataCollection > hwIntJetCands ; iEvent.getByLabel( internalJetSource_, hwIntJetCands ) ; //std::cout << "At leas Something is happening" <<std::endl; if( !hwIntJetCands.isValid() ) { std::cout << "These aren't the Jets you're looking for" << std::endl; LogDebug("L1GctInternJetProducer") << "\nWarning: L1GctJetCandCollection with " << internalJetSource_ << "\nrequested in configuration, but not found in the event." << std::endl; } else { //std::cout << "apparently the collection was found" <<std::endl; L1GctInternJetDataCollection::const_iterator jetItr = hwIntJetCands->begin() ; L1GctInternJetDataCollection::const_iterator jetEnd = hwIntJetCands->end() ; int i; for( i = 0 ; jetItr != jetEnd ; ++jetItr, ++i ){ //std::cout << " JetS a plenty" <<std::endl; if( !jetItr->empty() && ( !centralBxOnly_ || jetItr->bx() == 0 ) ) { double et = (jetItr->oflow() ? (double) 0xfff: (double) jetItr->et() ) * etSumLSB + 1.e-6; //double et = 10.; //std::cout << "jetET: " << jetItr->et() <<std::endl; //std::cout << "ET was: " << et << std::endl; double eta = caloGeom->etaBinCenter( jetItr->regionId() ); double phi = caloGeom->emJetPhiBinCenter( jetItr->regionId() ); internJetColl->push_back(L1JetParticle( math::PtEtaPhiMLorentzVector( et, eta, phi, 0.), Ref< L1GctJetCandCollection >(), jetItr->bx() ) ) ; } } } OrphanHandle< L1JetParticleCollection > internalJetHandle = iEvent.put( internJetColl, "Internal" ) ; }
bool L1GctInternJetProducer::centralBxOnly_ [private] |
Definition at line 46 of file L1GctInternJetProducer.h.
Referenced by produce().
Definition at line 44 of file L1GctInternJetProducer.h.
Referenced by produce().