Back to home page

Project CMSSW displayed by LXR

 
 

    


File indexing completed on 2021-02-14 14:30:10

0001 #include "SimMuon/CSCDigitizer/src/CSCAnalogSignal.h"
0002 #include <algorithm>
0003 #include <iostream>
0004 
0005 // =================================
0006 float CSCAnalogSignal::peakTime() const {
0007   size_t imax = std::max_element(theBinValues.begin(), theBinValues.end()) - theBinValues.begin();
0008   return imax / invBinSize + theTimeOffset;
0009 }
0010 
0011 std::ostream &operator<<(std::ostream &stream, const CSCAnalogSignal &signal) {
0012   stream << "CSCAnalogSignal: Element " << signal.theElement << "   Total " << signal.theTotal << std::endl;
0013   for (int i = 0; i < int(signal.theBinValues.size()); ++i) {
0014     //@@ ptc 26-Feb-02 Don't both with very small amplitudes
0015 
0016     if (signal.theBinValues[i] > 1.E-10) {
0017       stream << i * signal.getBinSize() + signal.getTimeOffset() << "\t" << signal.theBinValues[i] << std::endl;
0018     }
0019   }
0020   return stream;
0021 }