#include <CFAlgoChargeDistrib.h>
|
TFile * | _fout |
| TFile pointer to an output file. More...
|
|
bool | _verbose |
| Boolean to choose verbose mode. Turned on if CMergeManager/CMatchManager's verbosity level is >= kPerMerging. More...
|
|
User implementation for CFloatAlgoBase class doxygen documentation!
Definition at line 25 of file CFAlgoChargeDistrib.h.
cmtool::CFAlgoChargeDistrib::CFAlgoChargeDistrib |
( |
| ) |
|
virtual cmtool::CFAlgoChargeDistrib::~CFAlgoChargeDistrib |
( |
| ) |
|
|
inlinevirtual |
Core function: given a set of CPANs, return a float which indicates the compatibility the cluster combination.
Reimplemented from cmtool::CFloatAlgoBase.
Definition at line 23 of file CFAlgoChargeDistrib.cxx.
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++){
art::PtrVector< recob::Hit > Hits
QTextStream & endl(QTextStream &s)
void cmtool::CFAlgoChargeDistrib::Report |
( |
| ) |
|
|
virtual |
Optional function: called after each iterative approach if a manager class is run with verbosity level <= kPerIteration. Maybe useful for debugging.
Reimplemented from cmtool::CMAlgoBase.
Definition at line 79 of file CFAlgoChargeDistrib.cxx.
void cmtool::CFAlgoChargeDistrib::Reset |
( |
void |
| ) |
|
|
virtual |
void cmtool::CFAlgoChargeDistrib::SetDebug |
( |
bool |
on | ) |
|
|
inlineprivate |
void cmtool::CFAlgoChargeDistrib::SetVerbose |
( |
bool |
doit | ) |
|
|
inlineprivatevirtual |
Definition at line 87 of file CFAlgoChargeDistrib.cxx.
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); }
Double_t TimeToCm() const
virtual unsigned int NumberTimeSamples() const =0
QTextStream & endl(QTextStream &s)
bool cmtool::CFAlgoChargeDistrib::_debug |
|
private |
bool cmtool::CFAlgoChargeDistrib::_verbose |
|
private |
The documentation for this class was generated from the following files: