test
CMS 3D CMS Logo

 All Classes Namespaces Files Functions Variables Typedefs Enumerations Enumerator Properties Friends Macros Pages
Functions
GeneralSetup Namespace Reference

Functions

def setup
 

Function Documentation

def GeneralSetup.setup (   process,
  global_tag,
  zero_tesla = False 
)
General setup of an alignment process.

Arguments:
- `process`: cms.Process object
- `global_tag`: global tag to be used
- `zero_tesla`: if 'True' the B-field map for 0T is enforced

Definition at line 1 of file GeneralSetup.py.

Referenced by BeautifulSoup.PageElement._invert(), TtFullHadSignalSelMVATrainer.analyze(), TtSemiLepJetCombMVATrainer.analyze(), PhotonConversionTrajectorySeedProducerFromQuadrupletsAlgo.analyze(), TtSemiLepSignalSelMVATrainer.analyze(), SiStripCommissioningSource.analyze(), PCLTrackerAlProducer.applyAlignmentsToDB(), GenericBenchmarkAnalyzer.beginJob(), edm::SecondaryEventProvider.beginLuminosityBlock(), edm::SecondaryEventProvider.beginRun(), PixelThresholdClusterizer.clusterizeDetUnit(), CandCombinerBase< OutputCollection, CandPtr >.combine(), SiStripCommissioningSource.createTasks(), SiStripLorentzAngleCalibration.derivatives(), TriggerBxMonitor.dqmBeginRun(), TriggerRatesMonitor.dqmBeginRun(), edm::SecondaryEventProvider.endLuminosityBlock(), edm::SecondaryEventProvider.endRun(), CommissioningTask.eventSetup(), hcaldqm::quantity::FEDQuantity.FEDQuantity(), PhotonConversionTrajectorySeedProducerFromSingleLegAlgo.find(), triggerExpression.get(), get(), ConditionDumperInEdm.get(), TtFullHadSignalSelMVAComputer.produce(), TtSemiLepJetCombMVAComputer.produce(), TtSemiLepSignalSelMVAComputer.produce(), ElectronSeedGenerator.run(), SiStripElectronSeedGenerator.run(), CosmicTrackingParticleSelector.select(), triggerExpression::Data.setEvent(), RPCSim.setRPCSimSetUp(), edm::SecondaryEventProvider.setupPileUpEvent(), and MuonServiceProxy.update().

1 def setup(process, global_tag, zero_tesla = False):
2  """General setup of an alignment process.
3 
4  Arguments:
5  - `process`: cms.Process object
6  - `global_tag`: global tag to be used
7  - `zero_tesla`: if 'True' the B-field map for 0T is enforced
8  """
9 
10  # MessageLogger for convenient output
11  # --------------------------------------------------------------------------
12  process.load('Alignment.MillePedeAlignmentAlgorithm.alignmentsetup.myMessageLogger_cff')
13 
14  # Load the conditions
15  # --------------------------------------------------------------------------
16  if zero_tesla:
17  # actually only needed for 0T MC samples, but does not harm for 0T data:
18  process.load("Configuration.StandardSequences.MagneticField_0T_cff")
19  else:
20  process.load('Configuration.StandardSequences.MagneticField_cff')
21  process.load('Configuration.Geometry.GeometryRecoDB_cff')
22  process.load("Configuration.StandardSequences.FrontierConditions_GlobalTag_cff")
23 
24  from Configuration.AlCa.GlobalTag import GlobalTag
25  process.GlobalTag = GlobalTag(process.GlobalTag, global_tag)
26  print "Using Global Tag:", process.GlobalTag.globaltag._value
27 
28  return process # not required because the cms.Process is modified in place