CMS 3D CMS Logo

PFSuperCluster.cc
Go to the documentation of this file.
4 
5 using namespace std;
6 using namespace reco;
7 
8 PFSuperCluster::PFSuperCluster(const edm::PtrVector<reco::PFCluster>& clusters) : clusters_(clusters) {}
9 
12  clusters_.clear();
13 }
14 
17  clusters_ = other.clusters_;
18 
19  return *this;
20 }
21 
22 std::ostream& reco::operator<<(std::ostream& out, const PFSuperCluster& cluster) {
23  if (!out)
24  return out;
25 
26  const math::XYZPoint& pos = cluster.position();
27  const PFCluster::REPPoint& posrep = cluster.positionREP();
28  const std::vector<reco::PFRecHitFraction>& fracs = cluster.recHitFractions();
29 
30  out << "PFSuperCluster "
31  << ", clusters: " << cluster.clusters().size() << ", layer: " << cluster.layer() << "\tE = " << cluster.energy()
32  << "\tXYZ: " << pos.X() << "," << pos.Y() << "," << pos.Z() << " | "
33  << "\tREP: " << posrep.Rho() << "," << posrep.Eta() << "," << posrep.Phi() << " | " << fracs.size() << " rechits";
34 
35  for (unsigned i = 0; i < fracs.size(); i++) {
36  // PFRecHit is not available, print the detID
37  if (!fracs[i].recHitRef().isAvailable())
38  out << cluster.printHitAndFraction(i) << ", ";
39  else
40  out << fracs[i] << ", ";
41  }
42 
43  return out;
44 }
mps_fire.i
i
Definition: mps_fire.py:355
edm::PtrVectorBase::size
size_type size() const
Size of the RefVector.
Definition: PtrVectorBase.h:73
reco::PFSuperCluster
Particle flow cluster, see clustering algorithm in PFSuperClusterAlgo.
Definition: PFSuperCluster.h:24
reco::PFSuperCluster::clusters
const edm::PtrVector< reco::PFCluster > & clusters() const
vector of clusters
Definition: PFSuperCluster.h:35
reco::PFCluster::layer
PFLayer::Layer layer() const
cluster layer, see PFLayer.h in this directory
Definition: PFCluster.cc:100
pos
Definition: PixelAliasList.h:18
reco::PFCluster::recHitFractions
const std::vector< reco::PFRecHitFraction > & recHitFractions() const
vector of rechit fractions
Definition: PFCluster.h:69
reco
fixed size matrix
Definition: AlignmentAlgorithmBase.h:45
reco::PFCluster::energy
double energy() const
cluster energy
Definition: PFCluster.h:78
reco::PFSuperCluster::reset
void reset()
resets clusters parameters
Definition: PFSuperCluster.cc:10
edm::PtrVector< reco::PFCluster >
reco::PFCluster::operator=
PFCluster & operator=(const PFCluster &)
Definition: PFCluster.cc:107
PtrVector.h
trackingPlots.other
other
Definition: trackingPlots.py:1465
reco::PFCluster::positionREP
const REPPoint & positionREP() const
cluster position: rho, eta, phi
Definition: PFCluster.h:96
reco::PFSuperCluster::clusters_
edm::PtrVector< reco::PFCluster > clusters_
vector of clusters
Definition: PFSuperCluster.h:41
bsc_activity_cfg.clusters
clusters
Definition: bsc_activity_cfg.py:36
PFSuperCluster.h
reco::PFCluster::reset
void reset()
resets clusters parameters
Definition: PFCluster.cc:61
math::XYZPoint
XYZPointD XYZPoint
point in space with cartesian internal representation
Definition: Point3D.h:12
Pi.h
reco::CaloCluster::printHitAndFraction
std::string printHitAndFraction(unsigned i) const
print hitAndFraction
Definition: CaloCluster.cc:15
reco::operator<<
std::ostream & operator<<(std::ostream &, BeamSpot beam)
Definition: BeamSpot.cc:66
edm::PtrVectorBase::clear
void clear()
Clear the PtrVector.
Definition: PtrVectorBase.h:79
reco::PFSuperCluster::operator=
PFSuperCluster & operator=(const PFSuperCluster &)
Definition: PFSuperCluster.cc:15
reco::CaloCluster::position
const math::XYZPoint & position() const
cluster centroid position
Definition: CaloCluster.h:154
std
Definition: JetResolutionObject.h:76
reco::PFCluster
Particle flow cluster, see clustering algorithm in PFClusterAlgo.
Definition: PFCluster.h:46
MillePedeFileConverter_cfg.out
out
Definition: MillePedeFileConverter_cfg.py:31
reco::PFCluster::REPPoint
ROOT::Math::PositionVector3D< ROOT::Math::CylindricalEta3D< double > > REPPoint
Definition: PFCluster.h:52