CMS 3D CMS Logo

List of all members | Public Member Functions | Private Member Functions | Private Attributes
ConvBremPFTrackFinder Class Reference

#include <ConvBremPFTrackFinder.h>

Public Member Functions

 ConvBremPFTrackFinder (const TransientTrackBuilder &builder, double mvaBremConvCutBarrelLowPt, double mvaBremConvCutBarrelHighPt, double mvaBremConvCutEndcapsLowPt, double mvaBremConvCutEndcapsHighPt)
 
bool foundConvBremPFRecTrack (const edm::Handle< reco::PFRecTrackCollection > &thePfRecTrackCol, const edm::Handle< reco::VertexCollection > &primaryVertex, const edm::Handle< reco::PFDisplacedTrackerVertexCollection > &pfNuclears, const edm::Handle< reco::PFConversionCollection > &pfConversions, const edm::Handle< reco::PFV0Collection > &pfV0, const convbremhelpers::HeavyObjectCache *cache, bool useNuclear, bool useConversions, bool useV0, const reco::PFClusterCollection &theEClus, const reco::GsfPFRecTrack &gsfpfrectk)
 
const std::vector< reco::PFRecTrackRef > & getConvBremPFRecTracks ()
 
 ~ConvBremPFTrackFinder ()
 

Private Member Functions

void runConvBremFinder (const edm::Handle< reco::PFRecTrackCollection > &thePfRecTrackCol, const edm::Handle< reco::VertexCollection > &primaryVertex, const edm::Handle< reco::PFDisplacedTrackerVertexCollection > &pfNuclears, const edm::Handle< reco::PFConversionCollection > &pfConversions, const edm::Handle< reco::PFV0Collection > &pfV0, const convbremhelpers::HeavyObjectCache *cache, bool useNuclear, bool useConversions, bool useV0, const reco::PFClusterCollection &theEClus, const reco::GsfPFRecTrack &gsfpfrectk)
 

Private Attributes

TransientTrackBuilder builder_
 
float detaBremKF
 
float Epout
 
bool found_
 
double mvaBremConvCutBarrelHighPt_
 
double mvaBremConvCutBarrelLowPt_
 
double mvaBremConvCutEndcapsHighPt_
 
double mvaBremConvCutEndcapsLowPt_
 
float nHITS1
 
std::vector< reco::PFRecTrackRefpfRecTrRef_vec_
 
float ptRatioGsfKF
 
float secPin
 
float secPout
 
float secR
 
float sTIP
 

Detailed Description

Definition at line 34 of file ConvBremPFTrackFinder.h.

Constructor & Destructor Documentation

◆ ConvBremPFTrackFinder()

ConvBremPFTrackFinder::ConvBremPFTrackFinder ( const TransientTrackBuilder builder,
double  mvaBremConvCutBarrelLowPt,
double  mvaBremConvCutBarrelHighPt,
double  mvaBremConvCutEndcapsLowPt,
double  mvaBremConvCutEndcapsHighPt 
)

Definition at line 22 of file ConvBremPFTrackFinder.cc.

27  : builder_(builder),
28  mvaBremConvCutBarrelLowPt_(mvaBremConvCutBarrelLowPt),
29  mvaBremConvCutBarrelHighPt_(mvaBremConvCutBarrelHighPt),
30  mvaBremConvCutEndcapsLowPt_(mvaBremConvCutEndcapsLowPt),
31  mvaBremConvCutEndcapsHighPt_(mvaBremConvCutEndcapsHighPt) {}
TransientTrackBuilder builder_

◆ ~ConvBremPFTrackFinder()

ConvBremPFTrackFinder::~ConvBremPFTrackFinder ( )

Definition at line 32 of file ConvBremPFTrackFinder.cc.

32 {}

Member Function Documentation

◆ foundConvBremPFRecTrack()

