CMS 3D CMS Logo

List of all members | Public Types | Public Member Functions | Protected Attributes | Static Protected Attributes
reco::PFBlockElement Class Referenceabstract

Abstract base class for a PFBlock element (track, cluster...) More...

#include <PFBlockElement.h>

Inheritance diagram for reco::PFBlockElement:
reco::PFBlockElementBrem reco::PFBlockElementCluster reco::PFBlockElementGsfTrack reco::PFBlockElementSuperCluster reco::PFBlockElementTrack

Public Types

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
}
 

Public Member Functions

virtual PFBlockElementclone () const =0
 necessary to have the edm::OwnVector<PFBlockElement> working More...
 
virtual const PFClusterRefclusterRef () const
 
virtual const ConversionRefVectorconvRefs () const
 
virtual const PFDisplacedTrackerVertexRefdisplacedVertexRef (TrackType trType) const
 
virtual void Dump (std::ostream &out=std::cout, const char *tab=" ") const
 print the object inside the element More...
 
const PFMultilinksTypegetMultilinks (Type type) const
 
unsigned index () const
 
virtual bool isLinkedToDisplacedVertex () const
 
bool isMultilinksValide (Type type) const
 
virtual bool isPrimary () const
 
virtual bool isSecondary () 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)
 \set the timing information More...
 
virtual void setTrackType (TrackType trType, bool value)
 \set the trackType More...
 
virtual void setV0Ref (const VertexCompositeCandidateRef &v0ref, TrackType trType)
 
float time () const
 
float timeError () const
 
virtual const reco::TrackReftrackRef () const
 
virtual const PFRecTrackReftrackRefPF () const
 
virtual bool trackType (TrackType trType) const
 
Type type () const
 
void unLock ()
 unlock element More...
 
virtual const VertexCompositeCandidateRefV0Ref () const
 
virtual ~PFBlockElement ()
 destructor More...
 

Protected Attributes

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

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

Abstract base class for a PFBlock element (track, cluster...)

this class contains a PFRecTrackRef of a PFClusterRef, depending on the type of the element

Definition at line 26 of file PFBlockElement.h.

Member Enumeration Documentation

◆ TrackType

Enumerator
DEFAULT 
T_FROM_DISP 
T_TO_DISP 
T_FROM_GAMMACONV 
MUON 
T_FROM_V0 

Definition at line 47 of file PFBlockElement.h.

◆ Type

possible types for the element do not modify this enum if you don't know what you're doing!!!

Enumerator
NONE 
TRACK 
PS1 
PS2 
ECAL 
HCAL 
GSF 
BREM 
HFEM 
HFHAD 
SC 
HO 
HGCAL 
kNBETypes 

Definition at line 30 of file PFBlockElement.h.

30  {
31  NONE = 0,
32  TRACK = 1,
33  PS1 = 2,
34  PS2 = 3,
35  ECAL = 4,
36  HCAL = 5,
37  GSF = 6,
38  BREM = 7,
39  HFEM = 8,
40  HFHAD = 9,
41  SC = 10,
42  HO = 11,
43  HGCAL = 12,
44  kNBETypes = 13
45  };

Constructor & Destructor Documentation

◆ PFBlockElement()

reco::PFBlockElement::PFBlockElement ( Type  type = NONE)
inline

standard constructor

Definition at line 50 of file PFBlockElement.h.

51  : type_(type), locked_(false), index_(static_cast<unsigned>(-1)), time_(0.f), timeError_(-1.f) {}

◆ ~PFBlockElement()

virtual reco::PFBlockElement::~PFBlockElement ( )
inlinevirtual

destructor

Definition at line 54 of file PFBlockElement.h.

54 {}

Member Function Documentation

◆ clone()

virtual PFBlockElement* reco::PFBlockElement::clone ( ) const
pure virtual

◆ clusterRef()

virtual const PFClusterRef& reco::PFBlockElement::clusterRef ( ) const
inlinevirtual

◆ convRefs()

