|
|
|
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 | hasAbilityToProduceInBeginRuns () const final |
|
bool | hasAbilityToProduceInEndLumis () 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 698 of file PATIsolatedTrackProducer.cc.
699 if (hitInfo ==
nullptr) {
703 std::vector<float> charge_vec;
704 for (
unsigned int ih = 0; ih < hitInfo->
size(); ih++) {
725 Norm = 3.61e-06 * 265;
731 int size = charge_vec.size();
736 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 548 of file PATIsolatedTrackProducer.cc.
553 float chiso = 0, nhiso = 0, phiso = 0, puiso = 0;
554 float chmiso = 0, nhmiso = 0, phmiso = 0, pumiso = 0;
556 for (pat::PackedCandidateCollection::const_iterator pf_it = pc->begin(); pf_it != pc->end(); pf_it++) {
557 if (
int(pf_it - pc->begin()) == pc_idx)
561 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 172 of file PATIsolatedTrackProducer.cc.
232 auto outDeDxC = std::make_unique<reco::DeDxHitInfoCollection>();
233 std::vector<int> dEdXass;
235 auto outPtrP = std::make_unique<std::vector<pat::IsolatedTrack>>();
238 for (
unsigned int igt = 0; igt <
generalTracks->size(); igt++) {
249 bool isInPackedCands = (pcref.
isNonnull() && pcref.
id() == pc_h.
id() && pfCand->
charge() != 0);
250 bool isInLostTracks = (ltref.
isNonnull() && ltref.
id() == lt_h.
id());
256 float dz,
dxy, dzError, dxyError;
261 if (isInPackedCands) {
263 polarP4 = pfCand->
p4();
265 pfCandInd = pcref.
key();
267 }
else if (isInLostTracks) {
268 p4 = lostTrack->
p4();
269 polarP4 = lostTrack->
p4();
272 ltCandInd = ltref.
key();
274 double m = 0.13957018;
275 double E =
sqrt(
m *
m + gentk.
p() * gentk.
p());
276 p4.SetPxPyPzE(gentk.
px(), gentk.
py(), gentk.
pz(), E);
277 polarP4.SetCoordinates(gentk.
pt(), gentk.
eta(), gentk.
phi(),
m);
285 const auto& dedxRef = (*gt2dedxHitInfo)[tkref];
286 if (dedxRef.isNonnull()) {
287 prescaled = (*gt2dedxHitInfoPrescale)[dedxRef];
291 if (polarP4.pt() <
pT_cut_ && prescaled <= 1)
299 getIsolation(polarP4, pc, pfCandInd, isolationDR03, miniIso);
309 if (isInPackedCands) {
317 }
else if (isInLostTracks) {
319 dz = lostTrack->
dz();
327 dz = gentk.
dz(
pv.position());
335 float caloJetEm, caloJetHad;
342 int refToNearestPF_idx = -1;
344 if (refToNearestPF_idx != -1)
348 int refToNearestLostTrack_idx = -1;
350 if (refToNearestLostTrack_idx != -1)
354 float dEdxPixel = -1, dEdxStrip = -1;
356 dEdxStrip = (*gt2dedxStrip)[tkref].dEdx();
359 dEdxStrip =
getDeDx(hitInfo,
false,
true);
362 dEdxPixel = (*gt2dedxPixel)[tkref].dEdx();
365 dEdxPixel =
getDeDx(hitInfo,
true,
false);
374 std::vector<uint32_t> crossedHcalStatus;
378 std::vector<uint16_t> crossedEcalStatus;
380 crossedEcalStatus.push_back(ecalS->
find(did.rawId())->getStatusCode());
418 refToNearestLostTrack));
419 outPtrP->back().setStatus(prescaled);
422 const auto& dedxRef = (*gt2dedxHitInfo)[tkref];
424 outDeDxC->push_back(*dedxRef);
425 dEdXass.push_back(outDeDxC->size() - 1);
427 dEdXass.push_back(-1);
435 for (
unsigned int ipc = 0; ipc < pc->size(); ipc++) {
441 if (pfref.
get()->trackRef().isNonnull() && pfref.
get()->trackRef().id() == gt_h.
id())
447 float dz,
dxy, dzError, dxyError;
481 float caloJetEm, caloJetHad;
488 int refToNearestPF_idx = -1;
490 if (refToNearestPF_idx != -1)
494 int refToNearestLostTrack_idx = -1;
496 if (refToNearestLostTrack_idx != -1)
501 float dEdxPixel = -1, dEdxStrip = -1;
503 std::vector<uint16_t> ecalStatus;
504 std::vector<uint32_t> hcalStatus;
532 refToNearestLostTrack));
534 dEdXass.push_back(-1);
540 auto dedxMatch = std::make_unique<reco::DeDxHitInfoAss>(dedxOH);
542 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::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_
◆ 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
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_
void getNearestPCRef(const PolarLorentzVector &p4, const pat::PackedCandidateCollection *pc, int pc_idx, int &pc_ref_idx) const
T getParameter(std::string const &) 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_
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...
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