16 edm::LogInfo(
"ValidHcal") <<
"SimG4HcalHitJetFinder:: Deleting";
33 std::vector<CaloHit>::iterator itr;
34 for (itr =
input.begin(); itr !=
input.end(); itr++) {
35 LogDebug(
"ValidHcal") <<
"HcalHitJetFinder::getClusters_1 - input : e " 36 << itr->e() <<
" eta " << itr->eta() <<
" phi " 37 << itr->phi() <<
" subdet " << itr->det();
42 for (itr =
input.begin(); itr !=
input.end(); itr++) {
43 LogDebug(
"ValidHcal") <<
"HcalHitJetFinder::getClusters_2 - input : e " 44 << itr->e() <<
" eta " << itr->eta() <<
" phi " 45 << itr->phi() <<
" subdet " << itr->det();
48 std::vector<SimG4HcalHitCluster>
temp;
55 std::vector<CaloHit>::iterator itr_hits;
57 int j, first_seed = 0;
58 for (j=0, itr_hits =
input.begin(); itr_hits !=
input.end();
60 int h_type = itr_hits->det();
61 if (((h_type == static_cast<int>(
HcalBarrel) ||
63 h_type == static_cast<int>(
HcalForward)) && hcal_only) ||
66 LogDebug(
"ValidHcal") <<
"HcalHitJetFinder:: First seed hit " 67 <<
"..................\n" << (*itr_hits);
73 temp.push_back(cluster);
75 std::vector<SimG4HcalHitCluster>::iterator itr_clus;
77 for (j=0, itr_hits =
input.begin(); itr_hits !=
input.end();
79 int h_type = itr_hits->det();
80 if ((((h_type == static_cast<int>(
HcalBarrel) ||
82 h_type == static_cast<int>(
HcalForward)) && hcal_only) ||
83 (!hcal_only)) && (j != first_seed)) {
84 LogDebug(
"ValidHcal") <<
"HcalHitJetFinder:: ........... Consider hit" 85 <<
" ..................\n" << (*itr_hits);
90 for (itr_clus = temp.begin(), iclus = 0; itr_clus != temp.end();
91 itr_clus++, iclus++) {
93 LogDebug(
"ValidHcal") <<
"HcalHitJetFinder::=======> Cluster " 94 << iclus <<
"\n" << (*itr_clus);
96 double d =
rDist(&(*itr_clus), &(*itr_hits));
98 LogDebug(
"ValidHcal") <<
"HcalHitJetFinder:: -> associated ... ";
99 temp[iclus] += *itr_hits;
110 LogDebug(
"ValidHcal") <<
"HcalHitJetFinder:: ************ NEW CLUSTER" 123 double etac = cluster->
eta();
124 double phic = cluster->
phi();
126 double etah = hit->
eta();
127 double phih = hit->
phi();
129 return rDist(etac, phic, etah, phih);
134 const double etah,
const double phih)
const{
139 if (phic < phih) delta_phi = phih - phic;
142 double tmp =
sqrt(delta_eta * delta_eta + delta_phi * delta_phi);
144 LogDebug(
"ValidHcal") <<
"HcalHitJetFinder::rDist:\n" 145 <<
" Clus. eta, phi = " << etac <<
" " << phic <<
"\n" 146 <<
" hit eta, phi = " << etah <<
" " << phih
147 <<
" 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