-- WagnerDePaulaCarvalho - 2022-05-31

CTPPS Database (Revised)

This page contains the information for the development of the CmsTotemPrecisionProtonSpectrometer (CTPPS) online and offline.

General Information

People Involved

  • Clemencia MORA HERRERA -- offline conditions
  • Helena MALBOUISSON -- offline conditions
  • Umesh JOSHI -- online conditions
  • Diego Figueiredo
  • Wagner Carvalho
  • Laurent Forthomme

With support from:

  • Valdas Rapsevicius
  • Jan Kaspar (Proton Reco)
  • Leszek Grzanka
  • Valentina Avati (Offline SW)
  • Fabrizio Ferro (Offline SW)
  • Fabio Ravera (Pixels)
  • Enrico Robutti (Pixels)
  • Andrea Bellora (Pixels)
  • Antonio Vilela Pereira (Protons POG)
  • Helio Nogima
  • Gabrielle Hugo (Geometry DD4hep)
  • Carl Vuolsalo (Geometry DD4hep)
  • Ianna Osborne (Geometry DB)
  • Gustavo Silveira (Geometry PPS)

Content Requirements

The CTPPS database should store the information related to :

  • Roman pot postitions (raw and distance to beampipe center) (wip) %COMPLETE2%
  • Roman pot alignment corrections %COMPLETE5% NEW
  • DAQ mapping and information %COMPLETE5%
  • LHC optics (wip) %COMPLETE3%
  • Beam conditions (wip) %COMPLETE3%
  • Calibration constants (gains and pedestals for pixels)%COMPLETE5%
  • Timing calibration parameters %COMPLETE5% NEW

Offline Condition Classes Development

We are following the step-by-step instructions from 2 tutorials SWGuideCondObjectsTutorial and SWGuideCondSystemLayout.

  • The detailed directory layout in the Cond system is shown in the following table:
    Subsystem Package directory content owner
    CondFormats CTPPSObjects interface persistent object definition [objectname].h this object
    src persistent object implementation [objectname].cc(if necessary) this object
    src T_EventSetup_[objectName].cc EventSetup data registration macro this object
    src classes.h dictionary include file this task
    src classes_def.xml dictionary generator selection file this task
    DataRecord interface/src EventSetup record registrations all tasks
    CondCore CTPPSPlugins interface None  
    plugins src plugin.cc EventSetup data proxy registration macros this task
    Utilities src CondDBFetch.cc, CondDBImport.cc, CondFormats.h all tasks

  • ATTENTIONALERT!: Notice that in order to register the data object to the event setup system in src/T_EventSetup_[classname].cc, the statement changed from what is in the SWGuideCondSystemLayout tutorial. For example for pixel gain calibrations:

    #include "CondFormats/PPSObjects/interface/CTPPSPixelGainCalibrations.h"
    #include "FWCore/Utilities/interface/typelookup.h"
    TYPELOOKUP_DATA_REG(CTPPSPixelGainCalibrations);
   

PPS Conditions

Overview

Summary table showing the PPS conditions record/label names:

Record Class Label
CTPPSPixelAnalysisMaskRcd CTPPSPixelAnalysisMask -
CTPPSPixelDAQMappingRcd CTPPSPixelDAQMapping -
CTPPSPixelGainCalibrationsRcd CTPPSPixelGainCalibrations -
PPSTimingCalibrationRcd PPSTimingCalibration PPSDiamondTimingCalibration
PPSTimingCalibrationRcd PPSTimingCalibration TotemTimingCalibration
PPSTimingCalibrationRcd PPSTimingCalibration PPSDiamondSampicCalibration
PPSTimingCalibrationLUTRcd PPSTimingCalibrationLUT -
CTPPSRPAlignmentCorrectionsDataRcd CTPPSRPAlignmentCorrectionsData -
PPSAlignmentConfigurationRcd PPSAlignmentConfiguration -
PPSAlignmentConfigurationRcd PPSAlignmentConfiguration reference
PPSAssociationCutsRcd PPSAssociationCuts -
VeryForwardIdealGeometryRecord PDetGeomDesc -
CTPPSOpticsRcd LHCOpticalFunctionsSetCollection -
LHCInfoRcd LHCInfo -

