From: Michael Traxler Date: Mon, 17 Oct 2022 14:23:06 +0000 (+0200) Subject: local setup (trb84) settings, mt X-Git-Url: https://jspc29.x-matter.uni-frankfurt.de/git/?a=commitdiff_plain;h=7cfe7e3be81d01296fdd82fc03c93e2d3ad83177;p=daqtools.git local setup (trb84) settings, mt --- diff --git a/users/gsi_ee_trb84/db/addresses_dirich5s.db b/users/gsi_ee_trb84/db/addresses_dirich5s.db index 3060a0e..644dffe 100644 --- a/users/gsi_ee_trb84/db/addresses_dirich5s.db +++ b/users/gsi_ee_trb84/db/addresses_dirich5s.db @@ -6,5 +6,7 @@ 0x1401 001 1 0x1402 025 1 -0x1403 004 1 -0x1404 003 1 +0x1403 003 1 +0x1404 004 1 +0x1410 010 1 +0x1417 017 1 diff --git a/users/gsi_ee_trb84/db/addresses_dirich_concentrator.db b/users/gsi_ee_trb84/db/addresses_dirich_concentrator.db index 90bdf9e..ffe3b78 100644 --- a/users/gsi_ee_trb84/db/addresses_dirich_concentrator.db +++ b/users/gsi_ee_trb84/db/addresses_dirich_concentrator.db @@ -17,3 +17,4 @@ #0x8410 110 0 #0x8333 033 0 +0x8305 041 0 diff --git a/users/gsi_ee_trb84/db/addresses_trb3.db b/users/gsi_ee_trb84/db/addresses_trb3.db index 3366eaf..2c92e8c 100644 --- a/users/gsi_ee_trb84/db/addresses_trb3.db +++ b/users/gsi_ee_trb84/db/addresses_trb3.db @@ -5,17 +5,17 @@ # 0x1234 14 0 #CTS -0x0840 84 0 +0x8840 84 0 0x8841 84 1 # hub -0x0842 84 2 -0x0843 84 3 +0x1842 84 2 +0x1843 84 3 0xc001 84 5 #slave -0x0610 61 0 -0x0611 61 1 -0x0612 61 2 -0x0613 61 3 +0x8610 61 0 +0x8611 61 1 +0x1612 61 2 +0x1613 61 3 0x8610 61 5 #slave diff --git a/users/gsi_ee_trb84/db/register_configtdc.db b/users/gsi_ee_trb84/db/register_configtdc.db index e57d349..95ff983 100644 --- a/users/gsi_ee_trb84/db/register_configtdc.db +++ b/users/gsi_ee_trb84/db/register_configtdc.db @@ -30,7 +30,7 @@ #0xfe62 0 0x50003000 0x80640064 0x00000000 0x00000000 0x00000078 0x00000000 # trb3sc 0xfe71 0 0x50003000 0x80640064 0x00000000 0x00000000 0x00000078 0x00000000 # trb3sc padiwa 4Conn backplane #0xfe51 0 0x50003000 0x00640064 0x00000000 0x00000000 0x00000078 0x00000000 # dirich -0xfe57 0 0x50003000 0x00640064 0x00000000 0x00000000 0x00000078 0x00000000 # dirich5s +0xfe57 0 0x50003000 0x00640064 0x000000ff 0x00000000 0x00000010 0x00000000 # dirich5s diff --git a/users/gsi_ee_trb84/first.C b/users/gsi_ee_trb84/first.C index c497477..9696fa7 100644 --- a/users/gsi_ee_trb84/first.C +++ b/users/gsi_ee_trb84/first.C @@ -22,7 +22,7 @@ void first() // 2 - falling edge fully independent // 3 - falling uses calibration from rising edge // 4 - use common statistic for both rising and falling edge - hadaq::TrbProcessor::SetDefaults(65, 2); + hadaq::TrbProcessor::SetDefaults(33, 2); hadaq::TdcProcessor::SetTriggerDWindow(-5, 70); // hadaq::TdcProcessor::SetToTRange(30, 50, 80); @@ -32,7 +32,7 @@ void first() // [min..max] range for HUB ids - hadaq::TrbProcessor::SetHUBRange(0x0840, 0x0840); + hadaq::TrbProcessor::SetHUBRange(0x8000, 0x8FFF); // Histogramming for ToT: first: nr. of bins, 2nd: TOT range hadaq::TdcProcessor::SetDefaults(600, 1000); @@ -43,7 +43,7 @@ void first() const char* calname = getenv("CALNAME"); - if ((calname==0) || (*calname==0)) calname = "test_"; + if ((calname==0) || (*calname==0)) calname = "cal_150MHz_"; const char* calmode = getenv("CALMODE"); int cnt = (calmode && *calmode) ? atoi(calmode) : 100000; //cnt=100000; @@ -70,7 +70,7 @@ void first() // (1 << 0xD) - special 0XD trigger with internal pulser, used also for TOT calibration // 0x3FFF - all kinds of trigger types will be used for calibration (excluding 0xE and 0xF) // 0x80000000 in mask enables usage of temperature correction - hld->ConfigureCalibration("test", 1e6 , (1 << 0xD)); + hld->ConfigureCalibration(calname, cnt , (1 << trig)); // only accept trigger type 0x1 when storing file // new hadaq::HldFilter(0x1); @@ -82,7 +82,7 @@ void first() // 1 - std::vector - includes original TDC message // 2 - std::vector - compact form, without channel 0, stamp as float (relative to ch0) // 3 - std::vector - compact form, with channel 0, absolute time stamp as double - base::ProcMgr::instance()->SetStoreKind(2); + base::ProcMgr::instance()->SetStoreKind(1); // when configured as output in DABC, one specifies: @@ -124,13 +124,31 @@ extern "C" void after_create(hadaq::HldProcessor* hld) tdc->SetUseLastHit(false); + // needed if tdc-ToT values are larger 60ns + // arguments: delay, range (min, max) + // DiRICH has a 20ns calibration pulse width + // but it assumes a 312.5MHz Oscillator on it + // The DiRICH5s1 has a 200MHz Calibration Oscillator + // This gives a factor of 1.5625, so the calibration pulse has a length of + // 31.25ns + //tdc->SetToTRange(31.25, 40, 70); + + // in new dirich5s design the correct PLL is included, so no correction necessary! + + //tdc->SetStoreEnabled(); for (unsigned nch=1; nchNumChannels(); nch++) { //if(nch!=48) { - tdc->SetRefChannel(nch, nch-1, 0xffff, 100000, -50., 50.); + //tdc->SetRefChannel(nch, nch-1, 0xffff, 100000, -50., 50.); //} } + tdc->SetRefChannel(3, 7, 0x1417, 100000, -20.1, 20.); + tdc->SetRefChannel(4, 6, 0x1410, 100000, -20.1, 20.); + tdc->SetRefChannel(5, 7, 0x1417, 100000, -20.1, 20.); + tdc->SetRefChannel(6, 8, 0x1417, 100000, -20.1, 20.); + //tdc->SetRefChannel(0, 0, 0x1410, 100000, -500000.1, 500000.); + //tdc->SetRefChannel(48, 39, 0xffff, 18000, -50., 50.); // for (unsigned j=10; j<33; j++) { // tdc->SetRefChannel(j, 1, 0xffff, 10000, -40., 40.); diff --git a/users/gsi_ee_trb84/second.C b/users/gsi_ee_trb84/second.C index 84372ab..606a168 100644 --- a/users/gsi_ee_trb84/second.C +++ b/users/gsi_ee_trb84/second.C @@ -141,8 +141,8 @@ void second() // uncomment line to create tree for the events storage // base::ProcMgr::instance()->CreateStore("file.root"); - // new DebugProc("Debug1", "TDC_16F7"); - - new PrintProc("Print", "TDC_16EB"); + //new DebugProc("Debug1", "TDC_1417"); + + //new PrintProc("Print1", "TDC_1417"); } diff --git a/users/gsi_ee_trb84/startup.sh b/users/gsi_ee_trb84/startup.sh index 9e7dad5..81c2b74 100755 --- a/users/gsi_ee_trb84/startup.sh +++ b/users/gsi_ee_trb84/startup.sh @@ -38,6 +38,7 @@ merge_serial_address.pl $DAQ_TOOLS_PATH/base/serials_dirich_concentrator.db $USE merge_serial_address.pl $DAQ_TOOLS_PATH/base/serials_farich_concentrator.db $USER_DIR/db/addresses_farich_concentrator.db merge_serial_address.pl $DAQ_TOOLS_PATH/base/serials_farich.db $USER_DIR/db/addresses_farich.db merge_serial_address.pl $DAQ_TOOLS_PATH/base/serials_dirich5s.db $USER_DIR/db/addresses_dirich5s.db +merge_serial_address.pl $DAQ_TOOLS_PATH/base/serials_trb5sc.db $USER_DIR/db/addresses_trb5sc.db #echo "disable port 6 on hub 0x8841" #trbcmd clearbit 0x8841 0xc0 0x40 @@ -93,7 +94,7 @@ trbcmd w 0xfffe 0xc5 0x50ff echo "pulser" # pulser #0 to 10 kHz -trbcmd w 0xc001 0xa158 0x000007cf # set pulser frequency to 50kHz +trbcmd w 0xc001 0xa158 0x00004b4 # set pulser frequency to 50kHz #trbcmd w 0xc001 0xa150 0x0022270f echo "trigger type"