virtual const ConversionRefVector& reco::PFBlockElement::convRefs ( ) const
inlinevirtual

Reimplemented in reco::PFBlockElementTrack.

Definition at line 92 of file PFBlockElement.h.

92 { return nullConv_; }

References nullConv_.

Referenced by TrackAndTrackLinker::testLink().

◆ displacedVertexRef()

virtual const PFDisplacedTrackerVertexRef& reco::PFBlockElement::displacedVertexRef ( TrackType  trType) const
inlinevirtual

Reimplemented in reco::PFBlockElementTrack.

Definition at line 91 of file PFBlockElement.h.

91 { return nullPFDispVertex_; }

References nullPFDispVertex_.

Referenced by TrackAndTrackLinker::testLink().

◆ Dump()

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

print the object inside the element

Reimplemented in reco::PFBlockElementSuperCluster, reco::PFBlockElementCluster, reco::PFBlockElementGsfTrack, reco::PFBlockElementBrem, and reco::PFBlockElementTrack.

Definition at line 24 of file PFBlockElement.cc.

24  {
25  if (!out)
26  return;
27  out << pad << "base element";
28 }

References MillePedeFileConverter_cfg::out.

◆ getMultilinks()

const PFMultilinksType& reco::PFBlockElement::getMultilinks ( Type  type) const
inline

◆ index()

unsigned reco::PFBlockElement::index ( ) const
inline

◆ isLinkedToDisplacedVertex()

virtual bool reco::PFBlockElement::isLinkedToDisplacedVertex ( ) const
inlinevirtual

Reimplemented in reco::PFBlockElementTrack.

Definition at line 111 of file PFBlockElement.h.

111 { return false; }

Referenced by TrackAndTrackLinker::linkPrefilter().

◆ isMultilinksValide()

bool reco::PFBlockElement::isMultilinksValide ( Type  type) const
inline

Definition at line 117 of file PFBlockElement.h.

117  {
118  const auto& it = multilinks_.find(type);
119  if (it != multilinks_.end())
120  return it->second.isValid;
121  else
122  return false; // no multilinks_ for the specified type
123  }

References multilinks_.

Referenced by PreshowerAndECALLinker::linkPrefilter(), TrackAndECALLinker::linkPrefilter(), TrackAndHCALLinker::linkPrefilter(), TrackAndECALLinker::testLink(), and TrackAndHCALLinker::testLink().

◆ isPrimary()

virtual bool reco::PFBlockElement::isPrimary ( ) const
inlinevirtual

Reimplemented in reco::PFBlockElementTrack.

Definition at line 110 of file PFBlockElement.h.

110 { return false; }

◆ isSecondary()

virtual bool reco::PFBlockElement::isSecondary ( ) const
inlinevirtual

Reimplemented in reco::PFBlockElementTrack, and reco::PFBlockElementGsfTrack.

Definition at line 109 of file PFBlockElement.h.

109 { return false; }

◆ isTimeValid()

bool reco::PFBlockElement::isTimeValid ( ) const
inline

do we have a valid time information

Definition at line 128 of file PFBlockElement.h.

128 { return timeError_ >= 0.f; }

References timeError_.

Referenced by PFAlgo::reconstructTrack().

◆ lock()

void reco::PFBlockElement::lock ( )
inline

lock element

Definition at line 63 of file PFBlockElement.h.

63 { locked_ = true; }

References locked_.

Referenced by reco::PFBlock::addElement().

◆ locked()

bool reco::PFBlockElement::locked ( ) const
inline

locked ?

Definition at line 80 of file PFBlockElement.h.

80 { return locked_; }

References locked_.

◆ muonRef()

virtual const MuonRef& reco::PFBlockElement::muonRef ( ) const
inlinevirtual

Reimplemented in reco::PFBlockElementTrack.

Definition at line 93 of file PFBlockElement.h.

93 { return nullMuon_; }

References nullMuon_.

◆ setConversionRef()

virtual void reco::PFBlockElement::setConversionRef ( const ConversionRef convRef,
TrackType  trType 
)
inlinevirtual