bool ConvBremPFTrackFinder::foundConvBremPFRecTrack ( const edm::Handle< reco::PFRecTrackCollection > &  thePfRecTrackCol,
const edm::Handle< reco::VertexCollection > &  primaryVertex,
const edm::Handle< reco::PFDisplacedTrackerVertexCollection > &  pfNuclears,
const edm::Handle< reco::PFConversionCollection > &  pfConversions,
const edm::Handle< reco::PFV0Collection > &  pfV0,
const convbremhelpers::HeavyObjectCache cache,
bool  useNuclear,
bool  useConversions,
bool  useV0,
const reco::PFClusterCollection theEClus,
const reco::GsfPFRecTrack gsfpfrectk 
)
inline

Definition at line 43 of file ConvBremPFTrackFinder.h.

References utilities::cache(), found_, BeamMonitor_cff::primaryVertex, runConvBremFinder(), and RecoParticleFlow_conversion_cff::useConversions.

53  {
54  found_ = false;
55  runConvBremFinder(thePfRecTrackCol,
57  pfNuclears,
58  pfConversions,
59  pfV0,
60  cache,
61  useNuclear,
63  useV0,
64  theEClus,
65  gsfpfrectk);
66  return found_;
67  };
void runConvBremFinder(const edm::Handle< reco::PFRecTrackCollection > &thePfRecTrackCol, const edm::Handle< reco::VertexCollection > &primaryVertex, const edm::Handle< reco::PFDisplacedTrackerVertexCollection > &pfNuclears, const edm::Handle< reco::PFConversionCollection > &pfConversions, const edm::Handle< reco::PFV0Collection > &pfV0, const convbremhelpers::HeavyObjectCache *cache, bool useNuclear, bool useConversions, bool useV0, const reco::PFClusterCollection &theEClus, const reco::GsfPFRecTrack &gsfpfrectk)
def cache(function)
Definition: utilities.py:3
primaryVertex
hltOfflineBeamSpot for HLTMON

◆ getConvBremPFRecTracks()

const std::vector<reco::PFRecTrackRef>& ConvBremPFTrackFinder::getConvBremPFRecTracks ( )
inline

Definition at line 69 of file ConvBremPFTrackFinder.h.

References pfRecTrRef_vec_.

69 { return pfRecTrRef_vec_; };
std::vector< reco::PFRecTrackRef > pfRecTrRef_vec_

◆ runConvBremFinder()

void ConvBremPFTrackFinder::runConvBremFinder ( const edm::Handle< reco::PFRecTrackCollection > &  thePfRecTrackCol,
const edm::Handle< reco::VertexCollection > &  primaryVertex,
const edm::Handle< reco::PFDisplacedTrackerVertexCollection > &  pfNuclears,
const edm::Handle< reco::PFConversionCollection > &  pfConversions,
const edm::Handle< reco::PFV0Collection > &  pfV0,
const convbremhelpers::HeavyObjectCache cache,
bool  useNuclear,
bool  useConversions,
bool  useV0,
const reco::PFClusterCollection theEClus,
const reco::GsfPFRecTrack gsfpfrectk 
)
private

Definition at line 34 of file ConvBremPFTrackFinder.cc.

References funct::abs(), TrackingRecHit::all, TransientTrackBuilder::build(), builder_, utilities::cache(), reco::PFCluster::calculatePositionREP(), srCondWrite_cfg::deltaPhi, detaBremKF, MillePedeFileConverter_cfg::e, reco::PFTrajectoryPoint::ECALEntrance, reco::PFTrajectoryPoint::ECALShowerMax, Epout, PVValHelper::eta, reco::PFTrack::extrapolatedPoint(), found_, reco::GsfPFRecTrack::gsfTrackRef(), mps_fire::i, edm::Ref< C, T, F >::isNonnull(), reco::PFTrajectoryPoint::isValid(), reco::GsfPFRecTrack::kfPFRecTrackRef(), LogDebug, WZElectronSkims53X_cff::max, reco::PFTrajectoryPoint::momentum(), mvaBremConvCutBarrelHighPt_, mvaBremConvCutBarrelLowPt_, mvaBremConvCutEndcapsHighPt_, mvaBremConvCutEndcapsLowPt_, nHITS1, notFound, AlCaHLTBitMon_ParallelJobs::p, reco::GsfPFRecTrack::PFRecBrem(), pfRecTrRef_vec_, phi, BeamMonitor_cff::primaryVertex, edm::Handle< T >::product(), ptRatioGsfKF, secPin, secPout, secR, IPTools::signedTransverseImpactParameter(), findQualityFiles::size, mathSSE::sqrt(), sTIP, LinkByRecHit::testTrackAndClusterByRecHit(), RecoParticleFlow_conversion_cff::useConversions, and HltBtagValidation_cff::Vertex.

