45 virtual void endJob()
override;
53 double isocut_, etacut_, ptcut_,
ptSTAcut_, minZmass_, maxZmass_;
54 TH1D * h_zMuMu_mass_, * h_zMuSingleTrack_mass_, * h_zMuSingleStandAlone_mass_,* h_zMuSingleStandAloneOverlap_mass_,
55 * h_zMuMuMatched_mass_,
57 * h_zMuSingleStandAloneMatched_mass_,
58 * h_zMuSingleStandAloneOverlapMatched_mass_;
62 zMuMu_( pset.getParameter<
InputTag>(
"zMuMu" ) ),
63 zMuTrack_( pset.getParameter<
InputTag>(
"zMuTrack" ) ),
64 zMuStandAlone_( pset.getParameter<
InputTag>(
"zMuStandAlone" ) ),
65 muIso_( pset.getParameter<
InputTag>(
"muIso" ) ),
66 trackIso_( pset.getParameter<
InputTag>(
"trackIso" ) ),
67 standAloneIso_( pset.getParameter<
InputTag>(
"standAloneIso" ) ),
68 zMuMuMap_( pset.getParameter<
InputTag>(
"zMuMuMap" ) ),
69 zMuTrackMap_( pset.getParameter<
InputTag>(
"zMuTrackMap" ) ),
70 zMuStandAloneMap_( pset.getParameter<
InputTag>(
"zMuStandAloneMap" ) ),
71 isocut_( pset.getParameter<double>(
"isocut" ) ),
72 etacut_( pset.getParameter<double>(
"etacut" ) ),
73 ptcut_( pset.getParameter<double>(
"ptcut" ) ),
74 ptSTAcut_( pset.getParameter<double>(
"ptSTAcut" ) ),
76 minZmass_( pset.getParameter<double>(
"minZmass" )),
77 maxZmass_( pset.getParameter<double>(
"maxZmass" )) {
94 event.getByLabel(
zMuMu_, zMuMu);
100 unsigned int nZMuMu = zMuMu->size();
101 unsigned int nZTrackMu = zMuTrack->size();
102 unsigned int nZStandAloneMu = zMuStandAlone->size();
103 static const double zMass = 91.1876;
115 if( nZTrackMu > 0 ) {
120 if( nZStandAloneMu > 0 ) {
125 event.getByLabel(
muIso_, muIso);
129 ProductID trackIsoId = trackIso->keyProduct().
id();
133 ProductID standAloneIsoId = standAloneIso->keyProduct().
id();
136 double mass = 1000000.;
137 for(
unsigned int i = 0;
i < nZMuMu;
i++ ) {
143 const double iso1 = muIso->value( lep1.
key() );
144 const double iso2 = muIso->value( lep2.key() );
146 double m = zmmCand.
mass();
150 if ( fabs( mass - zMass ) > fabs( m - zMass ) ) {
155 CandMatchMap::const_iterator m0 = zMuMuMap->find(CandRef);
156 if( m0 != zMuMuMap->end()) {
164 if (nZMuMu ==0 && nZTrackMu>0) {
165 for(
unsigned int j = 0;
j < nZTrackMu;
j++ ) {
177 iso1 = muIso->value( lep1.
key() );
178 else if ( id1 == trackIsoId )
179 iso1 = trackIso->value( lep1.
key() );
182 iso2 = muIso->value( lep2.key() );
183 else if ( id2 == trackIsoId )
184 iso2 = trackIso->value( lep2.key() );
186 double mt = ztmCand.
mass();
191 CandMatchMap::const_iterator m0 = zMuTrackMap->find(CandRef);
192 if( m0 != zMuTrackMap->end()) {
200 if (nZMuMu ==0 && nZStandAloneMu>0) {
202 for(
unsigned int j = 0;
j < nZStandAloneMu;
j++ ) {
203 const Candidate & zsmCand = (*zMuStandAlone)[
j ];
214 iso1 = muIso->value( lep1.
key() );
215 else if ( id1 == standAloneIsoId )
216 iso1 = standAloneIso->value( lep1.
key() );
219 iso2 = muIso->value( lep2.key() );
220 else if ( id2 == standAloneIsoId )
221 iso2 = standAloneIso->value( lep2.key() );
223 double ms = zsmCand.
mass();
228 CandMatchMap::const_iterator m0 = zMuStandAloneMap->find(CandRef);
229 if( m0 != zMuStandAloneMap->end()) {
233 bool noOverlap =
true;
234 for(
unsigned int j = 0;
j < zMuTrack->size();
j++ ) {
247 iso1 = muIso->value( lep1.
key() );
248 else if ( id1 == trackIsoId )
249 iso1 = trackIso->value( lep1.
key() );
252 iso2 = muIso->value( lep2.key() );
253 else if ( id2 == trackIsoId )
254 iso2 = trackIso->value( lep2.key() );
256 double mt = ztmCand.
mass();
261 if (
overlap_( ztmCand, zsmCand ) ) {
267 CandMatchMap::const_iterator m1 = zMuTrackMap->find(CandReft);
268 CandMatchMap::const_iterator m2 = zMuStandAloneMap->find(CandRef);
270 if( m1 != zMuTrackMap->end() && m2 != zMuStandAloneMap->end() ) {
292 cout<<
"-- N SingleTrackMu = "<<Nztm<<endl;
293 cout<<
"-----N SinglStandAloneMu = "<<Nzsm<<endl;
294 cout<<
"-----N SingleStandAloneOverlapMu = "<<Nzsnom<<endl;
295 cout<<
"------- N MuMu = "<<Nzmm<<endl;
297 cout<<
"-- N SingleTrackMuMatched = "<<NztmMatch<<endl;
298 cout<<
"-----N SinglStandAloneMuMatched = "<<NzsmMatch<<endl;
299 cout<<
"-----N SingleStandAloneOverlapMuMatched = "<<NzsnomMatch<<endl;
300 cout<<
"------- N MuMu Matched = "<<NzmmMatch<<endl;
virtual const Candidate * daughter(size_type i) const =0
return daughter at a given position, i = 0, ... numberOfDaughters() - 1 (read only mode) ...
virtual float mass() const =0
mass
#define DEFINE_FWK_MODULE(type)
T * make(const Args &...args) const
make new ROOT object
virtual void analyze(const edm::Event &event, const edm::EventSetup &setup) override
ZMuMuAnalyzer(const edm::ParameterSet &pset)
InputTag zMuStandAloneMap_
edm::ValueMap< float > IsolationCollection
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
TH1D * h_zMuSingleTrack_mass_
TH1D * h_zMuMuMatched_mass_
virtual void endJob() override
REF castTo() const
cast to a concrete type
key_type key() const
Accessor for product key.
TH1D * h_zMuSingleStandAlone_mass_
TH1D * h_zMuSingleStandAloneOverlapMatched_mass_
TH1D * h_zMuSingleTrackMatched_mass_
ProductID id() const
Accessor for product ID.
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
virtual const CandidateBaseRef & masterClone() const =0