Reimplemented in reco::PFBlockElementTrack.

Definition at line 99 of file PFBlockElement.h.

99  {
100  std::cout << "Error in PFBlockElement::setConversionRef : this base class method is not implemented" << std::endl;
101  }

References gather_cfg::cout.

◆ setDisplacedVertexRef()

virtual void reco::PFBlockElement::setDisplacedVertexRef ( const PFDisplacedTrackerVertexRef niref,
TrackType  trType 
)
inlinevirtual

Reimplemented in reco::PFBlockElementTrack.

Definition at line 95 of file PFBlockElement.h.

95  {
96  std::cout << "Error in PFBlockElement::setDisplacedVertexRef : this base class method is not implemented"
97  << std::endl;
98  }

References gather_cfg::cout.

◆ setIndex()

void reco::PFBlockElement::setIndex ( unsigned  index)
inline

set index

Definition at line 83 of file PFBlockElement.h.

83 { index_ = index; }

References index(), and index_.

Referenced by reco::PFBlock::addElement().

◆ setIsValidMultilinks()

void reco::PFBlockElement::setIsValidMultilinks ( bool  isVal,
Type  type 
)
inline

Definition at line 115 of file PFBlockElement.h.

115 { multilinks_[type].isValid = isVal; }

References plotFactory::isVal, multilinks_, and type().

◆ setMultilinks()

void reco::PFBlockElement::setMultilinks ( const PFMultiLinksTC ml,
Type  type 
)
inline

Definition at line 114 of file PFBlockElement.h.

114 { multilinks_[type] = ml; }

References multilinks_, and type().

◆ setMuonRef()

virtual void reco::PFBlockElement::setMuonRef ( const MuonRef muref)
inlinevirtual

Reimplemented in reco::PFBlockElementTrack.

Definition at line 102 of file PFBlockElement.h.

102  {
103  std::cout << "Error in PFBlockElement::setMuonRef : this base class method is not implemented" << std::endl;
104  }

References gather_cfg::cout.

◆ setTime()

void reco::PFBlockElement::setTime ( float  time,
float  timeError = 0.f 
)
inline

\set the timing information

Definition at line 134 of file PFBlockElement.h.

134  {
135  time_ = time;
137  }

References time(), time_, timeError(), and timeError_.

◆ setTrackType()

virtual void reco::PFBlockElement::setTrackType ( TrackType  trType,
bool  value 
)
inlinevirtual

\set the trackType

Reimplemented in reco::PFBlockElementGsfTrack, and reco::PFBlockElementTrack.

Definition at line 75 of file PFBlockElement.h.

75  {
76  std::cout << "Error in PFBlockElement::setTrackType : this base class method is not implemented" << std::endl;
77  }

References gather_cfg::cout.

◆ setV0Ref()

virtual void reco::PFBlockElement::setV0Ref ( const VertexCompositeCandidateRef v0ref,
TrackType  trType 
)
inlinevirtual

Reimplemented in reco::PFBlockElementTrack.

Definition at line 105 of file PFBlockElement.h.

105  {
106  std::cout << "Error in PFBlockElement::setV0Ref : this base class method is not implemented" << std::endl;
107  }

References gather_cfg::cout.

◆ time()

float reco::PFBlockElement::time ( ) const
inline
Returns
the timing

Definition at line 130 of file PFBlockElement.h.

130 { return time_; }

References time_.

Referenced by PFAlgo::reconstructTrack(), and setTime().

◆ timeError()

float reco::PFBlockElement::timeError ( ) const
inline
Returns
the timing uncertainty

Definition at line 132 of file PFBlockElement.h.

132 { return timeError_; }

References timeError_.

Referenced by PFAlgo::reconstructTrack(), and setTime().

◆ trackRef()

virtual const reco::TrackRef& reco::PFBlockElement::trackRef ( ) const
inlinevirtual

◆ trackRefPF()

virtual const PFRecTrackRef& reco::PFBlockElement::trackRefPF ( ) const
inlinevirtual

