50 produces<pat::MHTCollection>();
69 double number_of_jets =
getJets(iEvent, iSetup);
71 double number_of_electrons =
getElectrons(iEvent, iSetup);
73 double number_of_muons =
getMuons(iEvent, iSetup);
76 std::cout <<
">>>---> Number of jets: " << number_of_jets << std::endl;
77 std::cout <<
">>>---> Number of electrons: " << number_of_jets << std::endl;
78 std::cout <<
">>>---> Number of muons: " << number_of_muons << std::endl;
88 auto themetsigcoll = std::make_unique<pat::MHTCollection>();
98 met_x=met_et*
cos(met_phi);
99 met_y=met_et*
sin(met_phi);
102 std::cout <<
">>>----> MHT Sgificance = " << significance << std::endl;
113 themetsigcoll->push_back(themetsigobj);
131 double number_of_jets_ = 0.0;
145 double jet_et = jet_iter->et();
146 double jet_phi = jet_iter->phi();
149 std::cout <<
"jet pt : " << jet_iter->pt() <<
" eta : " << jet_iter->eta()
150 <<
" EMF: " << jet_iter->emEnergyFraction() << std::endl;
153 double sigma_et, sigma_phi ;
165 std::cout <<
"jet sigma_et : " << sigma_et <<
", jet sigma_phi : " << sigma_phi << std::endl;
168 if(sigma_et<=0 || sigma_phi<=0)
170 " uncertainties for " << objectname <<
171 " are (et, phi): " << sigma_et <<
"," << sigma_phi <<
" (et,phi): " << jet_et <<
"," << jet_phi;
185 std::cout <<
"v101> " << number_of_jets_ <<
" " 186 << jet_et <<
" " << sigma_et <<
" " 187 << jet_phi <<
" " << sigma_phi << std::endl;
196 std::vector<CaloTowerPtr> v_towers = jet_iter->getCaloConstituents();
199 for (
unsigned int ii=0;
ii < v_towers.size();
ii++) {
207 std::cout <<
"v101> --------------------------------------------" << std::endl;
210 return number_of_jets_;
223 double number_of_electrons_ = 0.0;
241 std::cout <<
"electron pt = " << electron_iter->pt() <<
" eta : " << electron_iter->eta()
245 double electron_et = electron_iter->et();
246 double electron_phi = electron_iter->phi();
248 double sigma_et, sigma_phi ;
260 std::cout <<
"electron sigma_et : " << sigma_et <<
", electron sigma_phi : " << sigma_phi
263 if(sigma_et< 0 || sigma_phi< 0)
264 edm::LogWarning(
"PATMHTProducer") <<
" uncertainties for " << objectname
265 <<
" are (et, phi): " << sigma_et
266 <<
"," << sigma_phi <<
" (et,phi): " 267 << electron_et <<
"," << electron_phi;
276 number_of_electrons_ ++;
302 return number_of_electrons_;
319 std::cout <<
">>> PATMHTSelector not valid muon Handle!" << std::endl;
324 double number_of_muons_ = 0.0;
331 std::cout <<
"muon pt = " << muon_iter->pt() <<
" eta : " << muon_iter->eta() << std::endl;
334 double muon_pt = muon_iter->pt();
335 double muon_phi = muon_iter->phi();
337 double sigma_et, sigma_phi ;
349 std::cout <<
"muon sigma_et : " << sigma_et
350 <<
", muon sigma_phi : " << sigma_phi
353 if(sigma_et< 0 || sigma_phi< 0)
355 " uncertainties for " << objectname <<
" are (et, phi): " << sigma_et <<
"," <<
356 sigma_phi <<
" (pt,phi): " << muon_pt <<
"," << muon_phi;
369 return number_of_muons_;
T getParameter(std::string const &) const
const void addObjects(const std::vector< metsig::SigInputObj > &EventVec)
T getUntrackedParameter(std::string const &, T const &) const
edm::EDGetTokenT< edm::View< pat::Photon > > phoToken_
OrphanHandle< PROD > put(std::unique_ptr< PROD > product)
Put a new product.
double eleEtUncertaintyParameter0_
uncertaintyFunctions hcalHEUncertainty
void setNumberOfMuons(const double &numberOfMuons)
~PATMHTProducer() override
double getJets(edm::Event &, const edm::EventSetup &)
bool controlledUncertainty_
bool getByToken(EDGetToken token, Handle< PROD > &result) const
double muonPhiUncertaintyParameter0_
std::unique_ptr< TF1 > phiUncertainty
const double significance(double &met_r, double &met_phi, double &met_set)
void setNumberOfJets(const double &numberOfJets)
edm::EDGetTokenT< edm::View< pat::Muon > > muoToken_
uncertaintyFunctions muonUncertainty
Sin< T >::type sin(const T &t)
uncertaintyFunctions ecalEEUncertainty
uncertaintyFunctions jetUncertainty
double jetEtUncertaintyParameter1_
double elePhiUncertaintyParameter0_
double jetEtUncertaintyParameter2_
double jetPhiUncertaintyParameter2_
uncertaintyFunctions hcalHBUncertainty
double getMuons(edm::Event &, const edm::EventSetup &)
#define DEFINE_FWK_MODULE(type)
const_iterator begin() const
edm::EDGetTokenT< edm::View< pat::Tau > > tauToken_
double muonEtUncertaintyParameter0_
PATMHTProducer(const edm::ParameterSet &)
Cos< T >::type cos(const T &t)
void setUncertaintyParameters()
double getElectrons(edm::Event &, const edm::EventSetup &)
uncertaintyFunctions hcalHFUncertainty
std::vector< metsig::SigInputObj > physobjvector_
edm::EDGetTokenT< edm::View< pat::Electron > > eleToken_
double uncertaintyScaleFactor_
edm::InputTag CaloTowerTag_
double jetPhiUncertaintyParameter1_
void produce(edm::Event &, const edm::EventSetup &) override
double jetPhiUncertaintyParameter0_
boost::indirect_iterator< typename seq_t::const_iterator > const_iterator
edm::EDGetTokenT< edm::View< pat::Jet > > jetToken_
const_iterator end() const
uncertaintyFunctions ecalEBUncertainty
double jetEtUncertaintyParameter0_
uncertaintyFunctions hcalHOUncertainty
void setNumberOfElectrons(const double &numberOfElectrons)
math::XYZTLorentzVector LorentzVector
Lorentz vector.
std::unique_ptr< TF1 > etUncertainty
uncertaintyFunctions eleUncertainty
std::set< CaloTowerDetId > s_clusteredTowers