50 using namespace isodeposit;
57 virtual void endJob();
68 TH1D *h_trackProbe_eta_no_FSR, *
h_trackProbe_pt_no_FSR, *h_staProbe_eta_no_FSR, *h_staProbe_pt_no_FSR, *h_ProbeOk_eta_no_FSR, *h_ProbeOk_pt_no_FSR;
69 TH1D *h_trackProbe_eta_FSR, *
h_trackProbe_pt_FSR, *h_staProbe_eta_FSR, *h_staProbe_pt_FSR, *h_ProbeOk_eta_FSR, *h_ProbeOk_pt_FSR;
71 bool FSR_mu,
FSR_tk, FSR_mu0, FSR_mu1;
81 zMuMu_(pset.getParameter<
InputTag>(
"zMuMu")),
82 zMuMuMatchMap_(pset.getParameter<
InputTag>(
"zMuMuMatchMap")),
83 zMuTk_(pset.getParameter<
InputTag>(
"zMuTk")),
84 zMuTkMatchMap_(pset.getParameter<
InputTag>(
"zMuTkMatchMap")),
85 zMuSa_(pset.getParameter<
InputTag>(
"zMuSa")),
86 zMuSaMatchMap_(pset.getParameter<
InputTag>(
"zMuSaMatchMap")),
87 dRVeto_(pset.getUntrackedParameter<double>(
"veto")),
88 dRTrk_(pset.getUntrackedParameter<double>(
"deltaRTrk")),
89 ptThreshold_(pset.getUntrackedParameter<double>(
"ptThreshold")){
97 h_zmass_FSR= fs->
make<TH1D>(
"h_zmass_FRS",
"Invariant Z mass distribution",200,0,200);
98 h_zmass_no_FSR= fs->
make<TH1D>(
"h_zmass_no_FSR",
"Invariant Z mass distribution",200,0,200);
99 h_zMuSamass_FSR= fs->
make<TH1D>(
"h_zMuSamass_FRS",
"Invariant Z mass distribution",200,0,200);
101 h_zMuTkmass_FSR= fs->
make<TH1D>(
"h_zMuTkmass_FRS",
"Invariant Z mass distribution",200,0,200);
103 h_Iso_= fs->
make<TH1D>(
"h_iso",
"Isolation distribution of muons without FSR",100,0,20);
104 h_Iso_FSR_= fs->
make<TH1D>(
"h_iso_FSR",
"Isolation distribution of muons with FSR ",100,0,20);
105 h_Iso_3D_= fs->
make<TH3D>(
"h_iso_3D",
"Isolation distribution of muons without FSR",100,20,100,100,-2.0,2.0,100,0,20);
106 h_Iso_FSR_3D_= fs->
make<TH3D>(
"h_iso_FSR_3D",
"Isolation distribution of muons with FSR ",100,20,100,100,-2.0,2.0,100,0,20);
134 event.getByLabel(
zMuMu_, zMuMu);
137 event.getByLabel(
zMuTk_, zMuTk);
140 event.getByLabel(
zMuSa_, zMuSa);
141 cout <<
"********** New Event ***********"<<endl;
143 if (zMuMu->size() > 0 ) {
145 for(
unsigned int i = 0;
i < zMuMu->size(); ++
i) {
156 double zmass= zMuMuCand.
mass();
157 double pt0 = mu0.
pt();
158 double pt1 = mu1.
pt();
159 double eta0 = mu0.
eta();
160 double eta1 = mu1.
eta();
161 if(pt0>20 && pt1 > 20 &&
abs(eta0)<2 &&
abs(eta1)<2 && zmass > 20 && zmass < 200){
165 cout<<
" Zmumu cuts && matched" <<endl;
183 double Tracker_isovalue_mu0 = mu0TrackIso->
sumWithin(
dRTrk_,vetos_mu0);
184 double Tracker_isovalue_mu1 = mu1TrackIso->
sumWithin(
dRTrk_,vetos_mu1);
193 if( mu0HLTMatches.size()>0 )
195 if( mu1HLTMatches.size()>0 )
205 cout<<
" muone0"<<endl;
206 cout<<
" num di daughters = "<< num_dau_muon0 <<endl;
207 if( num_dau_muon0 > 1 ){
208 for(
int j = 0;
j < num_dau_muon0; ++
j){
210 cout<<
" dauther["<<
j<<
"] pdgId = "<<
id<<endl;
215 cout<<
" muone1"<<endl;
216 cout<<
" num di daughters = "<< num_dau_muon1 <<endl;
217 if( num_dau_muon1 > 1 ){
218 for(
int j = 0;
j < num_dau_muon1; ++
j){
220 cout<<
" dauther["<<
j<<
"] pdgId = "<<
id<<endl;
229 cout<<
"muon 1 is triggered "<<endl;
231 cout<<
"and muon 0 does FSR"<<endl;
241 cout<<
"and muon 0 doesn't FSR"<<endl;
256 h_Iso_->Fill(Tracker_isovalue_mu0);
257 h_Iso_3D_->Fill(pt0,eta0,Tracker_isovalue_mu0);
261 cout<<
"muon 0 is triggered"<<endl;
263 cout<<
"and muon 1 does FSR"<<endl;
274 cout<<
"and muon 1 doesn't FSR"<<endl;
290 h_Iso_->Fill(Tracker_isovalue_mu1);
291 h_Iso_3D_->Fill(pt1,eta1,Tracker_isovalue_mu1);
300 if (zMuSa->size() > 0 ) {
302 for(
unsigned int i = 0;
i < zMuSa->size(); ++
i) {
313 double zmass= zMuSaCand.
mass();
314 double pt0 = mu0.
pt();
315 double pt1 = mu1.
pt();
316 double eta0 = mu0.
eta();
317 double eta1 = mu1.
eta();
318 if(pt0>20 && pt1 > 20 &&
abs(eta0)<2 &&
abs(eta1)<2 && zmass > 20 && zmass < 200){
321 cout<<
" Zmusa cuts && matched" <<endl;
339 double Tracker_isovalue_mu0 = mu0TrackIso->
sumWithin(
dRTrk_,vetos_mu0);
340 double Tracker_isovalue_mu1 = mu1TrackIso->
sumWithin(
dRTrk_,vetos_mu1);
349 if( mu0HLTMatches.size()>0 )
351 if( mu1HLTMatches.size()>0 )
361 cout<<
" muone0"<<endl;
362 cout<<
" num di daughters = "<< num_dau_muon0 <<endl;
363 if( num_dau_muon0 > 1 ){
364 for(
int j = 0;
j < num_dau_muon0; ++
j){
366 cout<<
" dauther["<<
j<<
"] pdgId = "<<
id<<endl;
371 cout<<
" muone1"<<endl;
372 cout<<
" num di daughters = "<< num_dau_muon1 <<endl;
373 if( num_dau_muon1 > 1 ){
374 for(
int j = 0;
j < num_dau_muon1; ++
j){
376 cout<<
" dauther["<<
j<<
"] pdgId = "<<
id<<endl;
399 h_Iso_->Fill(Tracker_isovalue_mu1);
400 h_Iso_3D_->Fill(pt1,eta1,Tracker_isovalue_mu1);
420 h_Iso_->Fill(Tracker_isovalue_mu0);
421 h_Iso_3D_->Fill(pt0,eta0,Tracker_isovalue_mu0);
430 if (zMuTk->size() > 0 ) {
432 for(
unsigned int i = 0;
i < zMuTk->size(); ++
i) {
441 double zmass= zMuTkCand.
mass();
442 double pt0 = mu0.
pt();
443 double pt1 = mu1.
pt();
444 double eta0 = mu0.
eta();
445 double eta1 = mu1.
eta();
446 if(pt0>20 && pt1 > 20 &&
abs(eta0)<2 &&
abs(eta1)<2 && zmass > 20 && zmass < 200){
451 cout<<
" ZmuTk cuts && matched"<<endl;
477 cout<<
"numero di figli muone0 = " << num_dau_muon0 <<endl;
478 cout<<
"numero di figli muone1 = " << num_dau_muon1 <<endl;
481 cout<<
" num di daughters = "<< num_dau_muon0 <<endl;
482 if( num_dau_muon0 > 1 ){
483 for(
int j = 0;
j < num_dau_muon0; ++
j){
485 cout<<
" dau["<<
j<<
"] pdg ID = "<<
id<<endl;
492 cout<<
" traccia"<<endl;
493 cout<<
" num di daughters = "<< num_dau_muon1 <<endl;
494 if( num_dau_muon1 > 1 ){
495 for(
int j = 0;
j < num_dau_muon1; ++
j){
497 cout<<
" dau["<<
j<<
"] pdg ID = "<<
id<<endl;
504 cout<<
"Mu Isolation = "<< Tracker_isovalue_mu <<endl;
505 cout<<
"Track Isolation = "<< Tracker_isovalue_tk <<endl;
511 h_Iso_->Fill( Tracker_isovalue_mu);
512 h_Iso_3D_->Fill(pt0,eta0,Tracker_isovalue_mu);
522 h_Iso_->Fill( Tracker_isovalue_tk);
523 h_Iso_3D_->Fill(pt1,eta1,Tracker_isovalue_tk);
536 cout<<
" ============= Summary =========="<<endl;
538 cout <<
" 1)Numero di ZMuMu matched dopo i tagli cinematici = "<<
zmmcounter << endl;
539 cout <<
" 2)Numero di ZMuSa matched dopo i tagli cinematici = "<<
zmscounter << endl;
540 cout <<
" 3)Numero di ZMuTk matched dopo i tagli cinematici = "<<
zmtcounter << endl;
543 double eff_iso_FSR = (double)icut1/(
double)n1;
544 double err_iso_FSR =
sqrt(eff_iso_FSR*(1-eff_iso_FSR)/n1);
545 double n2=
h_Iso_->Integral();
546 double icut2=
h_Iso_->Integral(0,15);
547 double eff_iso= (double)icut2/(
double)n2;
548 double err_iso =
sqrt(eff_iso*(1-eff_iso)/n2);
549 cout<<
" ============= Isolation Efficiecy =========="<<endl;
550 cout<<
"Isolation Efficiency = "<< eff_iso <<
" +/- "<< err_iso <<endl;
551 cout<<
"Isolation Efficiency with FSR = "<< eff_iso_FSR <<
" +/- "<< err_iso_FSR <<endl;
TH1D * h_trackProbe_eta_FSR
virtual const Candidate * daughter(size_type i) const =0
return daughter at a given position, i = 0, ... numberOfDaughters() - 1 (read only mode) ...
const reco::GenParticle * genLepton() const
const reco::GenParticle * genParticle(size_t idx=0) const
TH1D * h_staProbe_eta_no_FSR
#define DEFINE_FWK_MODULE(type)
virtual double mass() const =0
mass
const IsoDeposit * isoDeposit(IsolationKeys key) const
Returns the IsoDeposit associated with some key, or a null pointer if it is not available.
TH2D * h_staProbe_pt_eta_no_FSR_
std::vector< TriggerObjectStandAlone > TriggerObjectStandAloneCollection
Collection of TriggerObjectStandAlone.
TH2D * h_ProbeOk_pt_eta_no_FSR_
const IsoDeposit * isoDeposit(IsolationKeys key) const
Returns the IsoDeposit associated with some key, or a null pointer if it is not available.
TH1D * h_trackProbe_eta_no_FSR
edm::InputTag zMuTkMatchMap_
virtual void analyze(const edm::Event &event, const edm::EventSetup &setup)
virtual double eta() const
momentum pseudorapidity
double sumWithin(double coneSize, const AbsVetos &vetos=AbsVetos(), bool skipDepositVeto=false) const
bool isNonnull() const
Checks for non-null.
Analysis-level Generic Particle class (e.g. for hadron or muon not fully reconstructed) ...
virtual size_type numberOfDaughters() const =0
number of daughters
edm::ValueMap< float > IsolationCollection
tuple zMuSa
zMUSa vector of PSet is specific for zMuSa category
TH1D * h_staProbe_eta_FSR
TH1D * h_trackProbe_pt_FSR
edm::InputTag zMuMuMatchMap_
const TriggerObjectStandAloneCollection triggerObjectMatchesByPath(const std::string &namePath, const bool pathLastFilterAccepted=false, const bool pathL3FilterAccepted=true) const
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
ZMuMu_Radiative_analyzer(const edm::ParameterSet &pset)
virtual int pdgId() const =0
PDG identifier.
TH1D * h_ProbeOk_eta_no_FSR
virtual double pt() const
transverse momentum
TH1D * h_zMuTkmass_no_FSR
TH1D * h_staProbe_pt_no_FSR
TH1D * h_trackProbe_pt_no_FSR
TH1D * h_zMuSamass_no_FSR
T * make() const
make new ROOT object
TH2D * h_staProbe_pt_eta_FSR_
std::vector< AbsVeto * > AbsVetos
TH1D * h_ProbeOk_pt_no_FSR
TH2D * h_ProbeOk_pt_eta_FSR_
isodeposit::AbsVetos AbsVetos
virtual double phi() const
momentum azimuthal angle
Analysis-level muon class.
virtual const Candidate * mother(size_type=0) const
return mother at a given position, i = 0, ... numberOfMothers() - 1 (read only mode) ...
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
edm::InputTag zMuSaMatchMap_
virtual bool isGlobalMuon() const =0
virtual const CandidateBaseRef & masterClone() const =0