test
CMS 3D CMS Logo

 All Classes Namespaces Files Functions Variables Typedefs Enumerations Enumerator Properties Friends Macros Pages
PFBlockElementSuperCluster.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 
12  const char* tab ) const {
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( superClusterRef_->position().X(), superClusterRef_->position().Y(),superClusterRef_->position().Z() );
19 
20  clusterPos = clusterPos.Unit();
21  double E = superClusterRef_->energy();
22  clusterPos *= E;
23  double ET = sqrt (clusterPos.X()*clusterPos.X() + clusterPos.Y()*clusterPos.Y());
24 
25  out << setprecision(3);
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 << superClusterRef_->position().Eta()<<",";
32  out << superClusterRef_->position().Phi()<<",";
33  out << superClusterRef_->position().Z() <<")";
34  out << resetiosflags(ios::right|ios::fixed);
35 }
T sqrt(T t)
Definition: SSEVec.h:48
tuple out
Definition: dbtoconf.py:99
void Dump(std::ostream &out=std::cout, const char *tab=" ") const
print the object inside the element
#define ET