Reimplemented in reco::PFBlockElementTrack.

Definition at line 89 of file PFBlockElement.h.

89 { return nullPFRecTrack_; }

References nullPFRecTrack_.

◆ trackType()

virtual bool reco::PFBlockElement::trackType ( TrackType  trType) const
inlinevirtual
Returns
tracktype

Reimplemented in reco::PFBlockElementGsfTrack, and reco::PFBlockElementTrack.

Definition at line 72 of file PFBlockElement.h.

72 { return false; }

Referenced by PFAlgo::isFromSecInt(), FWPFBlockProxyBuilder::setupTrackElement(), and TrackAndTrackLinker::testLink().

◆ type()

Type reco::PFBlockElement::type ( ) const
inline

◆ unLock()

void reco::PFBlockElement::unLock ( )
inline

unlock element

Definition at line 66 of file PFBlockElement.h.

66 { locked_ = false; }

References locked_.

◆ V0Ref()

virtual const VertexCompositeCandidateRef& reco::PFBlockElement::V0Ref ( ) const
inlinevirtual

Reimplemented in reco::PFBlockElementTrack.

Definition at line 94 of file PFBlockElement.h.

94 { return nullVertex_; }

References nullVertex_.

Referenced by TrackAndTrackLinker::testLink().

Member Data Documentation

◆ index_

unsigned reco::PFBlockElement::index_
protected

index in block vector

Definition at line 150 of file PFBlockElement.h.

Referenced by index(), and setIndex().

◆ locked_

bool reco::PFBlockElement::locked_
protected

locked flag.

Definition at line 147 of file PFBlockElement.h.

Referenced by lock(), locked(), and unLock().

◆ multilinks_

std::map<reco::PFBlockElement::Type, PFMultiLinksTC> reco::PFBlockElement::multilinks_
protected

◆ nullConv_

const reco::ConversionRefVector reco::PFBlockElement::nullConv_ = reco::ConversionRefVector()
staticprotected

Definition at line 166 of file PFBlockElement.h.

Referenced by convRefs().

◆ nullMuon_

const reco::MuonRef reco::PFBlockElement::nullMuon_ = reco::MuonRef()
staticprotected

Definition at line 167 of file PFBlockElement.h.

Referenced by muonRef().

◆ nullPFCluster_

const reco::PFClusterRef reco::PFBlockElement::nullPFCluster_ = reco::PFClusterRef()
staticprotected

Definition at line 164 of file PFBlockElement.h.

Referenced by clusterRef().

◆ nullPFDispVertex_

const reco::PFDisplacedTrackerVertexRef reco::PFBlockElement::nullPFDispVertex_ = reco::PFDisplacedTrackerVertexRef()
staticprotected

◆ nullPFRecTrack_

const reco::PFRecTrackRef reco::PFBlockElement::nullPFRecTrack_ = reco::PFRecTrackRef()
staticprotected

Definition at line 163 of file PFBlockElement.h.

Referenced by trackRefPF().

◆ nullTrack_

const reco::TrackRef reco::PFBlockElement::nullTrack_ = reco::TrackRef()
staticprotected

Definition at line 162 of file PFBlockElement.h.

Referenced by trackRef().

◆ nullVertex_

const reco::VertexCompositeCandidateRef reco::PFBlockElement::nullVertex_ = reco::VertexCompositeCandidateRef()
staticprotected

Definition at line 168 of file PFBlockElement.h.

Referenced by V0Ref().

◆ time_

float reco::PFBlockElement::time_
protected

timing information (valid if timeError_ >= 0)

Definition at line 158 of file PFBlockElement.h.

Referenced by setTime(), and time().

◆ timeError_

float reco::PFBlockElement::timeError_
protected

timing information uncertainty (<0 if timing not available)

Definition at line 160 of file PFBlockElement.h.

Referenced by isTimeValid(), setTime(), and timeError().

◆ type_

