CMS 3D CMS Logo

 All Classes Namespaces Files Functions Variables Typedefs Enumerations Enumerator Properties Friends Macros Pages
List of all members | Public Member Functions | Private Types | Private Member Functions | Private Attributes
ZMuMuIsolationAnalyzer Class Reference
Inheritance diagram for ZMuMuIsolationAnalyzer:
edm::EDAnalyzer edm::EDConsumerBase

Public Member Functions

 ZMuMuIsolationAnalyzer (const edm::ParameterSet &pset)
 
- Public Member Functions inherited from edm::EDAnalyzer
void callWhenNewProductsRegistered (std::function< void(BranchDescription const &)> const &func)
 
 EDAnalyzer ()
 
ModuleDescription const & moduleDescription () const
 
std::string workerType () const
 
virtual ~EDAnalyzer ()
 
- Public Member Functions inherited from edm::EDConsumerBase
std::vector< ConsumesInfoconsumesInfo () const
 
 EDConsumerBase ()
 
ProductHolderIndexAndSkipBit indexFrom (EDGetToken, BranchType, TypeID const &) const
 
void itemsMayGet (BranchType, std::vector< ProductHolderIndexAndSkipBit > &) const
 
void itemsToGet (BranchType, std::vector< ProductHolderIndexAndSkipBit > &) const
 
std::vector
< ProductHolderIndexAndSkipBit >
const & 
itemsToGetFromEvent () const
 
void labelsForToken (EDGetToken iToken, Labels &oLabels) const
 
void modulesDependentUpon (const std::string &iProcessName, std::vector< const char * > &oModuleLabels) const
 
void modulesWhoseProductsAreConsumed (std::vector< ModuleDescription const * > &modules, ProductRegistry const &preg, std::map< std::string, ModuleDescription const * > const &labelsToDesc, std::string const &processName) const
 
bool registeredToConsume (ProductHolderIndex, bool, BranchType) const
 
bool registeredToConsumeMany (TypeID const &, BranchType) const
 
void updateLookup (BranchType iBranchType, ProductHolderIndexHelper const &)
 
virtual ~EDConsumerBase ()
 

Private Types

enum  MuTag { muFromZ, muFromW, muFromOther }
 

Private Member Functions

virtual void analyze (const edm::Event &event, const edm::EventSetup &setup) override
 
void Deposits (const pat::IsoDeposit *isodep, double dR_max, TH1F *hist)
 
virtual void endJob () override
 
void histo (TH1F *hist, const char *cx, const char *cy) const
 
template<typename T >
MuTag muTag (const T &mu) const
 

Private Attributes

double alpha
 
double beta
 
double dREcal
 
double dRHcal
 
double dRTrk
 
double dRVeto
 
TH1F * EcalEt
 
TH1F * EcalEtZ
 
double eta
 
double etEcalThreshold
 
double etHcalThreshold
 
TH1F * h_IsoOther_ecal
 
TH1F * h_IsoOther_hcal
 
TH1F * h_IsoOther_tk
 
TH1F * h_IsoW_ecal
 
TH1F * h_IsoW_hcal
 
TH1F * h_IsoW_tk
 
TH1F * h_IsoZ_ecal
 
TH1F * h_IsoZ_hcal
 
TH1F * h_IsoZ_tk
 
TH1F * HcalEt
 
TH1F * HcalEtZ
 
double iso_cut
 
TH1F * IsoOther
 
TH1F * IsoW
 
TH1F * IsoZ
 
TH1F * Other_eta
 
TH1F * Other_eta_postSelection
 
TH1F * Other_pt
 
TH1F * Other_pt_postSelection
 
double pt
 
double ptThreshold
 
EDGetTokenT< CandidateViewsrcToken
 
TH1F * TkrPt
 
TH1F * W_eta
 
TH1F * W_eta_postSelection
 
TH1F * W_pt
 
TH1F * W_pt_postSelection
 
TH1F * Z_eta
 
TH1F * Z_eta_postSelection
 
TH1F * Z_pt
 
TH1F * Z_pt_postSelection
 

Additional Inherited Members

- Public Types inherited from edm::EDAnalyzer
typedef EDAnalyzer ModuleType
 
- Static Public Member Functions inherited from edm::EDAnalyzer
static const std::string & baseType ()
 
static void fillDescriptions (ConfigurationDescriptions &descriptions)
 
static void prevalidate (ConfigurationDescriptions &)
 
- Protected Member Functions inherited from edm::EDConsumerBase
template<typename ProductType , BranchType B = InEvent>
EDGetTokenT< ProductType > consumes (edm::InputTag const &tag)
 
EDGetToken consumes (const TypeToGet &id, edm::InputTag const &tag)
 
template<BranchType B>
EDGetToken consumes (TypeToGet const &id, edm::InputTag const &tag)
 
ConsumesCollector consumesCollector ()
 Use a ConsumesCollector to gather consumes information from helper functions. More...
 
template<typename ProductType , BranchType B = InEvent>
void consumesMany ()
 
