41 static
double CalcR(
double MR,
107 njets_(iConfig.getParameter<
unsigned int>("
njets")),
108 rsqCut_(iConfig.getParameter<
double>("rsqCut")),
109 mrCut_(iConfig.getParameter<
double>("mrCut")) {}
151 histtitle =
"PF Rsq";
162 histname =
"MRVsRsq";
163 histtitle =
"PF MR vs PF Rsq";
189 std::vector<reco::PFJet>
jets;
190 if (jetHandle->size() <
njets_)
192 for (
auto const&
j : *jetHandle) {
209 edm::LogError(
"DQM_HLT_Razor") <<
"Cannot calculate M_R and R^2 because there are too many jets! (trigger passed " 210 "automatically without forming the hemispheres)" 224 double MR = 0,
R = 0;
278 desc.add<
bool>(
"requireValidHLTPaths",
true);
283 ->setComment(
"hemisphere jets used to compute razor variables");
288 desc.add<
unsigned int>(
"njets", 2);
289 desc.add<
double>(
"mrCut", 300);
290 desc.add<
double>(
"rsqCut", 0.15);
299 std::vector<double> mrbins = {0., 100., 200., 300., 400., 500., 575., 650., 750., 900., 1200., 1600., 2500., 4000.};
300 histoPSet.add<std::vector<double> >(
"mrBins", mrbins);
302 std::vector<double> rsqbins = {0., 0.05, 0.1, 0.15, 0.2, 0.25, 0.30, 0.41, 0.52, 0.64, 0.8, 1.5};
303 histoPSet.add<std::vector<double> >(
"rsqBins", rsqbins);
305 std::vector<double> dphirbins = {0., 0.5, 1.0, 1.5, 2.0, 2.5, 2.8, 3.0, 3.2};
306 histoPSet.add<std::vector<double> >(
"dphiRBins", dphirbins);
310 descriptions.
add(
"razorMonitoring",
desc);
323 jaT.SetXYZ(ja.Px(), ja.Py(), 0.0);
324 jbT.SetXYZ(jb.Px(), jb.Py(), 0.0);
325 double ATBT = (jaT + jbT).Mag2();
327 double MR =
sqrt((
A +
B) * (
A +
B) - (az + bz) * (az + bz) -
328 (jbT.Dot(jbT) - jaT.Dot(jaT)) * (jbT.Dot(jbT) - jaT.Dot(jaT)) / (jaT + jbT).Mag2());
329 double mybeta = (jbT.Dot(jbT) - jaT.Dot(jaT)) /
sqrt(ATBT * ((
A +
B) * (
A +
B) - (az + bz) * (az + bz)));
331 double mygamma = 1. /
sqrt(1. - mybeta * mybeta);
340 const edm::Handle<std::vector<reco::PFMET> >& inputMet) {
344 double MTR =
sqrt(0.5 * (
met.R() * (ja.Pt() + jb.Pt()) -
met.Dot(ja.Vect() + jb.Vect())));
dqm::reco::MonitorElement MonitorElement
edm::EDGetTokenT< reco::PFJetCollection > jetToken_
edm::EDGetTokenT< reco::PFMETCollection > metToken_
std::unique_ptr< GenericTriggerEventFlag > num_genTriggerEventFlag_
static double CalcMR(const math::XYZTLorentzVector &ja, const math::XYZTLorentzVector &jb)
virtual void setCurrentFolder(std::string const &fullpath)
Provides a code based selection for trigger and DCS information in order to have no failing filters i...
Log< level::Error, false > LogError
void analyze(edm::Event const &iEvent, edm::EventSetup const &iSetup) override
denGenericTriggerEventPSet
std::unique_ptr< T, impl::DeviceDeleter > unique_ptr
void setMETitle(ObjME &me, const std::string &titleX, const std::string &titleY)
XYZTLorentzVectorD XYZTLorentzVector
Lorentz vector with cylindrical internal representation using pseudorapidity.
StringCutObjectSelector< reco::MET, true > metSelection_
edm::EDGetTokenT< std::vector< math::XYZTLorentzVector > > theHemispheres_
std::vector< double > mr_binning_
MonitorElement * denominator
MonitorElement * numerator
Abs< T >::type abs(const T &t)
#define DEFINE_FWK_MODULE(type)
std::vector< double > dphiR_binning_
StringCutObjectSelector< reco::PFJet, true > jetSelection_
std::vector< double > rsq_binning_
XYZVectorD XYZVector
spatial vector with cartesian internal representation
std::unique_ptr< GenericTriggerEventFlag > den_genTriggerEventFlag_
void add(std::string const &label, ParameterSetDescription const &psetDescription)
void bookME(DQMStore::IBooker &, ObjME &me, const std::string &histname, const std::string &histtitle, const uint nbins, const double xmin, const double xmax, const bool bookDen=true)
dqm::reco::DQMStore DQMStore
static void fillDescriptions(edm::ConfigurationDescriptions &descriptions)
std::vector< PFJet > PFJetCollection
collection of PFJet objects
void bookHistograms(DQMStore::IBooker &, edm::Run const &, edm::EventSetup const &) override
RazorMonitor(const edm::ParameterSet &)
static double CalcR(double MR, const math::XYZTLorentzVector &ja, const math::XYZTLorentzVector &jb, const edm::Handle< std::vector< reco::PFMET > > &met)
static void fillPSetDescription(edm::ParameterSetDescription &desc)
numGenericTriggerEventPSet
const std::string folderName_
const bool requireValidHLTPaths_
math::XYZTLorentzVector XYZTLorentzVector
Computes the MET from a collection of PFCandidates. HF missing!