6 theNoiseCalculator(noise_calc),
8 alreadyUsedEvent(
false)
10 if (0)
cout <<
"Constructing TT6CommonMode Calculator ..." << endl;
17 if (0)
cout <<
"Destructing TT6CommonModeCalculator " << endl;
26 calculateCommonMode(indat);
28 if(theCommonModeValues.size() >0) {
29 for (
unsigned int i=0;
i<indat.size();
i++){
30 setNumber = theTkCommonMode->topology().setOfStrip(
i);
31 out.push_back(indat[
i] - theCommonModeValues[setNumber]);
50 if(strip_noise.size() > 0) {
52 for (
int i=0;
i<nSet;
i++){
57 for (
int j = initial;
j <=
final;
j++) {
60 double nWeight = 1/(strip_noise[
j]*strip_noise[
j]);
61 sumVal += (indat[
j]*nWeight);
66 double avVal = (sumWt) ? sumVal/sumWt :0.0;
85 if (indat.size() != 128) {
91 for(
int s=0;
s<64;
s++) diffVec.push_back(indat[
s+64]-indat[
s]);
93 slope = (diffVec[31]+diffVec[32])/2./64.;
std::vector< StripMaskType > MaskType
std::vector< float > PedestalType
std::vector< int > & initialStrips()
ApvAnalysis::PedestalType doIt(ApvAnalysis::PedestalType)
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)