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::PFBlockElementCluster Class Reference

Cluster Element. More...

#include <PFBlockElementCluster.h>

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

Public Member Functions

PFBlockElementclone () const
 necessary to have the edm::OwnVector<PFBlockElement> working More...
 
PFClusterRef clusterRef () const
 
void Dump (std::ostream &out=std::cout, const char *tab=" ") const
 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...
 
- Public Member Functions inherited from reco::PFBlockElement
virtual ConversionRef convRef () const
 
virtual PFDisplacedTrackerVertexRef displacedVertexRef (TrackType trType) const
 
const PFMultilinksTypegetMultilinks () const
 
unsigned index () const
 
virtual bool isLinkedToDisplacedVertex () const
 
bool isMultilinksValide () const
 
virtual bool isPrimary () const
 
virtual bool isSecondary () const
 
void lock ()
 lock element More...
 
bool locked () const
 locked ? More...
 
virtual MuonRef muonRef () 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 setTrackType (TrackType trType, bool value)
 the trackType More...
 
virtual void setV0Ref (const VertexCompositeCandidateRef &v0ref, TrackType trType)
 
virtual reco::TrackRef trackRef () const
 
virtual PFRecTrackRef trackRefPF () const
 
virtual bool trackType (TrackType trType) const
 
Type type () const
 
void unLock ()
 unlock element More...
 
virtual VertexCompositeCandidateRef V0Ref () const
 
virtual ~PFBlockElement ()
 destructor More...
 

Private Attributes

PFClusterRef clusterRef_
 reference to the corresponding cluster More...
 

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
}
 
- Protected Attributes inherited from reco::PFBlockElement
unsigned index_
 index in block vector More...
 
bool locked_
 
PFMultiLinksTC multilinks_
 
Type type_
 

Detailed Description

Cluster Element.

this class contains a reference to a PFCluster

Definition at line 14 of file PFBlockElementCluster.h.

Constructor & Destructor Documentation

reco::PFBlockElementCluster::PFBlockElementCluster ( )
inline

Definition at line 16 of file PFBlockElementCluster.h.

Referenced by clone().

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

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

Definition at line 21 of file PFBlockElementCluster.h.

23  :
25  clusterRef_( ref ) {}
type
Definition: HCALResponse.h:22
PFClusterRef clusterRef_
reference to the corresponding cluster
PFBlockElement(Type type=NONE)
standard constructor

Member Function Documentation

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

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

Implements reco::PFBlockElement.

Definition at line 27 of file PFBlockElementCluster.h.

References PFBlockElementCluster().

27 { return new PFBlockElementCluster(*this); }
PFClusterRef reco::PFBlockElementCluster::clusterRef ( ) const
inlinevirtual
Returns
reference to the corresponding cluster

Reimplemented from reco::PFBlockElement.

Definition at line 30 of file PFBlockElementCluster.h.

References clusterRef_.

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

30 {return clusterRef_;}
PFClusterRef clusterRef_
reference to the corresponding cluster
void PFBlockElementCluster::Dump ( std::ostream &  out = std::cout,
const char *  tab = " " 
) const
virtual

print the object inside the element

Reimplemented from reco::PFBlockElement.

Definition at line 11 of file PFBlockElementCluster.cc.

References ET, and mathSSE::sqrt().

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

Member Data Documentation

PFClusterRef reco::PFBlockElementCluster::clusterRef_
private

reference to the corresponding cluster

Definition at line 37 of file PFBlockElementCluster.h.

Referenced by clusterRef().