Referenced by foundConvBremPFRecTrack().

44  {
45  found_ = false;
46 
47  LogDebug("ConvBremPFTrackFinder") << "runConvBremFinder:: Entering ";
48 
49  const reco::GsfTrackRef& refGsf = gsfpfrectk.gsfTrackRef();
50  float refGsfEta = refGsf->eta();
51  float refGsfPt = refGsf->pt();
52  float refGsfPhi = refGsf->phi();
53  float gsfR = sqrt(refGsf->innerPosition().x() * refGsf->innerPosition().x() +
54  refGsf->innerPosition().y() * refGsf->innerPosition().y());
55  // direction of the Gsf track
56  GlobalVector direction(refGsf->innerMomentum().x(), refGsf->innerMomentum().y(), refGsf->innerMomentum().z());
57  float refGsfPtMode = refGsf->ptMode();
58 
59  const reco::PFRecTrackRef& pfTrackRef = gsfpfrectk.kfPFRecTrackRef();
60  vector<PFBrem> primPFBrem = gsfpfrectk.PFRecBrem();
61 
62  const PFRecTrackCollection& PfRTkColl = *(thePfRecTrackCol.product());
63  reco::PFRecTrackCollection::const_iterator pft = PfRTkColl.begin();
64  reco::PFRecTrackCollection::const_iterator pftend = PfRTkColl.end();
65 
66  vector<PFRecTrackRef> AllPFRecTracks;
67  AllPFRecTracks.clear();
68  unsigned int ipft = 0;
69 
70  for (; pft != pftend; ++pft, ipft++) {
71  // do not consider the kf track already associated to the seed
72  if (pfTrackRef.isNonnull())
73  if (pfTrackRef->trackRef() == pft->trackRef())
74  continue;
75 
76  PFRecTrackRef pfRecTrRef(thePfRecTrackCol, ipft);
77  TrackRef trackRef = pfRecTrRef->trackRef();
78  reco::TrackBaseRef selTrackBaseRef(trackRef);
79 
80  LogDebug("ConvBremPFTrackFinder") << "runConvBremFinder:: pushing_back High Purity " << pft->trackRef()->pt()
81  << " eta,phi " << pft->trackRef()->eta() << ", " << pft->trackRef()->phi()
82  << " Memory Address Ref " << &*trackRef << " Memory Address BaseRef "
83  << &*selTrackBaseRef;
84  AllPFRecTracks.push_back(pfRecTrRef);
85  }
86 
87  if (useConversions) {
88  const PFConversionCollection& PfConvColl = *(pfConversions.product());
89  for (unsigned i = 0; i < PfConvColl.size(); i++) {
90  reco::PFConversionRef convRef(pfConversions, i);
91 
92  unsigned int trackSize = (convRef->pfTracks()).size();
93  if (convRef->pfTracks().size() < 2)
94  continue;
95  for (unsigned iTk = 0; iTk < trackSize; iTk++) {
96  PFRecTrackRef compPFTkRef = convRef->pfTracks()[iTk];
97  reco::TrackBaseRef newTrackBaseRef(compPFTkRef->trackRef());
98  // do not consider the kf track already associated to the seed
99  if (pfTrackRef.isNonnull()) {
100  reco::TrackBaseRef primaryTrackBaseRef(pfTrackRef->trackRef());
101  if (primaryTrackBaseRef == newTrackBaseRef)
102  continue;
103  }
104  bool notFound = true;
105  for (unsigned iPF = 0; iPF < AllPFRecTracks.size(); iPF++) {
106  reco::TrackBaseRef selTrackBaseRef(AllPFRecTracks[iPF]->trackRef());
107 
108  LogDebug("ConvBremPFTrackFinder")
109  << "## Track 1 HP pt " << AllPFRecTracks[iPF]->trackRef()->pt() << " eta, phi "
110  << AllPFRecTracks[iPF]->trackRef()->eta() << ", " << AllPFRecTracks[iPF]->trackRef()->phi()
111  << " Memory Address Ref " << &(*AllPFRecTracks[iPF]->trackRef()) << " Memory Address BaseRef "
112  << &*selTrackBaseRef;
113  LogDebug("ConvBremPFTrackFinder")
114  << "** Track 2 CONV pt " << compPFTkRef->trackRef()->pt() << " eta, phi "
115  << compPFTkRef->trackRef()->eta() << ", " << compPFTkRef->trackRef()->phi() << " Memory Address Ref "
116  << &*compPFTkRef->trackRef() << " Memory Address BaseRef " << &*newTrackBaseRef;
117  //if(selTrackBaseRef == newTrackBaseRef || AllPFRecTracks[iPF]->trackRef()== compPFTkRef->trackRef()) {
118  if (AllPFRecTracks[iPF]->trackRef() == compPFTkRef->trackRef()) {
119  LogDebug("ConvBremPFTrackFinder") << " SAME BREM REF " << endl;
120  notFound = false;
121  }
122  }
123  if (notFound) {
124  LogDebug("ConvBremPFTrackFinder")
125  << "runConvBremFinder:: pushing_back Conversions " << compPFTkRef->trackRef()->pt() << " eta,phi "
126  << compPFTkRef->trackRef()->eta() << " phi " << compPFTkRef->trackRef()->phi();
127  AllPFRecTracks.push_back(compPFTkRef);
128  }
129  }
130  }
131  }
132 
133  if (useNuclear) {
134  const PFDisplacedTrackerVertexCollection& PfNuclColl = *(pfNuclears.product());
135  for (unsigned i = 0; i < PfNuclColl.size(); i++) {
136  const reco::PFDisplacedTrackerVertexRef dispacedVertexRef(pfNuclears, i);
137  unsigned int trackSize = dispacedVertexRef->pfRecTracks().size();
138  for (unsigned iTk = 0; iTk < trackSize; iTk++) {
139  reco::PFRecTrackRef newPFRecTrackRef = dispacedVertexRef->pfRecTracks()[iTk];
140  reco::TrackBaseRef newTrackBaseRef(newPFRecTrackRef->trackRef());
141  // do not consider the kf track already associated to the seed
142  if (pfTrackRef.isNonnull()) {
143  reco::TrackBaseRef primaryTrackBaseRef(pfTrackRef->trackRef());
144  if (primaryTrackBaseRef == newTrackBaseRef)
145  continue;
146  }
147  bool notFound = true;
148  for (unsigned iPF = 0; iPF < AllPFRecTracks.size(); iPF++) {
149  reco::TrackBaseRef selTrackBaseRef(AllPFRecTracks[iPF]->trackRef());
150  if (selTrackBaseRef == newTrackBaseRef)
151  notFound = false;
152  }
153  if (notFound) {
154  LogDebug("ConvBremPFTrackFinder")
155  << "runConvBremFinder:: pushing_back displaced Vertex pt " << newPFRecTrackRef->trackRef()->pt()
156  << " eta,phi " << newPFRecTrackRef->trackRef()->eta() << ", " << newPFRecTrackRef->trackRef()->phi();
157  AllPFRecTracks.push_back(newPFRecTrackRef);
158  }
159  }
160  }
161  }
162 
163  if (useV0) {
164  const PFV0Collection& PfV0Coll = *(pfV0.product());
165  for (unsigned i = 0; i < PfV0Coll.size(); i++) {
166  reco::PFV0Ref v0Ref(pfV0, i);
167  unsigned int trackSize = (v0Ref->pfTracks()).size();
168  for (unsigned iTk = 0; iTk < trackSize; iTk++) {
169  reco::PFRecTrackRef newPFRecTrackRef = (v0Ref->pfTracks())[iTk];
170  reco::TrackBaseRef newTrackBaseRef(newPFRecTrackRef->trackRef());
171  // do not consider the kf track already associated to the seed
172  if (pfTrackRef.isNonnull()) {
173  reco::TrackBaseRef primaryTrackBaseRef(pfTrackRef->trackRef());
174  if (primaryTrackBaseRef == newTrackBaseRef)
175  continue;
176  }
177  bool notFound = true;
178  for (unsigned iPF = 0; iPF < AllPFRecTracks.size(); iPF++) {
179  reco::TrackBaseRef selTrackBaseRef(AllPFRecTracks[iPF]->trackRef());
180  if (selTrackBaseRef == newTrackBaseRef)
181  notFound = false;
182  }
183  if (notFound) {
184  LogDebug("ConvBremPFTrackFinder")
185  << "runConvBremFinder:: pushing_back V0 " << newPFRecTrackRef->trackRef()->pt() << " eta,phi "
186  << newPFRecTrackRef->trackRef()->eta() << ", " << newPFRecTrackRef->trackRef()->phi();
187  AllPFRecTracks.push_back(newPFRecTrackRef);
188  }
189  }
190  }
191  }
192 
193  pfRecTrRef_vec_.clear();
194 
195  for (unsigned iPF = 0; iPF < AllPFRecTracks.size(); iPF++) {
196  double dphi = std::abs(::deltaPhi(AllPFRecTracks[iPF]->trackRef()->phi(), refGsfPhi));
197  double deta = std::abs(AllPFRecTracks[iPF]->trackRef()->eta() - refGsfEta);
198 
199  // limiting the phase space (just for saving cpu-time)
200  if (std::abs(dphi) > 1.0 || std::abs(deta) > 0.4)
201  continue;
202 
203  double minDEtaBremKF = std::numeric_limits<double>::max();
204  double minDPhiBremKF = std::numeric_limits<double>::max();
205  double minDRBremKF2 = std::numeric_limits<double>::max();
206  double minDEtaBremKFPos = std::numeric_limits<double>::max();
207  double minDPhiBremKFPos = std::numeric_limits<double>::max();
208  double minDRBremKFPos2 = std::numeric_limits<double>::max();
209  reco::TrackRef trkRef = AllPFRecTracks[iPF]->trackRef();
210 
211  double secEta = trkRef->innerMomentum().eta();
212  double secPhi = trkRef->innerMomentum().phi();
213 
214  double posEta = trkRef->innerPosition().eta();
215  double posPhi = trkRef->innerPosition().phi();
216 
217  for (unsigned ipbrem = 0; ipbrem < primPFBrem.size(); ipbrem++) {
218  if (primPFBrem[ipbrem].indTrajPoint() == 99)
219  continue;
220  const reco::PFTrajectoryPoint& atPrimECAL =
221  primPFBrem[ipbrem].extrapolatedPoint(reco::PFTrajectoryPoint::ECALEntrance);
222  if (!atPrimECAL.isValid())
223  continue;
224  double bremEta = atPrimECAL.momentum().Eta();
225  double bremPhi = atPrimECAL.momentum().Phi();
226 
227  double deta = std::abs(bremEta - secEta);
228  double dphi = std::abs(::deltaPhi(bremPhi, secPhi));
229  double DR2 = deta * deta + dphi * dphi;
230 
231  double detaPos = std::abs(bremEta - posEta);
232  double dphiPos = std::abs(::deltaPhi(bremPhi, posPhi));
233  double DRPos2 = detaPos * detaPos + dphiPos * dphiPos;
234 
235  // find the closest track tangent
236  if (DR2 < minDRBremKF2) {
237  minDRBremKF2 = DR2;
238  minDEtaBremKF = deta;
239  minDPhiBremKF = std::abs(dphi);
240  }
241 
242  if (DRPos2 < minDRBremKFPos2) {
243  minDRBremKFPos2 = DRPos2;
244  minDEtaBremKFPos = detaPos;
245  minDPhiBremKFPos = std::abs(dphiPos);
246  }
247  }
248 
249  // secR
250  secR = sqrt(trkRef->innerPosition().x() * trkRef->innerPosition().x() +
251  trkRef->innerPosition().y() * trkRef->innerPosition().y());
252 
253  // apply loose selection (to be parallel) between the secondary track and brem-tangents.
254  // Moreover if the secR is internal with respect to the GSF track by two pixel layers discard it.
255  if ((minDPhiBremKF < 0.1 || minDPhiBremKFPos < 0.1) && (minDEtaBremKF < 0.02 || minDEtaBremKFPos < 0.02) &&
256  secR > (gsfR - 8)) {
257  LogDebug("ConvBremPFTrackFinder") << "runConvBremFinder:: OK Find track and BREM close "
258  << " MinDphi " << minDPhiBremKF << " MinDeta " << minDEtaBremKF;
259 
260  float MinDist = std::numeric_limits<float>::max();
261  float EE_calib = 0.;
262  PFRecTrack pfrectrack = *AllPFRecTracks[iPF];
263  // Find and ECAL associated cluster
264  for (PFClusterCollection::const_iterator clus = theEClus.begin(); clus != theEClus.end(); clus++) {
265  // Removed unusd variable, left this in case it has side effects
266  clus->position();
267  double dist = -1.;
268  PFCluster clust = *clus;
269  clust.calculatePositionREP();
271  ? LinkByRecHit::testTrackAndClusterByRecHit(pfrectrack, clust)
272  : -1.;
273 
274  if (dist > 0. && dist < MinDist) {
275  MinDist = dist;
276  EE_calib = cache->pfcalib_->energyEm(*clus, 0.0, 0.0, false);
277  }
278  }
279  if (MinDist > 0. && MinDist < 100000.) {
280  // compute all the input variables for conv brem selection
281 
282  secPout = sqrt(trkRef->outerMomentum().x() * trkRef->outerMomentum().x() +
283  trkRef->outerMomentum().y() * trkRef->outerMomentum().y() +
284  trkRef->outerMomentum().z() * trkRef->outerMomentum().z());
285 
286  secPin = sqrt(trkRef->innerMomentum().x() * trkRef->innerMomentum().x() +
287  trkRef->innerMomentum().y() * trkRef->innerMomentum().y() +
288  trkRef->innerMomentum().z() * trkRef->innerMomentum().z());
289 
290  // maybe put innter momentum pt?
291  ptRatioGsfKF = trkRef->pt() / refGsfPtMode;
292 
293  Vertex dummy;
294  const Vertex* pv = &dummy;
296  if (!primaryVertex->empty()) {
297  pv = &*primaryVertex->begin();
298  // we always use the first vertex (at the moment)
300  } else { // create a dummy PV
302  e(0, 0) = 0.0015 * 0.0015;
303  e(1, 1) = 0.0015 * 0.0015;
304  e(2, 2) = 15. * 15.;
305  Vertex::Point p(0, 0, 0);
306  dummy = Vertex(p, e, 0, 0, 0);
307  }
308 
309  TransientTrack transientTrack = builder_.build(*trkRef);
310  sTIP = IPTools::signedTransverseImpactParameter(transientTrack, direction, *pv).second.significance();
311 
312  Epout = EE_calib / secPout;
313 
314  // eta distance brem-secondary kf track
315  detaBremKF = minDEtaBremKF;
316 
317  // Number of commont hits
318  unsigned int tmpSh = 0;
319  //uint ish=0;
320  int kfhitcounter = 0;
321  for (auto const& nhit : refGsf->recHits())
322  if (nhit->isValid()) {
323  kfhitcounter = 0;
324  for (auto const& ihit : trkRef->recHits())
325  if (ihit->isValid()) {
326  // method 1
327  if (nhit->sharesInput(ihit, TrackingRecHit::all))
328  tmpSh++;
329  kfhitcounter++;
330  // method 2 to switch in case of problem with rechit collections
331  // if((ihit->geographicalId()==nhit->geographicalId())&&
332  // ((nhit->localPosition()-ihit->localPosition()).mag()<0.01)) ish++;
333  }
334  }
335 
336  nHITS1 = tmpSh;
337 
338  double mvaValue = -10;
339  double cutvalue = -10;
340 
341  float vars[6] = {secR, sTIP, nHITS1, Epout, detaBremKF, ptRatioGsfKF};
342  if (refGsfPt < 20 && std::abs(refGsfEta) < 1.479) {
343  mvaValue = cache->gbrBarrelLowPt_->GetClassifier(vars);
344  cutvalue = mvaBremConvCutBarrelLowPt_;
345  }
346  if (refGsfPt > 20 && std::abs(refGsfEta) < 1.479) {
347  mvaValue = cache->gbrBarrelHighPt_->GetClassifier(vars);
348  cutvalue = mvaBremConvCutBarrelHighPt_;
349  }
350  if (refGsfPt < 20 && std::abs(refGsfEta) > 1.479) {
351  mvaValue = cache->gbrEndcapsLowPt_->GetClassifier(vars);
352  cutvalue = mvaBremConvCutEndcapsLowPt_;
353  }
354  if (refGsfPt > 20 && std::abs(refGsfEta) > 1.479) {
355  mvaValue = cache->gbrEndcapsHighPt_->GetClassifier(vars);
356  cutvalue = mvaBremConvCutEndcapsHighPt_;
357  }
358 
359  LogDebug("ConvBremPFTrackFinder") << "Gsf track Pt, Eta " << refGsfPt << " " << refGsfEta;
360  LogDebug("ConvBremPFTrackFinder") << "Cutvalue " << cutvalue;
361 
362  if ((kfhitcounter - nHITS1) <= 3 && nHITS1 > 3)
363  mvaValue = 2; // this means duplicates tracks, very likely not physical
364 
365  LogDebug("ConvBremPFTrackFinder")
366  << " The input variables for conv brem tracks identification "
367  << " secR " << secR << " gsfR " << gsfR << " N shared hits " << nHITS1 << " sTIP " << sTIP
368  << " detaBremKF " << detaBremKF << " E/pout " << Epout << " ptRatioKFGsf " << ptRatioGsfKF
369  << " ***** MVA ***** " << mvaValue;
370 
371  if (mvaValue > cutvalue) {
372  found_ = true;
373  pfRecTrRef_vec_.push_back(AllPFRecTracks[iPF]);
374  }
375  } // end MinDIST
376  } // end selection kf - brem tangents
377  } // loop on the kf tracks
378 }
size
Write out results.
reconstructed track used as an input to particle flow
Definition: PFRecTrack.h:20
Particle flow cluster, see clustering algorithm in PFClusterAlgo.
Definition: PFCluster.h:42
vars
Definition: DeepTauIdBase.h:60
const math::XYZTLorentzVector & momentum() const
4-momenta quadrivector
std::pair< bool, Measurement1D > signedTransverseImpactParameter(const reco::TransientTrack &track, const GlobalVector &direction, const reco::Vertex &vertex)
Definition: IPTools.cc:57
T const * product() const
Definition: Handle.h:70
math::Error< dimension >::type Error
covariance error matrix (3x3)
Definition: Vertex.h:45
bool isNonnull() const
Checks for non-null.
Definition: Ref.h:232
std::vector< PFConversion > PFConversionCollection
collection of PFConversion objects
reco::TransientTrack build(const reco::Track *p) const
bool isValid() const
is this point valid ?
void calculatePositionREP()
computes posrep_ once and for all
Definition: PFCluster.h:95
const edm::Ref< std::vector< PFRecTrack > > & kfPFRecTrackRef() const
Definition: GsfPFRecTrack.h:37
T sqrt(T t)
Definition: SSEVec.h:23
TransientTrackBuilder builder_
const std::vector< reco::PFBrem > & PFRecBrem() const
Definition: GsfPFRecTrack.h:45
Abs< T >::type abs(const T &t)
Definition: Abs.h:22
std::vector< reco::PFRecTrackRef > pfRecTrRef_vec_
math::XYZPoint Point
point in the space
Definition: Vertex.h:40
std::vector< PFV0 > PFV0Collection
collection of PFV0 objects
Definition: PFV0Fwd.h:9
const reco::PFTrajectoryPoint & extrapolatedPoint(unsigned layerid) const
Definition: PFTrack.cc:46
static const GlobalPoint notFound(0, 0, 0)
const reco::GsfTrackRef & gsfTrackRef() const
Definition: GsfPFRecTrack.h:34
def cache(function)
Definition: utilities.py:3
A PFTrack holds several trajectory points, which basically contain the position and momentum of a tra...
primaryVertex
hltOfflineBeamSpot for HLTMON
static double testTrackAndClusterByRecHit(const reco::PFRecTrack &track, const reco::PFCluster &cluster, bool isBrem=false, bool debug=false)
Definition: LinkByRecHit.cc:18
std::vector< PFRecTrack > PFRecTrackCollection
collection of PFRecTrack objects
Definition: PFRecTrackFwd.h:9
std::vector< PFDisplacedTrackerVertex > PFDisplacedTrackerVertexCollection
collection of DisplacedTrackerVertexs
#define LogDebug(id)

