File indexing completed on 2024-04-06 12:04:52
0001 #include "DataFormats/ParticleFlowReco/interface/PFBlockElementSuperCluster.h"
0002 #include "DataFormats/EgammaReco/interface/SuperCluster.h"
0003 #include "DataFormats/Common/interface/Ref.h"
0004 #include "Math/Vector3D.h"
0005
0006 #include <iomanip>
0007
0008 using namespace reco;
0009 using namespace std;
0010
0011 void PFBlockElementSuperCluster::Dump(ostream& out, const char* tab) const {
0012 if (!out)
0013 return;
0014
0015
0016 ROOT::Math::DisplacementVector3D<ROOT::Math::Cartesian3D<double>, ROOT::Math::DefaultCoordinateSystemTag> clusterPos(
0017 superClusterRef_->position().X(), superClusterRef_->position().Y(), superClusterRef_->position().Z());
0018
0019 clusterPos = clusterPos.Unit();
0020 double E = superClusterRef_->energy();
0021 clusterPos *= E;
0022 double ET = sqrt(clusterPos.X() * clusterPos.X() + clusterPos.Y() * clusterPos.Y());
0023
0024 out << setprecision(3);
0025 out << setiosflags(ios::right);
0026 out << setiosflags(ios::fixed);
0027 out << setw(4) << ", ET =" << setw(7) << ET;
0028 out << setw(4) << ", E =" << setw(7) << E;
0029 out << " (eta,phi,z)= (";
0030 out << superClusterRef_->position().Eta() << ",";
0031 out << superClusterRef_->position().Phi() << ",";
0032 out << superClusterRef_->position().Z() << ")";
0033 out << resetiosflags(ios::right | ios::fixed);
0034 }