6 theNoiseCalculator(noise_calc),
8 alreadyUsedEvent(
false)
10 if (
false)
cout <<
"Constructing TT6CommonMode Calculator ..." << endl;
17 if (
false)
cout <<
"Destructing TT6CommonModeCalculator " << endl;
30 for (
unsigned int i=0;
i<indat.size();
i++){
51 if(!strip_noise.empty()) {
53 for (
int i=0;
i<nSet;
i++){
58 for (
int j = initial; j <=
final; j++) {
61 double nWeight = 1/(strip_noise[j]*strip_noise[j]);
62 sumVal += (indat[j]*nWeight);
67 double avVal = (sumWt) ? sumVal/sumWt :0.0;
86 if (indat.size() != 128) {
92 for(
int s=0;
s<64;
s++) diffVec.push_back(indat[
s+64]-indat[
s]);
94 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