37 theMultipleDepositsFlag(par.getParameter<
bool>(
"MultipleDepositsFlag"))
39 LogDebug(
"PhysicsTools|MuonIsolation")<<
" CandIsoDepositProducer CTOR";
63 else throw cms::Exception(
"Error") <<
"Track type " << trackType <<
" not valid.";
68 LogDebug(
"PhysicsTools/CandIsoDepositProducer")<<
" CandIsoDepositProducer DTOR";
79 if (rc ==
nullptr)
throw cms::Exception(
"Error") <<
" Candidate is not RecoCandidate: can't get a real track from it!";
102 static const unsigned int MAX_DEPS=10;
104 if (nDeps >MAX_DEPS )
LogError(metname)<<
"Unable to handle more than 10 input deposits";
109 size_t nMuons = hCands->size();
110 std::vector<std::vector<IsoDeposit> > deps2D(nDeps, std::vector<IsoDeposit>(nMuons));
120 edm::LogWarning(
"CandIsoDepositProducer") <<
"Candidate #"<<
i<<
" has no bestTrack(), it will produce no deposit";
122 for (
size_t iDep=0;iDep<nDeps;++iDep) {
123 deps2D[iDep][
i] = emptyDep;
135 for (
unsigned int iDep=0; iDep < nDeps; ++iDep){ deps2D[iDep][
i] = deps[iDep]; }
141 for (
unsigned int iDep=0; iDep < nDeps; ++iDep){
143 for (
unsigned int iMu = 0; iMu<
nMuons; ++iMu){
145 <<
" for a muon at index "<<iMu;
146 LogTrace(metname)<<deps2D[iDep][iMu].print();
150 auto depMap = std::make_unique<reco::IsoDepositMap>();
152 filler.insert(hCands, deps2D[iDep].
begin(), deps2D[iDep].
end());
153 deps2D[iDep].clear();
virtual reco::GsfTrackRef gsfTrack() const
reference to a GsfTrack
T getParameter(std::string const &) const
const std::string metname
edm::ParameterSet theConfig
std::vector< std::string > theDepositNames
const reco::Track * extractTrack(const reco::Candidate &cand, reco::Track *dummyStorage) const
virtual reco::TrackRef standAloneMuon() const
reference to a stand-alone muon Track
void produce(edm::Event &, const edm::EventSetup &) override
build deposits
virtual reco::TrackRef track() const
reference to a Track
#define DEFINE_FWK_MODULE(type)
bool theMultipleDepositsFlag
T const * get() const
Returns C++ pointer to the item.
std::unique_ptr< reco::isodeposit::IsoDepositExtractor > theExtractor
CandIsoDepositProducer(const edm::ParameterSet &)
constructor with config
edm::EDGetTokenT< edm::View< reco::Candidate > > theCandCollectionToken
virtual Vector momentum() const =0
spatial momentum vector
virtual int charge() const =0
electric charge
const Track * bestTrack() const override
best track pointer
virtual const Point & vertex() const =0
vertex position
~CandIsoDepositProducer() override
destructor
T get(const Candidate &c)
math::Error< dimension >::type CovarianceMatrix
5 parameter covariance matrix
virtual reco::TrackRef combinedMuon() const
reference to a stand-alone muon Track