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_
 
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 21 of file PFBlockElementGsfTrack.h.

References Pin(), and Pout().

Referenced by clone().

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

Definition at line 13 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().

15  :
17  GsftrackRefPF_( gsfref ),
18  GsftrackRef_( gsfref->gsfTrackRef() ),
19  Pin_(Pin),
20  Pout_(Pout),
21  trackType_(0){
22 
23  if(gsfref.isNull() )
24  throw cms::Exception("NullRef")
25  <<" PFBlockElementGsfTrack constructed from a null reference to PFGsfRecTrack.";
26  const reco::PFTrajectoryPoint& atECAL
27  = gsfref->extrapolatedPoint( reco::PFTrajectoryPoint::ECALEntrance );
28  if( atECAL.isValid() )
29  positionAtECALEntrance_.SetCoordinates( atECAL.position().x(),
30  atECAL.position().y(),
31  atECAL.position().z() );
32 
33 
34  setTrackType( DEFAULT, true );
35 }
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:250
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 27 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 37 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<<().

38  {
39 
40  if(! out ) return;
41 
42  if( !GsftrackRefPF_.isNull() ) {
43 
44  // double charge = trackPF().charge;
45  double charge = GsftrackRefPF_->charge();
48  double ptin = pin.pt();
49  double etain = pin.eta();
50  double phiin = pin.phi();
51  double ptout = pout.pt();
52  double etaout = pout.eta();
53  double phiout = pout.phi();
54  out<<setprecision(0);
55  out<<tab<<setw(7)<<"charge="<<setw(3)<<charge;
56  out<<setprecision(3);
57  out<<setiosflags(ios::right);
58  out<<setiosflags(ios::fixed);
59  out<<", Inner pT ="<<setw(7)<<ptin;
60  out<<" Inner (eta,phi)= (";
61  out<< etain <<",";
62  out<< phiin <<")";
63  out<<", Outer pT ="<<setw(7)<<ptout;
64  out<<" Outer (eta,phi)= (";
65  out<< etaout <<",";
66  out<< phiout <<")";
67  out<<resetiosflags(ios::right|ios::fixed); }
68 
69 }
XYZTLorentzVectorD XYZTLorentzVector
Lorentz vector with cylindrical internal representation using pseudorapidity.
Definition: LorentzVector.h:29
bool isNull() const
Checks for null.
Definition: Ref.h:250
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 67 of file PFBlockElementGsfTrack.h.

References GsftrackRefPF_.

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

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

Definition at line 48 of file PFBlockElementGsfTrack.h.

References GsftrackRefPF_.

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

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

Reimplemented from reco::PFBlockElement.

Definition at line 43 of file PFBlockElementGsfTrack.h.

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

43  {
44  return trackType(T_FROM_GAMMACONV);
45  }
bool trackType(TrackType trType) const override
const math::XYZTLorentzVector& reco::PFBlockElementGsfTrack::Pin ( ) const
inline

Definition at line 69 of file PFBlockElementGsfTrack.h.

References Pin_.

Referenced by PFBlockElementGsfTrack().

69 { 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 61 of file PFBlockElementGsfTrack.h.

References positionAtECALEntrance_.

Referenced by PFEGammaAlgo::calculate_ele_mva(), PFEGammaAlgo::fillPFCandidates(), PFElectronAlgo::SetCandidates(), PFElectronAlgo::SetIDOutputs(), and PFElectronAlgo::SetLinks().

61  {
63  }
math::XYZPointF positionAtECALEntrance_
position at ECAL entrance
const math::XYZTLorentzVector& reco::PFBlockElementGsfTrack::Pout ( ) const
inline
void reco::PFBlockElementGsfTrack::setTrackType ( TrackType  trType,
bool  value 
)
inlineoverridevirtual

the trackType

Reimplemented from reco::PFBlockElement.

Definition at line 38 of file PFBlockElementGsfTrack.h.

References trackType_.

Referenced by GSFTrackImporter::importToBlock(), and PFBlockElementGsfTrack().

38  {
39  if(value) trackType_ = trackType_ | (1<<trType);
40  else trackType_ = trackType_ ^ (1<<trType);
41  }
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 79 of file PFBlockElementGsfTrack.h.

Referenced by GsftrackRef().

GsfPFRecTrackRef reco::PFBlockElementGsfTrack::GsftrackRefPF_
private

reference to the corresponding GSF track (transient)

Definition at line 76 of file PFBlockElementGsfTrack.h.

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

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

The CorrespondingKFTrackRef is needeed.

Definition at line 83 of file PFBlockElementGsfTrack.h.

Referenced by Dump(), and Pin().

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

position at ECAL entrance

Definition at line 89 of file PFBlockElementGsfTrack.h.

Referenced by PFBlockElementGsfTrack(), and positionAtECALEntrance().

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

Definition at line 84 of file PFBlockElementGsfTrack.h.

Referenced by Dump(), and Pout().

unsigned int reco::PFBlockElementGsfTrack::trackType_
private

Definition at line 85 of file PFBlockElementGsfTrack.h.

Referenced by setTrackType(), and trackType().