CMS 3D CMS Logo

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 ()
 
SerialTaskQueueglobalLuminosityBlocksQueue ()
 
SerialTaskQueueglobalRunsQueue ()
 
ModuleDescription const & moduleDescription () const
 
std::string workerType () const
 
 ~EDAnalyzer () override
 
- Public Member Functions inherited from edm::EDConsumerBase
std::vector< ConsumesInfoconsumesInfo () const
 
void convertCurrentProcessAlias (std::string const &processName)
 Convert "@currentProcess" in InputTag process names to the actual current process name. More...
 
 EDConsumerBase ()
 
 EDConsumerBase (EDConsumerBase const &)=delete
 
 EDConsumerBase (EDConsumerBase &&)=default
 
ESProxyIndex const * esGetTokenIndices (edm::Transition iTrans) const
 
ProductResolverIndexAndSkipBit indexFrom (EDGetToken, BranchType, TypeID const &) const
 
void itemsMayGet (BranchType, std::vector< ProductResolverIndexAndSkipBit > &) const
 
void itemsToGet (BranchType, std::vector< ProductResolverIndexAndSkipBit > &) const
 
std::vector< ProductResolverIndexAndSkipBit > const & itemsToGetFrom (BranchType iType) const
 
void labelsForToken (EDGetToken iToken, Labels &oLabels) const
 
void modulesWhoseProductsAreConsumed (std::vector< ModuleDescription const * > &modules, ProductRegistry const &preg, std::map< std::string, ModuleDescription const * > const &labelsToDesc, std::string const &processName) const
 
EDConsumerBase const & operator= (EDConsumerBase const &)=delete
 
EDConsumerBaseoperator= (EDConsumerBase &&)=default
 
bool registeredToConsume (ProductResolverIndex, bool, BranchType) const
 
bool registeredToConsumeMany (TypeID const &, BranchType) const
 
ProductResolverIndexAndSkipBit uncheckedIndexFrom (EDGetToken) const
 
void updateLookup (BranchType iBranchType, ProductResolverIndexHelper const &, bool iPrefetchMayGet)
 
void updateLookup (eventsetup::ESRecordsToProxyIndices const &)
 
virtual ~EDConsumerBase () noexcept(false)
 

Private Types

enum  MuTag { muFromZ, muFromW, muFromOther }
 

Private Member Functions

void analyze (const edm::Event &event, const edm::EventSetup &setup) override
 
void Deposits (const pat::IsoDeposit *isodep, double dR_max, TH1F *hist)
 
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
 
- Public Types inherited from edm::EDConsumerBase
typedef ProductLabels Labels
 
- Static Public Member Functions inherited from edm::EDAnalyzer
static const std::string & baseType ()
 
static void fillDescriptions (ConfigurationDescriptions &descriptions)
 
static void prevalidate (ConfigurationDescriptions &)
 
static bool wantsGlobalLuminosityBlocks ()
 
static bool wantsGlobalRuns ()
 
static bool wantsStreamLuminosityBlocks ()
 
static bool wantsStreamRuns ()
 
- 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 ESProduct , typename ESRecord , Transition Tr = Transition::Event>
auto esConsumes ()
 
template<typename ESProduct , typename ESRecord , Transition Tr = Transition::Event>
auto esConsumes (ESInputTag const &tag)
 
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 130 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.

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

Definition at line 212 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(), mps_fire::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, edm::View< T >::size(), 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.

