Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

My cmssw 7 2 0 including new muon validation scripts #6101

Closed
wants to merge 44 commits into from
Closed
Show file tree
Hide file tree
Changes from all commits
Commits
Show all changes
44 commits
Select commit Hold shift + click to select a range
9543854
first attempt at extending the InputGenJetsParticleSelector with supp…
ferencek Sep 23, 2014
634e5af
prunedGenParticle collection now has a default value assigned
ferencek Sep 24, 2014
f7e5bb5
excluding status=1 particles from the prunedGenParticle collection to…
ferencek Oct 3, 2014
dd716fb
Change the top level directory to "HLT"
Oct 8, 2014
2da1799
switched to using already defined reco::CandidateView typedef
ferencek Oct 8, 2014
0487f7f
switched the tau validation code from a GenParticleRef selector to a …
ferencek Oct 8, 2014
3dfedfa
Merge pull request #5601 from syuvivida/73x_fixXSec_eiko
nclopezo Sep 29, 2014
3fd72e6
improve printout in GenXSecAnalyzer and add to default filter summary…
bendavid Sep 29, 2014
15f59c5
add missing dictionary for GenLumiInfoProduct data member
bendavid Sep 30, 2014
84f37ff
skip cross-section calculation if GenLumiInfo is not available (eg fo…
bendavid Sep 30, 2014
2eeedad
threading improvements
bendavid Sep 30, 2014
d2fcc15
move from cout to LogPrint
bendavid Sep 30, 2014
0a6c5b7
Update RelVal input.
Oct 9, 2014
5ff8563
adding new btag discriminators now run in the standard Reco sequence
ferencek Oct 7, 2014
109251e
don't exclude resonance decay products from gen jets, since this cann…
bendavid Sep 30, 2014
55d20dd
New paths for muonic channel in Top PAG validation codes
Oct 9, 2014
d17e1f2
New paths for muonic channel in Top PAG validation and offline dqm codes
Oct 9, 2014
89ad36d
added comments about the selection of stable and unstable particles i…
ferencek Oct 9, 2014
7953a42
keeping temporary old paths
Oct 10, 2014
77ae5bd
syncing 72X with 71X
yiiyama Oct 10, 2014
95c6e8a
Synching 72 with 73
yiiyama Oct 11, 2014
46a242f
update the list of paths tracked in the muon DQM
Oct 12, 2014
bc43c95
Make sure PLS1 Customisation uses nwe HF shower library
mdhildreth Oct 14, 2014
3635b8b
replicate standalone pythia8 behaviour for lhe energy-momentum treatment
bendavid Oct 13, 2014
8238512
Merge pull request #5760 from vadler/72X-updateRelValInputForBTagging
davidlange6 Oct 15, 2014
f1f832b
Merge pull request #5756 from bendavid/genxsecfixes_72x
davidlange6 Oct 15, 2014
0534d57
Merge pull request #5811 from mdhildreth/PreMix_HFShowerLib
davidlange6 Oct 15, 2014
245c7f2
Merge pull request #5791 from HuguesBrun/updateMuonDQMwithNewSingleMu…
davidlange6 Oct 15, 2014
0dc083b
Merge pull request #5763 from ebouvier/NewMuPathsForTopHltPagValidati…
davidlange6 Oct 15, 2014
9430230
Merge pull request #5731 from ferencek/MiniAODForInputGenJetsParticle…
davidlange6 Oct 15, 2014
b272dc3
Merge pull request #5747 from jruizvar/fix-hlt-susybsm
davidlange6 Oct 15, 2014
56ca13c
Merge pull request #5786 from yiiyama/ecaldqm-harvesting-bugfix
davidlange6 Oct 15, 2014
ec520c7
Allow back two template muon paths in GRun (with PS=0), as for CMSHLT…
perrotta Oct 15, 2014
753d15d
Merge pull request #5780 from yiiyama/ecaldqm-online-config-72X
davidlange6 Oct 15, 2014
33663f5
Merge pull request #5819 from bendavid/py8200final_72x
aledegano Oct 15, 2014
ad1adef
Merge pull request #5803 from rappoccio/rappoccio_72x_jec_exception
davidlange6 Oct 15, 2014
01c259f
add back ak5 to list of genjets to be dropped in REGEN workflow
bendavid Oct 15, 2014
7b5f333
Workaround for problem with remoteX connections using Quartz 2.7.7.
alja Oct 15, 2014
8112dd3
Merge pull request #5843 from alja/macX_72
davidlange6 Oct 16, 2014
62c9437
Merge pull request #5836 from bendavid/regenfix72x
davidlange6 Oct 16, 2014
0f684e1
Merge pull request #5833 from silviodonato/fastpv-ptweight
davidlange6 Oct 16, 2014
e11f2d9
Merge pull request #5830 from perrotta/fixedHltFor72X
davidlange6 Oct 16, 2014
51f3928
New validation scripts with input parameters set in the file userpara…
ndefilip Oct 29, 2014
78e478d
Script for muon validation summary
ndefilip Oct 30, 2014
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Jump to
Jump to file
Failed to load files.
Diff view
Diff view
Original file line number Diff line number Diff line change
Expand Up @@ -14,6 +14,7 @@
#include <algorithm>
#include <iostream>
#include "FWCore/Utilities/interface/Exception.h"
#include "FWCore/MessageLogger/interface/MessageLogger.h"

class JetCorrectorParameters
{
Expand Down
4 changes: 2 additions & 2 deletions CondFormats/JetMETObjects/interface/Utilities.h
Original file line number Diff line number Diff line change
Expand Up @@ -4,7 +4,7 @@
#ifdef STANDALONE
#include <stdexcept>
#else
#include "FWCore/Utilities/interface/Exception.h"
#include "FWCore/MessageLogger/interface/MessageLogger.h"
#endif

#include <cstdlib>
Expand All @@ -22,7 +22,7 @@ namespace
sserr<<fClass<<" ERROR: "<<fMessage;
throw std::runtime_error(sserr.str());
#else
throw cms::Exception(fClass)<<fMessage;
edm::LogError(fClass) << fMessage;
#endif
}
//----------------------------------------------------------------------
Expand Down
101 changes: 65 additions & 36 deletions CondFormats/JetMETObjects/src/JetCorrectionUncertainty.cc
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
#include "CondFormats/JetMETObjects/interface/JetCorrectionUncertainty.h"
#include "CondFormats/JetMETObjects/interface/SimpleJetCorrectionUncertainty.h"
#include "CondFormats/JetMETObjects/interface/JetCorrectorParameters.h"
#include "FWCore/Utilities/interface/Exception.h"
#include "FWCore/MessageLogger/interface/MessageLogger.h"
#include "Math/PtEtaPhiE4D.h"
#include "Math/Vector3D.h"
#include "Math/LorentzVector.h"
Expand Down Expand Up @@ -114,54 +114,81 @@ std::vector<float> JetCorrectionUncertainty::fillVector(const std::vector<std::s
{
if (fNames[i] == "JetEta")
{
if (!mIsJetEtaset)
throw cms::Exception("JetCorrectionUncertainty::")<<" jet eta is not set";
result.push_back(mJetEta);
if (!mIsJetEtaset) {
edm::LogError("JetCorrectionUncertainty::")<<" jet eta is not set";
result.push_back(-999.0);
} else {
result.push_back(mJetEta);
}
}
else if (fNames[i] == "JetPt")
{
if (!mIsJetPtset)
throw cms::Exception("JetCorrectionUncertainty::")<<" jet pt is not set";
result.push_back(mJetPt);
if (!mIsJetPtset){
edm::LogError("JetCorrectionUncertainty::")<<" jet pt is not set";
result.push_back(-999.0);
} else {
result.push_back(mJetPt);
}
}
else if (fNames[i] == "JetPhi")
{
if (!mIsJetPhiset)
throw cms::Exception("JetCorrectionUncertainty::")<<" jet phi is not set";
result.push_back(mJetPt);
if (!mIsJetPhiset) {
edm::LogError("JetCorrectionUncertainty::")<<" jet phi is not set";
result.push_back(-999.0);
} else {
result.push_back(mJetPt);
}
}
else if (fNames[i] == "JetE")
{
if (!mIsJetEset)
throw cms::Exception("JetCorrectionUncertainty::")<<" jet energy is not set";
result.push_back(mJetE);
if (!mIsJetEset) {
edm::LogError("JetCorrectionUncertainty::")<<" jet energy is not set";
result.push_back(-999.0);
} else {
result.push_back(mJetE);
}
}
else if (fNames[i] == "JetEMF")
{
if (!mIsJetEMFset)
throw cms::Exception("JetCorrectionUncertainty::")<<" jet emf is not set";
result.push_back(mJetEMF);
if (!mIsJetEMFset) {
edm::LogError("JetCorrectionUncertainty::")<<" jet emf is not set";
result.push_back(-999.0);
} else {
result.push_back(mJetEMF);
}
}
else if (fNames[i] == "LepPx")
{
if (!mIsLepPxset)
throw cms::Exception("JetCorrectionUncertainty::")<<" lepton px is not set";
result.push_back(mLepPx);
if (!mIsLepPxset){
edm::LogError("JetCorrectionUncertainty::")<<" lepton px is not set";
result.push_back(-999.0);
} else {
result.push_back(mLepPx);
}
}
else if (fNames[i] == "LepPy")
{
if (!mIsLepPyset)
throw cms::Exception("JetCorrectionUncertainty::")<<" lepton py is not set";
result.push_back(mLepPy);
if (!mIsLepPyset){
edm::LogError("JetCorrectionUncertainty::")<<" lepton py is not set";
result.push_back(-999.0);
} else {
result.push_back(mLepPy);
}
}
else if (fNames[i] == "LepPz")
{
if (!mIsLepPzset)
throw cms::Exception("JetCorrectionUncertainty::")<<" lepton pz is not set";
result.push_back(mLepPz);
if (!mIsLepPzset){
edm::LogError("JetCorrectionUncertainty::")<<" lepton pz is not set";
result.push_back(-999.0);
} else {
result.push_back(mLepPz);
}
}
else
throw cms::Exception("JetCorrectionUncertainty::")<<" unknown parameter "<<fNames[i];

else {
edm::LogError("JetCorrectionUncertainty::")<<" unknown parameter "<<fNames[i];
result.push_back(-999.0);
}
}
return result;
}
Expand All @@ -184,15 +211,17 @@ float JetCorrectionUncertainty::getPtRel()
float lj_z = (mAddLepToJet) ? lep.Z()+jet.Pz() : jet.Pz();
// absolute values squared
float lj2 = lj_x*lj_x+lj_y*lj_y+lj_z*lj_z;
if (!(lj2 > 0))
throw cms::Exception("JetCorrectionUncertainty")<<" not positive lepton-jet momentum: "<<lj2;
float lep2 = lep.X()*lep.X()+lep.Y()*lep.Y()+lep.Z()*lep.Z();
// projection vec(mu) to lepjet axis
float lepXlj = lep.X()*lj_x+lep.Y()*lj_y+lep.Z()*lj_z;
// absolute value squared and normalized
float pLrel2 = lepXlj*lepXlj/lj2;
// lep2 = pTrel2 + pLrel2
float pTrel2 = lep2-pLrel2;
float pTrel2 = -999.0;
if (lj2 > 0) {
float lep2 = lep.X()*lep.X()+lep.Y()*lep.Y()+lep.Z()*lep.Z();
// projection vec(mu) to lepjet axis
float lepXlj = lep.X()*lj_x+lep.Y()*lj_y+lep.Z()*lj_z;
// absolute value squared and normalized
float pLrel2 = lepXlj*lepXlj/lj2;
// lep2 = pTrel2 + pLrel2
pTrel2 = lep2-pLrel2;
} else
edm::LogError("JetCorrectionUncertainty")<<" not positive lepton-jet momentum: "<<lj2;
return (pTrel2 > 0) ? std::sqrt(pTrel2) : 0.0;
}
//------------------------------------------------------------------------
Expand Down
22 changes: 14 additions & 8 deletions CondFormats/JetMETObjects/src/SimpleJetCorrectionUncertainty.cc
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
#include "CondFormats/JetMETObjects/interface/SimpleJetCorrectionUncertainty.h"
#include "CondFormats/JetMETObjects/interface/JetCorrectorParameters.h"
#include "FWCore/Utilities/interface/Exception.h"
#include "FWCore/MessageLogger/interface/MessageLogger.h"
#include <vector>
#include <string>

