CMS 3D CMS Logo

 All Classes Namespaces Files Functions Variables Typedefs Enumerations Enumerator Properties Friends Macros Pages
PFSuperCluster.cc
Go to the documentation of this file.
4 
5 
6 using namespace std;
7 using namespace reco;
8 
9 PFSuperCluster::PFSuperCluster(const edm::PtrVector<reco::PFCluster>& clusters):
10 clusters_(clusters)
11 {
12 }
13 
15 
17  clusters_.clear();
18 
19 }
20 
22 
24  clusters_ = other.clusters_;
25 
26  return *this;
27 }
28 
29 
30 std::ostream& reco::operator<<(std::ostream& out,
31  const PFSuperCluster& cluster) {
32 
33  if(!out) return out;
34 
35  const math::XYZPoint& pos = cluster.position();
36  const PFCluster::REPPoint& posrep = cluster.positionREP();
37  const std::vector< reco::PFRecHitFraction >& fracs =
38  cluster.recHitFractions();
39 
40  out<<"PFSuperCluster "
41  <<", clusters: "<<cluster.clusters().size()
42  <<", layer: "<<cluster.layer()
43  <<"\tE = "<<cluster.energy()
44  <<"\tXYZ: "
45  <<pos.X()<<","<<pos.Y()<<","<<pos.Z()<<" | "
46  <<"\tREP: "
47  <<posrep.Rho()<<","<<posrep.Eta()<<","<<posrep.Phi()<<" | "
48  <<fracs.size()<<" rechits";
49 
50  for(unsigned i=0; i<fracs.size(); i++) {
51  // PFRecHit is not available, print the detID
52  if( !fracs[i].recHitRef().isAvailable() )
53  out<<cluster.printHitAndFraction(i)<<", ";
54  else
55  out<<fracs[i]<<", ";
56  }
57 
58 
59  return out;
60 }
PFLayer::Layer layer() const
cluster layer, see PFLayer.h in this directory
Definition: PFCluster.cc:85
const math::XYZPoint & position() const
cluster centroid position
Definition: CaloCluster.h:124
int i
Definition: DBlmapReader.cc:9
Particle flow cluster, see clustering algorithm in PFClusterAlgo.
Definition: PFCluster.h:47
ROOT::Math::PositionVector3D< ROOT::Math::CylindricalEta3D< Double32_t > > REPPoint
Definition: PFCluster.h:51
Particle flow cluster, see clustering algorithm in PFSuperClusterAlgo.
PFCluster & operator=(const PFCluster &)
Definition: PFCluster.cc:93
std::ostream & operator<<(std::ostream &, BeamSpot beam)
Definition: BeamSpot.cc:71
const REPPoint & positionREP() const
cluster position: rho, eta, phi
Definition: PFCluster.h:87
void reset()
resets clusters parameters
Definition: PFCluster.cc:36
double energy() const
cluster energy
Definition: PFCluster.h:79
std::string printHitAndFraction(unsigned i) const
print hitAndFraction
Definition: CaloCluster.cc:17
tuple out
Definition: dbtoconf.py:99
XYZPointD XYZPoint
point in space with cartesian internal representation
Definition: Point3D.h:12
PFSuperCluster & operator=(const PFSuperCluster &)
const std::vector< reco::PFRecHitFraction > & recHitFractions() const
vector of rechit fractions
Definition: PFCluster.h:69
void reset()
resets clusters parameters
const edm::PtrVector< reco::PFCluster > & clusters() const
vector of clusters
edm::PtrVector< reco::PFCluster > clusters_
vector of clusters