79 shift_(
cfg.getParameter<double>(
"shift")) {
85 hists_[
"globalMass"] = fileService->
make<TH1D>(
"globalMass",
"Mass_{Z} (global) (GeV)", 90, 30., 120.);
87 hists_[
"globalEta"] = fileService->
make<TH1D>(
"globalEta",
"#eta (global)", 48, -2.4, 2.4);
89 hists_[
"globalPt"] = fileService->
make<TH1D>(
"globalPt",
"p_{T} (global) (GeV)", 100, 0., 100.);
91 hists_[
"innerMass"] = fileService->
make<TH1D>(
"innerMass",
"Mass_{Z} (inner) (GeV)", 90, 30., 120.);
93 hists_[
"innerEta"] = fileService->
make<TH1D>(
"innerEta",
"#eta (inner)", 48, -2.4, 2.4);
95 hists_[
"innerPt"] = fileService->
make<TH1D>(
"innerPt",
"p_{T} (inner) (GeV)", 100, 0., 100.);
97 hists_[
"outerMass"] = fileService->
make<TH1D>(
"outerMass",
"Mass_{Z} (outer) (GeV)", 90, 30., 120.);
99 hists_[
"outerEta"] = fileService->
make<TH1D>(
"outerEta",
"#eta (outer)", 48, -2.4, 2.4);
101 hists_[
"outerPt"] = fileService->
make<TH1D>(
"outerPt",
"p_{T} (outer) (GeV)", 100, 0., 100.);
103 hists_[
"deltaPt"] = fileService->
make<TH1D>(
"deltaPt",
"#Delta p_{T} (GeV)", 100, -20., 20.);
105 hists_[
"deltaEta"] = fileService->
make<TH1D>(
"deltaEta",
"#Delta #eta", 100, -0.2, 0.2);
107 hists_[
"deltaPhi"] = fileService->
make<TH1D>(
"deltaPhi",
"#Delta #phi", 100, -0.2, 0.2);
111 if (
t1.isAvailable()) {
117 if (
t2.isAvailable()) {
123 if (
t1.isAvailable() &&
t2.isAvailable()) {
140 if (mu1->charge() * mu2->charge() < 0) {
145 if (mu1->isGlobalMuon()) {
146 fill(
"deltaPt", mu1->outerTrack()->pt() - mu1->globalTrack()->pt());
147 fill(
"deltaEta", mu1->outerTrack()->eta() - mu1->globalTrack()->eta());
148 fill(
"deltaPhi", mu1->outerTrack()->phi() - mu1->globalTrack()->phi());
150 if (mu2->isGlobalMuon()) {
151 fill(
"deltaPt", mu2->outerTrack()->pt() - mu2->globalTrack()->pt());
152 fill(
"deltaEta", mu2->outerTrack()->eta() - mu2->globalTrack()->eta());
153 fill(
"deltaPhi", mu2->outerTrack()->phi() - mu2->globalTrack()->phi());
static const std::string kSharedResource
math::XYZVector Vector
typedef's to simplify get functions
void fill(const std::string histName, double value) const
fill histogram if it had been booked before
double mass(const math::XYZVector &t1, const math::XYZVector &t2) const
calculate the mass of the Z boson from the tracker momenta by hand
muons
the two sets of parameters below are mutually exclusive, depending if RECO or ALCARECO is used the us...
XYZTLorentzVectorD XYZTLorentzVector
Lorentz vector with cylindrical internal representation using pseudorapidity.
void analyze(const edm::Event &event, const edm::EventSetup &setup) override
everything that needs to be done during the event loop
#define DEFINE_FWK_MODULE(type)
Module to analyze the performance of muon reconstruction on the example of Z->mumu events...
XYZVectorD XYZVector
spatial vector with cartesian internal representation
bool booked(const std::string histName) const
check if histogram was booked
~PatZToMuMuAnalyzer() override
default destructor
PatZToMuMuAnalyzer(const edm::ParameterSet &cfg)
default constructor
boost::indirect_iterator< typename seq_t::const_iterator > const_iterator
std::map< std::string, TH1D * > hists_
management of 1d histograms
edm::EDGetTokenT< edm::View< pat::Muon > > muonsToken_
input for muons
T * make(const Args &...args) const
make new ROOT object
math::XYZTLorentzVector LorentzVector