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 () const
 
unsigned index () const
 
virtual bool isLinkedToDisplacedVertex () const
 
bool isMultilinksValide () 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)
 
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 setTrackType (TrackType trType, bool value)
 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_
 
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

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

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 28 of file PFBlockElement.h.

Member Enumeration Documentation

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 33 of file PFBlockElement.h.

Constructor & Destructor Documentation

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

standard constructor

Definition at line 60 of file PFBlockElement.h.

60  :
61  type_(type),
62  locked_(false),
63  index_( static_cast<unsigned>(-1) ),
64  time_(0.f), timeError_(-1.f)
65  {
66  }
type
Definition: HCALResponse.h:21
float timeError_
timing information uncertainty (<0 if timing not available)
double f[11][100]
float time_
timing information (valid if timeError_ >= 0)
unsigned index_
index in block vector
virtual reco::PFBlockElement::~PFBlockElement ( )
inlinevirtual

destructor

Definition at line 70 of file PFBlockElement.h.

References clone(), gather_cfg::cout, Dump(), and MillePedeFileConverter_cfg::out.

70 {}

Member Function Documentation

virtual PFBlockElement* reco::PFBlockElement::clone ( ) const
pure virtual
virtual const PFClusterRef& reco::PFBlockElement::clusterRef ( ) const
inlinevirtual
virtual const ConversionRefVector& reco::PFBlockElement::convRefs ( ) const
inlinevirtual

Reimplemented in reco::PFBlockElementTrack.

Definition at line 108 of file PFBlockElement.h.

References nullConv_.

Referenced by TrackAndTrackLinker::testLink().

108 { return nullConv_;}
static const ConversionRefVector nullConv_
virtual const PFDisplacedTrackerVertexRef& reco::PFBlockElement::displacedVertexRef ( TrackType  trType) const
inlinevirtual

Reimplemented in reco::PFBlockElementTrack.

Definition at line 107 of file PFBlockElement.h.

References nullPFDispVertex_.

Referenced by TrackAndTrackLinker::testLink().

107 { return nullPFDispVertex_; }
static const PFDisplacedTrackerVertexRef nullPFDispVertex_
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 25 of file PFBlockElement.cc.

Referenced by ~PFBlockElement().

26  {
27  if(!out) return;
28  out<<pad<<"base element";
29 }
const PFMultilinksType& reco::PFBlockElement::getMultilinks ( ) const
inline
unsigned reco::PFBlockElement::index ( ) const
inline
virtual bool reco::PFBlockElement::isLinkedToDisplacedVertex ( ) const
inlinevirtual

Reimplemented in reco::PFBlockElementTrack.

Definition at line 125 of file PFBlockElement.h.

Referenced by TrackAndTrackLinker::linkPrefilter().

125 {return false;}
bool reco::PFBlockElement::isMultilinksValide ( ) const
inline
virtual bool reco::PFBlockElement::isPrimary ( ) const
inlinevirtual

Reimplemented in reco::PFBlockElementTrack.

Definition at line 124 of file PFBlockElement.h.

124 { return false; }
virtual bool reco::PFBlockElement::isSecondary ( ) const
inlinevirtual

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

Definition at line 123 of file PFBlockElement.h.

123 { return false; }
bool reco::PFBlockElement::isTimeValid ( ) const
inline

do we have a valid time information

Definition at line 137 of file PFBlockElement.h.

References timeError_.

Referenced by PFAlgo::reconstructTrack().

137 { return timeError_ >= 0.f; }
float timeError_
timing information uncertainty (<0 if timing not available)
void reco::PFBlockElement::lock ( )
inline

lock element

Definition at line 80 of file PFBlockElement.h.

References locked_.

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

80 {locked_ = true;}
bool reco::PFBlockElement::locked ( ) const
inline

locked ?

Definition at line 96 of file PFBlockElement.h.

References locked_.

96 {return locked_;}
virtual const MuonRef& reco::PFBlockElement::muonRef ( ) const
inlinevirtual

Reimplemented in reco::PFBlockElementTrack.

Definition at line 109 of file PFBlockElement.h.

References nullMuon_.

109 { return nullMuon_; }
static const MuonRef nullMuon_
virtual void reco::PFBlockElement::setConversionRef ( const ConversionRef convRef,
TrackType  trType 
)
inlinevirtual

