14 #include <Math/VectorUtil.h>
30 ev.getByToken(superClusterToken_, superClusterCollectionH);
31 ev.getByToken(basicClusterToken_, basicClusterCollectionH);
36 double delta1 = 1000.;
37 double deltacur = 1000.;
39 bool MATCHEDSC =
false;
44 deposit.addCandEnergy(sc->energy() *
sin(2 * atan(
exp(-sc->eta()))));
46 for (reco::SuperClusterCollection::const_iterator scItr = superClusterCollectionH->begin();
47 scItr != superClusterCollectionH->end();
51 if (supercluster->
seed()->algo() == 0) {
53 if (deltacur < delta1) {
55 matchedsupercluster = supercluster;
64 for (reco::BasicClusterCollection::const_iterator cItr = basicClusterCollectionH->begin();
65 cItr != basicClusterCollectionH->end();
69 int ebc_bcalgo = cluster->
algo();
70 double ebc_bce = cluster->
energy();
71 double ebc_bceta = cluster->
eta();
72 double ebc_bcet = ebc_bce *
sin(2 * atan(
exp(ebc_bceta)));
75 if (ebc_bcet > etMin_ && ebc_bcalgo == 0) {
78 if (MATCHEDSC || !scmatch_) {
79 bool inSuperCluster =
false;
84 for (; theEclust != matchedsupercluster->
clustersEnd(); ++theEclust) {
85 if ((**theEclust) == (*cluster))
86 inSuperCluster =
true;
89 if (!inSuperCluster || !scmatch_) {
91 if (newDelta < conesize_) {
92 deposit.addDeposit(
Direction(cluster->
eta(), cluster->
phi()), ebc_bcet);