CMS 3D CMS Logo

List of all members | Classes | Public Member Functions | Static Public Member Functions | Private Member Functions | Private Attributes
ZMuMuMassConstraintParameterFinder Class Reference

#include <Alignment/MillePedeAlignmentAlgorithm/plugins/ZMuMuMassConstraintParameterFinder.cc>

Inheritance diagram for ZMuMuMassConstraintParameterFinder:
edm::one::EDAnalyzer< edm::one::SharedResources > edm::one::EDAnalyzerBase edm::EDConsumerBase

Classes

class  DiMuonInfo
 helper class containing information about a di-muon system More...
 

Public Member Functions

 ZMuMuMassConstraintParameterFinder (const edm::ParameterSet &)
 
 ~ZMuMuMassConstraintParameterFinder () override
 
- Public Member Functions inherited from edm::one::EDAnalyzer< edm::one::SharedResources >
 EDAnalyzer ()=default
 
 EDAnalyzer (const EDAnalyzer &)=delete
 
SerialTaskQueueglobalLuminosityBlocksQueue () final
 
SerialTaskQueueglobalRunsQueue () final
 
const EDAnalyzeroperator= (const EDAnalyzer &)=delete
 
bool wantsGlobalLuminosityBlocks () const final
 
bool wantsGlobalRuns () const final
 
bool wantsInputProcessBlocks () const final
 
bool wantsProcessBlocks () const final
 
- Public Member Functions inherited from edm::one::EDAnalyzerBase
void callWhenNewProductsRegistered (std::function< void(BranchDescription const &)> const &func)
 
 EDAnalyzerBase ()
 
ModuleDescription const & moduleDescription () const
 
bool wantsStreamLuminosityBlocks () const
 
bool wantsStreamRuns () const
 
 ~EDAnalyzerBase () 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 &&)=default
 
 EDConsumerBase (EDConsumerBase const &)=delete
 
ESProxyIndex const * esGetTokenIndices (edm::Transition iTrans) const
 
std::vector< ESProxyIndex > const & esGetTokenIndicesVector (edm::Transition iTrans) const
 
std::vector< ESRecordIndex > const & esGetTokenRecordIndicesVector (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::array< std::vector< ModuleDescription const * > *, NumBranchTypes > &modulesAll, std::vector< ModuleProcessName > &modulesInPreviousProcesses, ProductRegistry const &preg, std::map< std::string, ModuleDescription const * > const &labelsToDesc, std::string const &processName) const
 
EDConsumerBaseoperator= (EDConsumerBase &&)=default
 
EDConsumerBase const & operator= (EDConsumerBase const &)=delete
 
bool registeredToConsume (ProductResolverIndex, bool, BranchType) const
 
bool registeredToConsumeMany (TypeID const &, BranchType) const
 
void selectInputProcessBlocks (ProductRegistry const &productRegistry, ProcessBlockHelperBase const &processBlockHelperBase)
 
ProductResolverIndexAndSkipBit uncheckedIndexFrom (EDGetToken) const
 
void updateLookup (BranchType iBranchType, ProductResolverIndexHelper const &, bool iPrefetchMayGet)
 
void updateLookup (eventsetup::ESRecordsToProxyIndices const &)
 
virtual ~EDConsumerBase () noexcept(false)
 

Static Public Member Functions

static void fillDescriptions (edm::ConfigurationDescriptions &descriptions)
 
- Static Public Member Functions inherited from edm::one::EDAnalyzerBase
static const std::string & baseType ()
 
static void fillDescriptions (ConfigurationDescriptions &descriptions)
 
static void prevalidate (ConfigurationDescriptions &descriptions)
 

Private Member Functions

void analyze (const edm::Event &, const edm::EventSetup &) override
 

Private Attributes

const double etaMax_
 
const double etaMin_
 
edm::EDGetTokenT< reco::GenParticleCollectiongenParticlesToken_
 
const double maxMassPair_
 
const double minMassPair_
 
DiMuonInfo muonInfo_
 
DiMuonInfo muonInfoFromZ_
 
const int muonPdg_ {13}
 
const double phiMax_
 
