|
| DistortedMuonProducerFromDB (const edm::ParameterSet &) |
|
| ~DistortedMuonProducerFromDB () |
|
| EDProducer () |
|
ModuleDescription const & | moduleDescription () const |
|
virtual | ~EDProducer () |
|
void | callWhenNewProductsRegistered (std::function< void(BranchDescription const &)> const &func) |
|
std::vector< edm::ProductResolverIndex > const & | indiciesForPutProducts (BranchType iBranchType) const |
|
| ProducerBase () |
|
void | registerProducts (ProducerBase *, ProductRegistry *, ModuleDescription const &) |
|
std::function< void(BranchDescription const &)> | registrationCallback () const |
| used by the fwk to register list of products More...
|
|
void | resolvePutIndicies (BranchType iBranchType, std::unordered_multimap< std::string, edm::ProductResolverIndex > const &iIndicies, std::string const &moduleLabel) |
|
virtual | ~ProducerBase () noexcept(false) |
|
std::vector< ConsumesInfo > | consumesInfo () const |
|
| EDConsumerBase () |
|
| EDConsumerBase (EDConsumerBase const &)=delete |
|
| EDConsumerBase (EDConsumerBase &&)=default |
|
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::vector< ModuleDescription const * > &modules, ProductRegistry const &preg, std::map< std::string, ModuleDescription const * > const &labelsToDesc, std::string const &processName) const |
|
EDConsumerBase const & | operator= (EDConsumerBase const &)=delete |
|
EDConsumerBase & | operator= (EDConsumerBase &&)=default |
|
bool | registeredToConsume (ProductResolverIndex, bool, BranchType) const |
|
bool | registeredToConsumeMany (TypeID const &, BranchType) const |
|
void | updateLookup (BranchType iBranchType, ProductResolverIndexHelper const &, bool iPrefetchMayGet) |
|
virtual | ~EDConsumerBase () noexcept(false) |
|
Definition at line 92 of file DistortedMuonProducerFromDB.cc.
References reco::Muon::clone(), DEFINE_FWK_MODULE, reco::LeafCandidate::eta(), edm::Event::getByToken(), mps_fire::i, edm::EventBase::isRealData(), LogTrace, reco::LeafCandidate::mass(), momResolutionData_, momResolutionMC_, eostools::move(), RPCpg::mu, HiRecoMuon_cff::muonCollection, muonToken_, MuonAlignmentFromReference_cff::newmuons, reco::LeafCandidate::phi(), funct::pow(), reco::LeafCandidate::pt(), edm::Event::put(), reco::LeafCandidate::setP4(), edm::shift, ctppsDiamondLocalTracks_cfi::sigma, and mathSSE::sqrt().
Referenced by JSONExport.JsonExport::export(), HTMLExport.HTMLExport::export(), and HTMLExport.HTMLExportStatic::export().
99 edm::LogError(
"") <<
">>> Muon collection does not exist !!!";
102 unsigned int muonCollectionSize = muonCollection->size();
106 for (
unsigned int i=0;
i<muonCollectionSize;
i++) {
110 double shift = (*momCorrector_)(*mu) - mu->
pt();
111 LogTrace(
"") <<
"\tmomentumScaleShift= " << shift <<
" [GeV]";
116 if (sigma>0.) sigma =
sqrt(sigma);
else sigma = 0.;
117 LogTrace(
"") <<
"\tPt additional smearing= " << sigma <<
" [GeV]";
120 double rndg = CLHEP::RandGauss::shoot();
123 double ptmu = mu->
pt();
124 ptmu += shift + sigma*rndg;
virtual double pt() const final
transverse momentum
std::unique_ptr< ResolutionFunction > momResolutionData_
std::unique_ptr< ResolutionFunction > momResolutionMC_
OrphanHandle< PROD > put(std::unique_ptr< PROD > product)
Put a new product.
virtual double mass() const final
mass
virtual double eta() const final
momentum pseudorapidity
bool getByToken(EDGetToken token, Handle< PROD > &result) const
std::vector< Muon > MuonCollection
collection of Muon objects
virtual double phi() const final
momentum azimuthal angle
virtual void setP4(const LorentzVector &p4) final
set 4-momentum
math::PtEtaPhiMLorentzVector PolarLorentzVector
Lorentz vector.
static unsigned int const shift
Muon * clone() const
create a clone
Power< A, B >::type pow(const A &a, const B &b)
edm::EDGetTokenT< edm::View< reco::Muon > > muonToken_