7 #include <calobase/RawTower.h>
8 #include <calobase/RawTowerContainer.h>
9 #include <calobase/RawTowerGeom.h>
10 #include <calobase/RawTowerGeomContainer.h>
13 #include <calobase/RawCluster.h>
14 #include <calobase/RawClusterv1.h>
15 #include <calobase/RawClusterContainer.h>
40 RawClusterContainer* clustersEM3 = findNode::getClass<RawClusterContainer>(topNode,
"CLUSTER_CEMC");
41 RawClusterContainer* clustersIH3 = findNode::getClass<RawClusterContainer>(topNode,
"CLUSTER_HCALIN");
42 RawClusterContainer* clustersOH3 = findNode::getClass<RawClusterContainer>(topNode,
"CLUSTER_HCALOUT");
46 cout <<
"clustersEM3 " << clustersEM3 << endl;
47 cout <<
"clustersIH3 " << clustersIH3 << endl;
48 cout <<
"clustersOH3 " << clustersOH3 << endl;
58 RawClusterContainer* new_cemc_clusters = findNode::getClass<RawClusterContainer>(topNode,
"CLUSTER_CEMC_MOD");
61 cout <<
"Regular clusters node: " << clustersEM3 << endl;
62 cout <<
"Modified clusters node: " << new_cemc_clusters << endl;
64 if ( !clustersEM3 || !new_cemc_clusters )
66 cout <<
"One or more invalid pointers, exiting event" << endl;
73 cout <<
"process_event: entering with # original clusters = " << clustersEM3->
size() << endl;
74 cout <<
"process_event: entering with # new clusters = " << new_cemc_clusters->
size() << endl;
85 double r = old_cluster->
get_r();
86 double z = old_cluster->
get_z();
89 double chi2 = old_cluster->
get_chi2();
90 double prob = old_cluster->
get_prob();
93 cout <<
"for old cluster:" << endl;
94 cout <<
"energy " << energy << endl;
96 cout <<
"r " << r << endl;
97 cout <<
"z " << z << endl;
98 cout <<
"phi " << phi << endl;
99 cout <<
"ecore " << ecore << endl;
100 cout <<
"chi2 " << chi2 << endl;
101 cout <<
"prob " << prob << endl;
109 new_cluster->
set_r(r);
110 new_cluster->
set_z(z);
126 RawClusterContainer* new_hcalin_clusters = findNode::getClass<RawClusterContainer>(topNode,
"CLUSTER_HCALIN_MOD");
129 cout <<
"Regular clusters node: " << clustersIH3 << endl;
130 cout <<
"Modified clusters node: " << new_hcalin_clusters << endl;
132 if ( !clustersIH3 || !new_hcalin_clusters )
134 cout <<
"One or more invalid pointers, exiting event" << endl;
141 cout <<
"process_event: entering with # original clusters = " << clustersIH3->
size() << endl;
142 cout <<
"process_event: entering with # new clusters = " << new_hcalin_clusters->
size() << endl;
150 RawCluster* old_cluster = hcalin_iter->second;
153 double r = old_cluster->
get_r();
154 double z = old_cluster->
get_z();
157 double chi2 = old_cluster->
get_chi2();
158 double prob = old_cluster->
get_prob();
161 cout <<
"for old cluster:" << endl;
162 cout <<
"energy " << energy << endl;
164 cout <<
"r " << r << endl;
165 cout <<
"z " << z << endl;
166 cout <<
"phi " << phi << endl;
167 cout <<
"ecore " << ecore << endl;
168 cout <<
"chi2 " << chi2 << endl;
169 cout <<
"prob " << prob << endl;
177 new_cluster->
set_r(r);
178 new_cluster->
set_z(z);
194 RawClusterContainer* new_hcalout_clusters = findNode::getClass<RawClusterContainer>(topNode,
"CLUSTER_HCALOUT_MOD");
197 cout <<
"Regular clusters node: " << clustersOH3 << endl;
198 cout <<
"Modified clusters node: " << new_hcalout_clusters << endl;
200 if ( !clustersOH3 || !new_hcalout_clusters )
202 cout <<
"One or more invalid pointers, exiting event" << endl;
209 cout <<
"process_event: entering with # original clusters = " << clustersOH3->
size() << endl;
210 cout <<
"process_event: entering with # new clusters = " << new_hcalout_clusters->
size() << endl;
218 RawCluster* old_cluster = hcalout_iter->second;
221 double r = old_cluster->
get_r();
222 double z = old_cluster->
get_z();
225 double chi2 = old_cluster->
get_chi2();
226 double prob = old_cluster->
get_prob();
229 cout <<
"for old cluster:" << endl;
230 cout <<
"energy " << energy << endl;
232 cout <<
"r " << r << endl;
233 cout <<
"z " << z << endl;
234 cout <<
"phi " << phi << endl;
235 cout <<
"ecore " << ecore << endl;
236 cout <<
"chi2 " << chi2 << endl;
237 cout <<
"prob " << prob << endl;
245 new_cluster->
set_r(r);
246 new_cluster->
set_z(z);
252 new_hcalout_clusters->
AddCluster(new_cluster);
259 cout <<
"process_event: exiting with # original cemc clusters = " << clustersEM3->
size() << endl;
260 cout <<
"process_event: exiting with # new cemc clusters = " << new_cemc_clusters->
size() << endl;
261 cout <<
"process_event: exiting with # original hcalin clusters = " << clustersIH3->size() << endl;
262 cout <<
"process_event: exiting with # new hcalin clusters = " << new_hcalin_clusters->
size() << endl;
263 cout <<
"process_event: exiting with # original hcalout clusters = " << clustersOH3->size() << endl;
264 cout <<
"process_event: exiting with # new hcalout clusters = " << new_hcalout_clusters->
size() << endl;