void consumesMany (const TypeToGet &id)
 
template<BranchType B>
void consumesMany (const TypeToGet &id)
 
template<typename ProductType , BranchType B = InEvent>
EDGetTokenT< ProductType > mayConsume (edm::InputTag const &tag)
 
EDGetToken mayConsume (const TypeToGet &id, edm::InputTag const &tag)
 
template<BranchType B>
EDGetToken mayConsume (const TypeToGet &id, edm::InputTag const &tag)
 

Detailed Description

Definition at line 35 of file ZMuMuIsolationAnalyzer.cc.

Member Enumeration Documentation

Constructor & Destructor Documentation

ZMuMuIsolationAnalyzer::ZMuMuIsolationAnalyzer ( const edm::ParameterSet pset)

Definition at line 128 of file ZMuMuIsolationAnalyzer.cc.

References alpha, beta, dRTrk, EcalEt, EcalEtZ, eta, h_IsoOther_ecal, h_IsoOther_hcal, h_IsoOther_tk, h_IsoW_ecal, h_IsoW_hcal, h_IsoW_tk, h_IsoZ_ecal, h_IsoZ_hcal, h_IsoZ_tk, HcalEt, HcalEtZ, IsoOther, IsoW, IsoZ, TFileService::make(), Other_eta, Other_eta_postSelection, Other_pt, Other_pt_postSelection, pt, ptThreshold, TkrPt, W_eta, W_eta_postSelection, W_pt, W_pt_postSelection, Z_eta, Z_eta_postSelection, Z_pt, and Z_pt_postSelection.

