Module to analyze the performance of muon reconstruction on the example of Z->mumu events. More...
#include "PhysicsTools/PatExamples/plugins/PatZToMuMuAnalyzer.h"
Public Types | |
typedef math::XYZTLorentzVector | LorentzVector |
typedef math::XYZVector | Vector |
typedef's to simplify get functions More... | |
Public Types inherited from edm::one::EDAnalyzerBase | |
typedef EDAnalyzerBase | ModuleType |
Public Types inherited from edm::EDConsumerBase | |
typedef ProductLabels | Labels |
Private Member Functions | |
void | analyze (const edm::Event &event, const edm::EventSetup &setup) override |
everything that needs to be done during the event loop More... | |
bool | booked (const std::string histName) const |
check if histogram was booked More... | |
void | fill (const std::string histName, double value) const |
fill histogram if it had been booked before More... | |
void | fill (std::string hists, const reco::TrackRef &t1, const reco::TrackRef &t2) const |
fill a predefined set of histograms from inner outer or global tracks for first and second mu candidate More... | |
double | mass (const math::XYZVector &t1, const math::XYZVector &t2) const |
calculate the mass of the Z boson from the tracker momenta by hand More... | |
Private Attributes | |
std::map< std::string, TH1D * > | hists_ |
management of 1d histograms More... | |
edm::EDGetTokenT< edm::View< pat::Muon > > | muonsToken_ |
input for muons More... | |
double | shift_ |
Additional Inherited Members | |
Static Public Member Functions inherited from edm::one::EDAnalyzerBase | |
static const std::string & | baseType () |
static void | fillDescriptions (ConfigurationDescriptions &descriptions) |
static void | prevalidate (ConfigurationDescriptions &descriptions) |
Protected Member Functions inherited from edm::EDConsumerBase | |
template<typename ProductType , BranchType B = InEvent> | |
EDGetTokenT< ProductType > | consumes (edm::InputTag const &tag) |
template<BranchType B = InEvent> | |
EDConsumerBaseAdaptor< B > | consumes (edm::InputTag tag) noexcept |
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 ESProduct , typename ESRecord , Transition Tr = Transition::Event> | |
auto | esConsumes () |
template<typename ESProduct , typename ESRecord , Transition Tr = Transition::Event> | |
auto | esConsumes (ESInputTag const &tag) |
template<Transition Tr = Transition::Event> | |
constexpr auto | esConsumes () |
template<Transition Tr = Transition::Event> | |
auto | esConsumes (ESInputTag tag) |
template<Transition Tr = Transition::Event> | |
ESGetTokenGeneric | esConsumes (eventsetup::EventSetupRecordKey const &iRecord, eventsetup::DataKey const &iKey) |
Used with EventSetupRecord::doGet. More... | |
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) |
void | resetItemsToGetFrom (BranchType iType) |
Module to analyze the performance of muon reconstruction on the example of Z->mumu events.
Module to analyze the performance of muon reconstruction on the example of Z->mumu events: transverse momentum and eta of the muon candidates and the mass of the Z boson candidate are plotted from inner, outer and global tracks. The mass is recalculated by an extra finction. The difference of the outer track and the global track are plotted for the transverse momentum, eta and phi of the two muon candi- dates, for global muons as far as available. The only input parameters are:
muons –> indicating the muon collection of choice. shift –> indicating the relative shift of the transverse momentum for the estimate of the effect on the invariant mass.
The shift is applied to all mass calculations.
Definition at line 32 of file PatZToMuMuAnalyzer.cc.
Definition at line 36 of file PatZToMuMuAnalyzer.cc.
typedef's to simplify get functions
Definition at line 35 of file PatZToMuMuAnalyzer.cc.
|
explicit |
default constructor
Definition at line 77 of file PatZToMuMuAnalyzer.cc.
References hists_, TFileService::kSharedResource, and TFileService::make().
|
inlineoverride |
|
overrideprivatevirtual |
everything that needs to be done during the event loop
Implements edm::one::EDAnalyzerBase.
Definition at line 129 of file PatZToMuMuAnalyzer.cc.
References fill(), PDWG_BPHSkim_cff::muons, muonsToken_, and AlCaHLTBitMon_QueryRunRegistry::string.
|
inlineprivate |
check if histogram was booked
Definition at line 50 of file PatZToMuMuAnalyzer.cc.
References hists_.
Referenced by fill().
|
inlineprivate |
fill histogram if it had been booked before
Definition at line 52 of file PatZToMuMuAnalyzer.cc.
References booked(), and hists_.
Referenced by analyze(), and fill().
|
private |
fill a predefined set of histograms from inner outer or global tracks for first and second mu candidate
Definition at line 110 of file PatZToMuMuAnalyzer.cc.
References mps_setup::append, fill(), compare::hists, mass(), AlCaHLTBitMon_QueryRunRegistry::string, RandomServiceHelper::t1, and RandomServiceHelper::t2.
|
inlineprivate |
calculate the mass of the Z boson from the tracker momenta by hand
Definition at line 68 of file PatZToMuMuAnalyzer.cc.
References shift_, mathSSE::sqrt(), RandomServiceHelper::t1, and RandomServiceHelper::t2.
Referenced by Particle.Particle::__str__(), DiObject.DiMuon::__str__(), and fill().
|
private |
management of 1d histograms
Definition at line 65 of file PatZToMuMuAnalyzer.cc.
Referenced by booked(), fill(), and PatZToMuMuAnalyzer().
|
private |
|
private |
shift in transverse momentum to determine a rough uncertainty on the Z mass estimation
Definition at line 63 of file PatZToMuMuAnalyzer.cc.
Referenced by mass().