50 using namespace isodeposit;
57 virtual void endJob()
override;
73 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;
74 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;
76 bool FSR_mu,
FSR_tk, FSR_mu0, FSR_mu1;
92 dRVeto_(pset.getUntrackedParameter<double>(
"veto")),
93 dRTrk_(pset.getUntrackedParameter<double>(
"deltaRTrk")),
94 ptThreshold_(pset.getUntrackedParameter<double>(
"ptThreshold")){
102 h_zmass_FSR= fs->
make<TH1D>(
"h_zmass_FRS",
"Invariant Z mass distribution",200,0,200);
103 h_zmass_no_FSR= fs->
make<TH1D>(
"h_zmass_no_FSR",
"Invariant Z mass distribution",200,0,200);
104 h_zMuSamass_FSR= fs->
make<TH1D>(
"h_zMuSamass_FRS",
"Invariant Z mass distribution",200,0,200);
106 h_zMuTkmass_FSR= fs->
make<TH1D>(
"h_zMuTkmass_FRS",
"Invariant Z mass distribution",200,0,200);
108 h_Iso_= fs->
make<TH1D>(
"h_iso",
"Isolation distribution of muons without FSR",100,0,20);
109 h_Iso_FSR_= fs->
make<TH1D>(
"h_iso_FSR",
"Isolation distribution of muons with FSR ",100,0,20);
110 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);
111 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);
146 cout <<
"********** New Event ***********"<<endl;
148 if (zMuMu->size() > 0 ) {
150 for(
unsigned int i = 0;
i < zMuMu->size(); ++
i) {
161 double zmass= zMuMuCand.
mass();
162 double pt0 = mu0.
pt();
163 double pt1 = mu1.
pt();
164 double eta0 = mu0.
eta();
165 double eta1 = mu1.
eta();
166 if(pt0>20 && pt1 > 20 &&
abs(eta0)<2 &&
abs(eta1)<2 && zmass > 20 && zmass < 200){
170 cout<<
" Zmumu cuts && matched" <<endl;
188 double Tracker_isovalue_mu0 = mu0TrackIso->
sumWithin(
dRTrk_,vetos_mu0);
189 double Tracker_isovalue_mu1 = mu1TrackIso->
sumWithin(
dRTrk_,vetos_mu1);
198 if( mu0HLTMatches.size()>0 )
200 if( mu1HLTMatches.size()>0 )
210 cout<<
" muone0"<<endl;
211 cout<<
" num di daughters = "<< num_dau_muon0 <<endl;
212 if( num_dau_muon0 > 1 ){
213 for(
int j = 0;
j < num_dau_muon0; ++
j){
215 cout<<
" dauther["<<
j<<
"] pdgId = "<<
id<<endl;
220 cout<<
" muone1"<<endl;
221 cout<<
" num di daughters = "<< num_dau_muon1 <<endl;
222 if( num_dau_muon1 > 1 ){
223 for(
int j = 0;
j < num_dau_muon1; ++
j){
225 cout<<
" dauther["<<
j<<
"] pdgId = "<<
id<<endl;
234 cout<<
"muon 1 is triggered "<<endl;
236 cout<<
"and muon 0 does FSR"<<endl;
246 cout<<
"and muon 0 doesn't FSR"<<endl;
261 h_Iso_->Fill(Tracker_isovalue_mu0);
262 h_Iso_3D_->Fill(pt0,eta0,Tracker_isovalue_mu0);
266 cout<<
"muon 0 is triggered"<<endl;
268 cout<<
"and muon 1 does FSR"<<endl;
279 cout<<
"and muon 1 doesn't FSR"<<endl;
295 h_Iso_->Fill(Tracker_isovalue_mu1);
296 h_Iso_3D_->Fill(pt1,eta1,Tracker_isovalue_mu1);
305 if (zMuSa->size() > 0 ) {
307 for(
unsigned int i = 0;
i < zMuSa->size(); ++
i) {
318 double zmass= zMuSaCand.
mass();
319 double pt0 = mu0.
pt();
320 double pt1 = mu1.
pt();
321 double eta0 = mu0.
eta();
322 double eta1 = mu1.
eta();
323 if(pt0>20 && pt1 > 20 &&
abs(eta0)<2 &&
abs(eta1)<2 && zmass > 20 && zmass < 200){
326 cout<<
" Zmusa cuts && matched" <<endl;
344 double Tracker_isovalue_mu0 = mu0TrackIso->
sumWithin(
dRTrk_,vetos_mu0);
345 double Tracker_isovalue_mu1 = mu1TrackIso->
sumWithin(
dRTrk_,vetos_mu1);
354 if( mu0HLTMatches.size()>0 )
356 if( mu1HLTMatches.size()>0 )
366 cout<<
" muone0"<<endl;
367 cout<<
" num di daughters = "<< num_dau_muon0 <<endl;
368 if( num_dau_muon0 > 1 ){
369 for(
int j = 0;
j < num_dau_muon0; ++
j){
371 cout<<
" dauther["<<
j<<
"] pdgId = "<<
id<<endl;
376 cout<<
" muone1"<<endl;
377 cout<<
" num di daughters = "<< num_dau_muon1 <<endl;
378 if( num_dau_muon1 > 1 ){
379 for(
int j = 0;
j < num_dau_muon1; ++
j){
381 cout<<
" dauther["<<
j<<
"] pdgId = "<<
id<<endl;
404 h_Iso_->Fill(Tracker_isovalue_mu1);
405 h_Iso_3D_->Fill(pt1,eta1,Tracker_isovalue_mu1);
425 h_Iso_->Fill(Tracker_isovalue_mu0);
426 h_Iso_3D_->Fill(pt0,eta0,Tracker_isovalue_mu0);
435 if (zMuTk->size() > 0 ) {
437 for(
unsigned int i = 0;
i < zMuTk->size(); ++
i) {
446 double zmass= zMuTkCand.
mass();
447 double pt0 = mu0.
pt();
448 double pt1 = mu1.
pt();
449 double eta0 = mu0.
eta();
450 double eta1 = mu1.
eta();
451 if(pt0>20 && pt1 > 20 &&
abs(eta0)<2 &&
abs(eta1)<2 && zmass > 20 && zmass < 200){
456 cout<<
" ZmuTk cuts && matched"<<endl;
482 cout<<
"numero di figli muone0 = " << num_dau_muon0 <<endl;
483 cout<<
"numero di figli muone1 = " << num_dau_muon1 <<endl;
486 cout<<
" num di daughters = "<< num_dau_muon0 <<endl;
487 if( num_dau_muon0 > 1 ){
488 for(
int j = 0;
j < num_dau_muon0; ++
j){
490 cout<<
" dau["<<
j<<
"] pdg ID = "<<
id<<endl;
497 cout<<
" traccia"<<endl;
498 cout<<
" num di daughters = "<< num_dau_muon1 <<endl;
499 if( num_dau_muon1 > 1 ){
500 for(
int j = 0;
j < num_dau_muon1; ++
j){
502 cout<<
" dau["<<
j<<
"] pdg ID = "<<
id<<endl;
509 cout<<
"Mu Isolation = "<< Tracker_isovalue_mu <<endl;
510 cout<<
"Track Isolation = "<< Tracker_isovalue_tk <<endl;
516 h_Iso_->Fill( Tracker_isovalue_mu);
517 h_Iso_3D_->Fill(pt0,eta0,Tracker_isovalue_mu);
527 h_Iso_->Fill( Tracker_isovalue_tk);
528 h_Iso_3D_->Fill(pt1,eta1,Tracker_isovalue_tk);
541 cout<<
" ============= Summary =========="<<endl;
543 cout <<
" 1)Numero di ZMuMu matched dopo i tagli cinematici = "<<
zmmcounter << endl;
544 cout <<
" 2)Numero di ZMuSa matched dopo i tagli cinematici = "<<
zmscounter << endl;
545 cout <<
" 3)Numero di ZMuTk matched dopo i tagli cinematici = "<<
zmtcounter << endl;
548 double eff_iso_FSR = (double)icut1/(
double)n1;
549 double err_iso_FSR =
sqrt(eff_iso_FSR*(1-eff_iso_FSR)/n1);
550 double n2=
h_Iso_->Integral();
551 double icut2=
h_Iso_->Integral(0,15);
552 double eff_iso= (double)icut2/(
double)n2;
553 double err_iso =
sqrt(eff_iso*(1-eff_iso)/n2);
554 cout<<
" ============= Isolation Efficiecy =========="<<endl;
555 cout<<
"Isolation Efficiency = "<< eff_iso <<
" +/- "<< err_iso <<endl;
556 cout<<
"Isolation Efficiency with FSR = "<< eff_iso_FSR <<
" +/- "<< err_iso_FSR <<endl;
TH1D * h_trackProbe_eta_FSR
EDGetTokenT< GenParticleMatch > zMuMuMatchMapToken_
virtual void analyze(const edm::Event &event, const edm::EventSetup &setup) override
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
virtual float mass() const =0
mass
virtual float pt() const
transverse momentum
const reco::GenParticle * genParticle(size_t idx=0) const
TH1D * h_staProbe_eta_no_FSR
#define DEFINE_FWK_MODULE(type)
virtual float phi() const
momentum azimuthal angle
EDGetTokenT< GenParticleMatch > zMuTkMatchMapToken_
T * make(const Args &...args) const
make new ROOT object
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
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
EDGetTokenT< CandidateView > zMuSaToken_
virtual float eta() const
momentum pseudorapidity
tuple zMuSa
zMUSa vector of PSet is specific for zMuSa category
TH1D * h_staProbe_eta_FSR
Abs< T >::type abs(const T &t)
TH1D * h_trackProbe_pt_FSR
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)
EDGetTokenT< CandidateView > zMuMuToken_
virtual int pdgId() const =0
PDG identifier.
TH1D * h_ProbeOk_eta_no_FSR
EDGetTokenT< GenParticleMatch > zMuSaMatchMapToken_
TH1D * h_zMuTkmass_no_FSR
TH1D * h_staProbe_pt_no_FSR
TH1D * h_trackProbe_pt_no_FSR
TH1D * h_zMuSamass_no_FSR
EDGetTokenT< CandidateView > zMuTkToken_
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 void endJob() override
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
virtual bool isGlobalMuon() const =0
virtual const CandidateBaseRef & masterClone() const =0