Skip to content

Commit

Permalink
Merge pull request #65 from Mu2e/pasha.gr3
Browse files Browse the repository at this point in the history
- get rid of adc_1
  • Loading branch information
ron003 authored Feb 10, 2025
2 parents d5982a1 + 115844c commit ab2ea19
Show file tree
Hide file tree
Showing 2 changed files with 27 additions and 27 deletions.
50 changes: 25 additions & 25 deletions otsdaq-mu2e-tracker/ArtModules/TrackerDQM_module.cc
Original file line number Diff line number Diff line change
Expand Up @@ -217,28 +217,28 @@ TrackerDQM::TrackerDQM(art::EDAnalyzer::Table<Config> const& conf) :
//-----------------------------------------------------------------------------
// TS1: compared to _0, swap lanes 3 and 4, and in the new lane3 swap lines 1 and 3
//-----------------------------------------------------------------------------
int adc_index_1[96] = {
91, 85, 79, 73, 67, 61, 55, 49,
43, 37, 31, 25, 19, 13, 7, 1,
90, 84, 78, 72, 66, 60, 54, 48,
// int adc_index_1[96] = {
// 91, 85, 79, 73, 67, 61, 55, 49,
// 43, 37, 31, 25, 19, 13, 7, 1,
// 90, 84, 78, 72, 66, 60, 54, 48,

42, 36, 30, 24, 18, 12, 6, 0,
93, 87, 81, 75, 69, 63, 57, 51,
45, 39, 33, 27, 21, 15, 9, 3,
// 42, 36, 30, 24, 18, 12, 6, 0,
// 93, 87, 81, 75, 69, 63, 57, 51,
// 45, 39, 33, 27, 21, 15, 9, 3,

94, 88, 82, 76, 70, 64, 58, 52,
46, 40, 34, 28, 22, 16, 10, 4,
95, 89, 83, 77, 71, 65, 59, 53,
// 94, 88, 82, 76, 70, 64, 58, 52,
// 46, 40, 34, 28, 22, 16, 10, 4,
// 95, 89, 83, 77, 71, 65, 59, 53,

44, 38, 32, 26, 20, 14, 8, 2,
92, 86, 80, 74, 68, 62, 56, 50,
47, 41, 35, 29, 23, 17, 11, 5
};
// 44, 38, 32, 26, 20, 14, 8, 2,
// 92, 86, 80, 74, 68, 62, 56, 50,
// 47, 41, 35, 29, 23, 17, 11, 5
// };


for (int i=0; i<96; i++) {
_adc_index_0[adc_index_0[i]] = i;
_adc_index_1[adc_index_1[i]] = i;
// _adc_index_1[adc_index_1[i]] = i;
}

