alcap-org / AlcapDAQ

Alcap DAQ
alcap-org.github.io
8 stars 0 forks source link

Question regarding the calibrations #262

Closed dmalexan closed 9 years ago

dmalexan commented 9 years ago

Working on commit hash, develop branch 352341dcf0f173d3cedcda47e878540f5c16158f

I have checked my calibration.db file for th inclusion of pedestal and noise values, time offset and energy calibrations. All are present for the runs I am attempting. When I try to run the production.cfg, I see

TVAnalysedPulseGenerator: WARNING: No calibration data an be found for the 'muSc' channel.  Will continue, but TAPs will not have an energy value filled.

for every analyzed channel. I am also having some problems when I try to run with timeoffset_calib.cfg. In this case, the detector muSc is not even recognized. This does not happen with the pedestalsandnoise.cfg file, but the ge_calib.cfg file does throw a similar exception with regards to the Ge-S channel

Alcap exception was thrown: 
Except::Base::SetupNavigator::InvalidDetector  "muSc"
Backtrace:
 --> rootana: _ZN6Except4BaseC2Ev+0x5f
 --> rootana: _ZN6Except15InvalidDetectorC2EPKc+0x19
 --> rootana: _ZN5alcap2atIN6Except15InvalidDetectorEN3IDs7channelEdEERKT1_RKSt3mapIT0_S5_St4lessIS9_ESaISt4pairIKS9_S5_EEERSD_PKc+0x5e
 --> rootana: _ZNK14SetupNavigator11GetPedestalERKN3IDs7channelE+0x26
 --> rootana: _ZN24FirstCompleteAPGeneratorC2EP19TAPGeneratorOptions+0x11b

I'm trying to figure out where the problem might be stemming from, and why it's selective to these cfg files. Any Ideas?

jrquirk commented 9 years ago
 TVAnalysedPulseGenerator: WARNING: No calibration data an be found for the 'muSc' channel.  Will continue, but TAPs will not have an energy value filled.

This warning arises from missing energy calibration data for a channel in the database. If you're not using it, just ignore it for now. For the scintillators there is no plan for energy calibration. If you're using it, contact @benkrikler for directions to a database with that information or directions for running the calibration.

I am also having some problems when I try to run with timeoffset_calib.cfg. In this case, the detector muSc is not even recognized. This does not happen with the pedestalsandnoise.cfg file, but the ge_calib.cfg file does throw a similar exception with regards to the Ge-S channel

When I run the develop version of production.cfg, timeoffset_calib.cfg, pedestalandnoise.cfg, and ge_calib.cf on

Merlin:~alexander_d/data/tree/tree03563.root

I do not reproduce the problem.

Could you do a full

$ git checkout develop
$ git pull
$ cd AlcapDAQ/analyzer/work/$USER
$ make
$ cd AlcapDAQ/analyzer/rootana
$ make

And then post

  1. The full command you're using to run this
  2. The directions to the calibration file you're using (if you're running on your local machine, could you copy it to merlin, like Merlin:~alexander_d/tmp/calibration.db?)
dmalexan commented 9 years ago

Okay, the error while trying to make the timing offset calibration is currently being replicated on my merlin account, using the calibration db in my $HOME/tmp folder. This one should just have the pedestals and noise calibrations from run 3563. I am running this using the command

./rootana -i $HOME/data/tree/tree03563.root -o $HOME/data/out/out03563.root -m configurations/timeoffset_calib.cfg -c

The calibration.db currently in my rootana folder is a copy of John's which has all the al50b runs in it, including 3563. I am getting the same calibration file error using

./rootana -i $HOME/data/tree/tree03563.root -o $HOME/data/out/out03563.root -m configurations/production.cfg 

Being relatively new at this, I tried using -s to point to the calibration db, but it did not help either (not exactly sure it was meant to).

jrquirk commented 9 years ago

The calibration DB in your $HOME/tmp directory is empty (it has the PedestalAndNoise table, but no entries). However, the one at ~alexander_d/AlcapDAQ/analyzer/rootana/calibration.db has all the entries like you say.

(Also, you shouldn't use the -s option, it's deprecated.)

If I do

$ cd ~alexander_d/AlcapDAQ
$ . thisdaq.sh
$ cd analyzer/rootana
$ ./rootana -i /gpfs/home/alexander_d/data/tree/tree03563.root -o $HOME/data/out/test03563.root -m configurations/timeoffset_calib.cfg -c
<output omitted>
$ ./rootana -i /gpfs/home/alexander_d/data/tree/tree03563.root -o $HOME/data/out/test03563.root -m configurations/production.cfg
<output omitted>

The code does not crash. I run your binary in your rootana directory...

Are you sure you weren't accidentally using the empty calibration database in your tmp folder...?

dmalexan commented 9 years ago

I am also having no crashes runnig either with the calibration database in place. I was using the empty calibration database to run the timeoffset, but getting a crash (it shouldn't have been empty, I had already run the merge script for the pedestal and noise calibration data on it). When running with the calibration db in the folder now, there is no crash. I figured this might be an issue if we're wanting to rebuild the db at some point (guess simply adding to it will be sufficient).

I'm not 100% sure how to check which database is getting loaded, I had assumed it searched the current directory, but I haven't had time to check the code yet. If there is some necessary step to load it, please let me know. As it stands now I am still getting the missing calibration data warnings, though on closer examination, it is not showing up for Ge-S. I suppose that's simply the energy field missing for the other detectors (which are not necessary at this point?)

I suppose that clears up all my concerns. Thank you.

jrquirk commented 9 years ago

I had assumed it searched the current directory

That is correct. The calibration database in the current directory is loaded.

As it stands now I am still getting the missing calibration data warnings, though on closer examination, it is not showing up for Ge-S. I suppose that's simply the energy field missing for the other detectors (which are not necessary at this point?)

If it's the TVAnalyzedPulse generator warning, that's for energy calibrations. If you're not using the energies of those detectors, you're okay. If it's another warning, reopen this issue.