7 const float etaBorder = 1.479;
21 if (fabs(cluster_p->position().eta()) < etaBorder)
23 islandClustersBarrel_v.
push_back(cluster_p);
27 islandClustersEndCap_v.
push_back(cluster_p);
43 double etaRoad,
double phiRoad)
52 double energy_ = (*currentSeed)->energy();
54 (*currentSeed)->position().Y(),
55 (*currentSeed)->position().Z());
60 std::cout <<
"*****************************" << std::endl;
61 std::cout <<
"******NEW SUPERCLUSTER*******" << std::endl;
62 std::cout <<
"Seed R = " << (*currentSeed)->position().Rho() << std::endl;
67 constituentClusters.
push_back( *currentSeed );
69 while (currentCluster != clusters_v.
end())
71 if (
match(*currentSeed, *currentCluster, etaRoad, phiRoad))
73 constituentClusters.
push_back(*currentCluster);
74 energy_ += (*currentCluster)->energy();
75 position_ += (*currentCluster)->energy() *
math::XYZVector((*currentCluster)->position().X(),
76 (*currentCluster)->position().Y(),
77 (*currentCluster)->position().Z());
80 std::cout <<
"Cluster R = " << (*currentCluster)->position().Rho() << std::endl;
91 std::cout <<
"Final SuperCluster R = " << position_.Rho() << std::endl;
103 std::cout <<
"created a new supercluster of: " << std::endl;
104 std::cout <<
"Energy = " << newSuperCluster.energy() << std::endl;
105 std::cout <<
"Position in (R, phi, theta) = (" 106 << newSuperCluster.position().Rho() <<
", " 107 << newSuperCluster.position().phi() <<
", " 108 << newSuperCluster.position().theta() <<
")" << std::endl;
122 double dPhi = acos(
cos(seedPosition.phi() - clusterPosition.phi()));
124 double dEta = fabs(seedPosition.eta() - clusterPosition.eta());
126 if (dEta > dEtaMax)
return false;
127 if (dPhi > dPhiMax)
return false;
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