38 theMuonCollectionLabel(par.getParameter<
InputTag>(
"inputMuonCollection")),
39 optOutputIsoDeposits(par.getParameter<
bool>(
"OutputMuIsoDeposits")),
42 LogDebug(
"RecoMuon|L3MuonIsolationProducer")<<
" L3MuonIsolationProducer CTOR";
47 produces<edm::ValueMap<bool> >();
64 if (cutsName ==
"SimpleCuts") {
71 (cutsName==
"L3NominalEfficiencyCuts_PXLS" )
72 || (cutsName==
"L3NominalEfficiencyCuts_TRKS") ) {
76 LogError(
"L3MuonIsolationProducer::beginJob")
77 <<
"cutsName: "<<cutsPSet<<
" is not recognized:" 78 <<
" theCuts not set!";
89 LogDebug(
"RecoMuon|L3MuonIsolationProducer")<<
" L3MuonIsolationProducer DTOR";
95 LogDebug(metname)<<
" L3 Muon Isolation producing..." 96 <<
" BEGINING OF EVENT " <<
"================================";
103 auto depMap = std::make_unique<reco::IsoDepositMap>();
104 auto isoMap = std::make_unique<edm::ValueMap<bool>>();
110 unsigned int nMuons = muons->size();
112 IsoDeposit::Vetos
vetos(nMuons);
114 std::vector<IsoDeposit>
deps(nMuons);
115 std::vector<bool> isos(nMuons,
false);
120 vetos[
i] = deps[
i].veto();
131 for(
unsigned int iMu=0; iMu <
nMuons; ++iMu){
140 double value = sumAndCount.first;
141 int count = sumAndCount.second;
143 bool result = (value < cut.threshold);
145 LogTrace(metname)<<
"deposit in cone: "<<value<<
"with count "<<count<<
" is isolated: "<<
result;
155 depFiller.
insert(muons, deps.begin(), deps.end());
160 isoFiller.
insert(muons, isos.begin(), isos.end());
164 LogTrace(metname) <<
" END OF EVENT " <<
"================================";
edm::InputTag theMuonCollectionLabel
T getParameter(std::string const &) const
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
L3MuonIsolationProducer(const edm::ParameterSet &)
constructor with config
muonisolation::Cuts cuts() const
std::unique_ptr< reco::isodeposit::IsoDepositExtractor > theExtractor
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