9 #include "TLorentzVector.h"
24 edm::LogInfo(
"DQMExample_Step1") <<
"Constructor DQMExample_Step1::DQMExample_Step1 " << std::endl;
54 edm::LogInfo(
"DQMExample_Step1") <<
"Destructor DQMExample_Step1::~DQMExample_Step1 " << std::endl;
62 edm::LogInfo(
"DQMExample_Step1") <<
"DQMExample_Step1::beginJob " << std::endl;
69 edm::LogInfo(
"DQMExample_Step1") <<
"DQMExample_Step1::beginRun" << std::endl;
80 edm::LogInfo(
"DQMExample_Step1") <<
"DQMExample_Step1::beginLuminosityBlock" << std::endl;
89 edm::LogInfo(
"DQMExample_Step1") <<
"DQMExample_Step1::analyze" << std::endl;
99 edm::LogError (
"DQMClientExample") <<
"invalid collection: vertex" <<
"\n";
103 int vertex_number = vertexHandle->size();
104 reco::VertexCollection::const_iterator
v = vertexHandle->begin();
107 if(vertex_number != 0)
108 PVPoint =
math::XYZPoint(v->position().x(), v->position().y(), v->position().z());
117 if ( !pfMETCollection.
isValid() )
119 edm::LogError (
"DQMClientExample") <<
"invalid collection: MET" <<
"\n";
127 if ( !electronCollection.
isValid() )
129 edm::LogError (
"DQMClientExample") <<
"invalid collection: electrons" <<
"\n";
134 int posEle=0, negEle=0;
137 for (reco::GsfElectronCollection::const_iterator recoElectron=electronCollection->begin(); recoElectron!=electronCollection->end(); ++recoElectron)
143 ele1 = &(*recoElectron);
145 else if(!ele2 && recoElectron->
pt() >
ptThrL2_)
146 ele2 = &(*recoElectron);
150 if(recoElectron->charge()==1)
152 else if(recoElectron->charge()==-1)
157 nEle = posEle+negEle;
164 if ( !caloJetCollection.
isValid() )
166 edm::LogError (
"DQMClientExample") <<
"invalid collection: jets" <<
"\n";
174 for (reco::CaloJetCollection::const_iterator i_calojet = caloJetCollection->begin(); i_calojet != caloJetCollection->end(); ++i_calojet)
178 if (
Distance(*i_calojet,*ele1) < 0.3)
continue;
181 if (
Distance(*i_calojet,*ele2) < 0.3)
continue;
183 if (i_calojet->pt() <
ptThrJet_)
continue;
188 jet1 = &(*i_calojet);
191 jet2 = &(*i_calojet);
204 edm::LogError (
"DQMClientExample") <<
"invalid collection: TriggerResults" <<
"\n";
208 bool hasFired =
false;
210 unsigned int numTriggers = trigNames.
size();
212 for(
unsigned int hltIndex=0; hltIndex<numTriggers; ++hltIndex )
214 if (trigNames.
triggerName(hltIndex)==
triggerPath_ && hltresults->wasrun(hltIndex) && hltresults->accept(hltIndex))
225 edm::LogError (
"DQMClientExample") <<
"invalid collection: TriggerEvent" <<
"\n";
235 if( !(filterIndex >= triggerEvent->sizeFilters()) )
238 std::vector<reco::Particle> triggeredEle;
240 for(
size_t j = 0;
j < keys.size(); ++
j )
245 triggeredEle.push_back( foundObject.
particle() );
249 if( triggeredEle.size() >= 1 )
250 ele1_HLT = &(triggeredEle.at(0));
291 if( ele1 && ele1_HLT &&
deltaR(*ele1_HLT,*ele1) < 0.3 && hasFired==
true )
309 edm::LogInfo(
"DQMExample_Step1") <<
"DQMExample_Step1::endLuminosityBlock" << std::endl;
318 edm::LogInfo(
"DQMExample_Step1") <<
"DQMExample_Step1::endRun" << std::endl;
326 edm::LogInfo(
"DQMExample_Step1") <<
"DQMExample_Step1::endJob" << std::endl;
338 h_vertex_number = dbe->
book1D(
"Vertex_number",
"Number of event vertices in collection", 40,-0.5, 39.5 );
340 h_pfMet = dbe->
book1D(
"pfMet",
"Pf Missing E_{T}; GeV" , 20, 0.0 , 100);
365 h_ePt_diff =
dbe_->
book1D(
"ElePt_diff_matched",
"pT(RECO) - pT(HLT) for mathed candidates",100,-10,10.);
386 if (deltaPhi < 0) deltaPhi = -
deltaPhi;
387 if (deltaPhi > 3.1415926) {
388 deltaPhi = 2 * 3.1415926 -
deltaPhi;
403 bool isMediumEle =
false;
405 float pt = electron.
pt();
406 float eta = electron.
eta();
408 int isEB = electron.
isEB();
415 int mishits = electron.
gsfTrack()->trackerExpectedHitsInner().numberOfHits();
419 float dxy = eleTrack->dxy(
PVPoint_);
429 if( (pt > 12.) && (fabs(eta) < 2.5) &&
430 ( ( (isEB == 1) && (fabs(DetaIn) < 0.004) ) || ( (isEB == 0) && (fabs(DetaIn) < 0.007) ) ) &&
431 ( ( (isEB == 1) && (fabs(DphiIn) < 0.060) ) || ( (isEB == 0) && (fabs(DphiIn) < 0.030) ) ) &&
432 ( ( (isEB == 1) && (sigmaIetaIeta < 0.010) ) || ( (isEB == 0) && (sigmaIetaIeta < 0.030) ) ) &&
433 ( ( (isEB == 1) && (HOverE < 0.120) ) || ( (isEB == 0) && (HOverE < 0.100) ) ) &&
434 ( ( (isEB == 1) && (fabs(ooemoop) < 0.050) ) || ( (isEB == 0) && (fabs(ooemoop) < 0.050) ) ) &&
435 ( ( (isEB == 1) && (fabs(dxy) < 0.020) ) || ( (isEB == 0) && (fabs(dxy) < 0.020) ) ) &&
436 ( ( (isEB == 1) && (fabs(dz) < 0.100) ) || ( (isEB == 0) && (fabs(dz) < 0.100) ) ) &&
437 ( ( (isEB == 1) && (!isConverted) ) || ( (isEB == 0) && (!isConverted) ) ) &&
439 ( nAmbiguousGsfTracks == 0 )
double calcDeltaPhi(double phi1, double phi2)
MonitorElement * h_ePhi_leading_matched
T getParameter(std::string const &) const
T getUntrackedParameter(std::string const &, T const &) const
virtual edm::TriggerNames const & triggerNames(edm::TriggerResults const &triggerResults) 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.
float eSuperClusterOverP() const
MonitorElement * book1D(const char *name, const char *title, int nchX, double lowX, double highX)
Book 1D histogram.
bool getByToken(EDGetToken token, Handle< PROD > &result) const
void cd(void)
go to top directory (ie. root)
void endLuminosityBlock(edm::LuminosityBlock const &lumi, edm::EventSetup const &eSetup)
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
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_
void bookHistos(DQMStore *dbe_)
double Distance(const reco::Candidate &c1, const reco::Candidate &c2)
double eta() const
momentum pseudorapidity
DQMExample_Step1(const edm::ParameterSet &ps)
MonitorElement * h_eEta_leading
edm::EDGetTokenT< reco::BeamSpot > theBSCollection_
MonitorElement * h_ePt_leading_HLT
Single trigger physics object (e.g., an isolated muon)
double phi() const
momentum azimuthal angle
virtual float phi() const GCC11_FINAL
momentum azimuthal angle
float deltaEtaSuperClusterTrackAtVtx() const
MonitorElement * h_ePt_diff
MonitorElement * h_ePt_leading_HLT_matched
float sigmaIetaIeta() const
float hadronicOverEm() const
MonitorElement * h_jEta_leading
void beginRun(edm::Run const &run, edm::EventSetup const &eSetup)
void Fill(HcalDetId &id, double val, std::vector< TH2F > &depth)
float deltaPhiSuperClusterTrackAtVtx() const
Abs< T >::type abs(const T &t)
MonitorElement * h_eEta_leading_HLT_matched
MonitorElement * h_vertex_number
MonitorElement * h_ePt_leading
double pt() const
transverse momentum
MonitorElement * h_eMultiplicity
virtual float eta() const GCC11_FINAL
momentum pseudorapidity
double deltaR(double eta1, double eta2, double phi1, double phi2)
void analyze(edm::Event const &e, edm::EventSetup const &eSetup)
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)
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
virtual ~DQMExample_Step1()
GsfTrackRefVector::size_type ambiguousGsfTracksSize() const
int pdgId() const
PDG identifier.
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 beginLuminosityBlock(edm::LuminosityBlock const &lumi, edm::EventSetup const &eSetup)
MonitorElement * h_eMultiplicity_HLT
virtual float pt() const GCC11_FINAL
transverse momentum
MonitorElement * h_eEta_leading_matched
edm::EDGetTokenT< reco::VertexCollection > thePVCollection_
edm::EDGetTokenT< reco::CaloJetCollection > theCaloJetCollection_
void setCurrentFolder(const std::string &fullpath)
virtual GsfTrackRef gsfTrack() const
reference to a GsfTrack
virtual const LorentzVector & p4() const =0
four-momentum Lorentz vector