92 LogTrace(
metname)<<
"[DiMuonHistograms] Analyze the mu in different eta regions";
100 unsigned int theIndexOfThePrimaryVertex = 999.;
105 for (
unsigned int ind=0; ind<vertex->size(); ++ind) {
106 if ( (*vertex)[ind].isValid() && !((*vertex)[ind].isFake()) ) {
107 theIndexOfThePrimaryVertex = ind;
113 if (theIndexOfThePrimaryVertex<100) {
114 posVtx = ((*vertex)[theIndexOfThePrimaryVertex]).
position();
115 errVtx = ((*vertex)[theIndexOfThePrimaryVertex]).
error();
118 LogInfo(
"RecoMuonValidator") <<
"reco::PrimaryVertex not found, use BeamSpot position instead\n";
127 errVtx(2,2) = bs.
sigmaZ();
135 TLorentzVector Mu1, Mu2;
137 float InvMass = -99.;
139 for (reco::MuonCollection::const_iterator recoMu1 = muons->begin(); recoMu1!=muons->end(); ++recoMu1) {
143 for (reco::MuonCollection::const_iterator recoMu2 = recoMu1; recoMu2!=muons->end(); ++recoMu2){
145 if (recoMu1==recoMu2)
continue;
148 if (recoMu1->isGlobalMuon() && recoMu2->isGlobalMuon()) {
152 Mu1.SetPxPyPzE(recoCombinedGlbTrack1->px(), recoCombinedGlbTrack1->py(),recoCombinedGlbTrack1->pz(), recoCombinedGlbTrack1->p());
153 Mu2.SetPxPyPzE(recoCombinedGlbTrack2->px(), recoCombinedGlbTrack2->py(),recoCombinedGlbTrack2->pz(), recoCombinedGlbTrack2->p());
155 charge = recoCombinedGlbTrack1->charge()*recoCombinedGlbTrack2->charge();
157 InvMass = (Mu1+Mu2).M();
158 for (
unsigned int iEtaRegion=0; iEtaRegion<3; iEtaRegion++){
163 if(fabs(recoCombinedGlbTrack1->eta())>
EtaCutMin && fabs(recoCombinedGlbTrack1->eta())<
EtaCutMax &&
164 fabs(recoCombinedGlbTrack2->eta())>
EtaCutMin && fabs(recoCombinedGlbTrack2->eta())<
EtaCutMax){
176 for (
unsigned int iEtaRegion=0; iEtaRegion<3; iEtaRegion++){
181 if(fabs(recoCombinedGlbTrack1->eta())>
EtaCutMin && fabs(recoCombinedGlbTrack1->eta())<
EtaCutMax &&
182 fabs(recoCombinedGlbTrack2->eta())>
EtaCutMin && fabs(recoCombinedGlbTrack2->eta())<
EtaCutMax){
183 if (InvMass > 55. && InvMass < 125.)
TightTightMuon[iEtaRegion]->Fill(InvMass);
190 if (recoMu2->isStandAloneMuon() && recoMu1->isTrackerMuon()) {
194 Mu2.SetPxPyPzE(recoStaTrack->px(), recoStaTrack->py(),recoStaTrack->pz(), recoStaTrack->p());
195 Mu1.SetPxPyPzE(recoTrack->px(), recoTrack->py(),recoTrack->pz(), recoTrack->p());
197 charge = recoStaTrack->charge()*recoTrack->charge();
199 InvMass = (Mu1+Mu2).M();
200 for (
unsigned int iEtaRegion=0; iEtaRegion<3; iEtaRegion++){
213 if (recoMu1->isStandAloneMuon() && recoMu2->isTrackerMuon()) {
217 Mu1.SetPxPyPzE(recoStaTrack->px(), recoStaTrack->py(),recoStaTrack->pz(), recoStaTrack->p());
218 Mu2.SetPxPyPzE(recoTrack->px(), recoTrack->py(),recoTrack->pz(), recoTrack->p());
220 charge = recoStaTrack->charge()*recoTrack->charge();
222 InvMass = (Mu1+Mu2).M();
223 for (
unsigned int iEtaRegion=0; iEtaRegion<3; iEtaRegion++){
238 if (recoMu1->isTrackerMuon() && recoMu2->isTrackerMuon()) {
242 Mu2.SetPxPyPzE(recoTrack2->px(), recoTrack2->py(),recoTrack2->pz(), recoTrack2->p());
243 Mu1.SetPxPyPzE(recoTrack1->px(), recoTrack1->py(),recoTrack1->pz(), recoTrack1->p());
245 charge = recoTrack1->charge()*recoTrack2->charge();
247 InvMass = (Mu1+Mu2).M();
248 for (
unsigned int iEtaRegion=0; iEtaRegion<3; iEtaRegion++){
268 InvMass = (Mu1+Mu2).M();
269 for (
unsigned int iEtaRegion=0; iEtaRegion<3; iEtaRegion++){
bool getByToken(EDGetToken token, Handle< PROD > &result) const
std::vector< MonitorElement * > GlbGlbMuon_LM
math::Error< dimension >::type Error
covariance error matrix (3x3)
bool isSoftMuon(const reco::Muon &, const reco::Vertex &)
edm::EDGetTokenT< reco::MuonCollection > theMuonCollectionLabel_
edm::EDGetTokenT< reco::BeamSpot > theBeamSpotLabel_
std::vector< MonitorElement * > SoftSoftMuon
math::XYZPoint Point
point in the space
double BeamWidthX() const
beam width X
std::vector< MonitorElement * > TrkTrkMuon_LM
std::vector< MonitorElement * > StaTrkMuon_LM
edm::EDGetTokenT< reco::VertexCollection > theVertexLabel_
std::vector< MonitorElement * > TrkTrkMuon_HM
double sigmaZ() const
sigma z
double BeamWidthY() const
beam width Y
static int position[264][3]
std::vector< MonitorElement * > StaTrkMuon_HM
std::vector< MonitorElement * > GlbGlbMuon_HM
const Point & position() const
position
std::vector< MonitorElement * > TightTightMuon
bool isTightMuon(const reco::Muon &, const reco::Vertex &)