Member Data Documentation

◆ builder_

TransientTrackBuilder ConvBremPFTrackFinder::builder_
private

Definition at line 85 of file ConvBremPFTrackFinder.h.

Referenced by runConvBremFinder().

◆ detaBremKF

float ConvBremPFTrackFinder::detaBremKF
private

Definition at line 90 of file ConvBremPFTrackFinder.h.

Referenced by runConvBremFinder().

◆ Epout

float ConvBremPFTrackFinder::Epout
private

Definition at line 90 of file ConvBremPFTrackFinder.h.

Referenced by runConvBremFinder().

◆ found_

bool ConvBremPFTrackFinder::found_
private

Definition at line 84 of file ConvBremPFTrackFinder.h.

Referenced by foundConvBremPFRecTrack(), and runConvBremFinder().

◆ mvaBremConvCutBarrelHighPt_

double ConvBremPFTrackFinder::mvaBremConvCutBarrelHighPt_
private

Definition at line 86 of file ConvBremPFTrackFinder.h.

Referenced by runConvBremFinder().

◆ mvaBremConvCutBarrelLowPt_

double ConvBremPFTrackFinder::mvaBremConvCutBarrelLowPt_
private

Definition at line 86 of file ConvBremPFTrackFinder.h.

Referenced by runConvBremFinder().