With only two exceptions, all the above classes are defined/implemented in the CondFormats/PPSObjects package of CMSSW. The exceptions are PDetGeomDesc defined/implemented in CondFormats/GeometryObjects and LHCInfo managed by the AlCaDB group and defined/implemented in CondFormats/RunInfo.

The records are all defined/implemented in CondFormats/DataRecord with the single exception of VeryForwardIdealGeometryRecord, defined/implemented in Geometry/Records.

CTPPSPixelGainCalibrations

History

Documentation table for tags: CTPPSPixelGainCalibrations.

Building software

To be added.

Recipe for Zero-level testing of sqlite before uploading to prod

  1. - set up a working dir with the latest sw release, 940pre2 or newer
  2. - look for a run where the pots were inserted and that falls in the IOV you want to test
  3. - prepare a python (see eg. ~fabferro/WORKSPACE/public/run_only_CTPPS_cfg_CLU_REC_DAQ_TRK_305044.py) to run the full CTPPS reconstruction with the “old” conditions and run it
  4. - modify the python to run the full CTPPS reconstruction with the new conditions and run it (modifying only the DB part). Check if it runs properly (no crashes, no error messages)
  5. - check that the Clusterizer leaves in the two root files give different but reasonably similar results. Just compare some of the distributions. They should be very similar but not 1:1.

Recipe for checking content of payload in DB

These are the instructions to "dump" the information saved about PPS Pixel Gains and Pedestals in the DB to a root file containing 2D histograms of the pedestals and gains for each plane.

  1. Setup an environment with CMSSW_10_5_X_2019-02-07-2300 or above
  2. Get the package
     git cms-addpkg CondTools/CTPPS
    
  3. Go to CondTools/CTPPS/test
  4. Execute (choose the sqlite file, runnumber and tag name as appropriate) :
      cmsRun retrieve_sqlite_PixGainCalib_cfg.py ctppspixgains.db CTPPSPixelGainCalibrations_v23Jun18 309100  output_v23Jun18.root 
  5. Check the output_v23Jun18.root file which contains a 2d histogram of gains and another of pedestals for each detId (i.e. per detector plane)

CTPPSDAQMapping and CTPPSAnalysisMask

History

Documentation table for tags: CTPPSDAQMapping

Documentation table for tags: CTPPSAnalysisMask

Building software

The configuration file to produce both conditions, DAQ mapping and analysis mask, for the pixel detectors is

CondTools/CTPPS/test/write-ctpps-pixel-daqmap_cfg.py

which loads

CalibPPS/ESProducers/python/CTPPSPixelDAQMappingESSourceXML_cfi.py

with the mapping and mask from the corresponding XML files located at CondFormats/PPSObjects/xml. The latest versions are:

Map Mask
CondFormats/PPSObjects/xml/rpix_mapping_2022.xml CondFormats/PPSObjects/xml/rpix_channel_mask_220_far.xml

CTPPSRPAlignmentCorrectionsData

History

Documentation table for tags and input XML files: CTPPSRPAlignmentCorrectionsData.

Building software

To be added.

Recipe for checking content of payload in DB

In order to check the content of a sqlite file, follow the setup above as it was done for gain calibrations and execute:

cmsRun retrieve-sqlite-rpalignment_cfg.py CTPPSRPRealAlignment_table.db 309100 CTPPSRPAlignment_real_table

An example configuration file to print out and check the content of a payload for a given run, in a tag present in the frontier development DB, is attached. This cfg can be used like this:

cmsRun retrieve-frontierdev-rpalignment_cfg.py 309100 CTPPSRPAlignmentCorrections_real_test

PPSOpticalFunctions

History

Documentation table for tags: PPSOpticalFunctions.

Building software

To be added.

PPSGeometryConditions

History

