38 std::unique_ptr<reco::isodeposit::IsoDepositExtractor>
theExtractor;
49 theMultipleDepositsFlag(par.getParameter<
bool>(
"MultipleDepositsFlag")) {
50 LogDebug(
"PhysicsTools|MuonIsolation") <<
" CandIsoDepositProducer CTOR";
57 produces<reco::IsoDepositMap>();
61 throw cms::Exception(
"Configuration Error") <<
"This module supports only up to 10 deposits";
90 LogDebug(
"PhysicsTools/CandIsoDepositProducer") <<
" CandIsoDepositProducer DTOR";
102 throw cms::Exception(
"Error") <<
" Candidate is not RecoCandidate: can't get a real track from it!";
118 return &*rc->
track();
137 static const unsigned int MAX_DEPS = 10;
139 if (nDeps > MAX_DEPS)
145 size_t nMuons = hCands->size();
146 std::vector<std::vector<IsoDeposit> > deps2D(nDeps, std::vector<IsoDeposit>(
nMuons));
157 <<
"Candidate #" <<
i <<
" has no bestTrack(), it will produce no deposit";
159 for (
size_t iDep = 0; iDep < nDeps; ++iDep) {
160 deps2D[iDep][
i] = emptyDep;
168 std::vector<IsoDeposit>
deps =
171 for (
unsigned int iDep = 0; iDep < nDeps; ++iDep) {
172 deps2D[iDep][
i] =
deps[iDep];
179 for (
unsigned int iDep = 0; iDep < nDeps; ++iDep) {
181 for (
unsigned int iMu = 0; iMu <
nMuons; ++iMu) {
187 auto depMap = std::make_unique<reco::IsoDepositMap>();
190 deps2D[iDep].clear();
T getParameter(std::string const &) const
virtual reco::GsfTrackRef gsfTrack() const
reference to a GsfTrack
const std::string metname
edm::ParameterSet theConfig
edm::EDGetTokenT< edm::View< reco::Candidate > > theCandCollectionToken
std::vector< std::string > theDepositNames
Log< level::Error, false > LogError
void produce(edm::Event &, const edm::EventSetup &) override
build deposits
bool theMultipleDepositsFlag
#define DEFINE_FWK_MODULE(type)
const reco::Track * extractTrack(const reco::Candidate &cand, reco::Track *dummyStorage) const
std::unique_ptr< reco::isodeposit::IsoDepositExtractor > theExtractor
const Track * bestTrack() const override
best track pointer
CandIsoDepositProducer(const edm::ParameterSet &)
constructor with config
virtual reco::TrackRef track() const
reference to a Track
T const * get() const
Returns C++ pointer to the item.
virtual reco::TrackRef combinedMuon() const
reference to a stand-alone muon Track
~CandIsoDepositProducer() override
destructor
Log< level::Warning, false > LogWarning
math::Error< dimension >::type CovarianceMatrix
5 parameter covariance matrix
virtual reco::TrackRef standAloneMuon() const
reference to a stand-alone muon Track