Reimplemented in reco::PFBlockElementTrack.

Definition at line 113 of file PFBlockElement.h.

References gather_cfg::cout.

113  {
114  std::cout << "Error in PFBlockElement::setConversionRef : this base class method is not implemented" << std::endl;}
virtual void reco::PFBlockElement::setDisplacedVertexRef ( const PFDisplacedTrackerVertexRef niref,
TrackType  trType 
)
inlinevirtual

Reimplemented in reco::PFBlockElementTrack.

Definition at line 111 of file PFBlockElement.h.

References gather_cfg::cout.

111  {
112  std::cout << "Error in PFBlockElement::setDisplacedVertexRef : this base class method is not implemented" << std::endl;}
void reco::PFBlockElement::setIndex ( unsigned  index)
inline

set index

Definition at line 99 of file PFBlockElement.h.

References index(), and index_.

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

99 { index_ = index; }
unsigned index() const
unsigned index_
index in block vector
void reco::PFBlockElement::setIsValidMultilinks ( bool  isVal)
inline
void reco::PFBlockElement::setMultilinks ( const PFMultiLinksTC ml)
inline

Definition at line 128 of file PFBlockElement.h.

References multilinks_.

128 {multilinks_ = ml;}
PFMultiLinksTC multilinks_
void reco::PFBlockElement::setMultilinksList ( const PFMultilinksType links)
inline

Definition at line 130 of file PFBlockElement.h.

References reco::PFMultiLinksTC::linkedClusters, and multilinks_.

130 {multilinks_.linkedClusters = links;}
PFMultiLinksTC multilinks_
PFMultilinksType linkedClusters
virtual void reco::PFBlockElement::setMuonRef ( const MuonRef muref)
inlinevirtual

Reimplemented in reco::PFBlockElementTrack.

Definition at line 115 of file PFBlockElement.h.

References gather_cfg::cout.

115  {
116  std::cout << "Error in PFBlockElement::setMuonRef : this base class method is not implemented" << std::endl;}
void reco::PFBlockElement::setTime ( float  time,
float  timeError = 0.f 
)
inline

the timing information

Definition at line 143 of file PFBlockElement.h.

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

143 { time_ = time; timeError_ = timeError; }
float time() const
float timeError_
timing information uncertainty (<0 if timing not available)
float time_
timing information (valid if timeError_ >= 0)
float timeError() const
virtual void reco::PFBlockElement::setTrackType ( TrackType  trType,
bool  value 
)
inlinevirtual

the trackType

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

Definition at line 92 of file PFBlockElement.h.

References gather_cfg::cout.

92  {
93  std::cout << "Error in PFBlockElement::setTrackType : this base class method is not implemented" << std::endl;}
virtual void reco::PFBlockElement::setV0Ref ( const VertexCompositeCandidateRef v0ref,
TrackType  trType 
)
inlinevirtual

Reimplemented in reco::PFBlockElementTrack.

Definition at line 117 of file PFBlockElement.h.

References gather_cfg::cout.

117  {
118 
119  std::cout << "Error in PFBlockElement::setV0Ref : this base class method is not implemented" << std::endl;
120  }
float reco::PFBlockElement::time ( ) const
inline
Returns
the timing

Definition at line 139 of file PFBlockElement.h.

References time_.

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

139 { return time_; }
float time_
timing information (valid if timeError_ >= 0)
float reco::PFBlockElement::timeError ( ) const
inline
Returns
the timing uncertainty

Definition at line 141 of file PFBlockElement.h.

References timeError_.

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

141 { return timeError_; }
float timeError_
timing information uncertainty (<0 if timing not available)
virtual const reco::TrackRef& reco::PFBlockElement::trackRef ( ) const
inlinevirtual
virtual const PFRecTrackRef& reco::PFBlockElement::trackRefPF ( ) const
inlinevirtual

Reimplemented in reco::PFBlockElementTrack.

Definition at line 105 of file PFBlockElement.h.

References nullPFRecTrack_.

Referenced by KDTreeLinkerTrackEcal::insertTargetElt(), and KDTreeLinkerTrackHcal::insertTargetElt().

105 {return nullPFRecTrack_; }
static const PFRecTrackRef nullPFRecTrack_
virtual bool reco::PFBlockElement::trackType ( TrackType  trType) const
inlinevirtual
Returns
tracktype

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

