ECALELF  d6718b6cc30d69f18fde9018c5ae12f9d80bd7a5
Rereco production

RERECO

The ReReco and the ntuple production can be run with the script EcalAlCaRecoProducers/scripts/RerecoQuick.sh from the directory EcalAlCaRecoProducers

Input files

  1. EcalAlCaRecoProducers/config/reRecoTags/tag_name.py: is the file where the GT and the list of tags to be used for the rereco and the ntuple production have to be specified. "tag_name" is the name that will be automatically assigned to all the directories created for the rereco and the ntuples (the crab directory in EcalAlCaRecoProducers/prod_alcarereco and the directories in eos with the reco files and the ntuples). More info in TAG FILES
  2. alcaraw_datasets.dat is the file with the list of the available alcaraw files

Output files

  1. alcarereco_datasets.dat is the file with the list of all the rerecos already done
  2. ntuple_datasets.dat is the file with the list of all the ntuples already produced These two files are updated automatically with a line that summarizes all the relevant information about the rereco/ntuples (run range, dataset name, alcaraw name, storage_element, user_remote_dir_base, tag_name and, for ntuples, if they are produced from alcareco or alcarecosim and ...) when the script RerecoQuick.sh is launched
  3. The rereco files produced are stored in
       /eos/cms/store/group/alca_ecalcalib/ecalelf/alcarereco/13TeV/tag_name
    
  4. The final merged ntuple is stored in: /eos/cms/store/group/alca_ecalcalib/ecalelf/ntuples/13TeV/ALCARERECO/tag_name/

Instructions

  1. CREATE the tag_name.py in EcalAlCaRecoProducers/config/reRecoTags directory
    Se more detailes below, in section TAG FILES
  2. check the syntax of the tag_name.py file
  3. commit the file in GITHUB:
    git add config/reRecoTags/tag_name.py
    git commit -m "...." config/reRecoTags/tag_name.py
  4. Add the period on which the ReReco has to be run in alcaraw_datasets.dat, if not already defined (e.g. RUN2012AB)
  5. Run the script RerecoQuick.sh
    ./scripts/RerecoQuick.sh -p period -t config/reRecoTags/tag_name.py --json=jsonFile.txt --json_name={runMin}-{runMax}_{prompt,rereconame}_{jsonVersion}
    where:
    • config/reRecoTags/tag_name.py is the configuration file defined in step1
    • jsonFile.txt is the version of the json file to be used (Where to find the golden json)
    • json_name is the name that ECALELF gives to the json file used for the ntuple production.

Rereco example:

./scripts/RerecoQuick.sh -p RUN2012ABCD -t config/reRecoTags/Cal_Dic2013_ZeeIC_v1_mo_b.py --json=/afs/cern.ch/cms/CAF/CMSCOMM/COMM_DQM/certification/Collisions12/8TeV/Reprocessing/Cert_190456-208686_8TeV_22Jan2013ReReco_Collisions12_JSON.txt --json_name=190456-208686_22JanReReco_v1 --tutorial

The files alcarereco_datasets.dat and ntuple_datasets.dat ae updated when this script is launched

  1. check the exit status of the jobs:

    ./scripts/RerecoQuick.sh -p period -t config/reRecoTags/tag_name.py --json=jsonFile.txt --json_name={runMin}-{runMax}_{prompt,rereconame}_{jsonVersion} --check

    This command will loop over all folders corresponding to the different datasets and check if jobs are exited with status 0 If jobs are finished, it merge all the produced ntuples and copy them to the right directory on EOS

  2. if all went fine, commit the alcarereco_datasets.dat and ntuple_datasets.dat files
    git pull --no-commit
    this will try to merge your local repository with the central one. If there are no conflicts you just need to commit the changes, otherwise you should go throu the files in conflict, resolve them by hand and do
    git add file.cc
    to say that the confict on the file.cpp has been solved and now is staged for commit

And then you must:

git commit -m "rereco tag_name done" alcarereco_datasets.dat ntuple_datasets.dat

Script options

–singleEle : to rereco also single electron datasets

TAG FILES

To run the Rereco with a new set of conditions it is necessary to have a configuration file with the tags.

An example of a configuration file can be found in Calibration/EcalAlCaRecoProducers/config/reRecoTags/test75x.py

Here an example:

##############################################################
import FWCore.ParameterSet.Config as cms
from CondCore.DBCommon.CondDBSetup_cfi import *
#### Please fill with comments
# Basic tag combination for 2012 end year seminar conditions
# Laser, alpha tags are fixed: no time to improve them
# A set of IC are derived on top of them and will be tested:
# Cal_Nov2012_ICEle_v2:
# description
#
RerecoGlobalTag = cms.ESSource("PoolDBESSource",
CondDBSetup,
connect = cms.string('frontier://FrontierProd/CMS_COND_31X_GLOBALTAG'),
globaltag = cms.string('GR_R_53_V13::All'),
toGet = cms.VPSet(
cms.PSet(record = cms.string("EcalLaserAPDPNRatiosRcd"),
tag = cms.string('EcalLaserAPDPNRatios_data_20120814_2011-2012_v3_upd20120919'),
connect = cms.untracked.string("frontier://FrontierProd/CMS_COND_42X_ECAL_LAS")
)
,cms.PSet(record = cms.string('EcalLaserAlphasRcd'),
tag = cms.string('EcalLaserAlphas_EB_sic1_btcp152_EE_sic1_btcp116'),
connect = cms.untracked.string('frontier://FrontierInt/CMS_COND_ECAL')
)
,cms.PSet(record = cms.string("EcalIntercalibConstantsRcd"),
tag = cms.string('EcalIntercalibConstants_V20120922_Ele19092012_2012IncEtaScale8TeV'),
connect = cms.untracked.string("frontier://FrontierInt/CMS_COND_ECAL")
)
),
BlobStreamerName = cms.untracked.string('TBufferBlobStreamingService')
)
#############################################################

The convention is to name these configuration files in this way: tag_name.py

So, for the rereco production follow the steps below: