104 unsigned int nZMuMu = zMuMu->
size();
105 unsigned int nZTrackMu = zMuTrack->
size();
106 unsigned int nZStandAloneMu = zMuStandAlone->
size();
107 static const double zMass = 91.1876;
119 if( nZTrackMu > 0 ) {
124 if( nZStandAloneMu > 0 ) {
130 ProductID muIsoId = muIso->keyProduct().id();
133 ProductID trackIsoId = trackIso->keyProduct().id();
137 ProductID standAloneIsoId = standAloneIso->keyProduct().id();
140 double mass = 1000000.;
141 for(
unsigned int i = 0;
i < nZMuMu;
i++ ) {
147 const double iso1 = muIso->value( lep1.
key() );
148 const double iso2 = muIso->value( lep2.key() );
150 double m = zmmCand.
mass();
154 if ( fabs( mass - zMass ) > fabs( m - zMass ) ) {
159 CandMatchMap::const_iterator m0 = zMuMuMap->
find(CandRef);
160 if( m0 != zMuMuMap->
end()) {
168 if (nZMuMu ==0 && nZTrackMu>0) {
169 for(
unsigned int j = 0; j < nZTrackMu; j++ ) {
170 const Candidate & ztmCand = (*zMuTrack)[ j ];
181 iso1 = muIso->value( lep1.
key() );
182 else if ( id1 == trackIsoId )
183 iso1 = trackIso->value( lep1.
key() );
186 iso2 = muIso->value( lep2.key() );
187 else if ( id2 == trackIsoId )
188 iso2 = trackIso->value( lep2.key() );
190 double mt = ztmCand.
mass();
195 CandMatchMap::const_iterator m0 = zMuTrackMap->
find(CandRef);
196 if( m0 != zMuTrackMap->
end()) {
204 if (nZMuMu ==0 && nZStandAloneMu>0) {
206 for(
unsigned int j = 0; j < nZStandAloneMu; j++ ) {
207 const Candidate & zsmCand = (*zMuStandAlone)[ j ];
218 iso1 = muIso->value( lep1.
key() );
219 else if ( id1 == standAloneIsoId )
220 iso1 = standAloneIso->value( lep1.
key() );
223 iso2 = muIso->value( lep2.key() );
224 else if ( id2 == standAloneIsoId )
225 iso2 = standAloneIso->value( lep2.key() );
227 double ms = zsmCand.
mass();
232 CandMatchMap::const_iterator m0 = zMuStandAloneMap->
find(CandRef);
233 if( m0 != zMuStandAloneMap->
end()) {
237 bool noOverlap =
true;
238 for(
unsigned int j = 0; j < zMuTrack->
size(); j++ ) {
239 const Candidate & ztmCand = (*zMuTrack)[ j ];
251 iso1 = muIso->value( lep1.
key() );
252 else if ( id1 == trackIsoId )
253 iso1 = trackIso->value( lep1.
key() );
256 iso2 = muIso->value( lep2.key() );
257 else if ( id2 == trackIsoId )
258 iso2 = trackIso->value( lep2.key() );
260 double mt = ztmCand.
mass();
265 if (
overlap_( ztmCand, zsmCand ) ) {
271 CandMatchMap::const_iterator m1 = zMuTrackMap->
find(CandReft);
272 CandMatchMap::const_iterator m2 = zMuStandAloneMap->
find(CandRef);
274 if( m1 != zMuTrackMap->
end() && m2 != zMuStandAloneMap->
end() ) {
EDGetTokenT< IsolationCollection > standAloneIsoToken_
const_iterator end() const
last iterator over the map (read only)
virtual const Candidate * daughter(size_type i) const =0
return daughter at a given position, i = 0, ... numberOfDaughters() - 1 (read only mode) ...
const_iterator find(const key_type &k) const
find element with specified reference key
EDGetTokenT< IsolationCollection > muIsoToken_
key_type key() const
Accessor for product key.
EDGetTokenT< CandidateCollection > zMuStandAloneToken_
ProductID id() const
Accessor for product ID.
TH1D * h_zMuSingleStandAloneOverlap_mass_
EDGetTokenT< CandMatchMap > zMuStandAloneMapToken_
EDGetTokenT< CandMatchMap > zMuTrackMapToken_
TH1D * h_zMuSingleTrack_mass_
virtual const CandidateBaseRef & masterClone() const =0
EDGetTokenT< CandidateCollection > zMuTrackToken_
TH1D * h_zMuMuMatched_mass_
virtual double mass() const =0
mass
TH1D * h_zMuSingleStandAlone_mass_
EDGetTokenT< IsolationCollection > trackIsoToken_
TH1D * h_zMuSingleStandAloneOverlapMatched_mass_
EDGetTokenT< CandMatchMap > zMuMuMapToken_
TH1D * h_zMuSingleTrackMatched_mass_
lep1
print 'MRbb(1b)',event.mr_bb
TH1D * h_zMuSingleStandAloneMatched_mass_
EDGetTokenT< CandidateCollection > zMuMuToken_