CMS 3D CMS Logo

List of all members | Public Member Functions | Static Public Attributes | Private Attributes
reco::PFBlockElementGsfTrack Class Referencefinal

Track Element. More...

#include <PFBlockElementGsfTrack.h>

Inheritance diagram for reco::PFBlockElementGsfTrack:
reco::PFBlockElement

Public Member Functions

PFBlockElementclone () const override
 necessary to have the edm::OwnVector<PFBlockElement> working More...
 
void Dump (std::ostream &out=std::cout, const char *tab=" ") const override
 print the object inside the element More...
 
const GsfPFRecTrackGsftrackPF () const
 
const reco::GsfTrackRefGsftrackRef () const
 
const GsfPFRecTrackRefGsftrackRefPF () const
 
bool isSecondary () const override
 
 PFBlockElementGsfTrack ()
 
 PFBlockElementGsfTrack (const GsfPFRecTrackRef &gsfref, const math::XYZTLorentzVector &Pin, const math::XYZTLorentzVector &Pout)
 
const math::XYZTLorentzVectorPin () const
 
const math::XYZPointFpositionAtECALEntrance () const
 
const math::XYZTLorentzVectorPout () const
 
void setTrackType (TrackType trType, bool value) override
 the trackType More...
 
bool trackType (TrackType trType) const override
 
- Public Member Functions inherited from reco::PFBlockElement
virtual const PFClusterRefclusterRef () const
 
virtual const ConversionRefVectorconvRefs () const
 
virtual const PFDisplacedTrackerVertexRefdisplacedVertexRef (TrackType trType) const
 
const PFMultilinksTypegetMultilinks (Type type) const
 
unsigned index () const
 
virtual bool isLinkedToDisplacedVertex () const
 
bool isMultilinksValide (Type type) const
 
virtual bool isPrimary () const
 
bool isTimeValid () const
 do we have a valid time information More...
 
void lock ()
 lock element More...
 
bool locked () const
 locked ? More...
 
virtual const MuonRefmuonRef () const
 
 PFBlockElement (Type type=NONE)
 standard constructor More...
 
virtual void setConversionRef (const ConversionRef &convRef, TrackType trType)
 
virtual void setDisplacedVertexRef (const PFDisplacedTrackerVertexRef &niref, TrackType trType)
 
void setIndex (unsigned index)
 set index More...
 
void setIsValidMultilinks (bool isVal, Type type)
 
void setMultilinks (const PFMultiLinksTC &ml, Type type)
 
virtual void setMuonRef (const MuonRef &muref)
 
void setTime (float time, float timeError=0.f)
 the timing information More...
 
virtual void setV0Ref (const VertexCompositeCandidateRef &v0ref, TrackType trType)
 
float time () const
 
float timeError () const
 
virtual const reco::TrackReftrackRef () const
 
virtual const PFRecTrackReftrackRefPF () const
 
Type type () const
 
void unLock ()
 unlock element More...
 
virtual const VertexCompositeCandidateRefV0Ref () const
 
virtual ~PFBlockElement ()
 destructor More...
 

Static Public Attributes

static constexpr unsigned int kSecondaryMask = 1 << T_FROM_GAMMACONV
 

Private Attributes

reco::GsfTrackRef GsftrackRef_
 reference to the corresponding GSF track More...
 
GsfPFRecTrackRef GsftrackRefPF_
 reference to the corresponding GSF track (transient) More...
 
math::XYZTLorentzVector Pin_
 The CorrespondingKFTrackRef is needeed. More...
 
math::XYZPointF positionAtECALEntrance_
 position at ECAL entrance More...
 
math::XYZTLorentzVector Pout_
 
unsigned int trackType_
 

Additional Inherited Members

- Public Types inherited from reco::PFBlockElement
enum  TrackType {
  DEFAULT = 0, T_FROM_DISP, T_TO_DISP, T_FROM_GAMMACONV,
  MUON, T_FROM_V0
}
 
enum  Type {
  NONE = 0, TRACK = 1, PS1 = 2, PS2 = 3,
  ECAL = 4, HCAL = 5, GSF = 6, BREM = 7,
  HFEM = 8, HFHAD = 9, SC = 10, HO = 11,
  HGCAL = 12, kNBETypes = 13
}
 