212  {
214  event.getByToken(srcToken, dimuons);
215 
216  for (unsigned int i = 0; i < dimuons->size(); ++i) {
217  const Candidate& zmm = (*dimuons)[i];
218  const Candidate* dau0 = zmm.daughter(0);
219  const Candidate* dau1 = zmm.daughter(1);
220  const pat::Muon& mu0 = dynamic_cast<const pat::Muon&>(*dau0->masterClone());
221  const pat::GenericParticle& mu1 = dynamic_cast<const pat::GenericParticle&>(*dau1->masterClone());
222 
223  const pat::IsoDeposit* muTrackIso = mu0.isoDeposit(pat::TrackIso);
224  const pat::IsoDeposit* tkTrackIso = mu1.isoDeposit(pat::TrackIso);
225  const pat::IsoDeposit* muEcalIso = mu0.isoDeposit(pat::EcalIso);
226  const pat::IsoDeposit* tkEcalIso = mu1.isoDeposit(pat::EcalIso);
227  const pat::IsoDeposit* muHcalIso = mu0.isoDeposit(pat::HcalIso);
228  const pat::IsoDeposit* tkHcalIso = mu1.isoDeposit(pat::HcalIso);
229 
230  if (mu0.pt() > pt && mu1.pt() > pt && abs(mu0.eta()) < eta && abs(mu1.eta()) < eta) {
231  Direction muDir = Direction(mu0.eta(), mu0.phi());
232  Direction tkDir = Direction(mu1.eta(), mu1.phi());
233 
234  IsoDeposit::AbsVetos vetos_mu;
235  vetos_mu.push_back(new ConeVeto(muDir, dRVeto));
236  vetos_mu.push_back(new ThresholdVeto(ptThreshold));
237 
239  vetos_tk.push_back(new ConeVeto(tkDir, dRVeto));
240  vetos_tk.push_back(new ThresholdVeto(ptThreshold));
241 
242  reco::IsoDeposit::AbsVetos vetos_mu_ecal;
243  vetos_mu_ecal.push_back(new ConeVeto(muDir, 0.));
244  vetos_mu_ecal.push_back(new ThresholdVeto(etEcalThreshold));
245 
246  reco::IsoDeposit::AbsVetos vetos_tk_ecal;
247  vetos_tk_ecal.push_back(new ConeVeto(tkDir, 0.));
248  vetos_tk_ecal.push_back(new ThresholdVeto(etEcalThreshold));
249 
250  reco::IsoDeposit::AbsVetos vetos_mu_hcal;
251  vetos_mu_hcal.push_back(new ConeVeto(muDir, 0.));
252  vetos_mu_hcal.push_back(new ThresholdVeto(etHcalThreshold));
253 
254  reco::IsoDeposit::AbsVetos vetos_tk_hcal;
255  vetos_tk_hcal.push_back(new ConeVeto(tkDir, 0.));
256  vetos_tk_hcal.push_back(new ThresholdVeto(etHcalThreshold));
257  MuTag tag_mu = muTag(mu0);
258  MuTag tag_track = muTag(mu1);
259 
260  double Tk_isovalue = TMath::Max(muTrackIso->sumWithin(dRTrk, vetos_mu), tkTrackIso->sumWithin(dRTrk, vetos_tk));
261  double Ecal_isovalue =
262  TMath::Max(muEcalIso->sumWithin(dREcal, vetos_mu_ecal), tkEcalIso->sumWithin(dREcal, vetos_tk_ecal));
263  double Hcal_isovalue =
264  TMath::Max(muHcalIso->sumWithin(dRHcal, vetos_mu_hcal), tkHcalIso->sumWithin(dRHcal, vetos_tk_hcal));
265  EcalEtZ->Fill(muEcalIso->candEnergy());
266  EcalEtZ->Fill(tkEcalIso->candEnergy());
267  HcalEtZ->Fill(muHcalIso->candEnergy());
268  HcalEtZ->Fill(tkHcalIso->candEnergy());
269 
270  double iso_value0 = alpha * ((0.5 * (1 + beta) * muEcalIso->sumWithin(dREcal, vetos_mu_ecal)) +
271  (0.5 * (1 - beta) * muHcalIso->sumWithin(dRHcal, vetos_mu_hcal))) +
272  (1 - alpha) * muTrackIso->sumWithin(dRTrk, vetos_mu);
273  double iso_value1 = alpha * ((0.5 * (1 + beta) * tkEcalIso->sumWithin(dREcal, vetos_tk_ecal)) +
274  (0.5 * (1 - beta) * tkHcalIso->sumWithin(dRHcal, vetos_tk_hcal))) +
275  (1 - alpha) * tkTrackIso->sumWithin(dRTrk, vetos_tk);
276 
277  double iso_value = TMath::Max(iso_value0, iso_value1);
278 
279  if (tag_mu == muFromZ && tag_track == muFromZ) {
280  h_IsoZ_tk->Fill(Tk_isovalue);
281  h_IsoZ_ecal->Fill(Ecal_isovalue);
282  h_IsoZ_hcal->Fill(Hcal_isovalue);
283  IsoZ->Fill(iso_value);
284 
285  Z_eta->Fill(mu0.eta());
286  Z_eta->Fill(mu1.eta());
287  Z_pt->Fill(mu0.pt());
288  Z_pt->Fill(mu1.pt());
289 
290  if (iso_value0 < iso_cut) {
291  Z_pt_postSelection->Fill(mu0.pt());
292  Z_eta_postSelection->Fill(mu0.eta());
293  }
294  if (iso_value1 < iso_cut) {
295  Z_pt_postSelection->Fill(mu1.pt());
296  Z_eta_postSelection->Fill(mu1.eta());
297  }
298 
299  Deposits(muTrackIso, dRTrk, TkrPt);
300  Deposits(muEcalIso, dREcal, EcalEt);
301  Deposits(muHcalIso, dRHcal, HcalEt);
302  Deposits(tkTrackIso, dRTrk, TkrPt);
303  Deposits(tkEcalIso, dREcal, EcalEt);
304  Deposits(tkHcalIso, dRHcal, HcalEt);
305  }
306  if (tag_mu == muFromW || tag_track == muFromW) {
307  h_IsoW_tk->Fill(Tk_isovalue);
308  h_IsoW_ecal->Fill(Ecal_isovalue);
309  h_IsoW_hcal->Fill(Hcal_isovalue);
310  IsoW->Fill(iso_value);
311 
312  W_eta->Fill(mu0.eta());
313  W_eta->Fill(mu1.eta());
314  W_pt->Fill(mu0.pt());
315  W_pt->Fill(mu1.pt());
316 
317  if (iso_value0 < iso_cut) {
318  W_pt_postSelection->Fill(mu0.pt());
319  W_eta_postSelection->Fill(mu0.eta());
320  }
321  if (iso_value1 < iso_cut) {
322  W_pt_postSelection->Fill(mu1.pt());
323  W_eta_postSelection->Fill(mu1.eta());
324  }
325 
326  Deposits(muTrackIso, dRTrk, TkrPt);
327  Deposits(muEcalIso, dREcal, EcalEt);
328  Deposits(muHcalIso, dRHcal, HcalEt);
329  Deposits(tkTrackIso, dRTrk, TkrPt);
330  Deposits(tkEcalIso, dREcal, EcalEt);
331  Deposits(tkHcalIso, dRHcal, HcalEt);
332  } else {
333  h_IsoOther_tk->Fill(Tk_isovalue);
334  h_IsoOther_ecal->Fill(Ecal_isovalue);
335  h_IsoOther_hcal->Fill(Hcal_isovalue);
336  IsoOther->Fill(iso_value);
337 
338  Other_eta->Fill(mu0.eta());
339  Other_eta->Fill(mu1.eta());
340  Other_pt->Fill(mu0.pt());
341  Other_pt->Fill(mu1.pt());
342 
343  if (iso_value0 < iso_cut) {
344  Other_pt_postSelection->Fill(mu0.pt());
345  Other_eta_postSelection->Fill(mu0.eta());
346  }
347  if (iso_value1 < iso_cut) {
348  Other_pt_postSelection->Fill(mu1.pt());
349  Other_eta_postSelection->Fill(mu1.eta());
350  }
351 
352  Deposits(muTrackIso, dRTrk, TkrPt);
353  Deposits(muEcalIso, dREcal, EcalEt);
354  Deposits(muHcalIso, dRHcal, HcalEt);
355  Deposits(tkTrackIso, dRTrk, TkrPt);
356  Deposits(tkEcalIso, dREcal, EcalEt);
357  Deposits(tkHcalIso, dRHcal, HcalEt);
358  }
359  }
360  }
361 
362  histo(h_IsoZ_tk, "#Sigma p_{T}", "Events");
363  histo(h_IsoW_tk, "#Sigma p_{T}", "Events");
364  histo(h_IsoOther_tk, "#Sigma p_{T}", "#Events");
365  histo(h_IsoZ_ecal, "#Sigma E_{t}", "Events");
366  histo(h_IsoW_ecal, "#Sigma E_{t}", "Events");
367  histo(h_IsoOther_ecal, "#Sigma E_{t}", "Events");
368  histo(h_IsoZ_hcal, "#Sigma E_{t}", "Events");
369  histo(h_IsoW_hcal, "#Sigma E_{t}", "Events");
370  histo(h_IsoOther_hcal, "#Sigma E_{t}", "Events");
371  histo(TkrPt, "p ", "");
372  histo(EcalEt, "E ", "");
373  histo(HcalEt, "E ", "");
374  histo(HcalEtZ, "E_{T}", "");
375  histo(EcalEtZ, "E_{T}", "");
376 }
double candEnergy() const
Get energy or pT attached to cand trajectory.
Definition: IsoDeposit.h:129
double eta() const final
momentum pseudorapidity
EDGetTokenT< CandidateView > srcToken
virtual const Candidate * daughter(size_type i) const =0
return daughter at a given position, i = 0, ... numberOfDaughters() - 1 (read only mode) ...
size_type size() const
double pt() const final
transverse momentum
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:182
double sumWithin(double coneSize, const AbsVetos &vetos=AbsVetos(), bool skipDepositVeto=false) const
Definition: IsoDeposit.cc:137
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
virtual const CandidateBaseRef & masterClone() const =0
std::vector< AbsVeto * > AbsVetos
Definition: IsoDeposit.h:43
MuTag muTag(const T &mu) const
isodeposit::AbsVetos AbsVetos
Definition: IsoDeposit.h:53
void histo(TH1F *hist, const char *cx, const char *cy) const
double phi() const final
momentum azimuthal angle
Analysis-level muon class.
Definition: Muon.h:51
void ZMuMuIsolationAnalyzer::Deposits ( const pat::IsoDeposit isodep,
double  dR_max,
TH1F *  hist 
)
private

