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
 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)
 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
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

reco::PFBlockElementGsfTrack::PFBlockElementGsfTrack ( )
inline

Definition at line 20 of file PFBlockElementGsfTrack.h.

References Pin(), and Pout().

Referenced by clone().

20 {}
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 }
const math::XYZTLorentzVector & Pout() const
const math::XYZPoint & position() const
cartesian position (x, y, z)
const math::XYZTLorentzVector & Pin() const
PFBlockElement(Type type=NONE)
standard constructor
bool isNull() const
Checks for null.
Definition: Ref.h:235
math::XYZPointF positionAtECALEntrance_
position at ECAL entrance
bool isValid() const
is this point valid ?
reco::GsfTrackRef GsftrackRef_
reference to the corresponding GSF track
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)

Member Function Documentation

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 gather_cfg::cout, Dump(), MillePedeFileConverter_cfg::out, and PFBlockElementGsfTrack().

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 ALCARECOTkAlJpsiMuMu_cff::charge, alignBH_cfg::fixed, GsftrackRefPF_, edm::Ref< C, T, F >::isNull(), Pin_, and Pout_.

Referenced by clone(), 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 }
XYZTLorentzVectorD XYZTLorentzVector
Lorentz vector with cylindrical internal representation using pseudorapidity.
Definition: LorentzVector.h:29
bool isNull() const
Checks for null.
Definition: Ref.h:235
math::XYZTLorentzVector Pin_
The CorrespondingKFTrackRef is needeed.
GsfPFRecTrackRef GsftrackRefPF_
reference to the corresponding GSF track (transient)
const GsfPFRecTrack& reco::PFBlockElementGsfTrack::GsftrackPF ( ) const
inline

Definition at line 52 of file PFBlockElementGsfTrack.h.

References GsftrackRefPF_.

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

52 { return *GsftrackRefPF_; }
GsfPFRecTrackRef GsftrackRefPF_
reference to the corresponding GSF track (transient)
const reco::GsfTrackRef& reco::PFBlockElementGsfTrack::GsftrackRef ( ) const
inline
Returns
reference to the corresponding GsfTrack

Definition at line 47 of file PFBlockElementGsfTrack.h.

References GsftrackRef_.

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

47 { return GsftrackRef_; }
reco::GsfTrackRef GsftrackRef_
reference to the corresponding GSF track
const GsfPFRecTrackRef& reco::PFBlockElementGsfTrack::GsftrackRefPF ( ) const
inline
Returns
reference to the corresponding PFGsfRecTrack

Definition at line 44 of file PFBlockElementGsfTrack.h.

References GsftrackRefPF_.

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

44 { return GsftrackRefPF_; }
GsfPFRecTrackRef GsftrackRefPF_
reference to the corresponding GSF track (transient)
bool reco::PFBlockElementGsfTrack::isSecondary ( ) const
inlineoverridevirtual

Reimplemented from reco::PFBlockElement.

Definition at line 41 of file PFBlockElementGsfTrack.h.

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

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

Definition at line 54 of file PFBlockElementGsfTrack.h.

References Pin_.

Referenced by PFBlockElementGsfTrack().

54 { return Pin_; }
math::XYZTLorentzVector Pin_
The CorrespondingKFTrackRef is needeed.
const math::XYZPointF& reco::PFBlockElementGsfTrack::positionAtECALEntrance ( ) const
inline
Returns
position at ECAL entrance

Definition at line 50 of file PFBlockElementGsfTrack.h.

References positionAtECALEntrance_.

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

50 { return positionAtECALEntrance_; }
math::XYZPointF positionAtECALEntrance_
position at ECAL entrance
const math::XYZTLorentzVector& reco::PFBlockElementGsfTrack::Pout ( ) const
inline

Definition at line 55 of file PFBlockElementGsfTrack.h.

References Pout_.

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

55 { return Pout_; }
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 GSFTrackImporter::importToBlock(), and PFBlockElementGsfTrack().

34  {
35  if (value)
36  trackType_ = trackType_ | (1 << trType);
37  else
38  trackType_ = trackType_ ^ (1 << trType);
39  }
Definition: value.py:1
bool reco::PFBlockElementGsfTrack::trackType ( TrackType  trType) const
inlineoverridevirtual

Member Data Documentation

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

reference to the corresponding GSF track

Definition at line 62 of file PFBlockElementGsfTrack.h.

Referenced by GsftrackRef().

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().

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

The CorrespondingKFTrackRef is needeed.

Definition at line 65 of file PFBlockElementGsfTrack.h.

Referenced by Dump(), and Pin().

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

position at ECAL entrance

Definition at line 70 of file PFBlockElementGsfTrack.h.

Referenced by PFBlockElementGsfTrack(), and positionAtECALEntrance().

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

Definition at line 66 of file PFBlockElementGsfTrack.h.

Referenced by Dump(), and Pout().

unsigned int reco::PFBlockElementGsfTrack::trackType_
private

Definition at line 67 of file PFBlockElementGsfTrack.h.

Referenced by setTrackType(), and trackType().