- Protected Attributes inherited from reco::PFBlockElement
unsigned index_
 index in block vector More...
 
bool locked_
 
std::map< reco::PFBlockElement::Type, PFMultiLinksTCmultilinks_
 
float time_
 timing information (valid if timeError_ >= 0) More...
 
float timeError_
 timing information uncertainty (<0 if timing not available) More...
 
Type type_
 
- Static Protected Attributes inherited from reco::PFBlockElement
static const ConversionRefVector nullConv_ = reco::ConversionRefVector()
 
static const MuonRef nullMuon_ = reco::MuonRef()
 
static const PFClusterRef nullPFCluster_ = reco::PFClusterRef()
 
static const PFDisplacedTrackerVertexRef nullPFDispVertex_ = reco::PFDisplacedTrackerVertexRef()
 
static const PFRecTrackRef nullPFRecTrack_ = reco::PFRecTrackRef()
 
static const reco::TrackRef nullTrack_ = reco::TrackRef()
 
static const VertexCompositeCandidateRef nullVertex_ = reco::VertexCompositeCandidateRef()
 

Detailed Description

Track Element.

this class contains a reference to a PFRecTrack

Definition at line 18 of file PFBlockElementGsfTrack.h.

Constructor & Destructor Documentation

◆ PFBlockElementGsfTrack() [1/2]

reco::PFBlockElementGsfTrack::PFBlockElementGsfTrack ( )
inline

Definition at line 20 of file PFBlockElementGsfTrack.h.

Referenced by clone().

20 {}

◆ PFBlockElementGsfTrack() [2/2]

PFBlockElementGsfTrack::PFBlockElementGsfTrack ( const GsfPFRecTrackRef gsfref,
const math::XYZTLorentzVector Pin,
const math::XYZTLorentzVector Pout 
)

Definition at line 12 of file PFBlockElementGsfTrack.cc.

References reco::PFBlockElement::DEFAULT, reco::PFTrajectoryPoint::ECALEntrance, edm::Ref< C, T, F >::isNull(), reco::PFTrajectoryPoint::isValid(), reco::PFTrajectoryPoint::position(), positionAtECALEntrance_, and setTrackType().

16  GsftrackRefPF_(gsfref),
17  GsftrackRef_(gsfref->gsfTrackRef()),
18  Pin_(Pin),
19  Pout_(Pout),
20  trackType_(0) {
21  if (gsfref.isNull())
22  throw cms::Exception("NullRef") << " PFBlockElementGsfTrack constructed from a null reference to PFGsfRecTrack.";
23  const reco::PFTrajectoryPoint& atECAL = gsfref->extrapolatedPoint(reco::PFTrajectoryPoint::ECALEntrance);
24  if (atECAL.isValid())
25  positionAtECALEntrance_.SetCoordinates(atECAL.position().x(), atECAL.position().y(), atECAL.position().z());
26 
27  setTrackType(DEFAULT, true);
28 }
PFBlockElement(Type type=NONE)
standard constructor
bool isValid() const
is this point valid ?
bool isNull() const
Checks for null.
Definition: Ref.h:229
const math::XYZPoint & position() const
cartesian position (x, y, z)
math::XYZPointF positionAtECALEntrance_
position at ECAL entrance
reco::GsfTrackRef GsftrackRef_
reference to the corresponding GSF track
const math::XYZTLorentzVector & Pout() const
math::XYZTLorentzVector Pin_
The CorrespondingKFTrackRef is needeed.
void setTrackType(TrackType trType, bool value) override
the trackType
A PFTrack holds several trajectory points, which basically contain the position and momentum of a tra...
GsfPFRecTrackRef GsftrackRefPF_
reference to the corresponding GSF track (transient)
const math::XYZTLorentzVector & Pin() const

Member Function Documentation

◆ clone()

PFBlockElement* reco::PFBlockElementGsfTrack::clone ( ) const
inlineoverridevirtual

necessary to have the edm::OwnVector<PFBlockElement> working

Implements reco::PFBlockElement.

