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;
77 edm::LogInfo(
"DQMExample_Step1") <<
"DQMExample_Step1::analyze" << std::endl;
87 edm::LogError (
"DQMClientExample") <<
"invalid collection: vertex" <<
"\n";
91 int vertex_number = vertexHandle->size();
92 reco::VertexCollection::const_iterator
v = vertexHandle->begin();
95 if(vertex_number != 0)
96 PVPoint =
math::XYZPoint(v->position().x(), v->position().y(), v->position().z());
105 if ( !pfMETCollection.
isValid() )
107 edm::LogError (
"DQMClientExample") <<
"invalid collection: MET" <<
"\n";
115 if ( !electronCollection.
isValid() )
117 edm::LogError (
"DQMClientExample") <<
"invalid collection: electrons" <<
"\n";
122 int posEle=0, negEle=0;
125 for (reco::GsfElectronCollection::const_iterator recoElectron=electronCollection->begin(); recoElectron!=electronCollection->end(); ++recoElectron)
131 ele1 = &(*recoElectron);
133 else if(!ele2 && recoElectron->
pt() >
ptThrL2_)
134 ele2 = &(*recoElectron);
138 if(recoElectron->charge()==1)
140 else if(recoElectron->charge()==-1)
145 nEle = posEle+negEle;
152 if ( !caloJetCollection.
isValid() )
154 edm::LogError (
"DQMClientExample") <<
"invalid collection: jets" <<
"\n";
162 for (reco::CaloJetCollection::const_iterator i_calojet = caloJetCollection->begin(); i_calojet != caloJetCollection->end(); ++i_calojet)
166 if (
Distance(*i_calojet,*ele1) < 0.3)
continue;
169 if (
Distance(*i_calojet,*ele2) < 0.3)
continue;
171 if (i_calojet->pt() <
ptThrJet_)
continue;
176 jet1 = &(*i_calojet);
179 jet2 = &(*i_calojet);
192 edm::LogError (
"DQMClientExample") <<
"invalid collection: TriggerResults" <<
"\n";
196 bool hasFired =
false;
198 unsigned int numTriggers = trigNames.
size();
200 for(
unsigned int hltIndex=0; hltIndex<numTriggers; ++hltIndex )
213 edm::LogError (
"DQMClientExample") <<
"invalid collection: TriggerEvent" <<
"\n";
223 if( !(filterIndex >= triggerEvent->
sizeFilters()) )
226 std::vector<reco::Particle> triggeredEle;
228 for(
size_t j = 0; j < keys.size(); ++j )
233 triggeredEle.push_back( foundObject.
particle() );
237 if( !triggeredEle.empty() )
238 ele1_HLT = &(triggeredEle.at(0));
279 if( ele1 && ele1_HLT &&
deltaR(*ele1_HLT,*ele1) < 0.3 && hasFired==
true )
298 edm::LogInfo(
"DQMExample_Step1") <<
"DQMExample_Step1::endRun" << std::endl;
310 h_vertex_number = ibooker_.
book1D(
"Vertex_number",
"Number of event vertices in collection", 40,-0.5, 39.5 );
312 h_pfMet = ibooker_.
book1D(
"pfMet",
"Pf Missing E_{T}; GeV" , 20, 0.0 , 100);
337 h_ePt_diff = ibooker_.
book1D(
"ElePt_diff_matched",
"pT(RECO) - pT(HLT) for mathed candidates",100,-10,10.);
358 if (deltaPhi < 0) deltaPhi = -
deltaPhi;
359 if (deltaPhi > 3.1415926) {
360 deltaPhi = 2 * 3.1415926 -
deltaPhi;
375 bool isMediumEle =
false;
377 float pt = electron.
pt();
378 float eta = electron.
eta();
380 int isEB = electron.
isEB();
401 if( (pt > 12.) && (fabs(eta) < 2.5) &&
402 ( ( (isEB == 1) && (fabs(DetaIn) < 0.004) ) || ( (isEB == 0) && (fabs(DetaIn) < 0.007) ) ) &&
403 ( ( (isEB == 1) && (fabs(DphiIn) < 0.060) ) || ( (isEB == 0) && (fabs(DphiIn) < 0.030) ) ) &&
404 ( ( (isEB == 1) && (sigmaIetaIeta < 0.010) ) || ( (isEB == 0) && (sigmaIetaIeta < 0.030) ) ) &&
405 ( ( (isEB == 1) && (HOverE < 0.120) ) || ( (isEB == 0) && (HOverE < 0.100) ) ) &&
406 ( ( (isEB == 1) && (fabs(ooemoop) < 0.050) ) || ( (isEB == 0) && (fabs(ooemoop) < 0.050) ) ) &&
407 ( ( (isEB == 1) && (fabs(dxy) < 0.020) ) || ( (isEB == 0) && (fabs(dxy) < 0.020) ) ) &&
408 ( ( (isEB == 1) && (fabs(dz) < 0.100) ) || ( (isEB == 0) && (fabs(dz) < 0.100) ) ) &&
409 ( ( (isEB == 1) && (!isConverted) ) || ( (isEB == 0) && (!isConverted) ) ) &&
411 ( 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
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
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