Expand Down Expand Up @@ -29,16 +29,20 @@ float SimpleJetCorrectionUncertainty::uncertainty(const std::vector<float>& fX,
{
float result = 1.;
int bin = mParameters->binIndex(fX);
if (bin<0)
throw cms::Exception("SimpleJetCorrectionUncertainty")<<" bin variables out of range";
result = uncertaintyBin((unsigned)bin,fY,fDirection);
if (bin<0) {
edm::LogError("SimpleJetCorrectionUncertainty")<<" bin variables out of range";
result = -999.0;
} else
result = uncertaintyBin((unsigned)bin,fY,fDirection);
return result;
}
/////////////////////////////////////////////////////////////////////////
float SimpleJetCorrectionUncertainty::uncertaintyBin(unsigned fBin, float fY, bool fDirection) const
{
if (fBin >= mParameters->size())
throw cms::Exception("SimpleJetCorrectionUncertainty")<<" wrong bin: "<<fBin<<": only "<<mParameters->size()<<" are available";
if (fBin >= mParameters->size()) {
edm::LogError("SimpleJetCorrectionUncertainty")<<" wrong bin: "<<fBin<<": only "<<mParameters->size()<<" are available";
return -999.0;
}
const std::vector<float>& p = mParameters->record(fBin).parameters();
if ((p.size() % 3) != 0)
throw cms::Exception ("SimpleJetCorrectionUncertainty")<<"wrong # of parameters: multiple of 3 expected, "<<p.size()<< " got";
Expand Down Expand Up @@ -81,8 +85,10 @@ float SimpleJetCorrectionUncertainty::linearInterpolation(float fZ, const float
{
if (fY[0] == fY[1])
r = fY[0];
else
throw cms::Exception("SimpleJetCorrectionUncertainty")<<" interpolation error";
else {
edm::LogError("SimpleJetCorrectionUncertainty")<<" interpolation error";
return -999.0;
}
}
else
{
Expand Down
1 change: 1 addition & 0 deletions Configuration/EventContent/python/EventContent_cff.py
Original file line number Diff line number Diff line change
Expand Up @@ -718,6 +718,7 @@
'drop *_kt6GenJets_*_*',
'drop *_iterativeCone5GenJets_*_*',
'drop *_ak4GenJets_*_*',
'drop *_ak5GenJets_*_*',
'drop *_ak7GenJets_*_*',
'drop *_genCandidatesForMET_*_*',
'drop *_genParticlesForMETAllVisible_*_*',
Expand Down
2 changes: 1 addition & 1 deletion DQM/EcalCommon/interface/DQWorker.h
Original file line number Diff line number Diff line change
Expand Up @@ -57,7 +57,6 @@ namespace ecaldqm{
virtual void beginLuminosityBlock(edm::LuminosityBlock const&, edm::EventSetup const&) {}
virtual void endLuminosityBlock(edm::LuminosityBlock const&, edm::EventSetup const&) {}

virtual void bookMEs(DQMStore&);
virtual void bookMEs(DQMStore::IBooker&);
virtual void releaseMEs();

Expand All @@ -74,6 +73,7 @@ namespace ecaldqm{

std::string name_;
MESetCollection MEs_;
bool booked_;

Timestamp timestamp_;
int verbosity_;
Expand Down
13 changes: 1 addition & 12 deletions DQM/EcalCommon/interface/EcalDQMonitor.h
Original file line number Diff line number Diff line change
Expand Up @@ -7,6 +7,7 @@
#include "DQWorker.h"

#include "FWCore/MessageLogger/interface/MessageLogger.h"
#include "DQMServices/Core/interface/DQMStore.h"

namespace edm
{
Expand All @@ -27,8 +28,6 @@ namespace ecaldqm

protected:
void ecaldqmGetSetupObjects(edm::EventSetup const&);
template<typename Booker> void ecaldqmBookHistograms(Booker&);
void ecaldqmReleaseHistograms();
void ecaldqmBeginRun(edm::Run const&, edm::EventSetup const&);
void ecaldqmEndRun(edm::Run const&, edm::EventSetup const&);
void ecaldqmBeginLuminosityBlock(edm::LuminosityBlock const&, edm::EventSetup const&);
Expand All @@ -41,16 +40,6 @@ namespace ecaldqm
int const verbosity_;
};

template<typename Booker>
void
EcalDQMonitor::ecaldqmBookHistograms(Booker& _booker)
{
executeOnWorkers_([&_booker](ecaldqm::DQWorker* worker){
worker->releaseMEs();
worker->bookMEs(_booker);
}, "bookMEs", "Booking MEs");
}

template<typename FuncOnWorker>
void
EcalDQMonitor::executeOnWorkers_(FuncOnWorker _func, std::string const& _context, std::string const& _message/* = ""*/, int _verbThreshold/* = 1*/)
Expand Down
11 changes: 5 additions & 6 deletions DQM/EcalCommon/interface/EcalMEFormatter.h
Original file line number Diff line number Diff line change
@@ -1,24 +1,23 @@
#ifndef EcalMEFormatter_H
#define EcalMEFormatter_H

#include "FWCore/Framework/interface/EDAnalyzer.h"
#include "DQMServices/Core/interface/DQMEDHarvester.h"

#include "DQM/EcalCommon/interface/DQWorker.h"
#include "DQM/EcalCommon/interface/MESet.h"

class EcalMEFormatter : public edm::EDAnalyzer, public ecaldqm::DQWorker {
class EcalMEFormatter : public DQMEDHarvester, public ecaldqm::DQWorker {
public:
EcalMEFormatter(edm::ParameterSet const&);
~EcalMEFormatter() {};

static void fillDescriptions(edm::ConfigurationDescriptions&);

private:
void endLuminosityBlock(edm::LuminosityBlock const&, edm::EventSetup const&) override;
void endRun(edm::Run const&, edm::EventSetup const&) override;
void analyze(edm::Event const&, edm::EventSetup const&) override {}
void dqmEndLuminosityBlock(DQMStore::IBooker&, DQMStore::IGetter&, edm::LuminosityBlock const&, edm::EventSetup const&) override;
void dqmEndJob(DQMStore::IBooker&, DQMStore::IGetter&) override;

void format_(bool);
void format_(DQMStore::IGetter&, bool);
void formatDet2D_(ecaldqm::MESet&);
};

Expand Down
3 changes: 1 addition & 2 deletions DQM/EcalCommon/interface/MESet.h
Original file line number Diff line number Diff line change
Expand Up @@ -39,9 +39,8 @@ namespace ecaldqm

virtual MESet* clone(std::string const& = "") const;

virtual void book(DQMStore&) {}
virtual void book(DQMStore::IBooker&) {}
virtual bool retrieve(DQMStore const&, std::string* = 0) const { return false; }
virtual bool retrieve(DQMStore::IGetter&, std::string* = 0) const { return false; }
virtual void clear() const;

virtual void fill(DetId const&, double = 1., double = 1., double = 1.) {}
Expand Down
8 changes: 4 additions & 4 deletions DQM/EcalCommon/interface/MESetBinningUtils.h
Original file line number Diff line number Diff line change
Expand Up @@ -72,16 +72,16 @@ namespace ecaldqm

struct AxisSpecs {
int nbins;
double low, high;
double* edges;
float low, high;
float* edges;
std::string* labels;
std::string title;
AxisSpecs() : nbins(0), low(0.), high(0.), edges(0), labels(0), title("") {}
AxisSpecs(AxisSpecs const& _specs) :
nbins(_specs.nbins), low(_specs.low), high(_specs.high), edges(0), labels(0), title(_specs.title)
{
if(_specs.edges){
edges = new double[nbins + 1];
edges = new float[nbins + 1];
for(int i(0); i <= nbins; i++) edges[i] = _specs.edges[i];
}
if(_specs.labels){
Expand All @@ -95,7 +95,7 @@ namespace ecaldqm
if(labels){ delete [] labels; labels = 0; }
nbins = _rhs.nbins; low = _rhs.low; high = _rhs.high; title = _rhs.title;
if(_rhs.edges){
edges = new double[nbins + 1];
edges = new float[nbins + 1];
for(int i(0); i <= nbins; i++) edges[i] = _rhs.edges[i];
}
if(_rhs.labels){
Expand Down
3 changes: 1 addition & 2 deletions DQM/EcalCommon/interface/MESetChannel.h
Original file line number Diff line number Diff line change
Expand Up @@ -27,9 +27,8 @@ namespace ecaldqm

MESet* clone(std::string const& = "") const override;

void book(DQMStore&) override;
void book(DQMStore::IBooker&) override;
bool retrieve(DQMStore const&, std::string* = 0) const override;
bool retrieve(DQMStore::IGetter&, std::string* = 0) const override;
void clear() const override;

void fill(DetId const&, double = 1., double = 0., double = 0.) override;
Expand Down
4 changes: 0 additions & 4 deletions DQM/EcalCommon/interface/MESetDet1D.h
Original file line number Diff line number Diff line change
Expand Up @@ -20,7 +20,6 @@ namespace ecaldqm

MESet* clone(std::string const& = "") const override;

void book(DQMStore&) override;
void book(DQMStore::IBooker&) override;

void fill(DetId const&, double = 1., double = 1., double = 0.) override;
Expand Down Expand Up @@ -68,9 +67,6 @@ namespace ecaldqm
int findBin(int, double, double = 0.) const override;

void reset(double = 0., double = 0., double = 0.) override;

private:
template<class Bookable> void doBook_(Bookable&);
};
}

Expand Down
4 changes: 0 additions & 4 deletions DQM/EcalCommon/interface/MESetDet2D.h
Original file line number Diff line number Diff line change
Expand Up @@ -18,7 +18,6 @@ namespace ecaldqm

MESet* clone(std::string const& = "") const override;

void book(DQMStore&) override;
void book(DQMStore::IBooker&) override;

void fill(DetId const&, double = 1., double = 0., double = 0.) override;
Expand Down Expand Up @@ -60,9 +59,6 @@ namespace ecaldqm
void fill_(unsigned, int, double) override;
void fill_(unsigned, int, double, double) override;
void fill_(unsigned, double, double, double) override;

private:
template<class Bookable> void doBook_(Bookable&);
};
}

Expand Down