|
|
|
void | getCaloJetEnergy (const PolarLorentzVector &, const reco::CaloJetCollection *, float &, float &) const |
|
float | getDeDx (const reco::DeDxHitInfo *hitInfo, bool doPixel, bool doStrip) const |
|
void | getIsolation (const PolarLorentzVector &p4, const pat::PackedCandidateCollection *pc, int pc_idx, pat::PFIsolation &iso, pat::PFIsolation &miniiso) const |
|
void | getNearestPCRef (const PolarLorentzVector &p4, const pat::PackedCandidateCollection *pc, int pc_idx, int &pc_ref_idx) const |
|
bool | getPFLeptonOverlap (const PolarLorentzVector &p4, const pat::PackedCandidateCollection *pc) const |
|
float | getPFNeutralSum (const PolarLorentzVector &p4, const pat::PackedCandidateCollection *pc, int pc_idx) const |
|
TrackDetMatchInfo | getTrackDetMatchInfo (const edm::Event &, const edm::EventSetup &, const reco::Track &) |
|
| PATIsolatedTrackProducer (const edm::ParameterSet &) |
|
void | produce (edm::Event &, const edm::EventSetup &) override |
|
| ~PATIsolatedTrackProducer () override |
|
| EDProducer ()=default |
|
bool | hasAbilityToProduceInBeginLumis () const final |
|
bool | hasAbilityToProduceInBeginProcessBlocks () const final |
|
bool | hasAbilityToProduceInBeginRuns () const final |
|
bool | hasAbilityToProduceInEndLumis () const final |
|
bool | hasAbilityToProduceInEndProcessBlocks () const final |
|
bool | hasAbilityToProduceInEndRuns () const final |
|
Definition at line 44 of file PATIsolatedTrackProducer.cc.
◆ LorentzVector
◆ PolarLorentzVector
◆ PATIsolatedTrackProducer()
pat::PATIsolatedTrackProducer::PATIsolatedTrackProducer |
( |
const edm::ParameterSet & |
iConfig | ) |
|
|
explicit |
◆ ~PATIsolatedTrackProducer()
pat::PATIsolatedTrackProducer::~PATIsolatedTrackProducer |
( |
| ) |
|
|
override |
◆ getCaloJetEnergy()
◆ getDeDx()
float pat::PATIsolatedTrackProducer::getDeDx |
( |
const reco::DeDxHitInfo * |
hitInfo, |
|
|
bool |
doPixel, |
|
|
bool |
doStrip |
|
) |
| const |
Definition at line 703 of file PATIsolatedTrackProducer.cc.
704 if (hitInfo ==
nullptr) {
708 std::vector<float> charge_vec;
709 for (
unsigned int ih = 0; ih < hitInfo->
size(); ih++) {
730 Norm = 3.61e-06 * 265;
736 int size = charge_vec.size();
741 for (
int i = 0;
i <
size;
i++) {
References reco::DeDxHitInfo::charge(), hltTrackClusterRemoverNew_cfi::doPixel, hltTrackClusterRemoverNew_cfi::doStrip, mps_fire::i, fastTrackerRecHitType::isPixel(), reco::DeDxHitInfo::pathlength(), reco::DeDxHitInfo::pixelCluster(), funct::pow(), mps_fire::result, DeDxTools::shapeSelection(), reco::DeDxHitInfo::size(), findQualityFiles::size, and reco::DeDxHitInfo::stripCluster().
◆ getIsolation()
Definition at line 553 of file PATIsolatedTrackProducer.cc.
558 float chiso = 0, nhiso = 0, phiso = 0, puiso = 0;
559 float chmiso = 0, nhmiso = 0, phmiso = 0, pumiso = 0;
561 for (pat::PackedCandidateCollection::const_iterator pf_it = pc->begin(); pf_it != pc->end(); pf_it++) {
562 if (
int(pf_it - pc->begin()) == pc_idx)
566 float pt = pf_it->p4().pt();
References funct::abs(), PbPb_ZMuSkimMuonDPG_cff::deltaR, flavorHistoryFilter_cfi::dr, isotracks_cff::fromPV, SiStripPI::max, min(), p4, muons2muons_cfi::PFIsolation, and DiDispStaMuonMonitor_cfi::pt.
◆ getNearestPCRef()
◆ getPFLeptonOverlap()
◆ getPFNeutralSum()
◆ getTrackDetMatchInfo()
◆ produce()
Definition at line 174 of file PATIsolatedTrackProducer.cc.
234 auto outDeDxC = std::make_unique<reco::DeDxHitInfoCollection>();
235 std::vector<int> dEdXass;
237 auto outPtrP = std::make_unique<std::vector<pat::IsolatedTrack>>();
240 for (
unsigned int igt = 0; igt <
generalTracks->size(); igt++) {
254 bool isInPackedCands = (pcref.
isNonnull() && pcref.
id() == pc_h.
id() && pfCand->
charge() != 0);
255 bool isInLostTracks = (ltref.
isNonnull() && ltref.
id() == lt_h.
id());
261 float dz,
dxy, dzError, dxyError;
266 if (isInPackedCands) {
268 polarP4 = pfCand->
p4();
270 pfCandInd = pcref.
key();
272 }
else if (isInLostTracks) {
273 p4 = lostTrack->
p4();
274 polarP4 = lostTrack->
p4();
277 ltCandInd = ltref.
key();
279 double m = 0.13957018;
280 double E =
sqrt(
m *
m + gentk.
p() * gentk.
p());
281 p4.SetPxPyPzE(gentk.
px(), gentk.
py(), gentk.
pz(), E);
282 polarP4.SetCoordinates(gentk.
pt(), gentk.
eta(), gentk.
phi(),
m);
290 const auto& dedxRef = (*gt2dedxHitInfo)[tkref];
291 if (dedxRef.isNonnull()) {
292 prescaled = (*gt2dedxHitInfoPrescale)[dedxRef];
296 if (polarP4.pt() <
pT_cut_ && prescaled <= 1)
304 getIsolation(polarP4, pc, pfCandInd, isolationDR03, miniIso);
314 if (isInPackedCands) {
322 }
else if (isInLostTracks) {
324 dz = lostTrack->
dz();
332 dz = gentk.
dz(
pv.position());
340 float caloJetEm, caloJetHad;
347 int refToNearestPF_idx = -1;
349 if (refToNearestPF_idx != -1)
353 int refToNearestLostTrack_idx = -1;
355 if (refToNearestLostTrack_idx != -1)
359 float dEdxPixel = -1, dEdxStrip = -1;
361 dEdxStrip = (*gt2dedxStrip)[tkref].dEdx();
364 dEdxStrip =
getDeDx(hitInfo,
false,
true);
367 dEdxPixel = (*gt2dedxPixel)[tkref].dEdx();
370 dEdxPixel =
getDeDx(hitInfo,
true,
false);
379 std::vector<uint32_t> crossedHcalStatus;
383 std::vector<uint16_t> crossedEcalStatus;
385 crossedEcalStatus.push_back(ecalS->
find(did.rawId())->getStatusCode());
423 refToNearestLostTrack));
424 outPtrP->back().setStatus(prescaled);
427 const auto& dedxRef = (*gt2dedxHitInfo)[tkref];
429 outDeDxC->push_back(*dedxRef);
430 dEdXass.push_back(outDeDxC->size() - 1);
432 dEdXass.push_back(-1);
440 for (
unsigned int ipc = 0; ipc < pc->size(); ipc++) {
446 if (pfref.
get()->trackRef().isNonnull() && pfref.
get()->trackRef().id() == gt_h.
id())
452 float dz,
dxy, dzError, dxyError;
486 float caloJetEm, caloJetHad;
493 int refToNearestPF_idx = -1;
495 if (refToNearestPF_idx != -1)
499 int refToNearestLostTrack_idx = -1;
501 if (refToNearestLostTrack_idx != -1)
506 float dEdxPixel = -1, dEdxStrip = -1;
508 std::vector<uint16_t> ecalStatus;
509 std::vector<uint32_t> hcalStatus;
537 refToNearestLostTrack));
539 dEdXass.push_back(-1);
545 auto dedxMatch = std::make_unique<reco::DeDxHitInfoAss>(dedxOH);
547 filler.insert(orphHandle, dEdXass.begin(), dEdXass.end());
References isolatedTracks_cfi::caloJets, ALCARECOTkAlJpsiMuMu_cff::charge, reco::TrackBase::charge(), pat::PackedCandidate::charge(), pat::PFIsolation::chargedHadronIso(), edm::Association< C >::contains(), TrackDetMatchInfo::crossedEcalIds, TrackDetMatchInfo::crossedHcalIds, spr::deltaEta, SiPixelRawToDigiRegional_cfi::deltaPhi, PVValHelper::dxy, reco::TrackBase::dxy(), pat::PackedCandidate::dxy(), reco::TrackBase::dxyError(), pat::PackedCandidate::dxyError(), PVValHelper::dz, reco::TrackBase::dz(), pat::PackedCandidate::dz(), reco::TrackBase::dzError(), pat::PackedCandidate::dzError(), reco::TrackBase::eta(), trigObjTnPSource_cfi::filler, EcalCondObjectContainer< T >::find(), isotracks_cff::fromPV, pat::PackedCandidate::fromPV(), isolatedTracks_cfi::generalTracks, edm::EventSetup::get(), get, edm::Ref< C, T, F >::get(), reco::JetExtendedAssociation::getValue(), HcalCondObjectContainer< Item >::getValues(), pat::PackedCandidate::hasTrackDetails(), reco::TrackBase::hitPattern(), trackingPlots::hp, edm::HandleBase::id(), edm::Ref< C, T, F >::id(), iEvent, createfilelist::int, edm::Ref< C, T, F >::isNonnull(), edm::HandleBase::isValid(), edm::Ref< C, T, F >::key(), lt_(), visualization-live-secondInstance_cfg::m, eostools::move(), reco::TrackBase::p(), p4, pat::PackedCandidate::p4(), EgammaValidation_cff::pdgId, pat::PackedCandidate::pdgId(), reco::TrackBase::phi(), pat::PackedCandidate::polarP4(), edm::Handle< T >::product(), edm::ESHandle< T >::product(), reco::TrackBase::pt(), MetAnalyzer::pv(), FSQDQM_cfi::pvs, reco::TrackBase::px(), reco::TrackBase::py(), reco::TrackBase::pz(), reco::TrackBase::quality(), reco::TrackBase::qualityByName(), reco::TrackBase::qualityMask(), mathSSE::sqrt(), StandaloneTrackMonitor_cfi::trackQuality, and TrackDetMatchInfo::trkGlobPosAtEcal.
◆ absIso_cut_
const float pat::PATIsolatedTrackProducer::absIso_cut_ |
|
private |
◆ addPrescaledDeDxTracks_
const bool pat::PATIsolatedTrackProducer::addPrescaledDeDxTracks_ |
|
private |
◆ caloJet_DR_
const float pat::PATIsolatedTrackProducer::caloJet_DR_ |
|
private |
◆ caloJets_
◆ gt2dedxHitInfo_
◆ gt2dedxHitInfoPrescale_
◆ gt2dedxPixel_
◆ gt2dedxStrip_
◆ gt2lt_
◆ gt2pc_
◆ gt_
◆ lt_
◆ miniIsoParams_
std::vector<double> pat::PATIsolatedTrackProducer::miniIsoParams_ |
|
private |
◆ miniRelIso_cut_
const float pat::PATIsolatedTrackProducer::miniRelIso_cut_ |
|
private |
◆ pc2pf_
◆ pc_
◆ pcRefNearest_DR_
const float pat::PATIsolatedTrackProducer::pcRefNearest_DR_ |
|
private |
◆ pcRefNearest_pTmin_
const float pat::PATIsolatedTrackProducer::pcRefNearest_pTmin_ |
|
private |
◆ pfIsolation_DR_
const float pat::PATIsolatedTrackProducer::pfIsolation_DR_ |
|
private |
◆ pfIsolation_DZ_
const float pat::PATIsolatedTrackProducer::pfIsolation_DZ_ |
|
private |
◆ pflepoverlap_DR_
const float pat::PATIsolatedTrackProducer::pflepoverlap_DR_ |
|
private |
◆ pflepoverlap_pTmin_
const float pat::PATIsolatedTrackProducer::pflepoverlap_pTmin_ |
|
private |
◆ pfneutralsum_DR_
const float pat::PATIsolatedTrackProducer::pfneutralsum_DR_ |
|
private |
◆ pT_cut_
const float pat::PATIsolatedTrackProducer::pT_cut_ |
|
private |
◆ pT_cut_noIso_
const float pat::PATIsolatedTrackProducer::pT_cut_noIso_ |
|
private |
◆ pv_
◆ relIso_cut_
const float pat::PATIsolatedTrackProducer::relIso_cut_ |
|
private |
◆ saveDeDxHitInfo_
const bool pat::PATIsolatedTrackProducer::saveDeDxHitInfo_ |
|
private |
◆ saveDeDxHitInfoCut_
◆ trackAssociator_
◆ trackAssocParameters_
◆ useHighPurity_
const bool pat::PATIsolatedTrackProducer::useHighPurity_ |
|
private |
◆ usePrecomputedDeDxPixel_
const bool pat::PATIsolatedTrackProducer::usePrecomputedDeDxPixel_ |
|
private |
◆ usePrecomputedDeDxStrip_
const bool pat::PATIsolatedTrackProducer::usePrecomputedDeDxStrip_ |
|
private |
T const * product() const
bool hasTrackDetails() const
Return true if a bestTrack can be extracted from this Candidate.
void getIsolation(const PolarLorentzVector &p4, const pat::PackedCandidateCollection *pc, int pc_idx, pat::PFIsolation &iso, pat::PFIsolation &miniiso) const
Jets made from CaloTowers.
const bool usePrecomputedDeDxPixel_
float chargedHadronIso() const
const float pcRefNearest_DR_
T const * product() const
const PolarLorentzVector & polarP4() const override
four-momentum Lorentz vector
const float pfIsolation_DZ_
const edm::EDGetTokenT< edm::Association< pat::PackedCandidateCollection > > gt2pc_
int pdgId() const override
PDG identifier.
double p() const
momentum vector magnitude
std::vector< DetId > crossedEcalIds
void useDefaultPropagator()
use the default propagator
const float pflepoverlap_pTmin_
const float pT_cut_noIso_
const bool saveDeDxHitInfo_
T const * get() const
Returns C++ pointer to the item.
float hadEnergyInHF() const
double px() const
x coordinate of momentum vector
bool contains(ProductID id) const
pat::IsolatedTrack::PolarLorentzVector PolarLorentzVector
float hadEnergyInHB() const
int charge() const override
electric charge
const float pfneutralsum_DR_
float emEnergyInEE() const
const Item * getValues(DetId fId, bool throwOnFail=true) const
double dxyError() const
error on dxy
float charge(size_t i) const
float dzError() const override
uncertainty on dz
const bool useHighPurity_
double pt() const
track transverse momentum
std::vector< DetId > crossedHcalIds
const SiStripCluster * stripCluster(size_t i) const
float pathlength(size_t i) const
float hadEnergyInHE() const
const bool addPrescaledDeDxTracks_
static const double deltaEta
double py() const
y coordinate of momentum vector
const float pcRefNearest_pTmin_
virtual float dz(size_t ipv=0) const
dz with respect to the PV[ipv]
const float miniRelIso_cut_
float emEnergyInEB() const
void getCaloJetEnergy(const PolarLorentzVector &, const reco::CaloJetCollection *, float &, float &) const
const_iterator find(uint32_t rawId) const
int charge() const
track electric charge
double dz() const
dz parameter (= dsz/cos(lambda)). This is the track z0 w.r.t (0,0,0) only if the refPoint is close to...
void loadParameters(const edm::ParameterSet &, edm::ConsumesCollector &)
double phi() const
azimuthal angle of momentum vector
const PVAssoc fromPV(size_t ipv=0) const
edm::Ref< TrackCollection > TrackRef
persistent reference to a Track
TrackDetectorAssociator trackAssociator_
bool isPixel(HitType hitType)
const edm::EDGetTokenT< edm::Association< reco::PFCandidateCollection > > pc2pf_
bool isNonnull() const
Checks for non-null.
double eta() const
pseudorapidity of momentum vector
std::vector< double > miniIsoParams_
const JetExtendedData & getValue(const Container &, const reco::JetBaseRef &)
get value for the association. Throw exception if no association found
double dzError() const
error on dz
const SiPixelCluster * pixelCluster(size_t i) const
TrackDetMatchInfo getTrackDetMatchInfo(const edm::Event &, const edm::EventSetup &, const reco::Track &)
const LorentzVector & p4() const override
four-momentum Lorentz vecto r
const float pfIsolation_DR_
math::XYZPoint trkGlobPosAtEcal
Track position at different parts of the calorimeter.
std::vector< pat::PackedCandidate > PackedCandidateCollection
const edm::EDGetTokenT< edm::ValueMap< int > > gt2dedxHitInfoPrescale_
static TrackQuality qualityByName(const std::string &name)
void getNearestPCRef(const PolarLorentzVector &p4, const pat::PackedCandidateCollection *pc, int pc_idx, int &pc_ref_idx) const
const HitPattern & hitPattern() const
Access the hit pattern, indicating in which Tracker layers the track has hits.
ProductID id() const
Accessor for product ID.
virtual float dxy() const
dxy with respect to the PV ref
const edm::EDGetTokenT< reco::CaloJetCollection > caloJets_
const edm::EDGetTokenT< reco::DeDxHitInfoAss > gt2dedxHitInfo_
const edm::EDGetTokenT< reco::VertexCollection > pv_
float getPFNeutralSum(const PolarLorentzVector &p4, const pat::PackedCandidateCollection *pc, int pc_idx) const
math::XYZTLorentzVector LorentzVector
const edm::EDGetTokenT< pat::PackedCandidateCollection > lt_
float dxyError() const override
uncertainty on dxy
const edm::EDGetTokenT< edm::ValueMap< reco::DeDxData > > gt2dedxStrip_
T getParameter(std::string const &) const
const edm::EDGetTokenT< pat::PackedCandidateCollection > pc_
TrackAssociatorParameters trackAssocParameters_
const bool usePrecomputedDeDxStrip_
key_type key() const
Accessor for product key.
Power< A, B >::type pow(const A &a, const B &b)
double pz() const
z coordinate of momentum vector
Abs< T >::type abs(const T &t)
TrackDetMatchInfo associate(const edm::Event &, const edm::EventSetup &, const FreeTrajectoryState &, const AssociatorParameters &)
const edm::EDGetTokenT< edm::Association< pat::PackedCandidateCollection > > gt2lt_
const edm::EDGetTokenT< reco::TrackCollection > gt_
StringCutObjectSelector< pat::IsolatedTrack > saveDeDxHitInfoCut_
double dxy() const
dxy parameter. (This is the transverse impact parameter w.r.t. to (0,0,0) ONLY if refPoint is close t...
bool quality(const TrackQuality) const
Track quality.
float emEnergyInHF() const
std::vector< Track > TrackCollection
collection of Tracks
bool getPFLeptonOverlap(const PolarLorentzVector &p4, const pat::PackedCandidateCollection *pc) const
const float pflepoverlap_DR_
float getDeDx(const reco::DeDxHitInfo *hitInfo, bool doPixel, bool doStrip) const
const edm::EDGetTokenT< edm::ValueMap< reco::DeDxData > > gt2dedxPixel_
edm::Ref< pat::PackedCandidateCollection > PackedCandidateRef