128  :
129  srcToken(consumes<CandidateView>(pset.getParameter<InputTag>("src"))),
130  dRVeto(pset.getUntrackedParameter<double>("veto")),
131  dRTrk(pset.getUntrackedParameter<double>("deltaRTrk")),
132  dREcal(pset.getUntrackedParameter<double>("deltaREcal")),
133  dRHcal(pset.getUntrackedParameter<double>("deltaRHcal")),
134  ptThreshold(pset.getUntrackedParameter<double>("ptThreshold")),
135  etEcalThreshold(pset.getUntrackedParameter<double>("etEcalThreshold")),
136  etHcalThreshold(pset.getUntrackedParameter<double>("etHcalThreshold")),
137  alpha(pset.getUntrackedParameter<double>("alpha")),
138  beta(pset.getUntrackedParameter<double>("beta")),
139  pt(pset.getUntrackedParameter<double>("pt")),
140  eta(pset.getUntrackedParameter<double>("eta")),
141  iso_cut(pset.getUntrackedParameter<double>("isoCut")) {
143  std::ostringstream str1,str2,str3,str4,str5,str6,str7,str8,str9,str10,n_tracks;
144  str1 << "muons from Z with p_{t} > " << ptThreshold << " GeV/c"<<" and #Delta R < "<<dRTrk;
145  str2 << "muons from W with p_{t} > " << ptThreshold << " GeV/c"<<" and #Delta R < "<<dRTrk;
146  str3 << "muons from Others with p_{t} > " << ptThreshold << " GeV/c"<<" and #Delta R < "<<dRTrk;
147  str4 << "muons from Z with p_{t} > " << ptThreshold << " GeV/c"<<" and #Delta R < "<<dRTrk<<" (alpha = "<<alpha<<" , "<<"beta = "<<beta<<" )";
148  str5 << "muons from W with p_{t} > " << ptThreshold << " GeV/c"<<" and #Delta R < "<<dRTrk<<" (alpha = "<<alpha<<" , "<<"beta = "<<beta<<" )";
149  str6 << "muons from Other with p_{t} > " << ptThreshold << " GeV/c"<<" and #Delta R < "<<dRTrk<<" (alpha = "<<alpha<<" , "<<"beta = "<<beta<<" )";
150  n_tracks <<"Number of tracks for muon with p_{t} > " << ptThreshold <<" and #Delta R < "<<dRTrk<< " GeV/c";
151  str7<<"Isolation Vs p_{t} with p_{t} > " << ptThreshold << " GeV/c"<<" and #Delta R < "<<dRTrk<<"(Tracker)";
152  str8<<"Isolation Vs p_{t} with p_{t} > " << ptThreshold << " GeV/c"<<" and #Delta R < "<<dRTrk<<"(Ecal)";
153  str9<<"Isolation Vs p_{t} with p_{t} > " << ptThreshold << " GeV/c"<<" and #Delta R < "<<dRTrk<<"(Hcal)";
154  str10<<"Isolation Vs p_{t} with p_{t} > " << ptThreshold << " GeV/c"<<" and #Delta R < "<<dRTrk<<" (alpha = "<<alpha<<" , "<<"beta = "<<beta<<" )";
155  h_IsoZ_tk = fs->make<TH1F>("ZIso_Tk",str1.str().c_str(),100,0.,20.);
156  h_IsoW_tk = fs->make<TH1F>("WIso_Tk",str2.str().c_str(),100,0.,20.);
157  h_IsoOther_tk = fs->make<TH1F>("otherIso_Tk",str3.str().c_str(),100,0.,20.);
158  h_IsoZ_ecal = fs->make<TH1F>("ZIso_ecal",str1.str().c_str(),100,0.,20.);
159  h_IsoW_ecal = fs->make<TH1F>("WIso_ecal",str2.str().c_str(),100,0.,20.);
160  h_IsoOther_ecal = fs->make<TH1F>("otherIso_ecal",str3.str().c_str(),100,0.,20.);
161  h_IsoZ_hcal = fs->make<TH1F>("ZIso_hcal",str1.str().c_str(),100,0.,20.);
162  h_IsoW_hcal = fs->make<TH1F>("WIso_hcal",str2.str().c_str(),100,0.,20.);
163  h_IsoOther_hcal = fs->make<TH1F>("otherIso_hcal",str3.str().c_str(),100,0.,20.);
164  IsoZ = fs->make<TH1F>("ZIso",str4.str().c_str(),100,0.,20.);
165  IsoW = fs->make<TH1F>("WIso",str5.str().c_str(),100,0.,20.);
166  IsoOther = fs->make<TH1F>("otherIso",str6.str().c_str(),100,0.,20.);
167 
168 
169  Z_eta = fs->make<TH1F>("Z_eta","#eta distribution for muons coming from Z",40,-eta,eta);
170  W_eta = fs->make<TH1F>("W_eta","#eta distribution for muons coming from W",40,-eta,eta);
171  Other_eta = fs->make<TH1F>("Other_eta","#eta distribution for muons coming from other",40,-eta,eta);
172  Z_eta_postSelection = fs->make<TH1F>("Z_eta_postSelection","#eta distribution for muons coming from Z after iso selection",40,-eta,eta);
173  W_eta_postSelection = fs->make<TH1F>("W_eta_postSelection","#eta distribution for muons coming from W after iso selection",40,-eta,eta);
174  Other_eta_postSelection = fs->make<TH1F>("Other_eta_postSelection","#eta distribution for muons coming from other after iso selection",40,-eta,eta);
175 
176  Z_pt = fs->make<TH1F>("Z_pt","p_{T} distribution for muons coming from Z",40,pt,150.);
177  W_pt = fs->make<TH1F>("W_pt","p_{T} distribution for muons coming from W",40,pt,150.);
178  Other_pt = fs->make<TH1F>("Other_pt","p_{T} distribution for muons coming from other",40,pt,150.);
179  Z_pt_postSelection = fs->make<TH1F>("Z_pt_postSelection","p_{T} distribution for muons coming from Z after iso selection",40,pt,150.);
180  W_pt_postSelection = fs->make<TH1F>("W_pt_postSelection","p_{t} distribution for muons coming from W after iso selection",40,pt,150.);
181  Other_pt_postSelection = fs->make<TH1F>("Other_pt_postSelection","p_{t} distribution for muons coming from other after iso selection",40,pt,150.);
182 
183 
184  TkrPt = fs->make<TH1F>("TkrPt","IsoDeposit p distribution in the Tracker",100,0.,10.);
185  EcalEt = fs->make<TH1F>("EcalEt","IsoDeposit E distribution in the Ecal",100,0.,5.);
186  HcalEt = fs->make<TH1F>("HcalEt","IsoDeposit E distribution in the Hcal",100,0.,5.);
187 
188  EcalEtZ = fs->make<TH1F>("VetoEcalEt"," #Sigma E_{T} deposited in veto cone in the Ecal",100,0.,10.);
189  HcalEtZ = fs->make<TH1F>("VetoHcalEt"," #Sigma E_{T} deposited in veto cone in the Hcal",100,0.,10.);
190 }
T getParameter(std::string const &) const
T getUntrackedParameter(std::string const &, T const &) const
EDGetTokenT< CandidateView > srcToken
T * make(const Args &...args) const
make new ROOT object
Definition: TFileService.h:64

Member Function Documentation

void ZMuMuIsolationAnalyzer::analyze ( const edm::Event event,
const edm::EventSetup setup 
)
overrideprivatevirtual

Implements edm::EDAnalyzer.

Definition at line 192 of file ZMuMuIsolationAnalyzer.cc.

References funct::abs(), alpha, beta, reco::IsoDeposit::candEnergy(), reco::Candidate::daughter(), Deposits(), WZMuSkim_cff::dimuons, dREcal, dRHcal, dRTrk, dRVeto, EcalEt, EcalEtZ, pat::EcalIso, eta, reco::LeafCandidate::eta(), etEcalThreshold, etHcalThreshold, h_IsoOther_ecal, h_IsoOther_hcal, h_IsoOther_tk, h_IsoW_ecal, h_IsoW_hcal, h_IsoW_tk, h_IsoZ_ecal, h_IsoZ_hcal, h_IsoZ_tk, HcalEt, HcalEtZ, pat::HcalIso, histo(), i, iso_cut, pat::Lepton< LeptonType >::isoDeposit(), pat::GenericParticle::isoDeposit(), IsoOther, IsoW, IsoZ, reco::Candidate::masterClone(), Max(), muFromW, muFromZ, muTag(), Other_eta, Other_eta_postSelection, Other_pt, Other_pt_postSelection, reco::LeafCandidate::phi(), pt, reco::LeafCandidate::pt(), ptThreshold, srcToken, reco::IsoDeposit::sumWithin(), TkrPt, pat::TrackIso, W_eta, W_eta_postSelection, W_pt, W_pt_postSelection, Z_eta, Z_eta_postSelection, Z_pt, and Z_pt_postSelection.

