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>();
96 double significance = signifAlgo.
significance(met_et,met_phi,met_set);
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;
242 std::cout <<
"electron pt = " << electron_iter->pt() <<
" eta : " << electron_iter->eta()
246 double electron_et = electron_iter->et();
247 double electron_phi = electron_iter->phi();
249 double sigma_et, sigma_phi ;
261 std::cout <<
"electron sigma_et : " << sigma_et <<
", electron sigma_phi : " << sigma_phi
264 if(sigma_et< 0 || sigma_phi< 0)
265 edm::LogWarning(
"PATMHTProducer") <<
" uncertainties for " << objectname
266 <<
" are (et, phi): " << sigma_et
267 <<
"," << sigma_phi <<
" (et,phi): " 268 << electron_et <<
"," << electron_phi;
277 number_of_electrons_ ++;
303 return number_of_electrons_;
320 std::cout <<
">>> PATMHTSelector not valid muon Handle!" << std::endl;
325 double number_of_muons_ = 0.0;
332 std::cout <<
"muon pt = " << muon_iter->pt() <<
" eta : " << muon_iter->eta() << std::endl;
335 double muon_pt = muon_iter->pt();
336 double muon_phi = muon_iter->phi();
338 double sigma_et, sigma_phi ;
350 std::cout <<
"muon sigma_et : " << sigma_et
351 <<
", muon sigma_phi : " << sigma_phi
354 if(sigma_et< 0 || sigma_phi< 0)
356 " uncertainties for " << objectname <<
" are (et, phi): " << sigma_et <<
"," <<
357 sigma_phi <<
" (pt,phi): " << muon_pt <<
"," << muon_phi;
370 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_
#define DEFINE_FWK_MODULE(type)
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 &)
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