CMS 3D CMS Logo

 All Classes Namespaces Files Functions Variables Typedefs Enumerations Enumerator Properties Friends Macros Pages
List of all members | Public Types | Public Member Functions | Private Member Functions | Private Attributes
PatZToMuMuAnalyzer Class Reference

Module to analyze the performance of muon reconstruction on the example of Z->mumu events. More...

#include "PhysicsTools/PatExamples/plugins/PatZToMuMuAnalyzer.h"

Inheritance diagram for PatZToMuMuAnalyzer:
edm::EDAnalyzer edm::EDConsumerBase

Public Types

typedef math::XYZTLorentzVector LorentzVector
 
typedef math::XYZVector Vector
 typedef's to simplify get functions More...
 
- Public Types inherited from edm::EDAnalyzer
typedef EDAnalyzer ModuleType
 
- Public Types inherited from edm::EDConsumerBase
typedef ProductLabels Labels
 

Public Member Functions

 PatZToMuMuAnalyzer (const edm::ParameterSet &cfg)
 default constructor More...
 
 ~PatZToMuMuAnalyzer ()
 default destructor More...
 
- 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 (std::string const &iProcessName, std::string const &iModuleLabel, bool iPrint, std::vector< char const * > &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 Member Functions

virtual 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::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

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 33 of file PatZToMuMuAnalyzer.cc.

Member Typedef Documentation

Definition at line 38 of file PatZToMuMuAnalyzer.cc.

typedef's to simplify get functions

Definition at line 37 of file PatZToMuMuAnalyzer.cc.

Constructor & Destructor Documentation

PatZToMuMuAnalyzer::PatZToMuMuAnalyzer ( const edm::ParameterSet cfg)
explicit

default constructor

Definition at line 76 of file PatZToMuMuAnalyzer.cc.

PatZToMuMuAnalyzer::~PatZToMuMuAnalyzer ( )
inline

default destructor

Definition at line 43 of file PatZToMuMuAnalyzer.cc.

Member Function Documentation

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

everything that needs to be done during the event loop

Implements edm::EDAnalyzer.

Definition at line 128 of file PatZToMuMuAnalyzer.cc.

bool PatZToMuMuAnalyzer::booked ( const std::string  histName) const
inlineprivate

check if histogram was booked

Definition at line 52 of file PatZToMuMuAnalyzer.cc.

void PatZToMuMuAnalyzer::fill ( const std::string  histName,
double  value 
) const
inlineprivate

fill histogram if it had been booked before

Definition at line 54 of file PatZToMuMuAnalyzer.cc.

void PatZToMuMuAnalyzer::fill ( std::string  hists,
const reco::TrackRef t1,
const reco::TrackRef t2 
) const
private

fill a predefined set of histograms from inner outer or global tracks for first and second mu candidate

Definition at line 108 of file PatZToMuMuAnalyzer.cc.

double PatZToMuMuAnalyzer::mass ( const math::XYZVector t1,
const math::XYZVector t2 
) const
inlineprivate

calculate the mass of the Z boson from the tracker momenta by hand

Definition at line 68 of file PatZToMuMuAnalyzer.cc.

Referenced by Particle.Particle::__str__(), and DiObject.DiMuon::__str__().

Member Data Documentation

std::map< std::string, TH1D* > PatZToMuMuAnalyzer::hists_
private

management of 1d histograms

Definition at line 64 of file PatZToMuMuAnalyzer.cc.

edm::EDGetTokenT<edm::View<pat::Muon> > PatZToMuMuAnalyzer::muonsToken_
private

input for muons

Definition at line 59 of file PatZToMuMuAnalyzer.cc.

double PatZToMuMuAnalyzer::shift_
private

shift in transverse momentum to determine a rough uncertainty on the Z mass estimation

Definition at line 62 of file PatZToMuMuAnalyzer.cc.