6 theNoiseCalculator(noise_calc),
8 alreadyUsedEvent(
false)
10 if (0)
cout <<
"Constructing TT6CommonMode Calculator ..." << endl;
17 if (0)
cout <<
"Destructing TT6CommonModeCalculator " << endl;
27 calculateCommonMode(indat);
29 if(theCommonModeValues.size() >0) {
30 for (
unsigned int i=0;
i<indat.size();
i++){
31 setNumber = theTkCommonMode->topology().setOfStrip(
i);
32 out.push_back(indat[
i] - theCommonModeValues[setNumber]);
51 if(strip_noise.size() > 0) {
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
std::vector< int > & initialStrips()
std::vector< int > & finalStrips()
virtual ApvAnalysis::PedestalType noise() const =0
void calculateCommonMode(ApvAnalysis::PedestalType &)
TkCommonMode * theTkCommonMode
TkNoiseCalculator * theNoiseCalculator
virtual ~TT6CommonModeCalculator()
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
void setCM(TkCommonMode *in)
ApvAnalysis::PedestalType doIt(const ApvAnalysis::PedestalType &)