45 virtual void endJob()
override;
57 double isocut_, etacut_, ptcut_,
ptSTAcut_, minZmass_, maxZmass_;
58 TH1D * h_zMuMu_mass_, * h_zMuSingleTrack_mass_, * h_zMuSingleStandAlone_mass_,* h_zMuSingleStandAloneOverlap_mass_,
59 * h_zMuMuMatched_mass_,
61 * h_zMuSingleStandAloneMatched_mass_,
62 * h_zMuSingleStandAloneOverlapMatched_mass_;
74 zMuStandAloneMapToken_( mayConsume<
CandMatchMap >( pset.getParameter<
InputTag>(
"zMuStandAloneMap" ) ) ),
75 isocut_( pset.getParameter<double>(
"isocut" ) ),
76 etacut_( pset.getParameter<double>(
"etacut" ) ),
77 ptcut_( pset.getParameter<double>(
"ptcut" ) ),
78 ptSTAcut_( pset.getParameter<double>(
"ptSTAcut" ) ),
80 minZmass_( pset.getParameter<double>(
"minZmass" )),
81 maxZmass_( pset.getParameter<double>(
"maxZmass" )) {
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 ) {
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++ ) {
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++ ) {
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() ) {
296 cout<<
"-- N SingleTrackMu = "<<Nztm<<endl;
297 cout<<
"-----N SinglStandAloneMu = "<<Nzsm<<endl;
298 cout<<
"-----N SingleStandAloneOverlapMu = "<<Nzsnom<<endl;
299 cout<<
"------- N MuMu = "<<Nzmm<<endl;
301 cout<<
"-- N SingleTrackMuMatched = "<<NztmMatch<<endl;
302 cout<<
"-----N SinglStandAloneMuMatched = "<<NzsmMatch<<endl;
303 cout<<
"-----N SingleStandAloneOverlapMuMatched = "<<NzsnomMatch<<endl;
304 cout<<
"------- N MuMu Matched = "<<NzmmMatch<<endl;
EDGetTokenT< IsolationCollection > standAloneIsoToken_
virtual const Candidate * daughter(size_type i) const =0
return daughter at a given position, i = 0, ... numberOfDaughters() - 1 (read only mode) ...
#define DEFINE_FWK_MODULE(type)
virtual double mass() const =0
mass
T * make(const Args &...args) const
make new ROOT object
virtual void analyze(const edm::Event &event, const edm::EventSetup &setup) override
EDGetTokenT< IsolationCollection > muIsoToken_
key_type key() const
Accessor for product key.
EDGetTokenT< CandidateCollection > zMuStandAloneToken_
ZMuMuAnalyzer(const edm::ParameterSet &pset)
ProductID id() const
Accessor for product ID.
edm::ValueMap< float > IsolationCollection
tuple lep1
print 'MRbb(1b)',event.mr_bb
TH1D * h_zMuSingleStandAloneOverlap_mass_
How EventSelector::AcceptEvent() decides whether to accept an event for output otherwise it is excluding the probing of A single or multiple positive and the trigger will pass if any such matching triggers are PASS or EXCEPTION[A criterion thatmatches no triggers at all is detected and causes a throw.] A single negative with an expectation of appropriate bit checking in the decision and the trigger will pass if any such matching triggers are FAIL or EXCEPTION A wildcarded negative criterion that matches more than one trigger in the trigger but the state exists so we define the behavior If all triggers are the negative crieriion will lead to accepting the event(this again matches the behavior of"!*"before the partial wildcard feature was incorporated).The per-event"cost"of each negative criterion with multiple relevant triggers is about the same as!*was in the past
EDGetTokenT< CandMatchMap > zMuStandAloneMapToken_
EDGetTokenT< CandMatchMap > zMuTrackMapToken_
TH1D * h_zMuSingleTrack_mass_
EDGetTokenT< CandidateCollection > zMuTrackToken_
TH1D * h_zMuMuMatched_mass_
virtual void endJob() override
REF castTo() const
cast to a concrete type
TH1D * h_zMuSingleStandAlone_mass_
EDGetTokenT< IsolationCollection > trackIsoToken_
TH1D * h_zMuSingleStandAloneOverlapMatched_mass_
EDGetTokenT< CandMatchMap > zMuMuMapToken_
TH1D * h_zMuSingleTrackMatched_mass_
TH1D * h_zMuSingleStandAloneMatched_mass_
void setup(std::vector< TH2F > &depth, std::string name, std::string units="")
tuple zMuMu
zMuMu vector of PSet is common to all categories except zMuTrk category
EDGetTokenT< CandidateCollection > zMuMuToken_
virtual const CandidateBaseRef & masterClone() const =0