Type reco::PFBlockElement::type_
protected
reco::PFBlockElement::nullConv_
const static ConversionRefVector nullConv_
Definition: PFBlockElement.h:166
reco::PFBlockElement::HO
Definition: PFBlockElement.h:42
reco::PFBlockElement::time_
float time_
timing information (valid if timeError_ >= 0)
Definition: PFBlockElement.h:158
reco::PFBlockElement::nullTrack_
const static reco::TrackRef nullTrack_
Definition: PFBlockElement.h:162
plotFactory.isVal
isVal
Definition: plotFactory.py:109
f
double f[11][100]
Definition: MuScleFitUtils.cc:78
reco::PFBlockElement::time
float time() const
Definition: PFBlockElement.h:130
reco::PFBlockElement::multilinks_
std::map< reco::PFBlockElement::Type, PFMultiLinksTC > multilinks_
Definition: PFBlockElement.h:154
reco::PFBlockElement::T_TO_DISP
Definition: PFBlockElement.h:47
gather_cfg.cout
cout
Definition: gather_cfg.py:144
reco::PFBlockElement::SC
Definition: PFBlockElement.h:41
reco::PFBlockElement::nullVertex_
const static VertexCompositeCandidateRef nullVertex_
Definition: PFBlockElement.h:168
reco::PFBlockElement::index_
unsigned index_
index in block vector
Definition: PFBlockElement.h:150
reco::PFBlockElement::HGCAL
Definition: PFBlockElement.h:43
reco::PFBlockElement::nullPFCluster_
const static PFClusterRef nullPFCluster_
Definition: PFBlockElement.h:164
reco::PFBlockElement::MUON
Definition: PFBlockElement.h:47
reco::PFBlockElement::TRACK
Definition: PFBlockElement.h:32
reco::PFBlockElement::NONE
Definition: PFBlockElement.h:31
HCAL
Definition: HCAL.py:1
reco::PFBlockElement::type_
Type type_
Definition: PFBlockElement.h:142
reco::PFBlockElement::T_FROM_V0
Definition: PFBlockElement.h:47
reco::PFBlockElement::T_FROM_DISP
Definition: PFBlockElement.h:47
reco::PFBlockElement::HFEM
Definition: PFBlockElement.h:39
reco::PFBlockElement::GSF
Definition: PFBlockElement.h:37
type
type
Definition: SiPixelVCal_PayloadInspector.cc:37
reco::PFBlockElement::DEFAULT
Definition: PFBlockElement.h:47
reco::PFBlockElement::ECAL
Definition: PFBlockElement.h:35
reco::PFBlockElement::BREM
Definition: PFBlockElement.h:38
reco::PFBlockElement::timeError
float timeError() const
Definition: PFBlockElement.h:132
reco::PFBlockElement::T_FROM_GAMMACONV
Definition: PFBlockElement.h:47
reco::PFBlockElement::HFHAD
Definition: PFBlockElement.h:40
reco::PFBlockElement::nullPFRecTrack_
const static PFRecTrackRef nullPFRecTrack_
Definition: PFBlockElement.h:163
reco::PFBlockElement::nullMuon_
const static MuonRef nullMuon_
Definition: PFBlockElement.h:167
reco::PFBlockElement::kNBETypes
Definition: PFBlockElement.h:44
reco::PFBlockElement::type
Type type() const
Definition: PFBlockElement.h:69
reco::PFBlockElement::locked_
bool locked_
Definition: PFBlockElement.h:147
MillePedeFileConverter_cfg.out
out
Definition: MillePedeFileConverter_cfg.py:31
reco::PFBlockElement::PS1
Definition: PFBlockElement.h:33
reco::PFBlockElement::index
unsigned index() const
Definition: PFBlockElement.h:86
reco::PFBlockElement::nullPFDispVertex_
const static PFDisplacedTrackerVertexRef nullPFDispVertex_
Definition: PFBlockElement.h:165
reco::PFBlockElement::timeError_
float timeError_
timing information uncertainty (<0 if timing not available)
Definition: PFBlockElement.h:160
reco::PFBlockElement::PS2
Definition: PFBlockElement.h:34