33 using namespace muonisolation;
38 theMuonCollectionLabel(par.getParameter<
InputTag>(
"inputMuonCollection")),
39 optOutputIsoDeposits(par.getParameter<bool>(
"OutputMuIsoDeposits")),
40 useRhoCorrectedCaloDeps(par.existsAs<bool>(
"UseRhoCorrectedCaloDeposits") ?
41 par.getParameter<bool>(
"UseRhoCorrectedCaloDeposits") :
false),
42 theCaloDepsLabel(par.existsAs<
InputTag>(
"CaloDepositsLabel") ?
43 par.getParameter<
InputTag>(
"CaloDepositsLabel") :
44 InputTag(
"hltL3CaloMuonCorrectedIsolations")),
48 printDebug (par.getParameter<bool>(
"printDebug"))
50 LogDebug(
"RecoMuon|L3MuonCombinedRelativeIsolationProducer")<<
" L3MuonCombinedRelativeIsolationProducer CTOR";
53 produces<reco::IsoDepositMap>(
"trkIsoDeposits");
55 produces<reco::IsoDepositMap>(
"caloIsoDeposits");
57 produces<edm::ValueMap<double> >(
"combinedRelativeIsoDeposits");
59 produces<edm::ValueMap<bool> >();
65 LogDebug(
"RecoMuon|L3MuonCombinedRelativeIsolationProducer")<<
" L3MuonCombinedRelativeIsolationProducer DTOR";
102 if (cutsName ==
"SimpleCuts") {
109 (cutsName==
"L3NominalEfficiencyCuts_PXLS" )
110 || (cutsName==
"L3NominalEfficiencyCuts_TRKS") ) {
114 LogError(
"L3MuonCombinedRelativeIsolationProducer::beginJob")
115 <<
"cutsName: "<<cutsPSet<<
" is not recognized:"
116 <<
" theCuts not set!";
129 <<
" BEGINING OF EVENT " <<
"================================" <<std::endl;
153 unsigned int nMuons = muons->size();
155 IsoDeposit::Vetos trkVetos(nMuons);
156 std::vector<IsoDeposit> trkDeps(nMuons);
163 IsoDeposit::Vetos caloVetos;
164 std::vector<IsoDeposit> caloDeps;
165 std::vector<float> caloCorrDeps;
168 caloCorrDeps.resize(nMuons, 0.);
171 caloVetos.resize(nMuons);
172 caloDeps.resize(nMuons);
175 std::vector<double> combinedRelativeDeps(nMuons, 0.);
176 std::vector<bool> combinedRelativeIsos(nMuons,
false);
178 for (
unsigned int i=0;
i<nMuons;
i++) {
183 trkVetos[
i] = trkDeps[
i].
veto();
186 caloCorrDeps[
i] = (*caloDepWithCorrMap)[
mu];
190 caloVetos[
i] = caloDeps[
i].
veto();
205 for(
unsigned int iMu=0; iMu < nMuons; ++iMu){
215 <<
"CUTDEBUG: Muon pt = " << mu->
pt() << std::endl
216 <<
"CUTDEBUG: minEta = " << cut.
etaRange.
min() << std::endl
217 <<
"CUTDEBUG: maxEta = " << cut.
etaRange.
max() << std::endl
218 <<
"CUTDEBUG: consize = " << cut.
conesize << std::endl
219 <<
"CUTDEBUG: thresho = " << cut.
threshold << std::endl;
225 double caloIsoSum = 0.;
227 caloIsoSum = caloCorrDeps[iMu];
228 if(caloIsoSum<0.) caloIsoSum = 0.;
229 if(
printDebug)
std::cout <<
"Rho-corrected calo deposit (min. 0) = " << caloIsoSum << std::endl;
232 const IsoDeposit & caloDeposit = caloDeps[iMu];
237 double trkIsoSum = trkIsoSumAndCount.first;
238 int count = trkIsoSumAndCount.second;
240 double muPt = mu->
pt();
241 if( muPt<1. ) muPt = 1.;
242 double combinedRelativeDeposit = ((trkIsoSum + caloIsoSum ) / muPt);
245 if (
printDebug)
std::cout <<
" trk dep in cone: " << trkIsoSum <<
" with count "<<count <<std::endl
246 <<
" calo dep in cone: " << caloIsoSum << std::endl
247 <<
" muPt: " << muPt << std::endl
248 <<
" relIso: " <<combinedRelativeDeposit << std::endl
249 <<
" is isolated: "<<result << std::endl;
251 combinedRelativeIsos[iMu] =
result;
253 combinedRelativeDeps[iMu] = combinedRelativeDeposit;
262 depFillerTrk.
insert(muons, trkDeps.begin(), trkDeps.end());
264 event.put(trkDepMap,
"trkIsoDeposits");
268 depFillerCalo.
insert(muons, caloDeps.begin(), caloDeps.end());
269 depFillerCalo.
fill();
270 event.put(caloDepMap,
"caloIsoDeposits");
275 depFillerCombRel.
insert(muons, combinedRelativeDeps.begin(), combinedRelativeDeps.end());
276 depFillerCombRel.
fill();
277 event.put(combinedRelativeDepMap,
"combinedRelativeIsoDeposits");
281 isoFiller.
insert(muons, combinedRelativeIsos.begin(), combinedRelativeIsos.end());
283 event.put(comboIsoDepMap);
T getParameter(std::string const &) const
edm::InputTag theMuonCollectionLabel
const Veto & veto() const
Get veto area.
const std::string metname
bool theApplyCutsORmaxNTracks
apply or not the maxN cut on top of the sumPt (or nominall eff) < cuts
void insert(const H &h, I begin, I end)
double depositWithin(double coneSize, const Vetos &vetos=Vetos(), bool skipDepositVeto=false) const
Get deposit.
std::string print() const
double eta() const
pseudorapidity of momentum vector
muonisolation::Range< double > etaRange
virtual void produce(edm::Event &, const edm::EventSetup &)
Produce isolation maps.
double pt() const
track transverse momentum
muonisolation::Cuts theCuts
virtual ~L3MuonCombinedRelativeIsolationProducer()
destructor
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
muonisolation::Cuts cuts() const
virtual void beginJob()
initialisation
L3MuonCombinedRelativeIsolationProducer(const edm::ParameterSet &)
constructor with config
bool optOutputIsoDeposits
edm::InputTag theCaloDepsLabel
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
reco::isodeposit::IsoDepositExtractor * trkExtractor
bool useRhoCorrectedCaloDeps
edm::ParameterSet theConfig
T get(const Candidate &c)
reco::isodeposit::IsoDepositExtractor * caloExtractor