CMS 3D CMS Logo

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:128
const math::XYZPoint & position() const
cluster centroid position
Definition: CaloCluster.h:126
int i
Definition: DBlmapReader.cc:9
Particle flow cluster, see clustering algorithm in PFClusterAlgo.
Definition: PFCluster.h:47
Particle flow cluster, see clustering algorithm in PFSuperClusterAlgo.
PFCluster & operator=(const PFCluster &)
Definition: PFCluster.cc:136
std::ostream & operator<<(std::ostream &, BeamSpot beam)
Definition: BeamSpot.cc:71
const REPPoint & positionREP() const
cluster position: rho, eta, phi
Definition: PFCluster.h:97
void reset()
resets clusters parameters
Definition: PFCluster.cc:79
double energy() const
cluster energy
Definition: PFCluster.h:82
std::string printHitAndFraction(unsigned i) const
print hitAndFraction
Definition: CaloCluster.cc:17
XYZPointD XYZPoint
point in space with cartesian internal representation
Definition: Point3D.h:12
fixed size matrix
ROOT::Math::PositionVector3D< ROOT::Math::CylindricalEta3D< double > > REPPoint
Definition: PFCluster.h:54
PFSuperCluster & operator=(const PFSuperCluster &)
const std::vector< reco::PFRecHitFraction > & recHitFractions() const
vector of rechit fractions
Definition: PFCluster.h:72
void reset()
resets clusters parameters
const edm::PtrVector< reco::PFCluster > & clusters() const
vector of clusters
edm::PtrVector< reco::PFCluster > clusters_
vector of clusters