Definition at line 109 of file ZMuMuIsolationAnalyzer.cc.

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

Referenced by analyze().

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

Reimplemented from edm::EDAnalyzer.

Definition at line 378 of file ZMuMuIsolationAnalyzer.cc.

References DEFINE_FWK_MODULE.

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

Definition at line 119 of file ZMuMuIsolationAnalyzer.cc.

Referenced by analyze().

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

Definition at line 70 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().

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

Member Data Documentation

double ZMuMuIsolationAnalyzer::alpha
private

Definition at line 46 of file ZMuMuIsolationAnalyzer.cc.

Referenced by analyze(), and ZMuMuIsolationAnalyzer().

double ZMuMuIsolationAnalyzer::beta
private

Definition at line 46 of file ZMuMuIsolationAnalyzer.cc.

Referenced by analyze(), and ZMuMuIsolationAnalyzer().

double ZMuMuIsolationAnalyzer::dREcal
private

Definition at line 44 of file ZMuMuIsolationAnalyzer.cc.

Referenced by analyze().

double ZMuMuIsolationAnalyzer::dRHcal
private

Definition at line 44 of file ZMuMuIsolationAnalyzer.cc.

Referenced by analyze().

double ZMuMuIsolationAnalyzer::dRTrk
private

Definition at line 44 of file ZMuMuIsolationAnalyzer.cc.

