CMS 3D CMS Logo

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

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
 \set 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 () const
 
unsigned index () const
 
virtual bool isLinkedToDisplacedVertex () const
 
bool isMultilinksValide () 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)
 
void setMultilinks (const PFMultiLinksTC &ml)
 
void setMultilinksList (const PFMultilinksType &links)
 
virtual void setMuonRef (const MuonRef &muref)
 
void setTime (float time, float timeError=0.f)
 \set 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...
 

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_
 
PFMultiLinksTC multilinks_
 
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
const static ConversionRefVector nullConv_ = reco::ConversionRefVector()
 
const static MuonRef nullMuon_ = reco::MuonRef()
 
const static PFClusterRef nullPFCluster_ = reco::PFClusterRef()
 
const static PFDisplacedTrackerVertexRef nullPFDispVertex_ = reco::PFDisplacedTrackerVertexRef()
 
const static PFRecTrackRef nullPFRecTrack_ = reco::PFRecTrackRef()
 
const static reco::TrackRef nullTrack_ = reco::TrackRef()
 
const static 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.

20 {}

Referenced by clone().

◆ PFBlockElementGsfTrack() [2/2]

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

Definition at line 12 of file PFBlockElementGsfTrack.cc.

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 }

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

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.

26 { return new PFBlockElementGsfTrack(*this); }

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.

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 }

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

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

◆ GsftrackPF()

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

◆ GsftrackRef()

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

Definition at line 47 of file PFBlockElementGsfTrack.h.

47 { return GsftrackRef_; }

References GsftrackRef_.

Referenced by PFEGammaAlgo::calculateEleMVA(), and PFEGammaAlgo::initializeProtoCands().

◆ GsftrackRefPF()

const GsfPFRecTrackRef& reco::PFBlockElementGsfTrack::GsftrackRefPF ( ) const
inline

◆ isSecondary()

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

Reimplemented from reco::PFBlockElement.

Definition at line 41 of file PFBlockElementGsfTrack.h.

41 { return trackType(T_FROM_GAMMACONV); }

References reco::PFBlockElement::T_FROM_GAMMACONV, and trackType().

◆ Pin()

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

Definition at line 54 of file PFBlockElementGsfTrack.h.

54 { return Pin_; }

References Pin_.

◆ positionAtECALEntrance()

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

Definition at line 50 of file PFBlockElementGsfTrack.h.

50 { return positionAtECALEntrance_; }

References positionAtECALEntrance_.

Referenced by PFEGammaAlgo::calculateEleMVA().

◆ Pout()

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

Definition at line 55 of file PFBlockElementGsfTrack.h.

55 { return Pout_; }

References Pout_.

Referenced by PFEGammaAlgo::calculateEleMVA().

◆ setTrackType()

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

\set the trackType

Reimplemented from reco::PFBlockElement.

Definition at line 34 of file PFBlockElementGsfTrack.h.

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

References trackType_.

Referenced by PFBlockElementGsfTrack().

◆ 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 62 of file PFBlockElementGsfTrack.h.

Referenced by GsftrackRef().

◆ GsftrackRefPF_

GsfPFRecTrackRef reco::PFBlockElementGsfTrack::GsftrackRefPF_
private

reference to the corresponding GSF track (transient)

Definition at line 59 of file PFBlockElementGsfTrack.h.

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

◆ Pin_

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

The CorrespondingKFTrackRef is needeed.

Definition at line 65 of file PFBlockElementGsfTrack.h.

Referenced by Dump(), and Pin().

◆ positionAtECALEntrance_

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

position at ECAL entrance

Definition at line 70 of file PFBlockElementGsfTrack.h.

Referenced by PFBlockElementGsfTrack(), and positionAtECALEntrance().

◆ Pout_

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

Definition at line 66 of file PFBlockElementGsfTrack.h.

Referenced by Dump(), and Pout().

◆ trackType_

unsigned int reco::PFBlockElementGsfTrack::trackType_
private

Definition at line 67 of file PFBlockElementGsfTrack.h.

Referenced by setTrackType(), and trackType().

reco::PFBlockElementGsfTrack::trackType
bool trackType(TrackType trType) const override
Definition: PFBlockElementGsfTrack.h:31
alignBH_cfg.fixed
fixed
Definition: alignBH_cfg.py:54
reco::PFBlockElementGsfTrack::GsftrackRefPF_
GsfPFRecTrackRef GsftrackRefPF_
reference to the corresponding GSF track (transient)
Definition: PFBlockElementGsfTrack.h:59
edm::Ref::isNull
bool isNull() const
Checks for null.
Definition: Ref.h:235
reco::PFBlockElementGsfTrack::Pin_
math::XYZTLorentzVector Pin_
The CorrespondingKFTrackRef is needeed.
Definition: PFBlockElementGsfTrack.h:65
reco::PFBlockElementGsfTrack::GsftrackRef_
reco::GsfTrackRef GsftrackRef_
reference to the corresponding GSF track
Definition: PFBlockElementGsfTrack.h:62
reco::PFBlockElementGsfTrack::Pout_
math::XYZTLorentzVector Pout_
Definition: PFBlockElementGsfTrack.h:66
reco::PFBlockElementGsfTrack::Pout
const math::XYZTLorentzVector & Pout() const
Definition: PFBlockElementGsfTrack.h:55
reco::PFBlockElementGsfTrack::trackType_
unsigned int trackType_
Definition: PFBlockElementGsfTrack.h:67
reco::PFBlockElementGsfTrack::PFBlockElementGsfTrack
PFBlockElementGsfTrack()
Definition: PFBlockElementGsfTrack.h:20
ALCARECOTkAlJpsiMuMu_cff.charge
charge
Definition: ALCARECOTkAlJpsiMuMu_cff.py:47
reco::PFBlockElement::GSF
Definition: PFBlockElement.h:37
reco::PFTrajectoryPoint::position
const math::XYZPoint & position() const
cartesian position (x, y, z)
Definition: PFTrajectoryPoint.h:100
reco::PFBlockElement::DEFAULT
Definition: PFBlockElement.h:47
value
Definition: value.py:1
reco::PFBlockElement::T_FROM_GAMMACONV
Definition: PFBlockElement.h:47
reco::PFBlockElementGsfTrack::setTrackType
void setTrackType(TrackType trType, bool value) override
\set the trackType
Definition: PFBlockElementGsfTrack.h:34
reco::PFTrajectoryPoint::isValid
bool isValid() const
is this point valid ?
Definition: PFTrajectoryPoint.h:84
reco::PFTrajectoryPoint::ECALEntrance
ECAL front face.
Definition: PFTrajectoryPoint.h:43
reco::PFBlockElementGsfTrack::positionAtECALEntrance_
math::XYZPointF positionAtECALEntrance_
position at ECAL entrance
Definition: PFBlockElementGsfTrack.h:70
math::XYZTLorentzVector
XYZTLorentzVectorD XYZTLorentzVector
Lorentz vector with cylindrical internal representation using pseudorapidity.
Definition: LorentzVector.h:29
reco::PFTrajectoryPoint
A PFTrack holds several trajectory points, which basically contain the position and momentum of a tra...
Definition: PFTrajectoryPoint.h:26
MillePedeFileConverter_cfg.out
out
Definition: MillePedeFileConverter_cfg.py:31
cms::Exception
Definition: Exception.h:70
reco::PFBlockElementGsfTrack::Pin
const math::XYZTLorentzVector & Pin() const
Definition: PFBlockElementGsfTrack.h:54
reco::PFBlockElement::PFBlockElement
PFBlockElement(Type type=NONE)
standard constructor
Definition: PFBlockElement.h:50