37 theMultipleDepositsFlag(par.getParameter<
bool>(
"MultipleDepositsFlag")),
40 LogDebug(
"PhysicsTools|MuonIsolation")<<
" CandIsoDepositProducer CTOR";
64 else throw cms::Exception(
"Error") <<
"Track type " << trackType <<
" not valid.";
69 LogDebug(
"PhysicsTools/CandIsoDepositProducer")<<
" CandIsoDepositProducer DTOR";
81 if (rc ==
nullptr)
throw cms::Exception(
"Error") <<
" Candidate is not RecoCandidate: can't get a real track from it!";
104 static const unsigned int MAX_DEPS=10;
106 if (nDeps >MAX_DEPS )
LogError(metname)<<
"Unable to handle more than 10 input deposits";
111 size_t nMuons = hCands->size();
112 std::vector<std::vector<IsoDeposit> > deps2D(nDeps, std::vector<IsoDeposit>(nMuons));
122 edm::LogWarning(
"CandIsoDepositProducer") <<
"Candidate #"<<
i<<
" has no bestTrack(), it will produce no deposit";
124 for (
size_t iDep=0;iDep<nDeps;++iDep) {
125 deps2D[iDep][
i] = emptyDep;
137 for (
unsigned int iDep=0; iDep < nDeps; ++iDep){ deps2D[iDep][
i] = deps[iDep]; }
143 for (
unsigned int iDep=0; iDep < nDeps; ++iDep){
145 for (
unsigned int iMu = 0; iMu<
nMuons; ++iMu){
147 <<
" for a muon at index "<<iMu;
148 LogTrace(metname)<<deps2D[iDep][iMu].print();
152 auto depMap = std::make_unique<reco::IsoDepositMap>();
154 filler.insert(hCands, deps2D[iDep].
begin(), deps2D[iDep].
end());
155 deps2D[iDep].clear();
virtual reco::GsfTrackRef gsfTrack() const
reference to a GsfTrack
T getParameter(std::string const &) const
const std::string metname
#define DEFINE_FWK_MODULE(type)
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
ConsumesCollector consumesCollector()
Use a ConsumesCollector to gather consumes information from helper functions.
bool theMultipleDepositsFlag
T const * get() const
Returns C++ pointer to the item.
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
reco::isodeposit::IsoDepositExtractor * theExtractor
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