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>();
174 deps2D[iDep].clear();