Referenced by analyze(), and ZMuMuIsolationAnalyzer().

double ZMuMuIsolationAnalyzer::dRVeto
private

Definition at line 43 of file ZMuMuIsolationAnalyzer.cc.

Referenced by analyze().

TH1F * ZMuMuIsolationAnalyzer::EcalEt
private

Definition at line 54 of file ZMuMuIsolationAnalyzer.cc.

Referenced by analyze(), and ZMuMuIsolationAnalyzer().

TH1F* ZMuMuIsolationAnalyzer::EcalEtZ
private

Definition at line 55 of file ZMuMuIsolationAnalyzer.cc.

Referenced by analyze(), and ZMuMuIsolationAnalyzer().

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

Definition at line 45 of file ZMuMuIsolationAnalyzer.cc.

Referenced by analyze().

double ZMuMuIsolationAnalyzer::etHcalThreshold
private

Definition at line 45 of file ZMuMuIsolationAnalyzer.cc.

Referenced by analyze().

TH1F * ZMuMuIsolationAnalyzer::h_IsoOther_ecal
private

Definition at line 51 of file ZMuMuIsolationAnalyzer.cc.

Referenced by analyze(), and ZMuMuIsolationAnalyzer().

TH1F * ZMuMuIsolationAnalyzer::h_IsoOther_hcal
private