192  {
194  event.getByToken(srcToken,dimuons);
195 
196  for(unsigned int i=0; i < dimuons->size(); ++ i ) {
197  const Candidate & zmm = (* dimuons)[i];
198  const Candidate * dau0 = zmm.daughter(0);
199  const Candidate * dau1 = zmm.daughter(1);
200  const pat::Muon & mu0 = dynamic_cast<const pat::Muon &>(*dau0->masterClone());
201  const pat::GenericParticle & mu1 = dynamic_cast<const pat::GenericParticle &>(*dau1->masterClone());
202 
203  const pat::IsoDeposit * muTrackIso =mu0.isoDeposit(pat::TrackIso);
204  const pat::IsoDeposit * tkTrackIso =mu1.isoDeposit(pat::TrackIso);
205  const pat::IsoDeposit * muEcalIso =mu0.isoDeposit(pat::EcalIso);
206  const pat::IsoDeposit * tkEcalIso =mu1.isoDeposit(pat::EcalIso);
207  const pat::IsoDeposit * muHcalIso =mu0.isoDeposit(pat::HcalIso);
208  const pat::IsoDeposit * tkHcalIso =mu1.isoDeposit(pat::HcalIso);
209 
210 
211  if(mu0.pt() > pt && mu1.pt() > pt && abs(mu0.eta()) < eta && abs(mu1.eta()) < eta){
212 
213  Direction muDir = Direction(mu0.eta(),mu0.phi());
214  Direction tkDir = Direction(mu1.eta(),mu1.phi());
215 
216  IsoDeposit::AbsVetos vetos_mu;
217  vetos_mu.push_back(new ConeVeto( muDir, dRVeto ));
218  vetos_mu.push_back(new ThresholdVeto( ptThreshold ));
219 
221  vetos_tk.push_back(new ConeVeto( tkDir, dRVeto ));
222  vetos_tk.push_back(new ThresholdVeto( ptThreshold ));
223 
224  reco::IsoDeposit::AbsVetos vetos_mu_ecal;
225  vetos_mu_ecal.push_back(new ConeVeto( muDir, 0. ));
226  vetos_mu_ecal.push_back(new ThresholdVeto( etEcalThreshold ));
227 
228  reco::IsoDeposit::AbsVetos vetos_tk_ecal;
229  vetos_tk_ecal.push_back(new ConeVeto( tkDir, 0. ));
230  vetos_tk_ecal.push_back(new ThresholdVeto( etEcalThreshold ));
231 
232  reco::IsoDeposit::AbsVetos vetos_mu_hcal;
233  vetos_mu_hcal.push_back(new ConeVeto( muDir, 0. ));
234  vetos_mu_hcal.push_back(new ThresholdVeto( etHcalThreshold ));
235 
236  reco::IsoDeposit::AbsVetos vetos_tk_hcal;
237  vetos_tk_hcal.push_back(new ConeVeto( tkDir, 0. ));
238  vetos_tk_hcal.push_back(new ThresholdVeto( etHcalThreshold ));
239  MuTag tag_mu = muTag(mu0);
240  MuTag tag_track = muTag(mu1);
241 
242  double Tk_isovalue = TMath::Max(muTrackIso->sumWithin(dRTrk,vetos_mu),tkTrackIso->sumWithin(dRTrk, vetos_tk));
243  double Ecal_isovalue = TMath::Max(muEcalIso->sumWithin(dREcal,vetos_mu_ecal),tkEcalIso->sumWithin(dREcal, vetos_tk_ecal));
244  double Hcal_isovalue = TMath::Max(muHcalIso->sumWithin(dRHcal,vetos_mu_hcal),tkHcalIso->sumWithin(dRHcal, vetos_tk_hcal));
245  EcalEtZ->Fill(muEcalIso->candEnergy());
246  EcalEtZ->Fill(tkEcalIso->candEnergy());
247  HcalEtZ->Fill(muHcalIso->candEnergy());
248  HcalEtZ->Fill(tkHcalIso->candEnergy());
249 
250  double iso_value0 = alpha*((0.5*(1+beta)* muEcalIso->sumWithin(dREcal,vetos_mu_ecal) ) + (0.5*(1-beta)*muHcalIso->sumWithin(dRHcal,vetos_mu_hcal) ) ) +(1-alpha)*muTrackIso->sumWithin(dRTrk,vetos_mu);
251  double iso_value1 = alpha*((0.5*(1+beta)* tkEcalIso->sumWithin(dREcal,vetos_tk_ecal) ) + (0.5*(1-beta)*tkHcalIso->sumWithin(dRHcal,vetos_tk_hcal) ) ) +(1-alpha)*tkTrackIso->sumWithin(dRTrk,vetos_tk);
252 
253  double iso_value=TMath::Max(iso_value0,iso_value1);
254 
255  if(tag_mu==muFromZ && tag_track==muFromZ){
256  h_IsoZ_tk->Fill(Tk_isovalue);
257  h_IsoZ_ecal->Fill(Ecal_isovalue);
258  h_IsoZ_hcal->Fill(Hcal_isovalue);
259  IsoZ->Fill(iso_value);
260 
261  Z_eta->Fill(mu0.eta());
262  Z_eta->Fill(mu1.eta());
263  Z_pt->Fill(mu0.pt());
264  Z_pt->Fill(mu1.pt());
265 
266  if(iso_value0<iso_cut) {
267  Z_pt_postSelection->Fill(mu0.pt());
268  Z_eta_postSelection->Fill(mu0.eta());
269  }
270  if(iso_value1<iso_cut){
271  Z_pt_postSelection->Fill(mu1.pt());
272  Z_eta_postSelection->Fill(mu1.eta());
273  }
274 
275  Deposits(muTrackIso,dRTrk,TkrPt);
276  Deposits(muEcalIso,dREcal,EcalEt);
277  Deposits(muHcalIso,dRHcal,HcalEt);
278  Deposits(tkTrackIso,dRTrk,TkrPt);
279  Deposits(tkEcalIso,dREcal,EcalEt);
280  Deposits(tkHcalIso,dRHcal,HcalEt);
281  }
282  if(tag_mu==muFromW || tag_track==muFromW){
283  h_IsoW_tk->Fill(Tk_isovalue);
284  h_IsoW_ecal->Fill(Ecal_isovalue);
285  h_IsoW_hcal->Fill(Hcal_isovalue);
286  IsoW->Fill(iso_value);
287 
288  W_eta->Fill(mu0.eta());
289  W_eta->Fill(mu1.eta());
290  W_pt->Fill(mu0.pt());
291  W_pt->Fill(mu1.pt());
292 
293  if(iso_value0<iso_cut) {
294  W_pt_postSelection->Fill(mu0.pt());
295  W_eta_postSelection->Fill(mu0.eta());
296  }
297  if(iso_value1<iso_cut) {
298  W_pt_postSelection->Fill(mu1.pt());
299  W_eta_postSelection->Fill(mu1.eta());
300  }
301 
302  Deposits(muTrackIso,dRTrk,TkrPt);
303  Deposits(muEcalIso,dREcal,EcalEt);
304  Deposits(muHcalIso,dRHcal,HcalEt);
305  Deposits(tkTrackIso,dRTrk,TkrPt);
306  Deposits(tkEcalIso,dREcal,EcalEt);
307  Deposits(tkHcalIso,dRHcal,HcalEt);
308  }
309  else{
310  h_IsoOther_tk->Fill(Tk_isovalue);
311  h_IsoOther_ecal->Fill(Ecal_isovalue);
312  h_IsoOther_hcal->Fill(Hcal_isovalue);
313  IsoOther->Fill(iso_value);
314 
315  Other_eta->Fill(mu0.eta());
316  Other_eta->Fill(mu1.eta());
317  Other_pt->Fill(mu0.pt());
318  Other_pt->Fill(mu1.pt());
319 
320  if(iso_value0<iso_cut) {
321  Other_pt_postSelection->Fill(mu0.pt());
322  Other_eta_postSelection->Fill(mu0.eta());
323  }
324  if(iso_value1<iso_cut) {
325  Other_pt_postSelection->Fill(mu1.pt());
326  Other_eta_postSelection->Fill(mu1.eta());
327  }
328 
329  Deposits(muTrackIso,dRTrk,TkrPt);
330  Deposits(muEcalIso,dREcal,EcalEt);
331  Deposits(muHcalIso,dRHcal,HcalEt);
332  Deposits(tkTrackIso,dRTrk,TkrPt);
333  Deposits(tkEcalIso,dREcal,EcalEt);
334  Deposits(tkHcalIso,dRHcal,HcalEt);
335  }
336  }
337  }
338 
339  histo(h_IsoZ_tk,"#Sigma p_{T}","Events");
340  histo(h_IsoW_tk,"#Sigma p_{T}","Events");
341  histo(h_IsoOther_tk,"#Sigma p_{T}","#Events");
342  histo(h_IsoZ_ecal,"#Sigma E_{t}","Events");
343  histo(h_IsoW_ecal,"#Sigma E_{t}","Events");
344  histo(h_IsoOther_ecal,"#Sigma E_{t}","Events");
345  histo(h_IsoZ_hcal,"#Sigma E_{t}","Events");
346  histo(h_IsoW_hcal,"#Sigma E_{t}","Events");
347  histo(h_IsoOther_hcal,"#Sigma E_{t}","Events");
348  histo(TkrPt,"p ","");
349  histo(EcalEt,"E ","");
350  histo(HcalEt,"E ","");
351  histo(HcalEtZ,"E_{T}","");
352  histo(EcalEtZ,"E_{T}","");
353 }
double candEnergy() const
Get energy or pT attached to cand trajectory.
Definition: IsoDeposit.h:136
int i
Definition: DBlmapReader.cc:9
virtual const Candidate * daughter(size_type i) const =0
return daughter at a given position, i = 0, ... numberOfDaughters() - 1 (read only mode) ...
EDGetTokenT< CandidateView > srcToken
const IsoDeposit * isoDeposit(IsolationKeys key) const
Returns the IsoDeposit associated with some key, or a null pointer if it is not available.
const IsoDeposit * isoDeposit(IsolationKeys key) const
Returns the IsoDeposit associated with some key, or a null pointer if it is not available.
Definition: Lepton.h:165
virtual double eta() const
momentum pseudorapidity
virtual double pt() const
transverse momentum
double sumWithin(double coneSize, const AbsVetos &vetos=AbsVetos(), bool skipDepositVeto=false) const
Definition: IsoDeposit.cc:138
Analysis-level Generic Particle class (e.g. for hadron or muon not fully reconstructed) ...
Abs< T >::type abs(const T &t)
Definition: Abs.h:22
void Deposits(const pat::IsoDeposit *isodep, double dR_max, TH1F *hist)
T Max(T a, T b)
Definition: MathUtil.h:44
std::vector< AbsVeto * > AbsVetos
Definition: IsoDeposit.h:40
MuTag muTag(const T &mu) const
isodeposit::AbsVetos AbsVetos
Definition: IsoDeposit.h:51
void histo(TH1F *hist, const char *cx, const char *cy) const
virtual double phi() const
momentum azimuthal angle
Analysis-level muon class.
Definition: Muon.h:49
virtual const CandidateBaseRef & masterClone() const =0
void ZMuMuIsolationAnalyzer::Deposits ( const pat::IsoDeposit isodep,
double  dR_max,
TH1F *  hist 
)
private

