9 #include "TLorentzVector.h" 24 edm::LogInfo(
"DQMExample_Step1") <<
"Constructor DQMExample_Step1::DQMExample_Step1 " << std::endl;
52 edm::LogInfo(
"DQMExample_Step1") <<
"Destructor DQMExample_Step1::~DQMExample_Step1 " << std::endl;
60 edm::LogInfo(
"DQMExample_Step1") <<
"DQMExample_Step1::beginRun" << std::endl;
67 edm::LogInfo(
"DQMExample_Step1") <<
"DQMExample_Step1::bookHistograms" << std::endl;
78 edm::LogInfo(
"DQMExample_Step1") <<
"DQMExample_Step1::beginLuminosityBlock" << std::endl;
87 edm::LogInfo(
"DQMExample_Step1") <<
"DQMExample_Step1::analyze" << std::endl;
97 edm::LogError (
"DQMClientExample") <<
"invalid collection: vertex" <<
"\n";
101 int vertex_number = vertexHandle->size();
102 reco::VertexCollection::const_iterator
v = vertexHandle->begin();
105 if(vertex_number != 0)
106 PVPoint =
math::XYZPoint(v->position().x(), v->position().y(), v->position().z());
115 if ( !pfMETCollection.
isValid() )
117 edm::LogError (
"DQMClientExample") <<
"invalid collection: MET" <<
"\n";
125 if ( !electronCollection.
isValid() )
127 edm::LogError (
"DQMClientExample") <<
"invalid collection: electrons" <<
"\n";
132 int posEle=0, negEle=0;
135 for (reco::GsfElectronCollection::const_iterator recoElectron=electronCollection->begin(); recoElectron!=electronCollection->end(); ++recoElectron)
141 ele1 = &(*recoElectron);
143 else if(!ele2 && recoElectron->
pt() >
ptThrL2_)
144 ele2 = &(*recoElectron);
148 if(recoElectron->charge()==1)
150 else if(recoElectron->charge()==-1)
155 nEle = posEle+negEle;
162 if ( !caloJetCollection.
isValid() )
164 edm::LogError (
"DQMClientExample") <<
"invalid collection: jets" <<
"\n";
172 for (reco::CaloJetCollection::const_iterator i_calojet = caloJetCollection->begin(); i_calojet != caloJetCollection->end(); ++i_calojet)
176 if (
Distance(*i_calojet,*ele1) < 0.3)
continue;
179 if (
Distance(*i_calojet,*ele2) < 0.3)
continue;
181 if (i_calojet->pt() <
ptThrJet_)
continue;
186 jet1 = &(*i_calojet);
189 jet2 = &(*i_calojet);
202 edm::LogError (
"DQMClientExample") <<
"invalid collection: TriggerResults" <<
"\n";
206 bool hasFired =
false;
208 unsigned int numTriggers = trigNames.
size();
210 for(
unsigned int hltIndex=0; hltIndex<numTriggers; ++hltIndex )
223 edm::LogError (
"DQMClientExample") <<
"invalid collection: TriggerEvent" <<
"\n";
233 if( !(filterIndex >= triggerEvent->
sizeFilters()) )
236 std::vector<reco::Particle> triggeredEle;
238 for(
size_t j = 0; j < keys.size(); ++j )
243 triggeredEle.push_back( foundObject.
particle() );
247 if( !triggeredEle.empty() )
248 ele1_HLT = &(triggeredEle.at(0));
289 if( ele1 && ele1_HLT &&
deltaR(*ele1_HLT,*ele1) < 0.3 && hasFired==
true )
307 edm::LogInfo(
"DQMExample_Step1") <<
"DQMExample_Step1::endLuminosityBlock" << std::endl;
316 edm::LogInfo(
"DQMExample_Step1") <<
"DQMExample_Step1::endRun" << std::endl;
328 h_vertex_number = ibooker_.
book1D(
"Vertex_number",
"Number of event vertices in collection", 40,-0.5, 39.5 );
330 h_pfMet = ibooker_.
book1D(
"pfMet",
"Pf Missing E_{T}; GeV" , 20, 0.0 , 100);
355 h_ePt_diff = ibooker_.
book1D(
"ElePt_diff_matched",
"pT(RECO) - pT(HLT) for mathed candidates",100,-10,10.);
376 if (deltaPhi < 0) deltaPhi = -
deltaPhi;
377 if (deltaPhi > 3.1415926) {
378 deltaPhi = 2 * 3.1415926 -
deltaPhi;
393 bool isMediumEle =
false;
395 float pt = electron.
pt();
396 float eta = electron.
eta();
398 int isEB = electron.
isEB();
419 if( (pt > 12.) && (fabs(eta) < 2.5) &&
420 ( ( (isEB == 1) && (fabs(DetaIn) < 0.004) ) || ( (isEB == 0) && (fabs(DetaIn) < 0.007) ) ) &&
421 ( ( (isEB == 1) && (fabs(DphiIn) < 0.060) ) || ( (isEB == 0) && (fabs(DphiIn) < 0.030) ) ) &&
422 ( ( (isEB == 1) && (sigmaIetaIeta < 0.010) ) || ( (isEB == 0) && (sigmaIetaIeta < 0.030) ) ) &&
423 ( ( (isEB == 1) && (HOverE < 0.120) ) || ( (isEB == 0) && (HOverE < 0.100) ) ) &&
424 ( ( (isEB == 1) && (fabs(ooemoop) < 0.050) ) || ( (isEB == 0) && (fabs(ooemoop) < 0.050) ) ) &&
425 ( ( (isEB == 1) && (fabs(dxy) < 0.020) ) || ( (isEB == 0) && (fabs(dxy) < 0.020) ) ) &&
426 ( ( (isEB == 1) && (fabs(dz) < 0.100) ) || ( (isEB == 0) && (fabs(dz) < 0.100) ) ) &&
427 ( ( (isEB == 1) && (!isConverted) ) || ( (isEB == 0) && (!isConverted) ) ) &&
429 ( 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
void endLuminosityBlock(edm::LuminosityBlock const &lumi, edm::EventSetup const &eSetup) override
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 bookHistos(DQMStore::IBooker &)
virtual const LorentzVector & p4() const =0
four-momentum Lorentz vector
const TriggerObjectCollection & getObjects() const
void Fill(HcalDetId &id, double val, std::vector< TH2F > &depth)
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
double deltaR(double eta1, double eta2, double phi1, double phi2)
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
void setCurrentFolder(const std::string &fullpath)
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 beginLuminosityBlock(edm::LuminosityBlock const &lumi, edm::EventSetup const &eSetup) override
void analyze(edm::Event const &e, edm::EventSetup const &eSetup) override