6 const float etaBorder = 1.479;
18 if (fabs(cluster_p->position().eta()) < etaBorder) {
19 islandClustersBarrel_v.
push_back(cluster_p);
21 islandClustersEndCap_v.
push_back(cluster_p);
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;
102 double dPhi = acos(
cos(seedPosition.phi() - clusterPosition.phi()));
104 double dEta = fabs(seedPosition.eta() - clusterPosition.eta());
void push_back(Ptr< T > const &iPtr)
Sin< T >::type sin(const T &t)
reco::SuperClusterCollection makeSuperClusters(reco::CaloClusterPtrVector &clusters)
const_iterator begin() const
std::vector< SuperCluster > SuperClusterCollection
collection of SuperCluser objectr
Cos< T >::type cos(const T &t)
const_iterator end() const
XYZVectorD XYZVector
spatial vector with cartesian internal representation
XYZPointD XYZPoint
point in space with cartesian internal representation
void clear()
Clear the PtrVector.
void makeIslandSuperClusters(reco::CaloClusterPtrVector &clusters_v, double etaRoad, double phiRoad)
double seedTransverseEnergyThreshold
bool match(reco::CaloClusterPtr seed_p, reco::CaloClusterPtr cluster_p, double etaRoad, double phiRoad)
reco::SuperClusterCollection superclusters_v