Definition at line 26 of file PFBlockElementGsfTrack.h.

References PFBlockElementGsfTrack().

◆ Dump()

void PFBlockElementGsfTrack::Dump ( std::ostream &  out = std::cout,
const char *  tab = " " 
) const
overridevirtual

print the object inside the element

Reimplemented from reco::PFBlockElement.

Definition at line 30 of file PFBlockElementGsfTrack.cc.

References reco::charge(), alignBH_cfg::fixed, GsftrackRefPF_, edm::Ref< C, T, F >::isNull(), MillePedeFileConverter_cfg::out, Pin_, and Pout_.

Referenced by PFEGammaAlgo::initializeProtoCands(), and reco::operator<<().

30  {
31  if (!out)
32  return;
33 
34  if (!GsftrackRefPF_.isNull()) {
35  // double charge = trackPF().charge;
36  double charge = GsftrackRefPF_->charge();
39  double ptin = pin.pt();
40  double etain = pin.eta();
41  double phiin = pin.phi();
42  double ptout = pout.pt();
43  double etaout = pout.eta();
44  double phiout = pout.phi();
45  out << setprecision(0);
46  out << tab << setw(7) << "charge=" << setw(3) << charge;
47  out << setprecision(3);
48  out << setiosflags(ios::right);
49  out << setiosflags(ios::fixed);
50  out << ", Inner pT =" << setw(7) << ptin;
51  out << " Inner (eta,phi)= (";
52  out << etain << ",";
53  out << phiin << ")";
54  out << ", Outer pT =" << setw(7) << ptout;
55  out << " Outer (eta,phi)= (";
56  out << etaout << ",";
57  out << phiout << ")";
58  out << resetiosflags(ios::right | ios::fixed);
59  }
60 }
ALPAKA_FN_HOST_ACC ALPAKA_FN_INLINE constexpr float charge(ConstView const &tracks, int32_t i)
Definition: TracksSoA.h:73
XYZTLorentzVectorD XYZTLorentzVector
Lorentz vector with cylindrical internal representation using pseudorapidity.
Definition: LorentzVector.h:29
bool isNull() const
Checks for null.
Definition: Ref.h:229
math::XYZTLorentzVector Pin_
The CorrespondingKFTrackRef is needeed.
GsfPFRecTrackRef GsftrackRefPF_
reference to the corresponding GSF track (transient)

◆ GsftrackPF()

const GsfPFRecTrack& reco::PFBlockElementGsfTrack::GsftrackPF ( ) const
inline

Definition at line 54 of file PFBlockElementGsfTrack.h.

References GsftrackRefPF_.

Referenced by GSFAndECALLinker::testLink(), GSFAndHGCalLinker::testLink(), and GSFAndHCALLinker::testLink().

54 { return *GsftrackRefPF_; }
GsfPFRecTrackRef GsftrackRefPF_
reference to the corresponding GSF track (transient)

◆ GsftrackRef()

const reco::GsfTrackRef& reco::PFBlockElementGsfTrack::GsftrackRef ( ) const
inline
Returns
reference to the corresponding GsfTrack

Definition at line 49 of file PFBlockElementGsfTrack.h.

References GsftrackRef_.

Referenced by PFEGammaAlgo::calculateEleMVA(), PFEGammaAlgo::initializeProtoCands(), and reco::mlpf::setCandidateRefs().

49 { return GsftrackRef_; }
reco::GsfTrackRef GsftrackRef_
reference to the corresponding GSF track

◆ GsftrackRefPF()

const GsfPFRecTrackRef& reco::PFBlockElementGsfTrack::GsftrackRefPF ( ) const
inline
Returns
reference to the corresponding PFGsfRecTrack

Definition at line 46 of file PFBlockElementGsfTrack.h.

References GsftrackRefPF_.

Referenced by PFElectronTranslator::getAmbiguousGsfTracks(), PFEGammaAlgo::isPrimaryTrack(), GSFAndGSFLinker::testLink(), GSFAndBREMLinker::testLink(), and TrackAndGSFLinker::testLink().

46 { return GsftrackRefPF_; }
GsfPFRecTrackRef GsftrackRefPF_
reference to the corresponding GSF track (transient)

