143 LogTrace(
metname) <<
"[DiMuonHistograms] Analyze the mu in different eta regions";
151 unsigned int theIndexOfThePrimaryVertex = 999.;
156 for (
unsigned int ind = 0; ind <
vertex->size(); ++ind) {
157 if ((*
vertex)[ind].isValid() && !((*vertex)[ind].isFake())) {
158 theIndexOfThePrimaryVertex = ind;
164 if (theIndexOfThePrimaryVertex < 100) {
165 posVtx = ((*vertex)[theIndexOfThePrimaryVertex]).
position();
166 errVtx = ((*vertex)[theIndexOfThePrimaryVertex]).
error();
168 LogInfo(
"RecoMuonValidator") <<
"reco::PrimaryVertex not found, use BeamSpot position instead\n";
174 posVtx =
bs.position();
175 errVtx(0, 0) =
bs.BeamWidthX();
176 errVtx(1, 1) =
bs.BeamWidthY();
177 errVtx(2, 2) =
bs.sigmaZ();
182 if (!
muons.isValid())
186 TLorentzVector Mu1, Mu2;
188 float InvMass = -99.;
204 if (muon1->isGlobalMuon() && muon2->isGlobalMuon()) {
208 Mu1.SetPxPyPzE(recoCombinedGlbTrack1->px(),
209 recoCombinedGlbTrack1->py(),
210 recoCombinedGlbTrack1->pz(),
211 recoCombinedGlbTrack1->p());
212 Mu2.SetPxPyPzE(recoCombinedGlbTrack2->px(),
213 recoCombinedGlbTrack2->py(),
214 recoCombinedGlbTrack2->pz(),
215 recoCombinedGlbTrack2->p());
217 charge = recoCombinedGlbTrack1->charge() * recoCombinedGlbTrack2->charge();
219 InvMass = (Mu1 + Mu2).M();
220 for (
unsigned int iEtaRegion = 0; iEtaRegion < 3; iEtaRegion++) {
221 if (fabs(recoCombinedGlbTrack1->eta()) >
EtaCutMin[iEtaRegion] &&
222 fabs(recoCombinedGlbTrack1->eta()) <
EtaCutMax[iEtaRegion] &&
223 fabs(recoCombinedGlbTrack2->eta()) >
EtaCutMin[iEtaRegion] &&
224 fabs(recoCombinedGlbTrack2->eta()) <
EtaCutMax[iEtaRegion]) {
237 for (
unsigned int iEtaRegion = 0; iEtaRegion < 3; iEtaRegion++) {
238 if (fabs(recoCombinedGlbTrack1->eta()) >
EtaCutMin[iEtaRegion] &&
239 fabs(recoCombinedGlbTrack1->eta()) <
EtaCutMax[iEtaRegion] &&
240 fabs(recoCombinedGlbTrack2->eta()) >
EtaCutMin[iEtaRegion] &&
241 fabs(recoCombinedGlbTrack2->eta()) <
EtaCutMax[iEtaRegion]) {
242 if (InvMass > 55. && InvMass < 125.) {
255 for (
unsigned int iEtaRegion = 0; iEtaRegion < 3; iEtaRegion++) {
256 if (fabs(recoCombinedGlbTrack1->eta()) >
EtaCutMin[iEtaRegion] &&
257 fabs(recoCombinedGlbTrack1->eta()) <
EtaCutMax[iEtaRegion] &&
258 fabs(recoCombinedGlbTrack2->eta()) >
EtaCutMin[iEtaRegion] &&
259 fabs(recoCombinedGlbTrack2->eta()) <
EtaCutMax[iEtaRegion]) {
260 if (InvMass > 55. && InvMass < 125.) {
273 for (
unsigned int iEtaRegion = 0; iEtaRegion < 3; iEtaRegion++) {
274 if (fabs(recoCombinedGlbTrack1->eta()) >
EtaCutMin[iEtaRegion] &&
275 fabs(recoCombinedGlbTrack1->eta()) <
EtaCutMax[iEtaRegion] &&
276 fabs(recoCombinedGlbTrack2->eta()) >
EtaCutMin[iEtaRegion] &&
277 fabs(recoCombinedGlbTrack2->eta()) <
EtaCutMax[iEtaRegion]) {
278 if (InvMass > 55. && InvMass < 125.) {
289 if (muon2->isStandAloneMuon() && muon1->isTrackerMuon()) {
293 Mu2.SetPxPyPzE(recoStaTrack->px(), recoStaTrack->py(), recoStaTrack->pz(), recoStaTrack->p());
294 Mu1.SetPxPyPzE(recoTrack->px(), recoTrack->py(), recoTrack->pz(), recoTrack->p());
296 charge = recoStaTrack->charge() * recoTrack->charge();
298 InvMass = (Mu1 + Mu2).M();
299 for (
unsigned int iEtaRegion = 0; iEtaRegion < 3; iEtaRegion++) {
300 if (fabs(recoStaTrack->eta()) >
EtaCutMin[iEtaRegion] &&
301 fabs(recoStaTrack->eta()) <
EtaCutMax[iEtaRegion] && fabs(recoTrack->eta()) >
EtaCutMin[iEtaRegion] &&
302 fabs(recoTrack->eta()) <
EtaCutMax[iEtaRegion]) {
311 if (muon1->isStandAloneMuon() && muon2->isTrackerMuon()) {
315 Mu1.SetPxPyPzE(recoStaTrack->px(), recoStaTrack->py(), recoStaTrack->pz(), recoStaTrack->p());
316 Mu2.SetPxPyPzE(recoTrack->px(), recoTrack->py(), recoTrack->pz(), recoTrack->p());
318 charge = recoStaTrack->charge() * recoTrack->charge();
320 InvMass = (Mu1 + Mu2).M();
321 for (
unsigned int iEtaRegion = 0; iEtaRegion < 3; iEtaRegion++) {
322 if (fabs(recoStaTrack->eta()) >
EtaCutMin[iEtaRegion] &&
323 fabs(recoStaTrack->eta()) <
EtaCutMax[iEtaRegion] && fabs(recoTrack->eta()) >
EtaCutMin[iEtaRegion] &&
324 fabs(recoTrack->eta()) <
EtaCutMax[iEtaRegion]) {
335 if (muon1->isTrackerMuon() && muon2->isTrackerMuon()) {
339 Mu2.SetPxPyPzE(recoTrack2->px(), recoTrack2->py(), recoTrack2->pz(), recoTrack2->p());
340 Mu1.SetPxPyPzE(recoTrack1->px(), recoTrack1->py(), recoTrack1->pz(), recoTrack1->p());
342 charge = recoTrack1->charge() * recoTrack2->charge();
344 InvMass = (Mu1 + Mu2).M();
345 for (
unsigned int iEtaRegion = 0; iEtaRegion < 3; iEtaRegion++) {
346 if (fabs(recoTrack1->eta()) >
EtaCutMin[iEtaRegion] && fabs(recoTrack1->eta()) <
EtaCutMax[iEtaRegion] &&
347 fabs(recoTrack2->eta()) >
EtaCutMin[iEtaRegion] && fabs(recoTrack2->eta()) <
EtaCutMax[iEtaRegion]) {
360 InvMass = (Mu1 + Mu2).M();
361 for (
unsigned int iEtaRegion = 0; iEtaRegion < 3; iEtaRegion++) {
362 if (fabs(recoTrack1->eta()) >
EtaCutMin[iEtaRegion] && fabs(recoTrack1->eta()) <
EtaCutMax[iEtaRegion] &&
363 fabs(recoTrack2->eta()) >
EtaCutMin[iEtaRegion] && fabs(recoTrack2->eta()) <
EtaCutMax[iEtaRegion]) {
365 SoftSoftMuonBadFrac[iEtaRegion]->Fill(muon1->innerTrack()->lost() / muon1->innerTrack()->found());
std::vector< MonitorElement * > MediumMediumMuon
bool isMediumMuon(const reco::Muon &, bool run2016_hip_mitigation=false)
std::vector< MonitorElement * > MediumMediumMuonBadFrac
std::vector< MonitorElement * > GlbGlbMuon_LM
std::vector< MonitorElement * > TightTightMuonBadFrac
math::Error< dimension >::type Error
covariance error matrix (3x3)
muons
the two sets of parameters below are mutually exclusive, depending if RECO or ALCARECO is used the us...
bool isLooseMuon(const reco::Muon &)
edm::EDGetTokenT< edm::View< reco::Muon > > theMuonCollectionLabel_
edm::EDGetTokenT< reco::BeamSpot > theBeamSpotLabel_
std::vector< MonitorElement * > LooseLooseMuonBadFrac
std::vector< MonitorElement * > SoftSoftMuon
math::XYZPoint Point
point in the space
std::vector< MonitorElement * > TrkTrkMuon_LM
std::vector< MonitorElement * > StaTrkMuon_LM
edm::EDGetTokenT< reco::VertexCollection > theVertexLabel_
bool isSoftMuon(const reco::Muon &, const reco::Vertex &, bool run2016_hip_mitigation=false)
Log< level::Info, false > LogInfo
std::vector< MonitorElement * > SoftSoftMuonBadFrac
std::vector< MonitorElement * > TrkTrkMuon_HM
boost::indirect_iterator< typename seq_t::const_iterator > const_iterator
static int position[264][3]
std::vector< MonitorElement * > StaTrkMuon_HM
std::vector< MonitorElement * > GlbGlbMuon_HM
std::vector< MonitorElement * > TightTightMuon
bool isTightMuon(const reco::Muon &, const reco::Vertex &)
std::vector< MonitorElement * > LooseLooseMuon