◆ mvaBremConvCutEndcapsHighPt_

double ConvBremPFTrackFinder::mvaBremConvCutEndcapsHighPt_
private

Definition at line 86 of file ConvBremPFTrackFinder.h.

Referenced by runConvBremFinder().

◆ mvaBremConvCutEndcapsLowPt_

double ConvBremPFTrackFinder::mvaBremConvCutEndcapsLowPt_
private

Definition at line 86 of file ConvBremPFTrackFinder.h.

Referenced by runConvBremFinder().

◆ nHITS1

float ConvBremPFTrackFinder::nHITS1
private

Definition at line 92 of file ConvBremPFTrackFinder.h.

Referenced by runConvBremFinder().

◆ pfRecTrRef_vec_

std::vector<reco::PFRecTrackRef> ConvBremPFTrackFinder::pfRecTrRef_vec_
private

Definition at line 89 of file ConvBremPFTrackFinder.h.

Referenced by getConvBremPFRecTracks(), and runConvBremFinder().

◆ ptRatioGsfKF

float ConvBremPFTrackFinder::ptRatioGsfKF
private

Definition at line 90 of file ConvBremPFTrackFinder.h.

Referenced by runConvBremFinder().

◆ secPin

float ConvBremPFTrackFinder::secPin
private

Definition at line 90 of file ConvBremPFTrackFinder.h.

Referenced by runConvBremFinder().

◆ secPout

float ConvBremPFTrackFinder::secPout
private

Definition at line 90 of file ConvBremPFTrackFinder.h.

Referenced by runConvBremFinder().

◆ secR

float ConvBremPFTrackFinder::secR
private

Definition at line 90 of file ConvBremPFTrackFinder.h.

Referenced by runConvBremFinder().

◆ sTIP

float ConvBremPFTrackFinder::sTIP
private

Definition at line 90 of file ConvBremPFTrackFinder.h.

Referenced by runConvBremFinder().