10 #include <TMatrixDfwd.h>
30 file.exceptions(std::ifstream::failbit | std::ifstream::badbit);
41 std::getline(file, line);
44 Float_t CoboNum, asad, aget, channel, pad;
45 Int_t intCoboNum, intpad;
48 std::istringstream iss(line);
49 iss.exceptions(std::ifstream::failbit | std::ifstream::badbit);
50 iss >> CoboNum >> asad >> aget >> channel >> pad;
51 if (CoboNum > 11 && CoboNum < 0)
53 intCoboNum = (int)CoboNum;
64 std::cout <<
"Malformed point in line " << (nLines + 1) <<
"!" << std::endl;
72 std::cout <<
"Successfully read " << nPoints <<
" points in " << nLines <<
" lines!" << std::endl;
79 Double_t fraction, Double_t threshold, Double_t window, Double_t height)
88 fPad_threshold = ((MSB * pow(2, 4) + LSB) / 128) * fraction * 4096;
90 std::cout <<
"==== Parameters for Trigger======" << std::endl;
91 std::cout <<
" === Time Factor: " <<
fTime_factor << std::endl;
92 std::cout <<
" === Trigger Width: " <<
fTrigger_width <<
" us?" << std::endl;
93 std::cout <<
" === Pad Threshold: " <<
fPad_threshold << std::endl;
94 std::cout <<
" === Time Window: " <<
fTime_window <<
" timebuckets" << std::endl;
105 TMatrixD triggerSignal(10, 512);
107 TMatrixD result(10, 512);
112 for (Int_t iHit = 0; iHit < numHits; iHit++) {
129 double trigSignal[512];
131 memset(trigSignal, 0,
sizeof(trigSignal));
149 for (Int_t j = 0; j < 512; j++) {
151 if (trigSignal[j] > 0) {
153 triggerSignal(
fCobo, j) = trigSignal[j];
167 for (Int_t l = 0; l < 512; l++) {
169 fMinIdx = std::max(0, triggerWindow);
172 for (Int_t ll = 0; ll < 10; ll++) {
174 result(ll, 0) =
fCobo;
176 fAccum += triggerSignal(ll, jj);
188 for (Int_t kk = 0; kk < 10; kk++) {
190 for (Int_t k = 0; k < 512; k++) {