|
|
Go to the documentation of this file.
33 theMultipleDepositsFlag(par.getParameter<
bool>(
"MultipleDepositsFlag")) {
34 LogDebug(
"PhysicsTools|MuonIsolation") <<
" CandIsoDepositProducer CTOR";
41 produces<reco::IsoDepositMap>();
45 throw cms::Exception(
"Configuration Error") <<
"This module supports only up to 10 deposits";
74 LogDebug(
"PhysicsTools/CandIsoDepositProducer") <<
" CandIsoDepositProducer DTOR";
86 throw cms::Exception(
"Error") <<
" Candidate is not RecoCandidate: can't get a real track from it!";
102 return &*rc->
track();
105 return static_cast<const Track *>(rc->
gsfTrack().
get());
121 static const unsigned int MAX_DEPS = 10;
123 if (nDeps > MAX_DEPS)
129 size_t nMuons = hCands->size();
130 std::vector<std::vector<IsoDeposit> > deps2D(nDeps, std::vector<IsoDeposit>(
nMuons));
141 <<
"Candidate #" <<
i <<
" has no bestTrack(), it will produce no deposit";
143 for (
size_t iDep = 0; iDep < nDeps; ++iDep) {
144 deps2D[iDep][
i] = emptyDep;
152 std::vector<IsoDeposit>
deps =
155 for (
unsigned int iDep = 0; iDep < nDeps; ++iDep) {
156 deps2D[iDep][
i] =
deps[iDep];
163 for (
unsigned int iDep = 0; iDep < nDeps; ++iDep) {
165 for (
unsigned int iMu = 0; iMu <
nMuons; ++iMu) {
171 auto depMap = std::make_unique<reco::IsoDepositMap>();
173 filler.insert(hCands, deps2D[iDep].begin(), deps2D[iDep].
end());
174 deps2D[iDep].clear();
virtual reco::TrackRef combinedMuon() const
reference to a stand-alone muon Track
std::unique_ptr< reco::isodeposit::IsoDepositExtractor > theExtractor
T const * get() const
Returns C++ pointer to the item.
virtual reco::TrackRef standAloneMuon() const
reference to a stand-alone muon Track
Log< level::Warning, false > LogWarning
virtual reco::GsfTrackRef gsfTrack() const
reference to a GsfTrack
CandIsoDepositProducer(const edm::ParameterSet &)
constructor with config
virtual reco::TrackRef track() const
reference to a Track
const Track * bestTrack() const override
best track pointer
#define DEFINE_FWK_MODULE(type)
~CandIsoDepositProducer() override
destructor
Log< level::Error, false > LogError
std::vector< std::string > theDepositNames
void produce(edm::Event &, const edm::EventSetup &) override
build deposits
edm::EDGetTokenT< edm::View< reco::Candidate > > theCandCollectionToken
T getParameter(std::string const &) const
edm::ParameterSet theConfig
math::Error< dimension >::type CovarianceMatrix
5 parameter covariance matrix
const reco::Track * extractTrack(const reco::Candidate &cand, reco::Track *dummyStorage) const
bool theMultipleDepositsFlag
const std::string metname