6 : theNoiseCalculator(noise_calc), theApvMask(mask_calc), alreadyUsedEvent(
false) {
8 cout <<
"Constructing TT6CommonMode Calculator ..." << endl;
16 cout <<
"Destructing TT6CommonModeCalculator " << endl;
27 for (
unsigned int i = 0;
i < indat.size();
i++) {
47 if (!strip_noise.empty()) {
49 for (
int i = 0;
i < nSet;
i++) {
54 for (
int j = initial;
j <=
final;
j++) {
57 double nWeight = 1 / (strip_noise[
j] * strip_noise[
j]);
58 sumVal += (indat[
j] * nWeight);
63 double avVal = (sumWt) ? sumVal / sumWt : 0.0;
80 if (indat.size() != 128) {
86 for (
int s = 0;
s < 64;
s++)
87 diffVec.push_back(indat[
s + 64] - indat[
s]);
88 std::sort(diffVec.begin(), diffVec.end());
89 slope = (diffVec[31] + diffVec[32]) / 2. / 64.;
std::vector< StripMaskType > MaskType
std::vector< float > PedestalType
virtual ApvAnalysis::PedestalType noise() const =0
std::vector< int > & initialStrips()
void setCM(TkCommonMode *in) override
std::vector< int > & finalStrips()
void calculateCommonMode(ApvAnalysis::PedestalType &)
TkCommonMode * theTkCommonMode
TkNoiseCalculator * theNoiseCalculator
TT6CommonModeCalculator(TkNoiseCalculator *noise_calc, TkApvMask *mask_calc, float sig_cut)
virtual TkCommonModeTopology & topology()
void calculateCMSlope(ApvAnalysis::PedestalType &)
std::vector< float > theCommonModeValues
virtual MaskType mask()=0
ApvAnalysis::PedestalType doIt(const ApvAnalysis::PedestalType &) override
~TT6CommonModeCalculator() override