Definition at line 52 of file ZMuMuIsolationAnalyzer.cc.

Referenced by analyze(), and ZMuMuIsolationAnalyzer().

TH1F * ZMuMuIsolationAnalyzer::h_IsoOther_tk
private

Definition at line 50 of file ZMuMuIsolationAnalyzer.cc.

Referenced by analyze(), and ZMuMuIsolationAnalyzer().

TH1F * ZMuMuIsolationAnalyzer::h_IsoW_ecal
private

Definition at line 51 of file ZMuMuIsolationAnalyzer.cc.

Referenced by analyze(), and ZMuMuIsolationAnalyzer().

TH1F * ZMuMuIsolationAnalyzer::h_IsoW_hcal
private

Definition at line 52 of file ZMuMuIsolationAnalyzer.cc.

Referenced by analyze(), and ZMuMuIsolationAnalyzer().

TH1F * ZMuMuIsolationAnalyzer::h_IsoW_tk
private

Definition at line 50 of file ZMuMuIsolationAnalyzer.cc.

Referenced by analyze(), and ZMuMuIsolationAnalyzer().

TH1F* ZMuMuIsolationAnalyzer::h_IsoZ_ecal
private

Definition at line 51 of file ZMuMuIsolationAnalyzer.cc.

Referenced by analyze(), and ZMuMuIsolationAnalyzer().

TH1F* ZMuMuIsolationAnalyzer::h_IsoZ_hcal
private

Definition at line 52 of file ZMuMuIsolationAnalyzer.cc.

Referenced by analyze(), and ZMuMuIsolationAnalyzer().

TH1F* ZMuMuIsolationAnalyzer::h_IsoZ_tk
private

Definition at line 50 of file ZMuMuIsolationAnalyzer.cc.

Referenced by analyze(), and ZMuMuIsolationAnalyzer().

TH1F * ZMuMuIsolationAnalyzer::HcalEt
private

Definition at line 54 of file ZMuMuIsolationAnalyzer.cc.

Referenced by analyze(), and ZMuMuIsolationAnalyzer().

TH1F * ZMuMuIsolationAnalyzer::HcalEtZ
private

Definition at line 55 of file ZMuMuIsolationAnalyzer.cc.

Referenced by analyze(), and ZMuMuIsolationAnalyzer().

double ZMuMuIsolationAnalyzer::iso_cut
private

Definition at line 48 of file ZMuMuIsolationAnalyzer.cc.

Referenced by analyze().

TH1F * ZMuMuIsolationAnalyzer::IsoOther
private

Definition at line 53 of file ZMuMuIsolationAnalyzer.cc.

