CMS 3D CMS Logo

 All Classes Namespaces Files Functions Variables Typedefs Enumerations Enumerator Properties Friends Macros Pages
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
 necessary to have the edm::OwnVector<PFBlockElement> working More...
 
void Dump (std::ostream &out=std::cout, const char *tab=" ") const
 print the object inside the element More...
 
const GsfPFRecTrackGsftrackPF () const
 
const reco::GsfTrackRefGsftrackRef () const
 
const GsfPFRecTrackRefGsftrackRefPF () const
 
bool isSecondary () const
 
 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
 
virtual void setTrackType (TrackType trType, bool value)
 the trackType More...
 
virtual bool trackType (TrackType trType) const
 
- Public Member Functions inherited from reco::PFBlockElement
virtual const PFClusterRefclusterRef () const
 
virtual const ConversionRefVectorconvRefs () const
 
virtual const
PFDisplacedTrackerVertexRef
displacedVertexRef (TrackType trType) const
 
const PFMultilinksTypegetMultilinks () const
 
unsigned index () const
 
virtual bool isLinkedToDisplacedVertex () const
 
bool isMultilinksValide () const
 
virtual bool isPrimary () const
 
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)
 
virtual void setV0Ref (const VertexCompositeCandidateRef &v0ref, TrackType trType)
 
virtual const reco::TrackReftrackRef () const
 
virtual const PFRecTrackReftrackRefPF () const
 
Type type () const
 
void unLock ()
 unlock element More...
 
virtual const
VertexCompositeCandidateRef
V0Ref () 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,
  kNBETypes =12
}
 
- Protected Attributes inherited from reco::PFBlockElement
unsigned index_
 index in block vector More...
 
bool locked_
 
PFMultiLinksTC multilinks_
 
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.

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
virtual void setTrackType(TrackType trType, bool value)
the trackType
bool isNull() const
Checks for null.
Definition: Ref.h:249
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.
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
inlinevirtual

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

Implements reco::PFBlockElement.

Definition at line 27 of file PFBlockElementGsfTrack.h.

References PFBlockElementGsfTrack().

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

print the object inside the element

Reimplemented from reco::PFBlockElement.

Definition at line 37 of file PFBlockElementGsfTrack.cc.

References RecoTauCleanerPlugins::charge, GsftrackRefPF_, edm::Ref< C, T, F >::isNull(), Pin_, and Pout_.

Referenced by PFEGammaAlgo::initializeProtoCands().

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:249
tuple out
Definition: dbtoconf.py:99
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(), 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
inlinevirtual

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  }
virtual bool trackType(TrackType trType) const
const math::XYZTLorentzVector& reco::PFBlockElementGsfTrack::Pin ( ) const
inline

Definition at line 69 of file PFBlockElementGsfTrack.h.

References Pin_.

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

Definition at line 70 of file PFBlockElementGsfTrack.h.

References Pout_.

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

70 { return Pout_; }
virtual void reco::PFBlockElementGsfTrack::setTrackType ( TrackType  trType,
bool  value 
)
inlinevirtual

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  }
virtual bool reco::PFBlockElementGsfTrack::trackType ( TrackType  trType) const
inlinevirtual

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