//-----------------------------------------------------------------------------
Expand Down Expand Up @@ -351,7 +351,7 @@ void TrackerDQM::book_roc_histograms(art::TFileDirectory* Dir, int RunNumber, Ro
Hist->eflg_vs_evt = Dir->make<TH1F>("eflg_vs_evt", Form("run %06i: link %02i:%i:%i eflag vs evt" ,RunNumber,Station,Dtc,Link), 1000, 0., 5000000.);

Hist->nh_vs_ch = Dir->make<TH2F>("nh_vs_ch" , Form("run %06i: link %02i:%i:%i nh vs ch" ,RunNumber,Station,Dtc,Link), 100,0.,100., 50,0,50);
Hist->nh_vs_adc1 = Dir->make<TH2F>("nh_vs_adc1", Form("run %06i: link %02i:%i:%i nh vs adc" ,RunNumber,Station,Dtc,Link), 100,0.,100., 50,0,50);
Hist->nh_vs_adc0 = Dir->make<TH2F>("nh_vs_adc0", Form("run %06i: link %02i:%i:%i nh vs adc" ,RunNumber,Station,Dtc,Link), 100,0.,100., 50,0,50);

Hist->dt0r_vs_ch = Dir->make<TH2F>("dt0r_vs_ch_0", Form("run %06i: link %02i:%i:%i dt0r vs ch[0]",RunNumber,Station,Dtc,Link), 100,0.,100.,2500,-25,25);
Hist->dt1r_vs_ch = Dir->make<TH2F>("dt1r_vs_ch_0", Form("run %06i: link %02i:%i:%i dt1r vs ch[0]",RunNumber,Station,Dtc,Link), 100,0.,100.,2500,-25,25);
Expand All @@ -360,8 +360,8 @@ void TrackerDQM::book_roc_histograms(art::TFileDirectory* Dir, int RunNumber, Ro
Hist->dt1r01 = Dir->make<TH1F>("dt1r01", Form("run %06i: link %02i:%i:%i dt1r01" ,RunNumber,Station,Dtc,Link), 40000,-20000,20000);

Hist->nhits_vs_ich = Dir->make<TH1F>("nh_vs_ich" , Form("run %06i: link %02i:%i:%i nh vs ich" ,RunNumber,Station,Dtc,Link), 100, 0., 100.);
Hist->nhits_vs_adc[0] = Dir->make<TH1F>("nh_vs_adc_0", Form("run %06i: link %02i:%i:%i nh vs adc_0" ,RunNumber,Station,Dtc,Link), 100, 0., 100.);
Hist->nhits_vs_adc[1] = Dir->make<TH1F>("nh_vs_adc_1", Form("run %06i: link %02i:%i:%i nh vs adc_1" ,RunNumber,Station,Dtc,Link), 100, 0., 100.);
Hist->nhits_vs_adc = Dir->make<TH1F>("nh_vs_adc", Form("run %06i: link %02i:%i:%i nh vs adc" ,RunNumber,Station,Dtc,Link), 100, 0., 100.);
// Hist->nhits_vs_adc[1] = Dir->make<TH1F>("nh_vs_adc_1", Form("run %06i: link %02i:%i:%i nh vs adc_1" ,RunNumber,Station,Dtc,Link), 100, 0., 100.);

Hist->dt0rc_vs_ch[0] = Dir->make<TH2F>("dt0rc_vs_ch_0", Form("run %06i: link %02i:%i:%i dt0rc vs ch[0], ns",RunNumber,Station,Dtc,Link), 100,0.,100.,1000,-10,10);
Hist->dt0rc_vs_ch[1] = Dir->make<TH2F>("dt0rc_vs_ch_1", Form("run %06i: link %02i:%i:%i dt0rc vs ch[1], ns",RunNumber,Station,Dtc,Link), 100,0.,100.,1000,-10,10);
Expand Down Expand Up @@ -611,7 +611,7 @@ void TrackerDQM::fill_roc_histograms(RocHist_t* Hist, RocData_t* Rd) {
hch->nhits->Fill(nh);
if (nh == 0) continue;

int fpga = _adc_index_1[ich] / 48;
int fpga = _adc_index_0[ich] / 48;
hch->dt0r->Fill(chd->dt0r);
hch->dt1r->Fill(chd->dt1r);

Expand All @@ -621,7 +621,7 @@ void TrackerDQM::fill_roc_histograms(RocHist_t* Hist, RocData_t* Rd) {
Hist->dt0rc_vs_ch[fpga]->Fill(ich,chd->dt0r_c);
Hist->dt1rc_vs_ch[fpga]->Fill(ich,chd->dt1r_c);

int iadc = _adc_index_1[ich];
int iadc = _adc_index_0[ich];
Hist->dt0rc_vs_adc[fpga]->Fill(iadc,chd->dt0r_c);
Hist->dt1rc_vs_adc[fpga]->Fill(iadc,chd->dt1r_c);
//-----------------------------------------------------------------------------
Expand Down Expand Up @@ -736,17 +736,17 @@ void TrackerDQM::fill_roc_histograms(RocHist_t* Hist, RocData_t* Rd) {
//-----------------------------------------------------------------------------
for (int ich=0; ich<kNChannels; ich++) {
int ind_0 = _adc_index_0[ich];
int ind_1 = _adc_index_1[ich];
// int ind_1 = _adc_index_1[ich];

int nh = Rd->channel[ich].nhits();
// number of hits in a channel vs the channel number
Hist->nh_vs_ch->Fill(ich,nh);
Hist->nh_vs_adc1->Fill(ind_1,nh);
Hist->nh_vs_adc0->Fill(ind_0,nh);

for (int ihit=0; ihit<nh; ihit++) {
Hist->nhits_vs_ich->Fill(ich);
Hist->nhits_vs_adc[0]->Fill(ind_0);
Hist->nhits_vs_adc[1]->Fill(ind_1);
Hist->nhits_vs_adc->Fill(ind_0);
// Hist->nhits_vs_adc[1]->Fill(ind_1);
}
}
}
Expand Down Expand Up @@ -1357,7 +1357,7 @@ void TrackerDQM::analyze_roc_data(RocDataHeaderPacket_t* Dh, RocData_t* Rd) {
ChannelData_t* chd = &Rd->channel[i];

int nh = chd->nhits();
int fpga = _adc_index_1[i] / 48;
int fpga = _adc_index_0[i] / 48;

ChannelData_t* rch = ref_ch[fpga];
//-----------------------------------------------------------------------------
Expand Down
4 changes: 2 additions & 2 deletions otsdaq-mu2e-tracker/ArtModules/TrackerDQM_module.hh
Original file line number Diff line number Diff line change
Expand Up @@ -279,7 +279,7 @@ class TrackerDQM : public art::EDAnalyzer {
TH1F* eflg_vs_evt;

TH2F* nh_vs_ch;
TH2F* nh_vs_adc1;
TH2F* nh_vs_adc0;

TH2F* dt0r_vs_ch;
TH2F* dt1r_vs_ch;
Expand All @@ -295,7 +295,7 @@ class TrackerDQM : public art::EDAnalyzer {
TH2F* dt1rc_vs_adc[2];

TH1F* nhits_vs_ich;
TH1F* nhits_vs_adc[2];
TH1F* nhits_vs_adc;

TProfile* fs_vs_ich;
TProfile* bl_vs_ich;
Expand Down

0 comments on commit ab2ea19

Please sign in to comment.