Referenced by analyze(), and ZMuMuIsolationAnalyzer().

TH1F * ZMuMuIsolationAnalyzer::IsoW
private

Definition at line 53 of file ZMuMuIsolationAnalyzer.cc.

Referenced by analyze(), and ZMuMuIsolationAnalyzer().

TH1F* ZMuMuIsolationAnalyzer::IsoZ
private

Definition at line 53 of file ZMuMuIsolationAnalyzer.cc.

Referenced by analyze(), and ZMuMuIsolationAnalyzer().

TH1F * ZMuMuIsolationAnalyzer::Other_eta
private

Definition at line 57 of file ZMuMuIsolationAnalyzer.cc.

Referenced by analyze(), and ZMuMuIsolationAnalyzer().

TH1F * ZMuMuIsolationAnalyzer::Other_eta_postSelection
private

Definition at line 58 of file ZMuMuIsolationAnalyzer.cc.

Referenced by analyze(), and ZMuMuIsolationAnalyzer().

TH1F * ZMuMuIsolationAnalyzer::Other_pt
private

Definition at line 59 of file ZMuMuIsolationAnalyzer.cc.

Referenced by analyze(), and ZMuMuIsolationAnalyzer().

TH1F * ZMuMuIsolationAnalyzer::Other_pt_postSelection
private

Definition at line 60 of file ZMuMuIsolationAnalyzer.cc.

Referenced by analyze(), and ZMuMuIsolationAnalyzer().

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

Definition at line 45 of file ZMuMuIsolationAnalyzer.cc.

Referenced by analyze(), and ZMuMuIsolationAnalyzer().

EDGetTokenT<CandidateView> ZMuMuIsolationAnalyzer::srcToken
private

Definition at line 42 of file ZMuMuIsolationAnalyzer.cc.

Referenced by analyze().

TH1F* ZMuMuIsolationAnalyzer::TkrPt
private

Definition at line 54 of file ZMuMuIsolationAnalyzer.cc.

Referenced by analyze(), and ZMuMuIsolationAnalyzer().

TH1F * ZMuMuIsolationAnalyzer::W_eta
private

Definition at line 57 of file ZMuMuIsolationAnalyzer.cc.

Referenced by analyze(), and ZMuMuIsolationAnalyzer().

TH1F * ZMuMuIsolationAnalyzer::W_eta_postSelection
private

Definition at line 58 of file ZMuMuIsolationAnalyzer.cc.

Referenced by analyze(), and ZMuMuIsolationAnalyzer().

TH1F * ZMuMuIsolationAnalyzer::W_pt
private

Definition at line 59 of file ZMuMuIsolationAnalyzer.cc.

Referenced by analyze(), and ZMuMuIsolationAnalyzer().

TH1F * ZMuMuIsolationAnalyzer::W_pt_postSelection
private

Definition at line 60 of file ZMuMuIsolationAnalyzer.cc.

Referenced by analyze(), and ZMuMuIsolationAnalyzer().

TH1F* ZMuMuIsolationAnalyzer::Z_eta
private

Definition at line 57 of file ZMuMuIsolationAnalyzer.cc.

Referenced by analyze(), and ZMuMuIsolationAnalyzer().

TH1F* ZMuMuIsolationAnalyzer::Z_eta_postSelection
private

Definition at line 58 of file ZMuMuIsolationAnalyzer.cc.

Referenced by analyze(), and ZMuMuIsolationAnalyzer().

TH1F* ZMuMuIsolationAnalyzer::Z_pt
private

Definition at line 59 of file ZMuMuIsolationAnalyzer.cc.

Referenced by analyze(), and ZMuMuIsolationAnalyzer().

TH1F* ZMuMuIsolationAnalyzer::Z_pt_postSelection
private

Definition at line 60 of file ZMuMuIsolationAnalyzer.cc.

Referenced by analyze(), and ZMuMuIsolationAnalyzer().