27 std::vector<CaloHit>::iterator itr;
28 for (itr =
input.begin(); itr !=
input.end(); itr++) {
29 LogDebug(
"ValidHcal") <<
"HcalHitJetFinder::getClusters_1 - input : e " << itr->e() <<
" eta " << itr->eta()
30 <<
" phi " << itr->phi() <<
" subdet " << itr->det();
35 for (itr =
input.begin(); itr !=
input.end(); itr++) {
36 LogDebug(
"ValidHcal") <<
"HcalHitJetFinder::getClusters_2 - input : e " << itr->e() <<
" eta " << itr->eta()
37 <<
" phi " << itr->phi() <<
" subdet " << itr->det();
40 std::vector<SimG4HcalHitCluster>
temp;
47 std::vector<CaloHit>::iterator itr_hits;
49 int j, first_seed = 0;
50 for (j = 0, itr_hits =
input.begin(); itr_hits !=
input.end(); j++, itr_hits++) {
51 int h_type = itr_hits->det();
57 LogDebug(
"ValidHcal") <<
"HcalHitJetFinder:: First seed hit " 58 <<
"..................\n" 65 temp.push_back(cluster);
67 std::vector<SimG4HcalHitCluster>::iterator itr_clus;
69 for (j = 0, itr_hits =
input.begin(); itr_hits !=
input.end(); j++, itr_hits++) {
70 int h_type = itr_hits->det();
76 LogDebug(
"ValidHcal") <<
"HcalHitJetFinder:: ........... Consider hit" 77 <<
" ..................\n" 83 for (itr_clus = temp.begin(), iclus = 0; itr_clus != temp.end(); itr_clus++, iclus++) {
84 LogDebug(
"ValidHcal") <<
"HcalHitJetFinder::=======> Cluster " << iclus <<
"\n" << (*itr_clus);
86 double d =
rDist(&(*itr_clus), &(*itr_hits));
88 LogDebug(
"ValidHcal") <<
"HcalHitJetFinder:: -> associated ... ";
89 temp[iclus] += *itr_hits;
100 LogDebug(
"ValidHcal") <<
"HcalHitJetFinder:: ************ NEW CLUSTER" 112 double etac = cluster->
eta();
113 double phic = cluster->
phi();
115 double etah = hit->
eta();
116 double phih = hit->
phi();
118 return rDist(etac, phic, etah, phih);
126 delta_phi = phih - phic;
127 if (delta_phi >
M_PI)
130 double tmp =
sqrt(delta_eta * delta_eta + delta_phi * delta_phi);
132 LogDebug(
"ValidHcal") <<
"HcalHitJetFinder::rDist:\n" 133 <<
" Clus. eta, phi = " << etac <<
" " << phic <<
"\n" 134 <<
" hit eta, phi = " << etah <<
" " << phih <<
" rDist = " <<
tmp;
void setInput(std::vector< CaloHit > *)
std::vector< CaloHit > input
SimG4HcalHitJetFinder(double cone=0.5)
std::vector< SimG4HcalHitCluster > clusvector
std::vector< SimG4HcalHitCluster > * getClusters(bool)
virtual ~SimG4HcalHitJetFinder()
std::vector< std::vector< double > > tmp
double rDist(const SimG4HcalHitCluster *, const CaloHit *) const