29 using namespace muonisolation;
35 theCandCollectionTag(par.getParameter<edm::
InputTag>(
"src")),
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;
105 std::auto_ptr<reco::IsoDepositMap> depMaps[MAX_DEPS];
107 if (nDeps >10 )
LogError(metname)<<
"Unable to handle more than 10 input deposits";
108 for (
unsigned int i =0;
i<nDeps; ++
i){
115 size_t nMuons = hCands->size();
117 std::vector<std::vector<IsoDeposit> > deps2D(nDeps, std::vector<IsoDeposit>(nMuons));
121 for (
size_t i=0;
i< nMuons; ++
i) {
125 edm::LogWarning(
"CandIsoDepositProducer") <<
"Candidate #"<<
i<<
" has no bestTrack(), it will produce no deposit";
127 for (
size_t iDep=0;iDep<nDeps;++iDep) {
128 deps2D[iDep][
i] = emptyDep;
141 for (
unsigned int iDep=0; iDep < nDeps; ++iDep){ deps2D[iDep][
i] = deps[iDep]; }
147 for (
unsigned int iDep=0; iDep < nDeps; ++iDep){
149 for (
unsigned int iMu = 0; iMu< nMuons; ++iMu){
151 <<
" for a muon at index "<<iMu;
152 LogTrace(metname)<<deps2D[iDep][iMu].print();
162 for (
unsigned int iMap = 0; iMap < nDeps; ++iMap) event.
put(depMaps[iMap],
theDepositNames[iMap]);
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
OrphanHandle< PROD > put(std::auto_ptr< PROD > product)
Put a new product.
bool theMultipleDepositsFlag
virtual const Point & vertex() const =0
vertex position
virtual int charge() const =0
electric charge
edm::ValueMap< reco::IsoDeposit > IsoDepositMap
keep it only as a part of ValueMap
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::InputTag theCandCollectionTag
reco::isodeposit::IsoDepositExtractor * theExtractor
T const * get() const
Returns C++ pointer to the item.
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