CMS 3D CMS Logo

PFBlockElementCluster.cc
Go to the documentation of this file.
4 #include "Math/Vector3D.h"
5 
6 #include <iomanip>
7 
8 using namespace reco;
9 using namespace std;
10 
11 void PFBlockElementCluster::Dump(ostream& out, const char* tab) const {
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 }
alignBH_cfg.fixed
fixed
Definition: alignBH_cfg.py:54
PFBlockElementCluster.h
reco
fixed size matrix
Definition: AlignmentAlgorithmBase.h:45
mathSSE::sqrt
T sqrt(T t)
Definition: SSEVec.h:19
PFCluster.h
ET
#define ET
Definition: GenericBenchmark.cc:27
std
Definition: JetResolutionObject.h:76
Ref.h
MillePedeFileConverter_cfg.out
out
Definition: MillePedeFileConverter_cfg.py:31
reco::PFBlockElementCluster::Dump
void Dump(std::ostream &out=std::cout, const char *tab=" ") const override
print the object inside the element
Definition: PFBlockElementCluster.cc:11