CMS 3D CMS Logo

List of all members | Public Member Functions | Private Attributes
reco::PFBlockElementCluster Class Reference

Cluster Element. More...

#include <PFBlockElementCluster.h>

Inheritance diagram for reco::PFBlockElementCluster:
reco::PFBlockElement

Public Member Functions

PFBlockElementclone () const override
 necessary to have the edm::OwnVector<PFBlockElement> working More...
 
const PFClusterRefclusterRef () const override
 
void Dump (std::ostream &out=std::cout, const char *tab=" ") const override
 print the object inside the element More...
 
 PFBlockElementCluster ()
 
 PFBlockElementCluster (const PFClusterRef &ref, PFBlockElement::Type type)
 constructor. type must be equal to PS1, PS2, ECAL, HCAL. More...
 
void setSuperClusterRef (const SuperClusterRef &ref)
 
const SuperClusterRefsuperClusterRef () const
 
- Public Member Functions inherited from reco::PFBlockElement
virtual const ConversionRefVectorconvRefs () const
 
virtual const PFDisplacedTrackerVertexRefdisplacedVertexRef (TrackType trType) const
 
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...
 

Private Attributes

PFClusterRef clusterRef_
 reference to the corresponding cluster More...
 
SuperClusterRef superClusterRef_
 

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_
 
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 inherited from reco::PFBlockElement
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

Cluster Element.

this class contains a reference to a PFCluster

Definition at line 16 of file PFBlockElementCluster.h.

Constructor & Destructor Documentation

◆ PFBlockElementCluster() [1/2]

reco::PFBlockElementCluster::PFBlockElementCluster ( )
inline

Definition at line 18 of file PFBlockElementCluster.h.

18 {}

Referenced by clone().

◆ PFBlockElementCluster() [2/2]

reco::PFBlockElementCluster::PFBlockElementCluster ( const PFClusterRef ref,
PFBlockElement::Type  type 
)
inline

constructor. type must be equal to PS1, PS2, ECAL, HCAL.

Definition at line 23 of file PFBlockElementCluster.h.

24  : PFBlockElement(type), clusterRef_(ref) {}

Member Function Documentation

◆ clone()

PFBlockElement* reco::PFBlockElementCluster::clone ( ) const
inlineoverridevirtual

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

Implements reco::PFBlockElement.

Definition at line 26 of file PFBlockElementCluster.h.

26 { return new PFBlockElementCluster(*this); }

References PFBlockElementCluster().

◆ clusterRef()

const PFClusterRef& reco::PFBlockElementCluster::clusterRef ( ) const
inlineoverridevirtual

◆ Dump()

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

print the object inside the element

Reimplemented from reco::PFBlockElement.

Definition at line 11 of file PFBlockElementCluster.cc.

11  {
12  if (!out)
13  return;
14  // need to convert the math::XYZPoint data member of the PFCluster class=
15  // to a displacement vector:
16  ROOT::Math::DisplacementVector3D<ROOT::Math::Cartesian3D<double>, ROOT::Math::DefaultCoordinateSystemTag> clusterPos(
17  clusterRef_->position().X(), clusterRef_->position().Y(), clusterRef_->position().Z());
18 
19  clusterPos = clusterPos.Unit();
20  double E = clusterRef_->energy();
21  clusterPos *= E;
22  double ET = sqrt(clusterPos.X() * clusterPos.X() + clusterPos.Y() * clusterPos.Y());
23 
24  out << setprecision(3);
25  out << tab << setw(7) << "layer=" << setw(3) << clusterRef_->layer();
26  out << setiosflags(ios::right);
27  out << setiosflags(ios::fixed);
28  out << setw(4) << ", ET =" << setw(7) << ET;
29  out << setw(4) << ", E =" << setw(7) << E;
30  out << " (eta,phi,z)= (";
31  out << clusterRef_->position().Eta() << ",";
32  out << clusterRef_->position().Phi() << ",";
33  out << clusterRef_->position().Z() << ")";
34  out << resetiosflags(ios::right | ios::fixed);
35 }

References ET, alignBH_cfg::fixed, MillePedeFileConverter_cfg::out, and mathSSE::sqrt().

Referenced by reco::operator<<(), and PFEGammaAlgo::unwrapSuperCluster().

◆ setSuperClusterRef()

void reco::PFBlockElementCluster::setSuperClusterRef ( const SuperClusterRef ref)
inline

Definition at line 32 of file PFBlockElementCluster.h.

32 { superClusterRef_ = ref; }

References superClusterRef_.

Referenced by SpecialClusterImporter< T >::importToBlock().

◆ superClusterRef()

const SuperClusterRef& reco::PFBlockElementCluster::superClusterRef ( ) const
inline

Member Data Documentation

◆ clusterRef_

PFClusterRef reco::PFBlockElementCluster::clusterRef_
private

reference to the corresponding cluster

Definition at line 38 of file PFBlockElementCluster.h.

Referenced by clusterRef().

◆ superClusterRef_

SuperClusterRef reco::PFBlockElementCluster::superClusterRef_
private

Definition at line 39 of file PFBlockElementCluster.h.

Referenced by setSuperClusterRef(), and superClusterRef().

reco::PFBlockElementCluster::PFBlockElementCluster
PFBlockElementCluster()
Definition: PFBlockElementCluster.h:18
alignBH_cfg.fixed
fixed
Definition: alignBH_cfg.py:54
mathSSE::sqrt
T sqrt(T t)
Definition: SSEVec.h:19
ET
#define ET
Definition: GenericBenchmark.cc:27
reco::PFBlockElementCluster::clusterRef_
PFClusterRef clusterRef_
reference to the corresponding cluster
Definition: PFBlockElementCluster.h:38
type
type
Definition: SiPixelVCal_PayloadInspector.cc:37
reco::PFBlockElementCluster::superClusterRef_
SuperClusterRef superClusterRef_
Definition: PFBlockElementCluster.h:39
MillePedeFileConverter_cfg.out
out
Definition: MillePedeFileConverter_cfg.py:31
reco::PFBlockElement::PFBlockElement
PFBlockElement(Type type=NONE)
standard constructor
Definition: PFBlockElement.h:50