◆ isSecondary()

bool reco::PFBlockElementGsfTrack::isSecondary ( ) const
inlineoverridevirtual

Reimplemented from reco::PFBlockElement.

Definition at line 43 of file PFBlockElementGsfTrack.h.

References kSecondaryMask, and trackType_.

43 { return trackType_ & kSecondaryMask; }
static constexpr unsigned int kSecondaryMask

◆ Pin()

const math::XYZTLorentzVector& reco::PFBlockElementGsfTrack::Pin ( ) const
inline

Definition at line 56 of file PFBlockElementGsfTrack.h.

References Pin_.

56 { return Pin_; }
math::XYZTLorentzVector Pin_
The CorrespondingKFTrackRef is needeed.

◆ positionAtECALEntrance()

const math::XYZPointF& reco::PFBlockElementGsfTrack::positionAtECALEntrance ( ) const
inline
Returns
position at ECAL entrance

Definition at line 52 of file PFBlockElementGsfTrack.h.

References positionAtECALEntrance_.

Referenced by PFEGammaAlgo::calculateEleMVA().

52 { return positionAtECALEntrance_; }
math::XYZPointF positionAtECALEntrance_
position at ECAL entrance

◆ Pout()

const math::XYZTLorentzVector& reco::PFBlockElementGsfTrack::Pout ( ) const
inline

Definition at line 57 of file PFBlockElementGsfTrack.h.

References Pout_.

Referenced by PFEGammaAlgo::calculateEleMVA().

57 { return Pout_; }

◆ setTrackType()

void reco::PFBlockElementGsfTrack::setTrackType ( TrackType  trType,
bool  value 
)
inlineoverridevirtual

the trackType

Reimplemented from reco::PFBlockElement.

Definition at line 34 of file PFBlockElementGsfTrack.h.

References trackType_.

Referenced by PFBlockElementGsfTrack().

34  {
35  if (value)
36  trackType_ = trackType_ | (1 << trType);
37  else
38  trackType_ = trackType_ ^ (1 << trType);
39  }
Definition: value.py:1

◆ trackType()

bool reco::PFBlockElementGsfTrack::trackType ( TrackType  trType) const
inlineoverridevirtual

Member Data Documentation

◆ GsftrackRef_

reco::GsfTrackRef reco::PFBlockElementGsfTrack::GsftrackRef_
private

reference to the corresponding GSF track

Definition at line 64 of file PFBlockElementGsfTrack.h.

Referenced by GsftrackRef().

◆ GsftrackRefPF_

GsfPFRecTrackRef reco::PFBlockElementGsfTrack::GsftrackRefPF_
private

reference to the corresponding GSF track (transient)

Definition at line 61 of file PFBlockElementGsfTrack.h.

Referenced by Dump(), GsftrackPF(), and GsftrackRefPF().

◆ kSecondaryMask

constexpr unsigned int reco::PFBlockElementGsfTrack::kSecondaryMask = 1 << T_FROM_GAMMACONV
static

Definition at line 41 of file PFBlockElementGsfTrack.h.

Referenced by isSecondary().

◆ Pin_

math::XYZTLorentzVector reco::PFBlockElementGsfTrack::Pin_
private

The CorrespondingKFTrackRef is needeed.

Definition at line 67 of file PFBlockElementGsfTrack.h.

Referenced by Dump(), and Pin().

◆ positionAtECALEntrance_

math::XYZPointF reco::PFBlockElementGsfTrack::positionAtECALEntrance_
private

position at ECAL entrance

Definition at line 72 of file PFBlockElementGsfTrack.h.

Referenced by PFBlockElementGsfTrack(), and positionAtECALEntrance().

◆ Pout_

math::XYZTLorentzVector reco::PFBlockElementGsfTrack::Pout_
private

Definition at line 68 of file PFBlockElementGsfTrack.h.

Referenced by Dump(), and Pout().

◆ trackType_

unsigned int reco::PFBlockElementGsfTrack::trackType_
private

Definition at line 69 of file PFBlockElementGsfTrack.h.

Referenced by isSecondary(), setTrackType(), and trackType().