CMS 3D CMS Logo

List of all members | Public Member Functions | Public Attributes
Eras.Eras Class Reference
Inheritance diagram for Eras.Eras:

Public Member Functions

def __init__ (self)
 
def addEra (self, name, obj)
 
def inspect (self, name=None, onlyChosen=False, details=True)
 
def inspectEra (self, e, details)
 
def inspectModifier (self, m, details)
 

Public Attributes

 pythonCfgLines
 

Detailed Description

Dummy container for all the cms.Modifier instances that config fragments
can use to selectively configure depending on what scenario is active.

Definition at line 5 of file Eras.py.

Constructor & Destructor Documentation

◆ __init__()

def Eras.Eras.__init__ (   self)

Definition at line 10 of file Eras.py.

10  def __init__(self):
11  allEras=['Run1_pA',
12  'Run1_peripheralPbPb',
13  'Run2_50ns',
14  'Run2_50ns_HIPM',
15  'Run2_25ns',
16  'Run2_25ns_HIPM',
17  'Run2_25ns_peripheralPbPb',
18  'Run2_HI',
19  'Run2_2016',
20  'Run2_2016_HIPM',
21  'Run2_2016_trackingLowPU',
22  'Run2_2016_pA',
23  'Run2_2017',
24  'Run2_2017_noMkFit',
25  'Run2_2017_FastSim', #new modifier for Phase1 FastSim, skips the muon GEM sequence
26  'Run2_2017_trackingRun2',
27  'Run2_2017_trackingLowPU',
28  'Run2_2017_pp_on_XeXe',
29  'Run2_2017_ppRef',
30  'Run2_2018',
31  'Run2_2018_FastSim', #new modifier for Phase1 FastSim, skips the muon GEM sequence
32  'Run2_2018_pp_on_AA',
33  'Run2_2018_pp_on_AA_noHCALmitigation',
34  'Run2_2018_highBetaStar',
35  'Run2_2018_noMkFit',
36  'Run3',
37  'Run3_2023',
38  'Run3_2024',
39  'Run3_2025',
40  'Run3_noMkFit',
41  'Run3_pp_on_PbPb',
42  'Run3_pp_on_PbPb_approxSiStripClusters',
43  'Run3_pp_on_PbPb_2023',
44  'Run3_pp_on_PbPb_approxSiStripClusters_2023',
45  'Run3_pp_on_PbPb_2024',
46  'Run3_pp_on_PbPb_approxSiStripClusters_2024',
47  'Run3_dd4hep',
48  'Run3_DDD',
49  'Run3_FastSim',
50  'Run3_2023_FastSim',
51  'Run3_2023_ZDC',
52  'Run3_2023_UPC',
53  'Run3_2024_ppRef',
54  'Run3_2024_UPC',
55  'Phase2',
56  'Phase2C9',
57  'Phase2C10',
58  'Phase2C11',
59  'Phase2C12',
60  'Phase2C9_dd4hep',
61  'Phase2C10_dd4hep',
62  'Phase2C11_dd4hep',
63  'Phase2C11I13',
64  'Phase2C12_dd4hep',
65  'Phase2C11M9',
66  'Phase2C11I13M9',
67  'Phase2C11I13T25M9',
68  'Phase2C11I13T26M9',
69  'Phase2C17I13M9',
70  'Phase2C20I13M9',
71  'Phase2C22I13M9'
72  ]
73 
74  internalUseMods = ['run2_common', 'run2_25ns_specific',
75  'run2_50ns_specific', 'run2_HI_specific',
76  'stage1L1Trigger', 'fastSim',
77  'peripheralPbPb', 'pA_2016',
78  'run2_HE_2017', 'stage2L1Trigger', 'stage2L1Trigger_2017', 'stage2L1Trigger_2018', 'stage2L1Trigger_2021',
79  'run2_HF_2017', 'run2_HCAL_2017', 'run2_HEPlan1_2017', 'run2_HB_2018','run2_HE_2018',
80  'run3_HB', 'run3_HFSL', 'run3_common', 'run3_RPC',
81  'phase1Pixel', 'run3_GEM', 'run2_GEM_2017',
82  'run2_CSC_2018',
83  'phase2_common', 'phase2_tracker',
84  'phase2_muon', 'phase2_GEM', 'phase2_GE0',
85  'phase2_hgcal', 'phase2_timing', 'phase2_hfnose', 'phase2_hgcalV10', 'phase2_hgcalV11', 'phase2_hgcalV12',
86  'phase2_timing_layer', 'phase2_etlV4', 'phase2_hcal', 'phase2_ecal','phase2_ecal_devel', 'phase2_ecalTP_devel',
87  'phase2_trigger',
88  'phase2_squarePixels', 'phase2_3DPixels',
89  'trackingLowPU', 'trackingPhase1',
90  'ctpps', 'ctpps_2016', 'ctpps_2017', 'ctpps_2018', 'ctpps_2022',
91  'trackingPhase2PU140','highBetaStar_2018',
92  'tracker_apv_vfp30_2016', 'pf_badHcalMitigationOff',
93  'run2_nanoAOD_106Xv2',
94  'run3_nanoAOD_122', 'run3_nanoAOD_124',
95  'run3_ecal_devel',
96  'run3_upc',
97  'hcalHardcodeConditions', 'hcalSkipPacker',
98  'run2_HLTconditions_2016','run2_HLTconditions_2017','run2_HLTconditions_2018',
99  'bParking']
100  internalUseModChains = ['run2_2017_noTrackingModifier', 'trackingMkFitProd']
101 
102  self.pythonCfgLines = {}
103 
104  for e in allEras:
105  eObj=getattr(__import__('Configuration.Eras.Era_'+e+'_cff',globals(),locals(),[e],0),e)
106  self.addEra(e,eObj)
107  self.pythonCfgLines[e] = 'from Configuration.Eras.Era_'+e+'_cff import '+e
108 
109  for e in internalUseMods:
110  eObj=getattr(__import__('Configuration.Eras.Modifier_'+e+'_cff',globals(),locals(),[e],0),e)
111  self.addEra(e,eObj)
112  self.pythonCfgLines[e] = 'from Configuration.Eras.Modifier_'+e+'_cff import '+e
113 
114  for e in internalUseModChains:
115  eObj=getattr(__import__('Configuration.Eras.ModifierChain_'+e+'_cff',globals(),locals(),[e],0),e)
116  self.addEra(e,eObj)
117  self.pythonCfgLines[e] = 'from Configuration.Eras.ModifierChain_'+e+'_cff import '+e
118 
119 
def __init__(self, dataset, job_number, job_id, job_name, isDA, isMC, applyBOWS, applyEXTRACOND, extraconditions, runboundary, lumilist, intlumi, maxevents, gt, allFromGT, alignmentDB, alignmentTAG, apeDB, apeTAG, bowDB, bowTAG, vertextype, tracktype, refittertype, ttrhtype, applyruncontrol, ptcut, CMSSW_dir, the_dir)

