Public Member Functions | |
L1TowerJetPUSubtractedProducer (const edm::ParameterSet &) | |
~L1TowerJetPUSubtractedProducer () | |
Static Public Member Functions | |
static void | fillDescriptions (edm::ConfigurationDescriptions &descriptions) |
Private Member Functions | |
virtual void | beginJob () |
virtual void | beginLuminosityBlock (edm::LuminosityBlock &, edm::EventSetup const &) |
virtual void | beginRun (edm::Run &, edm::EventSetup const &) |
virtual void | endJob () |
virtual void | endLuminosityBlock (edm::LuminosityBlock &, edm::EventSetup const &) |
virtual void | endRun (edm::Run &, edm::EventSetup const &) |
virtual void | produce (edm::Event &, const edm::EventSetup &) |
Private Attributes | |
ParameterSet | conf_ |
Definition at line 44 of file L1TowerJetPUSubtractedProducer.cc.
L1TowerJetPUSubtractedProducer::L1TowerJetPUSubtractedProducer | ( | const edm::ParameterSet & | iConfig | ) | [explicit] |
Definition at line 67 of file L1TowerJetPUSubtractedProducer.cc.
: conf_(iConfig) { produces<L1TowerJetCollection>("PUSubCenJets"); produces< L1JetParticleCollection >( "PUSubCen8x8" ) ; }
L1TowerJetPUSubtractedProducer::~L1TowerJetPUSubtractedProducer | ( | ) |
Definition at line 75 of file L1TowerJetPUSubtractedProducer.cc.
{ }
void L1TowerJetPUSubtractedProducer::beginJob | ( | void | ) | [private, virtual] |
Reimplemented from edm::EDProducer.
Definition at line 175 of file L1TowerJetPUSubtractedProducer.cc.
{ }
void L1TowerJetPUSubtractedProducer::beginLuminosityBlock | ( | edm::LuminosityBlock & | , |
edm::EventSetup const & | |||
) | [private, virtual] |
Reimplemented from edm::EDProducer.
Definition at line 200 of file L1TowerJetPUSubtractedProducer.cc.
{ }
void L1TowerJetPUSubtractedProducer::beginRun | ( | edm::Run & | , |
edm::EventSetup const & | |||
) | [private, virtual] |
Reimplemented from edm::EDProducer.
Definition at line 187 of file L1TowerJetPUSubtractedProducer.cc.
{ }
void L1TowerJetPUSubtractedProducer::endJob | ( | void | ) | [private, virtual] |
Reimplemented from edm::EDProducer.
Definition at line 182 of file L1TowerJetPUSubtractedProducer.cc.
{ }
void L1TowerJetPUSubtractedProducer::endLuminosityBlock | ( | edm::LuminosityBlock & | , |
edm::EventSetup const & | |||
) | [private, virtual] |
Reimplemented from edm::EDProducer.
Definition at line 206 of file L1TowerJetPUSubtractedProducer.cc.
{ }
void L1TowerJetPUSubtractedProducer::endRun | ( | edm::Run & | , |
edm::EventSetup const & | |||
) | [private, virtual] |
Reimplemented from edm::EDProducer.
Definition at line 194 of file L1TowerJetPUSubtractedProducer.cc.
{ }
void L1TowerJetPUSubtractedProducer::fillDescriptions | ( | edm::ConfigurationDescriptions & | descriptions | ) | [static] |
Reimplemented from edm::EDProducer.
Definition at line 212 of file L1TowerJetPUSubtractedProducer.cc.
References edm::ConfigurationDescriptions::addDefault(), and edm::ParameterSetDescription::setUnknown().
{ //The following says we do not know what parameters are allowed so do no validation // Please change this to state exactly what you do use, even if it is no parameters edm::ParameterSetDescription desc; desc.setUnknown(); descriptions.addDefault(desc); }
void L1TowerJetPUSubtractedProducer::produce | ( | edm::Event & | iEvent, |
const edm::EventSetup & | iSetup | ||
) | [private, virtual] |
Implements edm::EDProducer.
Definition at line 84 of file L1TowerJetPUSubtractedProducer.cc.
References conf_, edm::Event::getByLabel(), edm::ParameterSet::getParameter(), h, edm::HandleBase::isValid(), p4, edm::Event::put(), and l1slhc::L1TowerJet::setP4().
{ bool evValid =true; auto_ptr< L1TowerJetCollection > outputCollCen(new L1TowerJetCollection()); produces<L1TowerJetCollection>("CalibFwdJets"); auto_ptr< L1JetParticleCollection > outputExtraCen(new L1JetParticleCollection()); edm::Handle< double > calRho; iEvent.getByLabel(conf_.getParameter<edm::InputTag>("CalibratedL1Rho"), calRho); if(!calRho.isValid()){ evValid=false; edm::LogWarning("MissingProduct") << conf_.getParameter<edm::InputTag>("CalibratedL1Rho") << std::endl; } edm::Handle<L1TowerJetCollection > UnCalibCen; iEvent.getByLabel(conf_.getParameter<edm::InputTag>("FilteredCircle8"), UnCalibCen); if(!UnCalibCen.isValid()){ edm::LogWarning("MissingProduct") << conf_.getParameter<edm::InputTag>("FilteredCircle8") << std::endl; evValid=false; } if( evValid ) { //get rho from the producer L1TowerJetPUSubtraction //This value is calibrated to offline calo rho double cal_rhoL1 = *calRho; // JET VALUES math::PtEtaPhiMLorentzVector upgrade_jet; //Produce calibrated pt collection: central jets for (L1TowerJetCollection::const_iterator il1 = UnCalibCen->begin(); il1!= UnCalibCen->end() ; ++il1 ){ L1TowerJet h=(*il1); // float l1Eta_ = il1->p4().eta(); // float l1Phi_ = il1->p4().phi(); float l1Pt_ = il1->p4().Pt(); //weighted eta is still not correct //change the contents out p4, upgrade_jet when it is corrected float l1wEta_ = il1->WeightedEta(); float l1wPhi_ = il1->WeightedPhi() ; //This is just for 8x8 circular jets: change if using different jets double areaPerJet = 52 * (0.087 * 0.087) ; //PU subtraction float l1Pt_PUsub_ = l1Pt_ - (cal_rhoL1 * areaPerJet); //only keep jet if pt > 0 after PU sub if(l1Pt_PUsub_>0.1){ math::PtEtaPhiMLorentzVector p4; //use weighted eta and phi: these are energy weighted p4.SetCoordinates(l1Pt_PUsub_ , l1wEta_ , l1wPhi_ , il1->p4().M() ); h.setP4(p4); outputCollCen->insert( l1wEta_ , l1wPhi_ , h ); upgrade_jet.SetCoordinates( l1Pt_PUsub_ , l1wEta_ , l1wPhi_ , il1->p4().M() ); // add jet to L1Extra list outputExtraCen->push_back( L1JetParticle( math::PtEtaPhiMLorentzVector( l1Pt_PUsub_, l1wEta_, l1wPhi_, 0. ), Ref< L1GctJetCandCollection >(), 0 ) ); } } } //this is the slhc collection containing extra information iEvent.put(outputCollCen,"PUSubCenJets"); //this is the l1extra collection containing the same jet vector as in slhc collection iEvent.put(outputExtraCen,"PUSubCen8x8"); }
Definition at line 64 of file L1TowerJetPUSubtractedProducer.cc.
Referenced by produce().