33 static const std::string metname =
"RecoMuon|MuonIsolationProducers|MuIsoDepositProducer";
42 bool readFromRecoTrack =
theInputType ==
"TrackCollection";
43 bool readFromRecoMuon =
theInputType ==
"MuonCollection";
44 bool readFromCandidateView =
theInputType ==
"CandidateView";
45 if (readFromRecoTrack) {
47 }
else if (readFromRecoMuon) {
49 }
else if (readFromCandidateView) {
52 throw cms::Exception(
"Configuration") <<
"Inconsistent configuration or failure to read Candidate-muon view";
59 .getParameter<std::vector<std::string>>(
"DepositInstanceLabels");
77 LogDebug(
"RecoMuon/MuIsoDepositProducer") <<
" MuIsoDepositProducer DTOR";
82 static const std::string metname =
"RecoMuon|MuonIsolationProducers|MuIsoDepositProducer";
85 <<
" BEGINING OF EVENT " 86 <<
"================================";
100 bool readFromRecoTrack =
theInputType ==
"TrackCollection";
101 bool readFromRecoMuon =
theInputType ==
"MuonCollection";
102 bool readFromCandidateView =
theInputType ==
"CandidateView";
104 if (readFromRecoMuon) {
109 if (readFromRecoTrack) {
116 unsigned int nCands =
cands->size();
126 static const unsigned int MAX_DEPS = 10;
127 std::unique_ptr<reco::IsoDepositMap> depMaps[MAX_DEPS];
131 for (
unsigned int i = 0;
i < nDeps; ++
i) {
132 depMaps[
i] = std::make_unique<reco::IsoDepositMap>();
139 std::vector<std::vector<IsoDeposit>> deps2D(nDeps, std::vector<IsoDeposit>(
nMuons));
141 for (
unsigned int i = 0;
i <
nMuons; ++
i) {
143 if (readFromRecoMuon) {
151 if (!(*
muons)[
i].combinedMuon().isNull()) {
168 }
else if (readFromRecoTrack) {
179 std::vector<IsoDeposit>
deps(nDeps);
184 for (
unsigned int iDep = 0; iDep < nDeps; ++iDep) {
185 deps2D[iDep][
i] =
deps[iDep];
191 for (
unsigned int iDep = 0; iDep < nDeps; ++iDep) {
193 for (
unsigned int iMu = 0; iMu <
nMuons; ++iMu) {
202 if (readFromRecoMuon) {
204 }
else if (readFromRecoTrack) {
206 }
else if (readFromCandidateView) {
217 for (
unsigned int iMap = 0; iMap < nDeps; ++iMap) {
219 << depMaps[iMap]->size() <<
" into edm::Event";
224 <<
"================================";
T getParameter(std::string const &) const
bool theExtractForCandidate
constexpr unsigned int index() const noexcept
std::vector< std::string > theDepositNames
MuIsoDepositProducer(const edm::ParameterSet &)
constructor
const std::string metname
bool theMultipleDepositsFlag
std::unique_ptr< reco::isodeposit::IsoDepositExtractor > theExtractor
Log< level::Error, false > LogError
~MuIsoDepositProducer() override
destructor
edm::RefToBase< reco::Track > TrackBaseRef
persistent reference to a Track, using views
edm::EDGetToken theMuonCollectionTag
#define DEFINE_FWK_MODULE(type)
std::string theMuonTrackRefType
Log< level::Warning, false > LogWarning
void produce(edm::Event &, const edm::EventSetup &) override
data making method