Definition at line 107 of file ZMuMuIsolationAnalyzer.cc.

References reco::IsoDeposit::begin(), reco::IsoDeposit::end(), and theta().

Referenced by analyze().

107  {
108  for(IsoDeposit::const_iterator it= isodep->begin(); it!= isodep->end(); ++it){
109  if(it->dR()<dR_max) {
110  double theta= 2*(TMath::ATan(TMath::Exp(-(it->eta() ) ) ) );
111  // double theta= 2;
112  hist->Fill(it->value()/TMath::Sin(theta));
113  }
114  }
115 }
Geom::Theta< T > theta() const
const_iterator begin() const
Definition: IsoDeposit.h:163
const_iterator end() const
Definition: IsoDeposit.h:164
void ZMuMuIsolationAnalyzer::endJob ( void  )
overrideprivatevirtual

Reimplemented from edm::EDAnalyzer.

Definition at line 355 of file ZMuMuIsolationAnalyzer.cc.

355  {
356 }
void ZMuMuIsolationAnalyzer::histo ( TH1F *  hist,
const char *  cx,
const char *  cy 
) const
private

Definition at line 117 of file ZMuMuIsolationAnalyzer.cc.

Referenced by analyze().

117  {
118  hist->GetXaxis()->SetTitle(cx);
119  hist->GetYaxis()->SetTitle(cy);
120  hist->GetXaxis()->SetTitleOffset(1);
121  hist->GetYaxis()->SetTitleOffset(1.2);
122  hist->GetXaxis()->SetTitleSize(0.04);
123  hist->GetYaxis()->SetTitleSize(0.04);
124  hist->GetXaxis()->SetLabelSize(0.03);
125  hist->GetYaxis()->SetLabelSize(0.03);
126 }
template<typename T >
ZMuMuIsolationAnalyzer::MuTag ZMuMuIsolationAnalyzer::muTag ( const T mu) const
private

