45 double energy_ = (*currentSeed)->energy();
47 (*currentSeed)->position().X(), (*currentSeed)->position().Y(), (*currentSeed)->position().Z());
51 std::cout <<
"*****************************" << std::endl;
52 std::cout <<
"******NEW SUPERCLUSTER*******" << std::endl;
53 std::cout <<
"Seed R = " << (*currentSeed)->position().Rho() << std::endl;
58 constituentClusters.
push_back(*currentSeed);
60 while (currentCluster != clusters_v.
end()) {
61 if (
match(*currentSeed, *currentCluster, etaRoad, phiRoad)) {
62 constituentClusters.
push_back(*currentCluster);
63 energy_ += (*currentCluster)->energy();
64 position_ += (*currentCluster)->energy() *
math::XYZVector((*currentCluster)->position().X(),
65 (*currentCluster)->position().Y(),
66 (*currentCluster)->position().Z());
68 std::cout <<
"Cluster R = " << (*currentCluster)->position().Rho() << std::endl;
77 std::cout <<
"Final SuperCluster R = " << position_.Rho() << std::endl;
81 energy_,
math::XYZPoint(position_.X(), position_.Y(), position_.Z()), (*currentSeed), constituentClusters);
86 std::cout <<
"created a new supercluster of: " << std::endl;
87 std::cout <<
"Energy = " << newSuperCluster.energy() << std::endl;
88 std::cout <<
"Position in (R, phi, theta) = (" << newSuperCluster.position().Rho() <<
", " 89 << newSuperCluster.position().phi() <<
", " << newSuperCluster.position().theta() <<
")" << std::endl;
void push_back(Ptr< T > const &iPtr)
Sin< T >::type sin(const T &t)
const_iterator end() const
const_iterator begin() const
XYZVectorD XYZVector
spatial vector with cartesian internal representation
XYZPointD XYZPoint
point in space with cartesian internal representation
void clear()
Clear the PtrVector.
double seedTransverseEnergyThreshold
bool match(reco::CaloClusterPtr seed_p, reco::CaloClusterPtr cluster_p, double etaRoad, double phiRoad)
reco::SuperClusterCollection superclusters_v