TCAL Calibration Engine D. Kresan GSI, Darmstadt
Purpose Give an overview on how to use, showing simplified extracted code Followed by practical exercise with Ralf Plag on Mapped2Cal conversion 2nd R3BRoot Development Workshop March 7 - 9, 2017 D.Kresan TCAL Calibration Engine 2
Not to duplicate the code Multiple detectors use the same algorithm for Create one implementation in a library, easy to time calibration use and reliable With extra functionality to allow “human-like” operations on a binary ROOT file 2nd R3BRoot Development Workshop March 7 - 9, 2017 D.Kresan TCAL Calibration Engine 3
Usage in calibration task: 2 Stages I. Mapped2CalPar II. Mapped2Cal 2nd R3BRoot Development Workshop March 7 - 9, 2017 D.Kresan TCAL Calibration Engine 4
I. Calculate parameters: Mapped2CalPar 1. Create parameter container Init() 2. Fill TDC values Exec() // Event loop 3. Calculate calibration parameters FinishTask() 2nd R3BRoot Development Workshop March 7 - 9, 2017 D.Kresan TCAL Calibration Engine 5
1. Init() fCal_Par = (R3BTCalPar*) FairRuntimeDb::instance()->getContainer( // Create parameter "LandTCalPar"); // container fCal_Par->setChanged(); // Create TCAL engine fEngine = new R3BTCalEngine(fCal_Par, fMinStats); 2nd R3BRoot Development Workshop March 7 - 9, 2017 D.Kresan TCAL Calibration Engine 6
2. Exec() // Loop over mapped data { fEngine->Fill(iPlane, iPaddle, iSide, hit->GetTacData()); // Stores TDC value of current module } 2nd R3BRoot Development Workshop March 7 - 9, 2017 D.Kresan TCAL Calibration Engine 7
3. FinishTask() fEngine->CalculateParamTacquila(); // Calculate and store parameters, assuming Tacquila electronics or // VFTX electronics fEngine->CalculateParamVFTX(); 2nd R3BRoot Development Workshop March 7 - 9, 2017 D.Kresan TCAL Calibration Engine 8
II. Apply parameters: Mapped2Cal 1. Read parameters SetParContainers() 2. Apply them for calculation of time [ns] Exec() 2nd R3BRoot Development Workshop March 7 - 9, 2017 D.Kresan TCAL Calibration Engine 9
1. SetParContainers() fCal_Par = (R3BTCalPar*) // Get pointer to parameters FairRuntimeDb::instance()->getContainer( "LandTCalPar"); 2nd R3BRoot Development Workshop March 7 - 9, 2017 D.Kresan TCAL Calibration Engine 10
2. Exec() // Loop over mapped data { R3BTCalModulePar* par = // Get parameters for the current module fCal_Par->GetModuleParAt(iPlane, iPaddle, iSide); // Get time for the TDC channel Double_t time = par->GetTimeVFTX(tdc); } 2nd R3BRoot Development Workshop March 7 - 9, 2017 D.Kresan TCAL Calibration Engine 11
Insight 2nd R3BRoot Development Workshop March 7 - 9, 2017 D.Kresan TCAL Calibration Engine 12
Open the ROOT file with parameters Create new instance of TBrowser and navigate to the file Right-click on the object (name which was used in getContainer(“...”)) for context menu 2nd R3BRoot Development Workshop March 7 - 9, 2017 D.Kresan TCAL Calibration Engine 13
Available functions printParams // Dump values for all modules PrintModuleParams … plane, paddle, side // Dump values for a specific module DrawModuleParams … plane, paddle, side // Display values graphically on a canvas 2nd R3BRoot Development Workshop March 7 - 9, 2017 D.Kresan TCAL Calibration Engine 14
Advanced One can manually change value for a specific module in some (range of) channel(s) Instructions here: Restricted document “Manually edit ROOT time calibration parameters” on the r3broot website 2nd R3BRoot Development Workshop March 7 - 9, 2017 D.Kresan TCAL Calibration Engine 15
Recommend
More recommend