Definition at line 69 of file ZMuMuIsolationAnalyzer.cc.

References funct::abs(), edm::Ref< C, T, F >::isNull(), reco::Candidate::mother(), AlCaHLTBitMon_ParallelJobs::p, and reco::Candidate::pdgId().

Referenced by analyze().

69  {
70  GenParticleRef p = mu.genParticleRef();
71  if(p.isNull()){
72  // cout<<"genParticleRef is null "<<endl;
73  return muFromOther;
74 }
75  int sizem = p->numberOfMothers();
76  if(sizem != 1) {
77  //cout<<"number of mothers !=1 "<<endl;
78  return muFromOther;
79  }
80  const Candidate * moth1 = p->mother();
81  if(moth1 == 0) {
82  return muFromOther;
83  //cout<<"no mother "<<endl;
84  }
85  int pdgId1 = moth1->pdgId();
86  if(abs(pdgId1)!=13){
87  return muFromOther;
88  //cout<<"mother is not a muon"<<endl;
89  }
90  const Candidate * moth2 = moth1->mother();
91  if(moth2 == 0) {
92  return muFromOther;
93  //cout<<"no mother "<<endl;
94 }
95  int pdgId2 = moth2->pdgId();
96  if(pdgId2 == 23) {
97  //cout<<" muon from Z"<<endl;
98  return muFromZ;
99  }
100  if(abs(pdgId2)==24) return muFromW;
101  else {
102  //cout<<" muon from other"<<endl;
103  return muFromOther;
104  }
105 }
virtual const Candidate * mother(size_type i=0) const =0
return pointer to mother
Abs< T >::type abs(const T &t)
Definition: Abs.h:22
const int mu
Definition: Constants.h:22
bool isNull() const
Checks for null.
Definition: Ref.h:247
virtual int pdgId() const =0
PDG identifier.

