36 static const std::string metname =
"RecoMuon|MuonIsolationProducers|MuIsoDepositProducer";
45 bool readFromRecoTrack =
theInputType ==
"TrackCollection";
46 bool readFromRecoMuon =
theInputType ==
"MuonCollection";
47 bool readFromCandidateView =
theInputType ==
"CandidateView";
48 if (readFromRecoTrack) {
50 }
else if (readFromRecoMuon) {
52 }
else if (readFromCandidateView) {
55 throw cms::Exception(
"Configuration") <<
"Inconsistent configuration or failure to read Candidate-muon view";
62 .getParameter<std::vector<std::string>>(
"DepositInstanceLabels");
80 LogDebug(
"RecoMuon/MuIsoDepositProducer") <<
" MuIsoDepositProducer DTOR";
85 static const std::string metname =
"RecoMuon|MuonIsolationProducers|MuIsoDepositProducer";
88 <<
" BEGINING OF EVENT "
89 <<
"================================";
103 bool readFromRecoTrack =
theInputType ==
"TrackCollection";
104 bool readFromRecoMuon =
theInputType ==
"MuonCollection";
105 bool readFromCandidateView =
theInputType ==
"CandidateView";
107 if (readFromRecoMuon) {
112 if (readFromRecoTrack) {
119 unsigned int nCands =
cands->size();
129 static const unsigned int MAX_DEPS = 10;
130 std::unique_ptr<reco::IsoDepositMap> depMaps[MAX_DEPS];
134 for (
unsigned int i = 0;
i < nDeps; ++
i) {
135 depMaps[
i] = std::make_unique<reco::IsoDepositMap>();
142 std::vector<std::vector<IsoDeposit>> deps2D(nDeps, std::vector<IsoDeposit>(
nMuons));
144 for (
unsigned int i = 0;
i <
nMuons; ++
i) {
146 if (readFromRecoMuon) {
154 if (!(*
muons)[
i].combinedMuon().isNull()) {
171 }
else if (readFromRecoTrack) {
182 std::vector<IsoDeposit>
deps(nDeps);
187 for (
unsigned int iDep = 0; iDep < nDeps; ++iDep) {
188 deps2D[iDep][
i] =
deps[iDep];
194 for (
unsigned int iDep = 0; iDep < nDeps; ++iDep) {
196 for (
unsigned int iMu = 0; iMu <
nMuons; ++iMu) {
205 if (readFromRecoMuon) {
207 }
else if (readFromRecoTrack) {
209 }
else if (readFromCandidateView) {
220 for (
unsigned int iMap = 0; iMap < nDeps; ++iMap) {
222 << depMaps[iMap]->size() <<
" into edm::Event";
227 <<
"================================";