46 virtual void endJob();
54 double isocut_, etacut_, ptcut_,
ptSTAcut_, minZmass_, maxZmass_;
55 TH1D * h_zMuMu_mass_, * h_zMuSingleTrack_mass_, * h_zMuSingleStandAlone_mass_,* h_zMuSingleStandAloneOverlap_mass_,
56 * h_zMuMuMatched_mass_,
58 * h_zMuSingleStandAloneMatched_mass_,
59 * h_zMuSingleStandAloneOverlapMatched_mass_;
63 zMuMu_( pset.getParameter<
InputTag>(
"zMuMu" ) ),
64 zMuTrack_( pset.getParameter<
InputTag>(
"zMuTrack" ) ),
65 zMuStandAlone_( pset.getParameter<
InputTag>(
"zMuStandAlone" ) ),
66 muIso_( pset.getParameter<
InputTag>(
"muIso" ) ),
67 trackIso_( pset.getParameter<
InputTag>(
"trackIso" ) ),
68 standAloneIso_( pset.getParameter<
InputTag>(
"standAloneIso" ) ),
69 zMuMuMap_( pset.getParameter<
InputTag>(
"zMuMuMap" ) ),
70 zMuTrackMap_( pset.getParameter<
InputTag>(
"zMuTrackMap" ) ),
71 zMuStandAloneMap_( pset.getParameter<
InputTag>(
"zMuStandAloneMap" ) ),
72 isocut_( pset.getParameter<double>(
"isocut" ) ),
73 etacut_( pset.getParameter<double>(
"etacut" ) ),
74 ptcut_( pset.getParameter<double>(
"ptcut" ) ),
75 ptSTAcut_( pset.getParameter<double>(
"ptSTAcut" ) ),
77 minZmass_( pset.getParameter<double>(
"minZmass" )),
78 maxZmass_( pset.getParameter<double>(
"maxZmass" )) {
95 event.getByLabel(
zMuMu_, zMuMu);
101 unsigned int nZMuMu = zMuMu->size();
102 unsigned int nZTrackMu = zMuTrack->size();
103 unsigned int nZStandAloneMu = zMuStandAlone->size();
104 static const double zMass = 91.1876;
116 if( nZTrackMu > 0 ) {
121 if( nZStandAloneMu > 0 ) {
126 event.getByLabel(
muIso_, muIso);
130 ProductID trackIsoId = trackIso->keyProduct().
id();
134 ProductID standAloneIsoId = standAloneIso->keyProduct().
id();
137 double mass = 1000000.;
138 for(
unsigned int i = 0;
i < nZMuMu;
i++ ) {
144 const double iso1 = muIso->value( lep1.
key() );
145 const double iso2 = muIso->value( lep2.key() );
147 double m = zmmCand.
mass();
151 if ( fabs( mass - zMass ) > fabs( m - zMass ) ) {
157 if( m0 != zMuMuMap->end()) {
165 if (nZMuMu ==0 && nZTrackMu>0) {
166 for(
unsigned int j = 0;
j < nZTrackMu;
j++ ) {
178 iso1 = muIso->value( lep1.
key() );
179 else if ( id1 == trackIsoId )
180 iso1 = trackIso->value( lep1.
key() );
183 iso2 = muIso->value( lep2.key() );
184 else if ( id2 == trackIsoId )
185 iso2 = trackIso->value( lep2.key() );
187 double mt = ztmCand.
mass();
193 if( m0 != zMuTrackMap->end()) {
201 if (nZMuMu ==0 && nZStandAloneMu>0) {
203 for(
unsigned int j = 0;
j < nZStandAloneMu;
j++ ) {
204 const Candidate & zsmCand = (*zMuStandAlone)[
j ];
215 iso1 = muIso->value( lep1.
key() );
216 else if ( id1 == standAloneIsoId )
217 iso1 = standAloneIso->value( lep1.
key() );
220 iso2 = muIso->value( lep2.key() );
221 else if ( id2 == standAloneIsoId )
222 iso2 = standAloneIso->value( lep2.key() );
224 double ms = zsmCand.
mass();
230 if( m0 != zMuStandAloneMap->end()) {
234 bool noOverlap =
true;
235 for(
unsigned int j = 0;
j < zMuTrack->size();
j++ ) {
248 iso1 = muIso->value( lep1.
key() );
249 else if ( id1 == trackIsoId )
250 iso1 = trackIso->value( lep1.
key() );
253 iso2 = muIso->value( lep2.key() );
254 else if ( id2 == trackIsoId )
255 iso2 = trackIso->value( lep2.key() );
257 double mt = ztmCand.
mass();
262 if (
overlap_( ztmCand, zsmCand ) ) {
271 if( m1 != zMuTrackMap->end() && m2 != zMuStandAloneMap->end() ) {
293 cout<<
"-- N SingleTrackMu = "<<Nztm<<endl;
294 cout<<
"-----N SinglStandAloneMu = "<<Nzsm<<endl;
295 cout<<
"-----N SingleStandAloneOverlapMu = "<<Nzsnom<<endl;
296 cout<<
"------- N MuMu = "<<Nzmm<<endl;
298 cout<<
"-- N SingleTrackMuMatched = "<<NztmMatch<<endl;
299 cout<<
"-----N SinglStandAloneMuMatched = "<<NzsmMatch<<endl;
300 cout<<
"-----N SingleStandAloneOverlapMuMatched = "<<NzsnomMatch<<endl;
301 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)
ZMuMuAnalyzer(const edm::ParameterSet &pset)
InputTag zMuStandAloneMap_
edm::ValueMap< float > IsolationCollection
virtual void analyze(const edm::Event &event, const edm::EventSetup &setup)
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_
REF castTo() const
cast to a concrete type
key_type key() const
Accessor for product key.
TH1D * h_zMuSingleStandAlone_mass_
TH1D * h_zMuSingleStandAloneOverlapMatched_mass_
T * make() const
make new ROOT object
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