Member Function Documentation

◆ addEra()

def Eras.Eras.addEra (   self,
  name,
  obj 
)

Definition at line 120 of file Eras.py.

120  def addEra(self,name,obj):
121  setattr(self,name,obj)
122 

◆ inspect()

def Eras.Eras.inspect (   self,
  name = None,
  onlyChosen = False,
  details = True 
)

Definition at line 137 of file Eras.py.

References Eras.Eras.inspectEra(), mps_monitormerge.items, and print().

137  def inspect(self,name=None,onlyChosen=False,details=True):
138  if name==None:
139  print('Inspecting the known eras', end=' ')
140  if onlyChosen: print(' (all active)')
141  else: print('(all eras defined)')
142  else:
143  print('Inspecting the '+name+' era', end=' ')
144 
145  allEras=[]
146  for key, value in self.__dict__.items():
147  if isinstance(value, ModifierChain): allEras.append(key)
148 
149  for e in allEras:
150  if name is not None and name==e:
151  self.inspectEra(e,details)
152  if name is None:
153  if not onlyChosen or getattr(self,e).isChosen():
154  self.inspectEra(e,details)
155 
156 eras=Eras()
157 
158 
159 #eras.inspect()
160 
void print(TMatrixD &m, const char *label=nullptr, bool mathematicaFormat=false)
Definition: Utilities.cc:47
Definition: Eras.py:1

◆ inspectEra()

def Eras.Eras.inspectEra (   self,
  e,
  details 
)

Definition at line 126 of file Eras.py.

References Eras.Eras.inspectModifier(), and print().

Referenced by Eras.Eras.inspect().

126  def inspectEra(self,e,details):
127  print('\nEra:',e)
128  print(' isChosen:',getattr(self,e)._isChosen())
129  if details: print(' Modifiers:')
130  nmod=0
131  for value in getattr(self,e).__dict__['_ModifierChain__chain']:
132  if isinstance(value, Modifier):
133  nmod=nmod+1
134  if details: self.inspectModifier(value,details)
135  print(' ',nmod,'modifiers defined')
136 
void print(TMatrixD &m, const char *label=nullptr, bool mathematicaFormat=false)
Definition: Utilities.cc:47

◆ inspectModifier()

def Eras.Eras.inspectModifier (   self,
  m,
  details 
)

Definition at line 123 of file Eras.py.

References print().

Referenced by Eras.Eras.inspectEra().

123  def inspectModifier(self,m,details):
124  print(' ',m.__dict__ ['_Modifier__processModifiers'])
125 
void print(TMatrixD &m, const char *label=nullptr, bool mathematicaFormat=false)
Definition: Utilities.cc:47

Member Data Documentation

◆ pythonCfgLines

Eras.Eras.pythonCfgLines

Definition at line 102 of file Eras.py.