Documentation table for tags: PPSGeometryConditions.

Building software

To be added.

Tags for Run 3

PPSTagsRun3

Open developments with AlCaDB group: https://docs.google.com/document/d/1SRrfyvMxYMZj3zFmDSUVpf5OftMzOM1JGDOeDr-InKc/edit

PPS Tags for Simulation

Documentation table for tags: PPSTagsMC.

Additional Material

Proton Reconstruction Calibrations

Documentation table for tags used in standard proton reconstruction: optics, alignment, and LHCInfo (Work In Progress).

Tool For Querying CTPPS OMS Tables

Here you can test your queries on CTPPS on-line database. Please, not overload the system.

Extras

Here are some of Clemencia's GitRecipes.

Presentations

Obsolet Material

Serialization testing

#include "CondFormats/Serialization/interface/Test.h"

#include "../src/headers.h"

int main()
{
  
  testSerialization<CTPPSAlignmentCorrections>();
  return 0;
}

and in the same directory the BuildFile.xml should say:

<bin file="testSerializationCTPPSObjects.cpp">
    <use   name="CondFormats/CTPPSObjects"/>
</bin>

Then after building (might need to explicitely build the tests scram b tests ) you can execute, for example

% ./test/slc6_amd64_gcc530/testSerializationCTPPSObjects 

The development for one example class is available in the CTPPSDB3 branch in github. Here for RP positions

SQlite creation

To fill and read a SQlite file (a local DB that can be exported to the central DB via ConditionUploader) the plugins are developed in CalibForward/CTPPS in the git branch CTPPSDB5_FillTest.

The "maker" is in CalibForward/CTPPS/src/myCTPPSRPPosMaker.cc, the configuration file is testDB_fromXML.py which uses the xml file RP_Dist_Beam_Cent.xml as source and calls this module, then outputs the SQlite file myctpps_xml.db which contains a few dummy payloads for IOV 1-4 (different time stamps) that were there to test the different accessors of the class,and for IOV 5-eot the RP distances from the xml file.

One can inspect the sqlite file with the conddb command. The name of the tag (which was set in the configuration file to create it) is myctppsRPpos_test0 so the command and its output are as follow:

% conddb --db myctpps_xml.db list myctppsRPpos_test0
[2016-10-31 17:58:50,386] INFO: Connecting to myctpps_xml.db [sqlite:///myctpps_xml.db]
[2016-10-31 17:58:50,416] INFO: Listing with a limit of 500 IOVs, starting from the highest since. If you need to see more, please increase the limit of returned results.
Since: Run   Insertion Time              Payload                                   Object Type       
-----------  --------------------------  ----------------------------------------  ----------------  
1            2016-10-31 13:49:55.680067  68ed4457c10846a4a8d3ab0004262b83397b855e  CTPPSRPPositions  
1            2016-10-31 13:49:55.681336  18c2f114ed1b4436e28c749a4da0ab08d9fb21ce  CTPPSRPPositions  
5            2016-10-31 13:49:55.682248  b3c240997ed895c81959acdede2dc4b576e78515  CTPPSRPPositions 

The module that reads the SQlite is CalibForward/CTPPS/plugins/myCTPPSRPPosESAnalyzer.cc and called from the configuration file testReadDB_5xml.py. At the moment it just prints out the values read from the local DB , but it is the basis of what can be used in reconstruction to access the DB.

Edit | Attach | Watch | Print version | History: r5 < r4 < r3 < r2 < r1 | Backlinks | Raw View | WYSIWYG | More topic actions
Topic revision: r5 - 2022-07-08 - WagnerDePaulaCarvalho
 
    • Cern Search Icon Cern Search
    • TWiki Search Icon TWiki Search
    • Google Search Icon Google Search

    Sandbox All webs login

This site is powered by the TWiki collaboration platform Powered by PerlCopyright &© 2008-2023 by the contributing authors. All material on this collaboration platform is the property of the contributing authors.
or Ideas, requests, problems regarding TWiki? use Discourse or Send feedback