Skip to content

CTPPS/pps-alignment-data

 
 

Repository files navigation

Example configurations of global alignment

For more information about the PPS global alignment check out the TWiki page.

Installation

1. CMSSW

scram project CMSSW_12_3_0_pre2
cd CMSSW_12_3_0_pre2/src
cmsenv
git cms-init
scram b -j 8

2. Data

cd ../../
git clone https://github.com/CTPPS/pps-alignment-data.git data
cd data

Example

Configuration:

  • year: 2018
  • fill: 7334
  • xangle: 160
  • beta: 0.30

1. Reference dataset

At first we need to produce some necessary plots using the reference dataset. Note that it has already been aligned. The process should take about 15 minutes.

cd 2018/alig-version-3/fill_6554/xangle_160_beta_0_30
cmsRun ../../../../run_distributions_reference_cfg.py

2. Test dataset

Now we perform the analysis of the test dataset. Firstly, we fill the histograms (run_distributions_cfg.py). This should take about 2 minutes. Then we analyse the histograms and produce the alignment constants (run_analysis_cfg.py). This should take a few seconds.

cd ../../../phys-version-1/fill_7334/xangle_160_beta_0_30
cmsRun ../../../../run_distributions_cfg.py
cmsRun ../../../../run_analysis_cfg.py

Local DB example

Now, we use SQLite files as conditions input and output.

Configuration:

  • year: 2018
  • fill: 7334
  • xangle: 160
  • beta: 0.30

1. Reference dataset

The reference dataset analysis ought to be done by an expert. We can assume that we already have the DQM files with the reference plots. Here we can produce them without the DB integration (as in the previous example).

cd 2018/alig-version-3/fill_6554/xangle_160_beta_0_30
cmsRun ../../../../run_distributions_reference_cfg.py

Now we can write an SQLite file with the reference config. It will include the reference data for the horizontal alignment (matching graphs).

cmsRun ../../../../write_config_reference_cfg.py

2. Test dataset

At first, we have to write an SQLite file with the config.

cd ../../../phys-version-1/fill_7334/xangle_160_beta_0_30
cmsRun ../../../../write_config_cfg.py

After that, we need to modify the configs so that they use the SQLite file.

  1. In run_distributions_cfg.py: change conditions_input to "local_sqlite".
  2. In run_analysis_cfg.py: change conditions_input and conditions_input_reference to "local_sqlite".
  3. To write the alignment results to an SQLite file too, change write_sqlite_results to True in run_analysis_cfg.py.

Now we perform the analysis of the test dataset.

cmsRun ../../../../run_distributions_cfg.py
cmsRun ../../../../run_analysis_cfg.py

If write_sqlite_results was set to True, an SQLite file with the results has been produced. To retrieve the results, use:

cmsRun ../../../../retrieve_CTPPSRPAlignmentCorrectionsData.py 325159

The first argument is the run number. A .log file with the results should be produced.

Online DB example

Check out the CondDB page for the list of the objects.

1. Reference dataset

Here, we don't have to do anything, since the reference data will be delivered from the DB (together with the input conditions).

2. Test dataset

cd 2018/phys-version-1/fill_7334/xangle_160_beta_0_30

We need to modify the configs so that they retrieve the conditions from the DB.

  1. In run_distributions_cfg.py: change conditions_input to "db".
  2. In run_analysis_cfg.py: change conditions_input and conditions_input_reference to "db".
  3. We can handle writing the results to an SQLite file in the same way as in the previous example.

Now we perform the analysis of the test dataset.

cmsRun ../../../../run_distributions_cfg.py
cmsRun ../../../../run_analysis_cfg.py

About

No description, website, or topics provided.

Resources

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published

Languages

  • Python 97.3%
  • C++ 2.7%