29 using namespace muonisolation;
36 theDepositNames(std::vector<std::
string>(1,
"")),
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 == 0)
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));
118 for (
size_t i=0;
i< nMuons; ++
i) {
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();
155 deps2D[iDep].clear();
virtual reco::GsfTrackRef gsfTrack() const
reference to a GsfTrack
T getParameter(std::string const &) const
virtual void produce(edm::Event &, const edm::EventSetup &)
build deposits
virtual ~CandIsoDepositProducer()
destructor
const std::string metname
#define DEFINE_FWK_MODULE(type)
void insert(const H &h, I begin, I end)
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
virtual reco::TrackRef track() const
reference to a Track
virtual Vector momentum() const =0
spatial momentum vector
ConsumesCollector consumesCollector()
Use a ConsumesCollector to gather consumes information from helper functions.
bool theMultipleDepositsFlag
virtual const Point & vertex() const =0
vertex position
virtual int charge() const =0
electric charge
T const * get() const
Returns C++ pointer to the item.
How EventSelector::AcceptEvent() decides whether to accept an event for output otherwise it is excluding the probing of A single or multiple positive and the trigger will pass if any such matching triggers are PASS or EXCEPTION[A criterion thatmatches no triggers at all is detected and causes a throw.] A single negative with an expectation of appropriate bit checking in the decision and the trigger will pass if any such matching triggers are FAIL or EXCEPTION A wildcarded negative criterion that matches more than one trigger in the trigger but the state exists so we define the behavior If all triggers are the negative crieriion will lead to accepting the event(this again matches the behavior of"!*"before the partial wildcard feature was incorporated).The per-event"cost"of each negative criterion with multiple relevant triggers is about the same as!*was in the past
CandIsoDepositProducer(const edm::ParameterSet &)
constructor with config
virtual const Track * bestTrack() const
best track pointer
edm::EDGetTokenT< edm::View< reco::Candidate > > theCandCollectionToken
reco::isodeposit::IsoDepositExtractor * theExtractor
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