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());
101 edm::LogError(
"DQMClientExample") <<
"invalid collection: MET" 111 edm::LogError(
"DQMClientExample") <<
"invalid collection: electrons" 117 int posEle = 0, negEle = 0;
120 for (reco::GsfElectronCollection::const_iterator recoElectron =
electronCollection->begin();
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;
147 edm::LogError(
"DQMClientExample") <<
"invalid collection: jets" 156 for (reco::CaloJetCollection::const_iterator i_calojet =
caloJetCollection->begin();
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" 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) {
293 h_vertex_number = ibooker_.
book1D(
"Vertex_number",
"Number of event vertices in collection", 40, -0.5, 39.5);
295 h_pfMet = ibooker_.
book1D(
"pfMet",
"Pf Missing E_{T}; GeV", 20, 0.0, 100);
318 ibooker_.
book1D(
"EleEta_leading_HLT_matched",
"Eta of leading electron @HLT", 50, -5., 5.);
320 ibooker_.
book1D(
"ElePhi_leading_HLT_matched",
"Phi of leading electron @HLT", 50, -3.5, 3.5);
322 h_ePt_diff = ibooker_.
book1D(
"ElePt_diff_matched",
"pT(RECO) - pT(HLT) for mathed candidates", 100, -10, 10.);
359 bool isMediumEle =
false;
366 float DetaIn =
electron.deltaEtaSuperClusterTrackAtVtx();
367 float DphiIn =
electron.deltaPhiSuperClusterTrackAtVtx();
368 float HOverE =
electron.hadronicOverEm();
372 int nAmbiguousGsfTracks =
electron.ambiguousGsfTracksSize();
385 if ((
pt > 12.) && (fabs(
eta) < 2.5) &&
386 (((
isEB == 1) && (fabs(DetaIn) < 0.004)) || ((
isEB == 0) && (fabs(DetaIn) < 0.007))) &&
387 (((
isEB == 1) && (fabs(DphiIn) < 0.060)) || ((
isEB == 0) && (fabs(DphiIn) < 0.030))) &&
389 (((
isEB == 1) && (HOverE < 0.120)) || ((
isEB == 0) && (HOverE < 0.100))) &&
390 (((
isEB == 1) && (fabs(ooemoop) < 0.050)) || ((
isEB == 0) && (fabs(ooemoop) < 0.050))) &&
391 (((
isEB == 1) && (fabs(
dxy) < 0.020)) || ((
isEB == 0) && (fabs(
dxy) < 0.020))) &&
392 (((
isEB == 1) && (fabs(
dz) < 0.100)) || ((
isEB == 0) && (fabs(
dz) < 0.100))) &&
393 (((
isEB == 1) && (!isConverted)) || ((
isEB == 0) && (!isConverted))) && (mishits == 0) &&
394 (nAmbiguousGsfTracks == 0))
~DQMExample_Step1() override
double calcDeltaPhi(double phi1, double phi2)
MonitorElement * h_ePhi_leading_matched
T getParameter(std::string const &) const
MonitorElement * h_jMultiplicity
bool MediumEle(const edm::Event &iEvent, const edm::EventSetup &iESetup, const reco::GsfElectron &electron)
edm::EDGetTokenT< reco::GsfElectronCollection > theElectronCollection_
Jets made from CaloTowers.
double pt() const final
transverse momentum
const Point & position() const
position
virtual void setCurrentFolder(std::string const &fullpath)
MonitorElement * h_ePhi_leading_HLT_matched
MonitorElement * h_ePhi_leading
MonitorElement * h_eEta_leading_HLT
MonitorElement * h_jPhi_leading
edm::EDGetTokenT< reco::ConversionCollection > theConversionCollection_
edm::EDGetTokenT< trigger::TriggerEvent > triggerEvent_
Log< level::Error, false > LogError
double Distance(const reco::Candidate &c1, const reco::Candidate &c2)
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
T getUntrackedParameter(std::string const &, T const &) const
Single trigger physics object (e.g., an isolated muon)
MonitorElement * h_ePt_diff
MonitorElement * h_ePt_leading_HLT_matched
MonitorElement * h_jEta_leading
void bookHistos(DQMStore::IBooker &)
int pdgId() const
PDG identifier.
double phi() const
momentum azimuthal angle
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)
Log< level::Info, false > LogInfo
static const char *const trigNames[]
double pt() const
transverse momentum
edm::EDGetTokenT< edm::TriggerResults > triggerResults_
MonitorElement * h_jPt_leading
XYZPointD XYZPoint
point in space with cartesian internal representation
std::vector< size_type > Keys
MonitorElement * h_ePt_leading_matched
edm::EDGetTokenT< reco::PFMETCollection > thePfMETCollection_
edm::InputTag triggerFilter_
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
double DistancePhi(const reco::Candidate &c1, const reco::Candidate &c2)
double eta() const
momentum pseudorapidity
void bookHistograms(DQMStore::IBooker &, edm::Run const &, edm::EventSetup const &) override
MonitorElement * h_eMultiplicity_HLT
MonitorElement * book1D(TString const &name, TString const &title, int const nchX, double const lowX, double const highX, FUNC onbooking=NOOP())
double phi() const final
momentum azimuthal angle
MonitorElement * h_eEta_leading_matched
edm::EDGetTokenT< reco::VertexCollection > thePVCollection_
edm::EDGetTokenT< reco::CaloJetCollection > theCaloJetCollection_
virtual const LorentzVector & p4() const =0
four-momentum Lorentz vector
double eta() const final
momentum pseudorapidity
void analyze(edm::Event const &e, edm::EventSetup const &eSetup) override