38 theMuonCollectionLabel(par.getParameter<
InputTag>(
"inputMuonCollection")),
39 optOutputIsoDeposits(par.getParameter<
bool>(
"OutputMuIsoDeposits")),
43 LogDebug(
"RecoMuon|L3MuonIsolationProducer")<<
" L3MuonIsolationProducer CTOR";
48 produces<edm::ValueMap<bool> >();
65 if (cutsName ==
"SimpleCuts") {
72 (cutsName==
"L3NominalEfficiencyCuts_PXLS" )
73 || (cutsName==
"L3NominalEfficiencyCuts_TRKS") ) {
77 LogError(
"L3MuonIsolationProducer::beginJob")
78 <<
"cutsName: "<<cutsPSet<<
" is not recognized:" 79 <<
" theCuts not set!";
90 LogDebug(
"RecoMuon|L3MuonIsolationProducer")<<
" L3MuonIsolationProducer DTOR";
97 LogDebug(metname)<<
" L3 Muon Isolation producing..." 98 <<
" BEGINING OF EVENT " <<
"================================";
105 auto depMap = std::make_unique<reco::IsoDepositMap>();
106 auto isoMap = std::make_unique<edm::ValueMap<bool>>();
112 unsigned int nMuons = muons->size();
114 IsoDeposit::Vetos
vetos(nMuons);
116 std::vector<IsoDeposit>
deps(nMuons);
117 std::vector<bool> isos(nMuons,
false);
122 vetos[
i] = deps[
i].
veto();
133 for(
unsigned int iMu=0; iMu <
nMuons; ++iMu){
142 double value = sumAndCount.first;
143 int count = sumAndCount.second;
145 bool result = (value < cut.threshold);
147 LogTrace(metname)<<
"deposit in cone: "<<value<<
"with count "<<count<<
" is isolated: "<<
result;
157 depFiller.
insert(muons, deps.begin(), deps.end());
162 isoFiller.
insert(muons, isos.begin(), isos.end());
166 LogTrace(metname) <<
" END OF EVENT " <<
"================================";
edm::InputTag theMuonCollectionLabel
T getParameter(std::string const &) const
const Veto & veto() const
Get veto area.
muonisolation::Cuts theCuts
const std::string metname
double optOutputIsoDeposits
void insert(const H &h, I begin, I end)
~L3MuonIsolationProducer() override
destructor
std::string print() const
bool theApplyCutsORmaxNTracks
apply or not the maxN cut on top of the sumPt (or nominall eff) < cuts
double eta() const
pseudorapidity of momentum vector
edm::EDGetTokenT< reco::RecoChargedCandidateCollection > theMuonCollectionToken
ConsumesCollector consumesCollector()
Use a ConsumesCollector to gather consumes information from helper functions.
L3MuonIsolationProducer(const edm::ParameterSet &)
constructor with config
muonisolation::Cuts cuts() const
std::pair< double, int > depositAndCountWithin(double coneSize, const Vetos &vetos=Vetos(), double threshold=-1e+36, bool skipDepositVeto=false) const
Get deposit.
std::string print() const
void produce(edm::Event &, const edm::EventSetup &) override
Produce isolation maps.
T get(const Candidate &c)
edm::ParameterSet theConfig
reco::isodeposit::IsoDepositExtractor * theExtractor