41 LogDebug(
"RecoMuon|MuonIsolation")<<
" MuIsoDepositProducer CTOR";
49 bool readFromRecoTrack = theInputType ==
"TrackCollection";
50 bool readFromRecoMuon = theInputType ==
"MuonCollection";
51 bool readFromCandidateView = theInputType ==
"CandidateView";
52 if(readFromRecoTrack){
54 }
else if(readFromRecoMuon) {
56 }
else if (readFromCandidateView) {
59 throw cms::Exception(
"Configuration")<<
"Inconsistent configuration or failure to read Candidate-muon view";
68 .getParameter<std::vector<std::string> >(
"DepositInstanceLabels");
89 LogDebug(
"RecoMuon/MuIsoDepositProducer")<<
" MuIsoDepositProducer DTOR";
97 LogDebug(metname)<<
" Muon Deposit producing..." 98 <<
" BEGINING OF EVENT " <<
"================================";
113 bool readFromRecoTrack =
theInputType ==
"TrackCollection";
114 bool readFromRecoMuon =
theInputType ==
"MuonCollection";
115 bool readFromCandidateView =
theInputType ==
"CandidateView";
117 if (readFromRecoMuon){
119 nMuons = muons->size();
123 if (readFromRecoTrack){
125 nMuons = tracks->size();
130 unsigned int nCands = cands->size();
133 if (nMuons != nCands)
edm::LogError(metname)<<
"Inconsistent configuration or failure to read Candidate-muon view";
139 static const unsigned int MAX_DEPS=10;
140 std::unique_ptr<reco::IsoDepositMap> depMaps[MAX_DEPS];
142 if (nDeps >10 )
LogError(metname)<<
"Unable to handle more than 10 input deposits";
143 for (
unsigned int i =0;
i<nDeps; ++
i){
144 depMaps[
i] = std::make_unique<reco::IsoDepositMap>();
152 std::vector<std::vector<IsoDeposit> > deps2D(nDeps, std::vector<IsoDeposit>(nMuons));
156 if (readFromRecoMuon){
164 if (!(*muons)[
i].combinedMuon().isNull()){
166 }
else if (!(*muons)[
i].
track().isNull()){
172 if (!(*muons)[
i].
track().isNull()){
181 }
else if (readFromRecoTrack){
190 std::vector<IsoDeposit>
deps(nDeps);
193 for (
unsigned int iDep =0; iDep<nDeps; ++iDep) {
194 deps2D[iDep][
i] = deps[iDep];
200 for (
unsigned int iDep=0; iDep < nDeps; ++iDep){
202 for (
unsigned int iMu = 0; iMu<
nMuons; ++iMu){
204 <<
" for a muon at index "<<iMu;
205 LogTrace(metname)<<deps2D[iDep][iMu].print();
212 if (readFromRecoMuon){
214 }
else if (readFromRecoTrack){
216 }
else if (readFromCandidateView){
219 edm::LogError(metname)<<
"Inconsistent configuration: unknown type requested";
228 for (
unsigned int iMap = 0; iMap < nDeps; ++iMap){
230 <<
" of size "<<depMaps[iMap]->size()
231 <<
" into edm::Event";
235 LogTrace(metname) <<
" END OF EVENT " <<
"================================";
T getParameter(std::string const &) const
bool theExtractForCandidate
std::vector< std::string > theDepositNames
MuIsoDepositProducer(const edm::ParameterSet &)
constructor
const std::string metname
#define DEFINE_FWK_MODULE(type)
bool theMultipleDepositsFlag
void insert(const H &h, I begin, I end)
~MuIsoDepositProducer() override
destructor
edm::RefToBase< reco::Track > TrackBaseRef
persistent reference to a Track, using views
ConsumesCollector consumesCollector()
Use a ConsumesCollector to gather consumes information from helper functions.
edm::EDGetToken theMuonCollectionTag
std::string theMuonTrackRefType
reco::isodeposit::IsoDepositExtractor * theExtractor
void produce(edm::Event &, const edm::EventSetup &) override
data making method
edm::ParameterSet theConfig
module configuration
T get(const Candidate &c)