14 #include <Math/VectorUtil.h> 28 ev.
getByToken(superClusterToken_, superClusterCollectionH);
29 ev.
getByToken(basicClusterToken_, basicClusterCollectionH);
35 double deltacur=1000.;
37 bool MATCHEDSC =
false;
39 Direction candDir(position.eta(), position.phi());
42 deposit.addCandEnergy(sc->energy()*
sin(2*atan(
exp(-sc->eta()))));
44 for(reco::SuperClusterCollection::const_iterator scItr = superClusterCollectionH->begin(); scItr != superClusterCollectionH->end(); ++scItr){
48 if(supercluster->
seed()->algo() == 0){
50 if (deltacur < delta1) {
52 matchedsupercluster = supercluster;
61 for(reco::BasicClusterCollection::const_iterator cItr = basicClusterCollectionH->begin(); cItr != basicClusterCollectionH->end(); ++cItr){
65 int ebc_bcalgo = cluster->algo();
66 double ebc_bce = cluster->energy();
67 double ebc_bceta = cluster->eta();
68 double ebc_bcet = ebc_bce*
sin(2*atan(
exp(ebc_bceta)));
71 if (ebc_bcet > etMin_ && ebc_bcalgo == 0) {
74 if(MATCHEDSC || !scmatch_ ){
75 bool inSuperCluster =
false;
80 for(;theEclust != matchedsupercluster->
clustersEnd(); ++theEclust) {
81 if ((**theEclust) == (*cluster) ) inSuperCluster =
true;
84 if (!inSuperCluster || !scmatch_ ) {
86 if(newDelta < conesize_) {
87 deposit.addDeposit(
Direction(cluster->eta(), cluster->phi()), ebc_bcet);
const math::XYZPoint & position() const
cluster centroid position
bool getByToken(EDGetToken token, Handle< PROD > &result) const
Sin< T >::type sin(const T &t)
XYZPointD XYZPoint
point in space with cartesian internal representation
static int position[264][3]
CaloCluster_iterator clustersBegin() const
fist iterator over BasicCluster constituents
T get() const
get a component
const CaloClusterPtr & seed() const
seed BasicCluster
CaloCluster_iterator clustersEnd() const
last iterator over BasicCluster constituents