Member Data Documentation

double ZMuMuIsolationAnalyzer::alpha
private

Definition at line 45 of file ZMuMuIsolationAnalyzer.cc.

Referenced by analyze(), and ZMuMuIsolationAnalyzer().

double ZMuMuIsolationAnalyzer::beta
private

Definition at line 45 of file ZMuMuIsolationAnalyzer.cc.

Referenced by analyze(), and ZMuMuIsolationAnalyzer().

double ZMuMuIsolationAnalyzer::dREcal
private

Definition at line 43 of file ZMuMuIsolationAnalyzer.cc.

Referenced by analyze().

double ZMuMuIsolationAnalyzer::dRHcal
private

Definition at line 43 of file ZMuMuIsolationAnalyzer.cc.

Referenced by analyze().

double ZMuMuIsolationAnalyzer::dRTrk
private

Definition at line 43 of file ZMuMuIsolationAnalyzer.cc.

Referenced by analyze(), and ZMuMuIsolationAnalyzer().

double ZMuMuIsolationAnalyzer::dRVeto
private

Definition at line 42 of file ZMuMuIsolationAnalyzer.cc.

Referenced by analyze().

TH1F * ZMuMuIsolationAnalyzer::EcalEt
private

Definition at line 53 of file ZMuMuIsolationAnalyzer.cc.

Referenced by analyze(), and ZMuMuIsolationAnalyzer().

TH1F* ZMuMuIsolationAnalyzer::EcalEtZ
private

Definition at line 54 of file ZMuMuIsolationAnalyzer.cc.

Referenced by analyze(), and ZMuMuIsolationAnalyzer().

double ZMuMuIsolationAnalyzer::eta
private
double ZMuMuIsolationAnalyzer::etEcalThreshold
private

Definition at line 44 of file ZMuMuIsolationAnalyzer.cc.

Referenced by analyze().

double ZMuMuIsolationAnalyzer::etHcalThreshold
private

Definition at line 44 of file ZMuMuIsolationAnalyzer.cc.

Referenced by analyze().

TH1F * ZMuMuIsolationAnalyzer::h_IsoOther_ecal
private

Definition at line 50 of file ZMuMuIsolationAnalyzer.cc.

Referenced by analyze(), and ZMuMuIsolationAnalyzer().

TH1F * ZMuMuIsolationAnalyzer::h_IsoOther_hcal
private

Definition at line 51 of file ZMuMuIsolationAnalyzer.cc.

Referenced by analyze(), and ZMuMuIsolationAnalyzer().

TH1F * ZMuMuIsolationAnalyzer::h_IsoOther_tk
private

Definition at line 49 of file ZMuMuIsolationAnalyzer.cc.

Referenced by analyze(), and ZMuMuIsolationAnalyzer().

TH1F * ZMuMuIsolationAnalyzer::h_IsoW_ecal
private

Definition at line 50 of file ZMuMuIsolationAnalyzer.cc.

Referenced by analyze(), and ZMuMuIsolationAnalyzer().

TH1F * ZMuMuIsolationAnalyzer::h_IsoW_hcal
private

Definition at line 51 of file ZMuMuIsolationAnalyzer.cc.

Referenced by analyze(), and ZMuMuIsolationAnalyzer().

TH1F * ZMuMuIsolationAnalyzer::h_IsoW_tk
private

Definition at line 49 of file ZMuMuIsolationAnalyzer.cc.

Referenced by analyze(), and ZMuMuIsolationAnalyzer().

TH1F* ZMuMuIsolationAnalyzer::h_IsoZ_ecal
private

Definition at line 50 of file ZMuMuIsolationAnalyzer.cc.

Referenced by analyze(), and ZMuMuIsolationAnalyzer().

TH1F* ZMuMuIsolationAnalyzer::h_IsoZ_hcal
private

Definition at line 51 of file ZMuMuIsolationAnalyzer.cc.

Referenced by analyze(), and ZMuMuIsolationAnalyzer().

