24 NumEvents =
new TH1D(Form(
"InttNumEvents"), Form(
"InttNumEvents"), 1, 0, 1);
33 const char *inttcalib = getenv(
"INTTCALIB");
36 std::cout <<
"INTTCALIB environment variable not set" << std::endl;
40 std::ifstream calib(fullfile);
46 rng =
new TRandom(1234);
74 for(pid = 3001; pid < 3009; ++
pid)
81 N = p->
iValue(0,
"NR_HITS");
86 for(n = 0; n <
N; ++
n)
88 felix_channel = p->
iValue(n,
"FEE");
95 indexes.
arm = (felix / 4) % 2;
96 indexes.
chp = p->
iValue(n,
"CHIP_ID") % 26;
110 std::cout <<
"n: " << n << std::endl;
111 std::cout <<
"bin: " << bin << std::endl;
112 std::cout <<
"lyr: " << indexes.
lyr << std::endl;
113 std::cout <<
"ldr: " << indexes.
ldr << std::endl;
114 std::cout <<
"arm: " << indexes.
arm << std::endl;
115 std::cout <<
"chp: " << indexes.
chp << std::endl;
116 std::cout <<
"chn: " << indexes.
chn << std::endl;
117 std::cout <<
"adc: " << indexes.
adc << std::endl;
121 HitMap->AddBinContent(bin);
152 var_name =
"intt_evtcnt";
177 int hits =
rng->Poisson(16);
178 for(
int hit = 0; hit < hits; ++hit)
186 indexes.
arm = felix / 4;
198 HitMap->SetBinContent(bin,
HitMap->GetBinContent(bin) + 1);
201 printf(
"Layer:%2d\tLadder:%3d (%s)\tChip:%3d\tChannel:%4d\n", indexes.
lyr, indexes.
ldr, indexes.
arm ?
"North" :
"South", indexes.
chp, indexes.
chn);
210 int felix_channel = 0;
211 int gelix_channel = -1;
224 std::cout <<
"Round trip failed" << std::endl;
225 std::cout <<
"bin: " << b <<
" -> " << c << std::endl;
226 std::cout <<
"felix_channel: " << felix_channel <<
" -> " << gelix_channel << std::endl;
227 std::cout <<
"chp: " << indexes.
chp <<
" -> " << jndexes.
chp << std::endl;
228 std::cout <<
"chn: " << indexes.
chn <<
" -> " << jndexes.
chn << std::endl;
229 std::cout <<
"adc: " << indexes.
adc <<
" -> " << jndexes.
adc << std::endl;
252 std::cout <<
"Felix Round trip worked" << std::endl;