const double phiMin_
 
const double pMin_
 
const double ptMin_
 
const int zBosonPdg_ {23}
 

Additional Inherited Members

- Public Types inherited from edm::one::EDAnalyzerBase
typedef EDAnalyzerBase ModuleType
 
- Public Types inherited from edm::EDConsumerBase
typedef ProductLabels Labels
 
- Protected Member Functions inherited from edm::EDConsumerBase
EDGetToken consumes (const TypeToGet &id, edm::InputTag const &tag)
 
template<typename ProductType , BranchType B = InEvent>
EDGetTokenT< ProductType > consumes (edm::InputTag const &tag)
 
template<BranchType B = InEvent>
EDConsumerBaseAdaptor< B > consumes (edm::InputTag tag) noexcept
 
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<Transition Tr = Transition::Event>
constexpr auto esConsumes () noexcept
 
template<typename ESProduct , typename ESRecord , Transition Tr = Transition::Event>
auto esConsumes (ESInputTag const &tag)
 
template<Transition Tr = Transition::Event>
auto esConsumes (ESInputTag tag) noexcept
 
template<Transition Tr = Transition::Event>
ESGetTokenGeneric esConsumes (eventsetup::EventSetupRecordKey const &iRecord, eventsetup::DataKey const &iKey)
 Used with EventSetupRecord::doGet. More...
 
EDGetToken mayConsume (const TypeToGet &id, edm::InputTag const &tag)
 
template<BranchType B>
EDGetToken mayConsume (const TypeToGet &id, edm::InputTag const &tag)
 
template<typename ProductType , BranchType B = InEvent>
EDGetTokenT< ProductType > mayConsume (edm::InputTag const &tag)
 

Detailed Description

Description: Determines the generator di-muon invariant-mass distribution

Implementation:

Generator muons are extracted from the genParticles collection and matched to Z-boson decays. The configured selection should match the selection applied on muon tracks in real data to obtain a "true" invariant mass distribution within the selection.

Definition at line 47 of file ZMuMuMassConstraintParameterFinder.cc.

Constructor & Destructor Documentation

◆ ZMuMuMassConstraintParameterFinder()

ZMuMuMassConstraintParameterFinder::ZMuMuMassConstraintParameterFinder ( const edm::ParameterSet iConfig)
explicit

Definition at line 102 of file ZMuMuMassConstraintParameterFinder.cc.

103  : genParticlesToken_(consumes<reco::GenParticleCollection>(edm::InputTag{"genParticles"})),
104  pMin_(iConfig.getParameter<double>("pMin")),
105  ptMin_(iConfig.getParameter<double>("ptMin")),
106  etaMin_(iConfig.getParameter<double>("etaMin")),
107  etaMax_(iConfig.getParameter<double>("etaMax")),
108  phiMin_(iConfig.getParameter<double>("phiMin")),
109  phiMax_(iConfig.getParameter<double>("phiMax")),
110  minMassPair_(iConfig.getParameter<double>("minMassPair")),
111  maxMassPair_(iConfig.getParameter<double>("maxMassPair")),
114  usesResource(TFileService::kSharedResource);
116  muonInfo_.setupTree("di_muon", fs);
117  muonInfoFromZ_.setupTree("di_muon_from_Z", fs);
118 }

◆ ~ZMuMuMassConstraintParameterFinder()

ZMuMuMassConstraintParameterFinder::~ZMuMuMassConstraintParameterFinder ( )
override

Definition at line 120 of file ZMuMuMassConstraintParameterFinder.cc.

120 {}

Member Function Documentation

◆ analyze()

void ZMuMuMassConstraintParameterFinder::analyze ( const edm::Event iEvent,
const edm::EventSetup  
)
overrideprivatevirtual

Implements edm::one::EDAnalyzerBase.

Definition at line 127 of file ZMuMuMassConstraintParameterFinder.cc.