TH1F* ZMuMuIsolationAnalyzer::h_IsoZ_tk
private

Definition at line 49 of file ZMuMuIsolationAnalyzer.cc.

Referenced by analyze(), and ZMuMuIsolationAnalyzer().

TH1F * ZMuMuIsolationAnalyzer::HcalEt
private

Definition at line 53 of file ZMuMuIsolationAnalyzer.cc.

Referenced by analyze(), and ZMuMuIsolationAnalyzer().

TH1F * ZMuMuIsolationAnalyzer::HcalEtZ
private

Definition at line 54 of file ZMuMuIsolationAnalyzer.cc.

Referenced by analyze(), and ZMuMuIsolationAnalyzer().

double ZMuMuIsolationAnalyzer::iso_cut
private

Definition at line 47 of file ZMuMuIsolationAnalyzer.cc.

Referenced by analyze().

TH1F * ZMuMuIsolationAnalyzer::IsoOther
private

Definition at line 52 of file ZMuMuIsolationAnalyzer.cc.

Referenced by analyze(), and ZMuMuIsolationAnalyzer().

TH1F * ZMuMuIsolationAnalyzer::IsoW
private

Definition at line 52 of file ZMuMuIsolationAnalyzer.cc.

Referenced by analyze(), and ZMuMuIsolationAnalyzer().

TH1F* ZMuMuIsolationAnalyzer::IsoZ
private

Definition at line 52 of file ZMuMuIsolationAnalyzer.cc.

Referenced by analyze(), and ZMuMuIsolationAnalyzer().

TH1F * ZMuMuIsolationAnalyzer::Other_eta
private

Definition at line 56 of file ZMuMuIsolationAnalyzer.cc.

Referenced by analyze(), and ZMuMuIsolationAnalyzer().

TH1F * ZMuMuIsolationAnalyzer::Other_eta_postSelection
private

Definition at line 57 of file ZMuMuIsolationAnalyzer.cc.

Referenced by analyze(), and ZMuMuIsolationAnalyzer().

TH1F * ZMuMuIsolationAnalyzer::Other_pt
private

Definition at line 58 of file ZMuMuIsolationAnalyzer.cc.

Referenced by analyze(), and ZMuMuIsolationAnalyzer().

TH1F * ZMuMuIsolationAnalyzer::Other_pt_postSelection
private

Definition at line 59 of file ZMuMuIsolationAnalyzer.cc.

Referenced by analyze(), and ZMuMuIsolationAnalyzer().

double ZMuMuIsolationAnalyzer::pt
private
double ZMuMuIsolationAnalyzer::ptThreshold
private

Definition at line 44 of file ZMuMuIsolationAnalyzer.cc.

Referenced by analyze(), and ZMuMuIsolationAnalyzer().

EDGetTokenT<CandidateView> ZMuMuIsolationAnalyzer::srcToken
private

Definition at line 41 of file ZMuMuIsolationAnalyzer.cc.

Referenced by analyze().

TH1F* ZMuMuIsolationAnalyzer::TkrPt
private

Definition at line 53 of file ZMuMuIsolationAnalyzer.cc.

Referenced by analyze(), and ZMuMuIsolationAnalyzer().

TH1F * ZMuMuIsolationAnalyzer::W_eta
private

Definition at line 56 of file ZMuMuIsolationAnalyzer.cc.

Referenced by analyze(), and ZMuMuIsolationAnalyzer().

TH1F * ZMuMuIsolationAnalyzer::W_eta_postSelection
private

Definition at line 57 of file ZMuMuIsolationAnalyzer.cc.

Referenced by analyze(), and ZMuMuIsolationAnalyzer().

TH1F * ZMuMuIsolationAnalyzer::W_pt
private

Definition at line 58 of file ZMuMuIsolationAnalyzer.cc.

Referenced by analyze(), and ZMuMuIsolationAnalyzer().

TH1F * ZMuMuIsolationAnalyzer::W_pt_postSelection
private

Definition at line 59 of file ZMuMuIsolationAnalyzer.cc.

Referenced by analyze(), and ZMuMuIsolationAnalyzer().

TH1F* ZMuMuIsolationAnalyzer::Z_eta
private

Definition at line 56 of file ZMuMuIsolationAnalyzer.cc.

Referenced by analyze(), and ZMuMuIsolationAnalyzer().

TH1F* ZMuMuIsolationAnalyzer::Z_eta_postSelection
private

Definition at line 57 of file ZMuMuIsolationAnalyzer.cc.

Referenced by analyze(), and ZMuMuIsolationAnalyzer().

TH1F* ZMuMuIsolationAnalyzer::Z_pt
private

Definition at line 58 of file ZMuMuIsolationAnalyzer.cc.

Referenced by analyze(), and ZMuMuIsolationAnalyzer().

TH1F* ZMuMuIsolationAnalyzer::Z_pt_postSelection
private

Definition at line 59 of file ZMuMuIsolationAnalyzer.cc.

Referenced by analyze(), and ZMuMuIsolationAnalyzer().