21 ISvcLocator* svcLocator = Gaudi::svcLocator();
23 if (
sc.isFailure()) std::cout <<
"CscAverage::Fail to locate Message Service" << std::endl;
27 MsgStream mLog(
m_msgSvc,
"CscAverage");
31 bool cluster_found =
false;
32 std::map<unsigned int, std::vector<int> >
clusters;
33 unsigned int NClusters = 1;
41 for (
int is = 0; is < L; ++is) {
45 }
else if (cluster_found) {
46 cluster_found =
false;
54 for (std::map<
unsigned int, std::vector<int> >::const_iterator
ic =
clusters.begin();
ic !=
clusters.end(); ++
ic) {
62 double maxPos = -1000.0;
66 for (std::vector<int>::const_iterator
d = (*ic).second.begin();
d != (*ic).second.end(); ++
d) {
67 if (qstr[*
d] > maxCharge) {
75 if (
i >= 0 &&
i < L) {
77 sum += da * (
i + 0.5 - L / 2) *
w;
83 if (tcharge > 0)
avg =
sum / tcharge;
109 *(zpos + (*ic).first - 1) =
avg;
110 if (
count > 1 && tcharge > 0)
111 *(
sig + (*ic).first - 1) =
noise * (da / (tcharge)) * sqrt(2.0 * tcharge2);
113 *(
sig + (*ic).first - 1) = da / sqrt(12.0);
114 if (L < 92) *(
sig + (*ic).first - 1) = da / sqrt(12.0);