8 #include "TLorentzVector.h" 22 edm::LogInfo(
"DQMExample_Step1") <<
"Constructor DQMExample_Step1::DQMExample_Step1 " << std::endl;
48 edm::LogInfo(
"DQMExample_Step1") <<
"Destructor DQMExample_Step1::~DQMExample_Step1 " << std::endl;
56 edm::LogInfo(
"DQMExample_Step1") <<
"DQMExample_Step1::beginRun" << std::endl;
63 edm::LogInfo(
"DQMExample_Step1") <<
"DQMExample_Step1::bookHistograms" << std::endl;
73 edm::LogInfo(
"DQMExample_Step1") <<
"DQMExample_Step1::analyze" << std::endl;
81 edm::LogError(
"DQMClientExample") <<
"invalid collection: vertex" 86 int vertex_number = vertexHandle->size();
87 reco::VertexCollection::const_iterator
v = vertexHandle->begin();
90 if (vertex_number != 0)
91 PVPoint =
math::XYZPoint(v->position().x(), v->position().y(), v->position().z());
100 if (!pfMETCollection.
isValid()) {
101 edm::LogError(
"DQMClientExample") <<
"invalid collection: MET" 110 if (!electronCollection.
isValid()) {
111 edm::LogError(
"DQMClientExample") <<
"invalid collection: electrons" 117 int posEle = 0, negEle = 0;
120 for (reco::GsfElectronCollection::const_iterator recoElectron = electronCollection->begin();
121 recoElectron != electronCollection->end();
124 if (
MediumEle(e, eSetup, *recoElectron)) {
126 ele1 = &(*recoElectron);
128 else if (!ele2 && recoElectron->
pt() >
ptThrL2_)
129 ele2 = &(*recoElectron);
132 if (recoElectron->charge() == 1)
134 else if (recoElectron->charge() == -1)
139 nEle = posEle + negEle;
146 if (!caloJetCollection.
isValid()) {
147 edm::LogError(
"DQMClientExample") <<
"invalid collection: jets" 156 for (reco::CaloJetCollection::const_iterator i_calojet = caloJetCollection->begin();
157 i_calojet != caloJetCollection->end();
161 if (
Distance(*i_calojet, *ele1) < 0.3)
165 if (
Distance(*i_calojet, *ele2) < 0.3)
174 jet1 = &(*i_calojet);
177 jet2 = &(*i_calojet);
189 edm::LogError(
"DQMClientExample") <<
"invalid collection: TriggerResults" 194 bool hasFired =
false;
196 unsigned int numTriggers = trigNames.
size();
198 for (
unsigned int hltIndex = 0; hltIndex < numTriggers; ++hltIndex) {
207 edm::LogError(
"DQMClientExample") <<
"invalid collection: TriggerEvent" 217 if (!(filterIndex >= triggerEvent->
sizeFilters())) {
219 std::vector<reco::Particle> triggeredEle;
221 for (
size_t j = 0; j < keys.size(); ++j) {
226 triggeredEle.push_back(foundObject.
particle());
230 if (!triggeredEle.empty())
231 ele1_HLT = &(triggeredEle.at(0));
268 if (ele1 && ele1_HLT &&
deltaR(*ele1_HLT, *ele1) < 0.3 && hasFired ==
true) {
286 edm::LogInfo(
"DQMExample_Step1") <<
"DQMExample_Step1::endRun" << std::endl;
297 h_vertex_number = ibooker_.
book1D(
"Vertex_number",
"Number of event vertices in collection", 40, -0.5, 39.5);
299 h_pfMet = ibooker_.
book1D(
"pfMet",
"Pf Missing E_{T}; GeV", 20, 0.0, 100);
322 ibooker_.
book1D(
"EleEta_leading_HLT_matched",
"Eta of leading electron @HLT", 50, -5., 5.);
324 ibooker_.
book1D(
"ElePhi_leading_HLT_matched",
"Phi of leading electron @HLT", 50, -3.5, 3.5);
326 h_ePt_diff = ibooker_.
book1D(
"ElePt_diff_matched",
"pT(RECO) - pT(HLT) for mathed candidates", 100, -10, 10.);
346 if (deltaPhi > 3.1415926) {
347 deltaPhi = 2 * 3.1415926 -
deltaPhi;
363 bool isMediumEle =
false;
365 float pt = electron.
pt();
366 float eta = electron.
eta();
368 int isEB = electron.
isEB();
389 if ((pt > 12.) && (fabs(eta) < 2.5) &&
390 (((isEB == 1) && (fabs(DetaIn) < 0.004)) || ((isEB == 0) && (fabs(DetaIn) < 0.007))) &&
391 (((isEB == 1) && (fabs(DphiIn) < 0.060)) || ((isEB == 0) && (fabs(DphiIn) < 0.030))) &&
392 (((isEB == 1) && (sigmaIetaIeta < 0.010)) || ((isEB == 0) && (sigmaIetaIeta < 0.030))) &&
393 (((isEB == 1) && (HOverE < 0.120)) || ((isEB == 0) && (HOverE < 0.100))) &&
394 (((isEB == 1) && (fabs(ooemoop) < 0.050)) || ((isEB == 0) && (fabs(ooemoop) < 0.050))) &&
395 (((isEB == 1) && (fabs(dxy) < 0.020)) || ((isEB == 0) && (fabs(dxy) < 0.020))) &&
396 (((isEB == 1) && (fabs(dz) < 0.100)) || ((isEB == 0) && (fabs(dz) < 0.100))) &&
397 (((isEB == 1) && (!isConverted)) || ((isEB == 0) && (!isConverted))) && (mishits == 0) &&
398 (nAmbiguousGsfTracks == 0))
~DQMExample_Step1() override
double calcDeltaPhi(double phi1, double phi2)
MonitorElement * h_ePhi_leading_matched
T getParameter(std::string const &) const
GsfTrackRef gsfTrack() const override
reference to a GsfTrack
T getUntrackedParameter(std::string const &, T const &) const
bool wasrun() const
Was at least one path run?
double pt() const
transverse momentum
MonitorElement * h_jMultiplicity
bool MediumEle(const edm::Event &iEvent, const edm::EventSetup &iESetup, const reco::GsfElectron &electron)
double eta() const final
momentum pseudorapidity
edm::EDGetTokenT< reco::GsfElectronCollection > theElectronCollection_
Jets made from CaloTowers.
trigger::size_type sizeFilters() const
float eSuperClusterOverP() const
bool getByToken(EDGetToken token, Handle< PROD > &result) const
bool accept() const
Has at least one path accepted the event?
const Keys & filterKeys(trigger::size_type index) const
trigger::size_type filterIndex(const edm::InputTag &filterTag) const
find index of filter in data-member vector from filter tag
reco::Particle particle(reco::Particle::Charge q=0, const reco::Particle::Point &vertex=reco::Particle::Point(0, 0, 0), int status=0, bool integerCharge=true) const
MonitorElement * h_ePhi_leading_HLT_matched
double pt() const final
transverse momentum
MonitorElement * h_ePhi_leading
MonitorElement * h_eEta_leading_HLT
MonitorElement * h_jPhi_leading
edm::EDGetTokenT< reco::ConversionCollection > theConversionCollection_
Strings::size_type size() const
edm::EDGetTokenT< trigger::TriggerEvent > triggerEvent_
double Distance(const reco::Candidate &c1, const reco::Candidate &c2)
int pdgId() const
PDG identifier.
DQMExample_Step1(const edm::ParameterSet &ps)
MonitorElement * h_eEta_leading
void dqmBeginRun(edm::Run const &, edm::EventSetup const &) override
edm::EDGetTokenT< reco::BeamSpot > theBSCollection_
MonitorElement * h_ePt_leading_HLT
Single trigger physics object (e.g., an isolated muon)
float deltaEtaSuperClusterTrackAtVtx() const
MonitorElement * h_ePt_diff
MonitorElement * h_ePt_leading_HLT_matched
float sigmaIetaIeta() const
float hadronicOverEm() const
double phi() const
momentum azimuthal angle
MonitorElement * h_jEta_leading
void setCurrentFolder(std::string const &fullpath)
void bookHistos(DQMStore::IBooker &)
virtual const LorentzVector & p4() const =0
four-momentum Lorentz vector
const TriggerObjectCollection & getObjects() const
float deltaPhiSuperClusterTrackAtVtx() const
MonitorElement * book1D(Args &&...args)
Abs< T >::type abs(const T &t)
MonitorElement * h_eEta_leading_HLT_matched
MonitorElement * h_vertex_number
MonitorElement * h_ePt_leading
MonitorElement * h_eMultiplicity
std::vector< TriggerObject > TriggerObjectCollection
collection of trigger physics objects (e.g., all isolated muons)
static const char *const trigNames[]
edm::EDGetTokenT< edm::TriggerResults > triggerResults_
void endRun(edm::Run const &run, edm::EventSetup const &eSetup) override
MonitorElement * h_jPt_leading
std::string const & triggerName(unsigned int index) const
XYZPointD XYZPoint
point in space with cartesian internal representation
std::vector< size_type > Keys
MonitorElement * h_ePt_leading_matched
GsfTrackRefVector::size_type ambiguousGsfTracksSize() const
edm::EDGetTokenT< reco::PFMETCollection > thePfMETCollection_
edm::InputTag triggerFilter_
MonitorElement * h_ePhi_leading_HLT
double DistancePhi(const reco::Candidate &c1, const reco::Candidate &c2)
const Point & position() const
position
void bookHistograms(DQMStore::IBooker &, edm::Run const &, edm::EventSetup const &) override
MonitorElement * h_eMultiplicity_HLT
double eta() const
momentum pseudorapidity
double phi() const final
momentum azimuthal angle
MonitorElement * h_eEta_leading_matched
edm::EDGetTokenT< reco::VertexCollection > thePVCollection_
edm::EDGetTokenT< reco::CaloJetCollection > theCaloJetCollection_
edm::TriggerNames const & triggerNames(edm::TriggerResults const &triggerResults) const override
void analyze(edm::Event const &e, edm::EventSetup const &eSetup) override