38 if ( clusters.size() == 1 )
41 if (
_verbose) { std::cout <<
"Number of clusters taken into account: " << clusters.size() <<
std::endl; }
47 std::vector<std::vector<util::PxHit> >
Hits;
49 for (
size_t c=0;
c < clusters.size();
c++)
50 Hits.push_back( clusters.at(
c)->GetHitVector() );
65 for (
size_t c1=0;
c1 < (Hits.size()-1);
c1++){
66 for (
size_t c2=
c1+1; c2 < Hits.size(); c2++){
93 double Tmin = NumTimeSamples;
98 std::vector<float> QprofA(100,0.);
99 std::vector<float> QprofB(100,0.);
104 for(
auto const& hitA : hA) {
105 if(hitA.t > Tmax) Tmax = hitA.t;
106 if(hitA.t < Tmin) Tmin = hitA.t;
108 for(
auto const& hitB : hB) {
109 if(hitB.t > Tmax) Tmax = hitB.t;
110 if(hitB.t < Tmin) Tmin = hitB.t;
114 for(
auto const& hitA : hA){
115 QprofA.at(
int(99*(hitA.t-Tmin)/(Tmax-Tmin)) ) += hitA.charge;
118 for(
auto const& hitB : hB){
119 QprofB.at(
int(99*(hitB.t-Tmin)/(Tmax-Tmin)) ) += hitB.charge;
132 std::cout <<
"Q distribution for Cluster A:" <<
std::endl;
133 for (
size_t b=0;
b < QprofA.size();
b++)
134 if ( QprofA.at(
b) != 0 ) { std::cout <<
b <<
"\t" << QprofA.at(
b) <<
std::endl; }
135 std::cout <<
"Q distribution for Cluster B:" <<
std::endl;
136 for (
size_t b=0;
b < QprofB.size();
b++)
137 if ( QprofB.at(
b) != 0 ) { std::cout <<
b <<
"\t" << QprofB.at(
b) <<
std::endl; }
145 for (
size_t b=0;
b < QprofA.size();
b++){
146 if ( QprofA.at(
b) < QprofB.at(
b) ) { conv += QprofA.at(
b); }
147 else { conv += QprofB.at(
b); }
Class def header for a class CFAlgoChargeDistrib.
Double_t TimeToCm() const
virtual unsigned int NumberTimeSamples() const =0
art::PtrVector< recob::Hit > Hits
QTextStream & endl(QTextStream &s)