103 LogTrace(
metname)<<
"[DiMuonHistograms] Analyze the mu in different eta regions";
111 unsigned int theIndexOfThePrimaryVertex = 999.;
116 for (
unsigned int ind=0; ind<vertex->size(); ++ind) {
117 if ( (*vertex)[ind].isValid() && !((*vertex)[ind].isFake()) ) {
118 theIndexOfThePrimaryVertex = ind;
124 if (theIndexOfThePrimaryVertex<100) {
125 posVtx = ((*vertex)[theIndexOfThePrimaryVertex]).
position();
126 errVtx = ((*vertex)[theIndexOfThePrimaryVertex]).
error();
129 LogInfo(
"RecoMuonValidator") <<
"reco::PrimaryVertex not found, use BeamSpot position instead\n";
138 errVtx(2,2) = bs.
sigmaZ();
146 TLorentzVector Mu1, Mu2;
148 float InvMass = -99.;
150 for (reco::MuonCollection::const_iterator recoMu1 = muons->begin(); recoMu1!=muons->end(); ++recoMu1) {
154 for (reco::MuonCollection::const_iterator recoMu2 = recoMu1; recoMu2!=muons->end(); ++recoMu2){
156 if (recoMu1==recoMu2)
continue;
159 if (recoMu1->isGlobalMuon() && recoMu2->isGlobalMuon()) {
163 Mu1.SetPxPyPzE(recoCombinedGlbTrack1->px(), recoCombinedGlbTrack1->py(),recoCombinedGlbTrack1->pz(), recoCombinedGlbTrack1->p());
164 Mu2.SetPxPyPzE(recoCombinedGlbTrack2->px(), recoCombinedGlbTrack2->py(),recoCombinedGlbTrack2->pz(), recoCombinedGlbTrack2->p());
166 charge = recoCombinedGlbTrack1->charge()*recoCombinedGlbTrack2->charge();
168 InvMass = (Mu1+Mu2).M();
169 for (
unsigned int iEtaRegion=0; iEtaRegion<3; iEtaRegion++){
174 if(fabs(recoCombinedGlbTrack1->eta())>
EtaCutMin && fabs(recoCombinedGlbTrack1->eta())<
EtaCutMax &&
175 fabs(recoCombinedGlbTrack2->eta())>
EtaCutMin && fabs(recoCombinedGlbTrack2->eta())<
EtaCutMax){
187 for (
unsigned int iEtaRegion=0; iEtaRegion<3; iEtaRegion++){
192 if(fabs(recoCombinedGlbTrack1->eta())>
EtaCutMin && fabs(recoCombinedGlbTrack1->eta())<
EtaCutMax &&
193 fabs(recoCombinedGlbTrack2->eta())>
EtaCutMin && fabs(recoCombinedGlbTrack2->eta())<
EtaCutMax){
194 if (InvMass > 55. && InvMass < 125.)
TightTightMuon[iEtaRegion]->Fill(InvMass);
201 if (recoMu2->isStandAloneMuon() && recoMu1->isTrackerMuon()) {
205 Mu2.SetPxPyPzE(recoStaTrack->px(), recoStaTrack->py(),recoStaTrack->pz(), recoStaTrack->p());
206 Mu1.SetPxPyPzE(recoTrack->px(), recoTrack->py(),recoTrack->pz(), recoTrack->p());
208 charge = recoStaTrack->charge()*recoTrack->charge();
210 InvMass = (Mu1+Mu2).M();
211 for (
unsigned int iEtaRegion=0; iEtaRegion<3; iEtaRegion++){
224 if (recoMu1->isStandAloneMuon() && recoMu2->isTrackerMuon()) {
228 Mu1.SetPxPyPzE(recoStaTrack->px(), recoStaTrack->py(),recoStaTrack->pz(), recoStaTrack->p());
229 Mu2.SetPxPyPzE(recoTrack->px(), recoTrack->py(),recoTrack->pz(), recoTrack->p());
231 charge = recoStaTrack->charge()*recoTrack->charge();
233 InvMass = (Mu1+Mu2).M();
234 for (
unsigned int iEtaRegion=0; iEtaRegion<3; iEtaRegion++){
249 if (recoMu1->isTrackerMuon() && recoMu2->isTrackerMuon()) {
253 Mu2.SetPxPyPzE(recoTrack2->px(), recoTrack2->py(),recoTrack2->pz(), recoTrack2->p());
254 Mu1.SetPxPyPzE(recoTrack1->px(), recoTrack1->py(),recoTrack1->pz(), recoTrack1->p());
256 charge = recoTrack1->charge()*recoTrack2->charge();
258 InvMass = (Mu1+Mu2).M();
259 for (
unsigned int iEtaRegion=0; iEtaRegion<3; iEtaRegion++){
279 InvMass = (Mu1+Mu2).M();
280 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 &)