Definition at line 89 of file PFBlockElement.h.

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

89 { return false; }
Type reco::PFBlockElement::type ( ) const
inline
Returns
type

Definition at line 86 of file PFBlockElement.h.

References type_.

Referenced by PFPhotonAlgo::EvaluateGCorrMVA(), PFPhotonAlgo::EvaluateResMVA(), PFBlockBasedIsolation::getHighestEtECALCluster(), Vispa.Plugins.ConfigEditor.ConfigDataAccessor.ConfigDataAccessor::inputCommands(), PFEGammaAlgo::isAMuon(), PFEGammaFilters::isElectronSafeForJetMET(), PFEGammaFilters::isPhotonSafeForJetMET(), PFBlockAlgo::link(), PreshowerAndECALLinker::linkPrefilter(), TrackAndECALLinker::linkPrefilter(), PFBlockElementSCEqual::operator()(), reco::operator<<(), Vispa.Plugins.ConfigEditor.ConfigDataAccessor.ConfigDataAccessor::outputCommands(), Vispa.Plugins.ConfigEditor.ConfigDataAccessor.ConfigDataAccessor::outputEventContent(), PFElectronTranslator::produce(), EgammaHLTPFPhotonIsolationProducer::produce(), PFPhotonTranslator::produce(), Vispa.Plugins.ConfigEditor.ConfigDataAccessor.ConfigDataAccessor::properties(), HCALAndHOLinker::testLink(), HFEMAndHFHADLinker::testLink(), ECALAndHCALCaloJetLinker::testLink(), ECALAndHCALLinker::testLink(), GSFAndBREMLinker::testLink(), HGCalAndBREMLinker::testLink(), HCALAndBREMLinker::testLink(), ECALAndBREMLinker::testLink(), GSFAndHCALLinker::testLink(), GSFAndHGCalLinker::testLink(), GSFAndECALLinker::testLink(), TrackAndHOLinker::testLink(), TrackAndGSFLinker::testLink(), SCAndECALLinker::testLink(), SCAndHGCalLinker::testLink(), PreshowerAndECALLinker::testLink(), TrackAndHCALLinker::testLink(), and TrackAndECALLinker::testLink().

86 { return type_; }
void reco::PFBlockElement::unLock ( )
inline

unlock element

Definition at line 83 of file PFBlockElement.h.

References locked_.

83 {locked_ = false;}
virtual const VertexCompositeCandidateRef& reco::PFBlockElement::V0Ref ( ) const
inlinevirtual

Reimplemented in reco::PFBlockElementTrack.

Definition at line 110 of file PFBlockElement.h.

References nullVertex_.

Referenced by TrackAndTrackLinker::testLink().

110 { return nullVertex_; }
static const VertexCompositeCandidateRef nullVertex_

Member Data Documentation

unsigned reco::PFBlockElement::index_
protected

index in block vector

Definition at line 157 of file PFBlockElement.h.

Referenced by index(), and setIndex().

bool reco::PFBlockElement::locked_
protected

locked flag.

Definition at line 154 of file PFBlockElement.h.

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

PFMultiLinksTC reco::PFBlockElement::multilinks_
protected
const reco::ConversionRefVector reco::PFBlockElement::nullConv_ = reco::ConversionRefVector()
staticprotected

Definition at line 172 of file PFBlockElement.h.

Referenced by convRefs().

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

Definition at line 173 of file PFBlockElement.h.

Referenced by muonRef().

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

Definition at line 170 of file PFBlockElement.h.

Referenced by clusterRef().

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

Definition at line 169 of file PFBlockElement.h.

Referenced by trackRefPF().

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

Definition at line 168 of file PFBlockElement.h.

Referenced by trackRef().

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

Definition at line 174 of file PFBlockElement.h.

Referenced by V0Ref().

float reco::PFBlockElement::time_
protected

timing information (valid if timeError_ >= 0)

Definition at line 164 of file PFBlockElement.h.

Referenced by setTime(), and time().

float reco::PFBlockElement::timeError_
protected

timing information uncertainty (<0 if timing not available)

Definition at line 166 of file PFBlockElement.h.

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

Type reco::PFBlockElement::type_
protected