Complete: 3

Detailed Review status

Introduction

Description of the database object formats

How to add a new database object

How to inspect the Data Base content

Online DB for trigger configuration: http://cms-project-confdb-hltdev.web.cern.ch/cms-project-confdb-hltdev/browser/

Offline DB tool to dump the conditions: ECAL DB dumper

How to know what is in a global tag

Check the twiki page on the Frontier Conditions and follow the links to see which ECAL tag has been taken in a given global tag.

Additional information about the ECAL Energy calibration tags.

Additional information about the ECAL laser correction tags.

The conventions for tags in the Global Tag is explained in detail in this page.

How to override a specific Tag from a Global Tag

There are cases where we want to use a global tag for retriving the appropiate conditions for CMS reconstruction while overriding an ECAL specific tag. For example one may want to test, for validation reasons, the new (Nov 2009) EE weights and group-ids (EcalTBWeights_EBEE_offline) with the cvs head of the EcalShape (used to generate MGPA digis), which is not yet included in the 34x_prerelease.

What we need to use is the so called ESPrefer to express a preference of a particular EcalDB tag. An example of code which could be used is:

process.load('Configuration/StandardSequences/FrontierConditions_CMS.GlobalTag_cff')
process.GlobalTag.globaltag = 'MC_3XY_V12::All'
########## Remove lines below if you do not want to override the global tag ###################
from CondCore.DBCommon.CondDBSetup_cfi import *
process.ecalConditions = cms.ESSource("PoolDBESSource", CondDBSetup,
      connect = cms.string('frontier://FrontierProd/CMS_COND_31X_ECAL'),
      toGet = cms.VPSet(         # overide Global Tag use EcalTBWeights_EBEE_offline
                  cms.PSet(
                      record = cms.string('EcalTBWeightsRcd') ,
                      tag = cms.string('EcalTBWeights_EBEE_offline')
                  ),
                  cms.PSet(
                      record = cms.string('EcalWeightXtalGroupsRcd') ,
                      tag = cms.string('EcalWeightXtalGroups_EBEE_offline')
                  )
              )
)
process.es_prefer_EcalTBWeights = cms.ESPrefer("PoolDBESSource","ecalConditions")
#############################################################################################

Notice that the global tag version (e.g. MC_3XY_V12) need to be used together with the appropiate CMSSW version (e.g. 34x) in order to address the same CondFormats and get the desired result. Consult Frontier Conditions to learn which global tag should be used with your CMSSW version.

How to override a specific Global Tag with the Trivial Condition Retriever

The trivial condition retriever is an ECAL-specific tool used to provide via configuration file constants and conditions typically taken from the DB. It is located under the package CalibCalorimetry/EcalTrivialCondModules. Although not officially supported by CMS, the trivial conditions are still maintained by ECAL as a very useful tool to check e.g. a set of intercalibration constants, weights for the reconstruction, parameters for the noise simulation etc.

In order to override a global tag with the trivial conditions, you have to add the following lines to your cfg:

   from CalibCalorimetry.EcalTrivialCondModules.EcalTrivialCondRetriever_cfi import *
   process.myCond = EcalTrivialConditionRetriever.clone()
   # prefer these conditions over the globalTag's ones
   process.es_prefer = cms.ESPrefer("EcalTrivialConditionRetriever","myCond")

If you also want to change some of the default trivial condition parameters, you can do something as below:

   # example: change some of the default trivial condition parameters
   process.myCond.amplWeights = cms.untracked.vdouble( 
         -0.381279,  -0.381279,  -0.381279,  0,  0.235699,  0.422836,  0.329865,  0.157519,  -0.00208278,  0 
   )
   process.myCond.producedEcalWeights = cms.untracked.bool(True)

Be careful that the EcalTrivialCondition retriever loads ALL the trivial conditions by default. If you want to load only part of the trivial conditions, you have to switch on/off the relevant flags among the following, at your wish:

    process.myCond.producedEcalADCToGeVConstant = cms.untracked.bool(True)
    process.myCond.producedEcalChannelStatus = cms.untracked.bool(True)
    process.myCond.producedEcalClusterCrackCorrParameters = cms.untracked.bool(True)
    process.myCond.producedEcalClusterLocalContCorrParameters = cms.untracked.bool(True)
    process.myCond.producedEcalDAQTowerStatus = cms.untracked.bool(True)
    process.myCond.producedEcalDCSTowerStatus = cms.untracked.bool(True)
    process.myCond.producedEcalGainRatios = cms.untracked.bool(True)
    process.myCond.producedEcalIntercalibConstants = cms.untracked.bool(True)
    process.myCond.producedEcalIntercalibConstantsMC = cms.untracked.bool(True)
    process.myCond.producedEcalIntercalibErrors = cms.untracked.bool(True)
    process.myCond.producedEcalLaserCorrection = cms.untracked.bool(True)
    process.myCond.producedEcalMappingElectronics = cms.untracked.bool(True)
    process.myCond.producedEcalPedestals = cms.untracked.bool(True)
    process.myCond.producedEcalTimeCalibConstants = cms.untracked.bool(True)
    process.myCond.producedEcalTimeCalibErrors = cms.untracked.bool(True)
    process.myCond.producedEcalTrgChannelStatus = cms.untracked.bool(True)
    process.myCond.producedEcalWeights = cms.untracked.bool(True)
    process.myCond.producedEnergyUncertaintyParameters = cms.untracked.bool(True)
    process.myCond.produceEnergyCorrectionParameters = cms.untracked.bool(True)

Review status

-- FedericoFerri - 22-Mar-2010 - improve explanation on how to activate the EcalTrivialCondition only for specific conditions
-- FedericoFerri - 04 March 2010 - add description on how to override global tag with trivial condition retriever
-- modified by KostasTheofilatos - 02-Nov-2009
-- FedericoFerri - 22 Jul 2009

Edit | Attach | Watch | Print version | History: r12 < r11 < r10 < r9 < r8 | Backlinks | Raw View | WYSIWYG | More topic actions
Topic revision: r12 - 2012-04-07 - FedericoFerri
 
    • Cern Search Icon Cern Search
    • TWiki Search Icon TWiki Search
    • Google Search Icon Google Search

    CMSPublic All webs login

This site is powered by the TWiki collaboration platform Powered by PerlCopyright & 2008-2020 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