127  {
130 
131  for (const auto& particle : *(genParticles.product())) {
132  if (std::abs(particle.pdgId()) != muonPdg_ || particle.status() != 1)
133  continue;
134  if (particle.p() < pMin_)
135  continue;
136  if (particle.pt() < ptMin_)
137  continue;
138  if (particle.eta() < etaMin_ || particle.eta() > etaMax_)
139  continue;
140  if (particle.phi() < phiMin_ || particle.phi() > phiMax_)
141  continue;
142 
143  muonInfo_.muons().push_back(particle);
144  if (particle.mother()->pdgId() == zBosonPdg_) {
145  muonInfoFromZ_.muons().push_back(particle);
146  }
147  }
148 
149  muonInfo_.fill();
151 }

References funct::abs(), etaMax_, etaMin_, ZMuMuMassConstraintParameterFinder::DiMuonInfo::fill(), genParticles2HepMC_cfi::genParticles, genParticlesToken_, iEvent, muonInfo_, muonInfoFromZ_, muonPdg_, ZMuMuMassConstraintParameterFinder::DiMuonInfo::muons(), phiMax_, phiMin_, pMin_, ptMin_, and zBosonPdg_.

◆ fillDescriptions()

void ZMuMuMassConstraintParameterFinder::fillDescriptions ( edm::ConfigurationDescriptions descriptions)
static

Definition at line 154 of file ZMuMuMassConstraintParameterFinder.cc.

154  {
156  desc.setComment("Extract information on 'Z -> mu mu' decays.");
157  desc.add<double>("pMin", 3.0);
158  desc.add<double>("ptMin", 15.0);
159  desc.add<double>("etaMin", -3.0);
160  desc.add<double>("etaMax", 3.0);
161  desc.add<double>("phiMin", -3.1416);
162  desc.add<double>("phiMax", 3.1416);
163  desc.add<double>("minMassPair", 85.8);
164  desc.add<double>("maxMassPair", 95.8);
165  descriptions.add("zMuMuMassConstraintParameterFinder", desc);
166 }

References edm::ConfigurationDescriptions::add(), and submitPVResolutionJobs::desc.

Member Data Documentation

◆ etaMax_

const double ZMuMuMassConstraintParameterFinder::etaMax_
private

Definition at line 87 of file ZMuMuMassConstraintParameterFinder.cc.

Referenced by analyze().

◆ etaMin_

const double ZMuMuMassConstraintParameterFinder::etaMin_
private

Definition at line 86 of file ZMuMuMassConstraintParameterFinder.cc.

Referenced by analyze().

◆ genParticlesToken_

edm::EDGetTokenT<reco::GenParticleCollection> ZMuMuMassConstraintParameterFinder::genParticlesToken_
private

Definition at line 77 of file ZMuMuMassConstraintParameterFinder.cc.

Referenced by analyze().

◆ maxMassPair_

const double ZMuMuMassConstraintParameterFinder::maxMassPair_
private

◆ minMassPair_

const double ZMuMuMassConstraintParameterFinder::minMassPair_
private

◆ muonInfo_

DiMuonInfo ZMuMuMassConstraintParameterFinder::muonInfo_
private

Definition at line 95 of file ZMuMuMassConstraintParameterFinder.cc.

Referenced by analyze().

◆ muonInfoFromZ_

DiMuonInfo ZMuMuMassConstraintParameterFinder::muonInfoFromZ_
private

Definition at line 96 of file ZMuMuMassConstraintParameterFinder.cc.

Referenced by analyze().

◆ muonPdg_

const int ZMuMuMassConstraintParameterFinder::muonPdg_ {13}
private

Definition at line 80 of file ZMuMuMassConstraintParameterFinder.cc.

Referenced by analyze().

◆ phiMax_

const double ZMuMuMassConstraintParameterFinder::phiMax_
private

Definition at line 89 of file ZMuMuMassConstraintParameterFinder.cc.

Referenced by analyze().

◆ phiMin_

const double ZMuMuMassConstraintParameterFinder::phiMin_
private

Definition at line 88 of file ZMuMuMassConstraintParameterFinder.cc.

Referenced by analyze().

◆ pMin_

const double ZMuMuMassConstraintParameterFinder::pMin_
private

Definition at line 84 of file ZMuMuMassConstraintParameterFinder.cc.

Referenced by analyze().

◆ ptMin_

const double ZMuMuMassConstraintParameterFinder::ptMin_
private

Definition at line 85 of file ZMuMuMassConstraintParameterFinder.cc.

Referenced by analyze().

◆ zBosonPdg_

const int ZMuMuMassConstraintParameterFinder::zBosonPdg_ {23}
private

Definition at line 81 of file ZMuMuMassConstraintParameterFinder.cc.

Referenced by analyze().

ZMuMuMassConstraintParameterFinder::pMin_
const double pMin_
Definition: ZMuMuMassConstraintParameterFinder.cc:84
ZMuMuMassConstraintParameterFinder::DiMuonInfo::muons
std::vector< reco::GenParticle > & muons()
Definition: ZMuMuMassConstraintParameterFinder.cc:61
genParticles2HepMC_cfi.genParticles
genParticles
Definition: genParticles2HepMC_cfi.py:4
ZMuMuMassConstraintParameterFinder::DiMuonInfo::fill
void fill()
Definition: ZMuMuMassConstraintParameterFinder.cc:181
ZMuMuMassConstraintParameterFinder::DiMuonInfo::setupTree
void setupTree(const std::string &, edm::Service< TFileService > &)
Definition: ZMuMuMassConstraintParameterFinder.cc:172
ZMuMuMassConstraintParameterFinder::zBosonPdg_
const int zBosonPdg_
Definition: ZMuMuMassConstraintParameterFinder.cc:81
edm::ParameterSetDescription
Definition: ParameterSetDescription.h:52
ZMuMuMassConstraintParameterFinder::phiMin_
const double phiMin_
Definition: ZMuMuMassConstraintParameterFinder.cc:88
edm::Handle< reco::GenParticleCollection >
ZMuMuMassConstraintParameterFinder::minMassPair_
const double minMassPair_
Definition: ZMuMuMassConstraintParameterFinder.cc:92
edm::ConfigurationDescriptions::add
void add(std::string const &label, ParameterSetDescription const &psetDescription)
Definition: ConfigurationDescriptions.cc:57
ZMuMuMassConstraintParameterFinder::muonPdg_
const int muonPdg_
Definition: ZMuMuMassConstraintParameterFinder.cc:80
ZMuMuMassConstraintParameterFinder::ptMin_
const double ptMin_
Definition: ZMuMuMassConstraintParameterFinder.cc:85
edm::Service< TFileService >
iEvent
int iEvent
Definition: GenABIO.cc:224
ZMuMuMassConstraintParameterFinder::genParticlesToken_
edm::EDGetTokenT< reco::GenParticleCollection > genParticlesToken_
Definition: ZMuMuMassConstraintParameterFinder.cc:77
ZMuMuMassConstraintParameterFinder::etaMin_
const double etaMin_
Definition: ZMuMuMassConstraintParameterFinder.cc:86
submitPVResolutionJobs.desc
string desc
Definition: submitPVResolutionJobs.py:251
ZMuMuMassConstraintParameterFinder::etaMax_
const double etaMax_
Definition: ZMuMuMassConstraintParameterFinder.cc:87
ZMuMuMassConstraintParameterFinder::muonInfoFromZ_
DiMuonInfo muonInfoFromZ_
Definition: ZMuMuMassConstraintParameterFinder.cc:96
ZMuMuMassConstraintParameterFinder::maxMassPair_
const double maxMassPair_
Definition: ZMuMuMassConstraintParameterFinder.cc:93
TFileService::kSharedResource
static const std::string kSharedResource
Definition: TFileService.h:76
edm::ParameterSet::getParameter
T getParameter(std::string const &) const
Definition: ParameterSet.h:303
ZMuMuMassConstraintParameterFinder::phiMax_
const double phiMax_
Definition: ZMuMuMassConstraintParameterFinder.cc:89
funct::abs
Abs< T >::type abs(const T &t)
Definition: Abs.h:22
edm::InputTag
Definition: InputTag.h:15
ZMuMuMassConstraintParameterFinder::muonInfo_
DiMuonInfo muonInfo_
Definition: ZMuMuMassConstraintParameterFinder.cc:95