MuonBuilder Class Reference

Lazily builds collections of reconstructed muons. More...

#include <MuonBuilder.h>

Collaboration diagram for MuonBuilder:
Collaboration graph
[legend]

List of all members.

Public Member Functions

 MuonBuilder (Dataset &dataset, Options const &options, TabulatedRngEngine &rngEngine)
 Constructor.
std::vector< Muon > const & Get () const override
 Alias for GetTight.
std::vector< Muon > const & GetLoose () const
 Returns collection of loose muons.
std::vector< Muon > const & GetTight () const
 Returns collection of tight muons.

Private Member Functions

void ApplyRochesterCorrection (int index, Muon *muon, int trackerLayers) const
 Applies Rochester correction to momentum of the muon.
void Build () const override
 Constructs muons for the current event.
std::optional< GenParticleFindGenMatch (Muon const &muon, double maxDR) const
 Finds matching generator-level muon using (eta, phi) metric.

Private Attributes

double minPtLoose_
 Minimal pt for loose muons, GeV.
double minPtTight_
 Minimal pt for tight muons, GeV.
double maxRelIsoLoose_
 Maximal rel iso for loose muons.
double maxRelIsoTight_
 Maximal rel iso for tight muons.
std::vector< Muon > looseMuons_
 Collection of muons passing loose selection.
std::vector< Muon > tightMuons_
 Collection of muons passing tight selection.
bool isSim_
 Indicates whether running on simulation or data.
std::unique_ptr< RoccoRrochesterCorrection_
 Object to compute Rochester correction to muon pt.
TabulatedRandomGenerator tabulatedRng_
 Random number generator.
TTreeReaderArray< float > srcPt_
TTreeReaderArray< float > srcEta_
TTreeReaderArray< float > srcPhi_
TTreeReaderArray< float > srcMass_
TTreeReaderArray< int > srcCharge_
TTreeReaderArray< float > srcIsolation_
TTreeReaderArray< bool > srcIsPfMuon_
TTreeReaderArray< bool > srcIsGlobalMuon_
TTreeReaderArray< bool > srcIsTrackerMuon_
TTreeReaderArray< bool > srcId_
TTreeReaderArray< int > srcTrackerLayers_
std::unique_ptr
< TTreeReaderArray< int > > 
genPartId_
std::unique_ptr
< TTreeReaderArray< float > > 
genPartPt_
std::unique_ptr
< TTreeReaderArray< float > > 
genPartEta_
std::unique_ptr
< TTreeReaderArray< float > > 
genPartPhi_

Detailed Description

Lazily builds collections of reconstructed muons.

For each event two collections of muons are constructed: tight and loose. They differ in the minimal pt cut as well as identification requirements. The tight collection is a subset of the loose one.

Rochester corrections for muon momenta are applied. The changes in momenta of loose muons are aggregated for GetSumMomentumShift.


Constructor & Destructor Documentation

MuonBuilder::MuonBuilder ( Dataset dataset,
Options const &  options,
TabulatedRngEngine rngEngine 
)

Constructor.

Parameters:
[in] dataset Dataset that will be processed.
[in] options Configuration options for the job.
[in] rngEngine Engine to construct TabulatedRandomGenerator.

Member Function Documentation

void MuonBuilder::ApplyRochesterCorrection ( int  index,
Muon *  muon,
int  trackerLayers 
) const [private]

Applies Rochester correction to momentum of the muon.

Parameters:
[in] index Index of the muon to choose channel for tabulatedRng_.
[in,out] muon Muon to be corrected.
[in] trackerLayers Number of tracker layers with measurements for the given muon.

The Rochester correction is applied in place.

std::optional<GenParticle> MuonBuilder::FindGenMatch ( Muon const &  muon,
double  maxDR 
) const [private]

Finds matching generator-level muon using (eta, phi) metric.

Parameters:
[in] muon Recontructed muon for which a generator-level match needs to be found.
[in] maxDR Maximal allowed distance in the (eta, phi) metric.
Returns:
An optional that contains the matching GenParicle. If no match is found in the specified cone, the optional is empty.

The documentation for this class was generated from the following files:
 All Classes Namespaces Functions Variables Enumerations Enumerator

Generated on 30 Oct 2020 for H→ZZ→2ℓ2ν analysis by  doxygen 1.6.1