CMS 3D CMS Logo

Functions
mergeVDriftHistosByStation Namespace Reference

Functions

def getHistoName (wheel, station, sector)
 
def mergeHistosWheelSector (file, wheel, sector)
 
def mergeHistosWheelStation (file, wheel, station)
 

Function Documentation

◆ getHistoName()

def mergeVDriftHistosByStation.getHistoName (   wheel,
  station,
  sector 
)

Definition at line 7 of file mergeVDriftHistosByStation.py.

7 def getHistoName(wheel,station,sector):
8  wheelStr = 'W' + str(wheel)
9  stationStr = 'St' + str(station)
10  sectorStr = 'Sec' + str(sector)
11  name = "hRPhiVDriftCorr_" + wheelStr + "_" + stationStr + "_" + sectorStr
12 
13  return name
14 

References str.

Referenced by DTT0CalibrationRMS.analyze(), dtCalibration::DTTTrigT0SegCorrection.getHisto(), dtCalibration::DTTTrigResidualCorrection.getHisto(), mergeHistosWheelSector(), and mergeHistosWheelStation().

◆ mergeHistosWheelSector()

def mergeVDriftHistosByStation.mergeHistosWheelSector (   file,
  wheel,
  sector 
)

Definition at line 15 of file mergeVDriftHistosByStation.py.

15 def mergeHistosWheelSector(file, wheel, sector):
16 
17  histWheelSector = None
18  for station in range(1,5):
19  if sector in (13,14) and station != 4: continue
20  name = getHistoName(wheel,station,sector)
21  hist = file.Get(name)
22  if hist:
23  print("Adding",hist.GetName())
24  if not histWheelSector: histWheelSector = hist.Clone( "h_W%d_Sec%d" % (wheel,sector) )
25  else: histWheelSector.Add(hist)
26 
27  return histWheelSector
28 

References getHistoName(), print(), and FastTimerService_cff.range.

◆ mergeHistosWheelStation()

def mergeVDriftHistosByStation.mergeHistosWheelStation (   file,
  wheel,
  station 
)

Definition at line 29 of file mergeVDriftHistosByStation.py.

29 def mergeHistosWheelStation(file, wheel, station):
30 
31  sectors = range(1,13)
32  if station == 4: sectors.extend([13,14])
33  histWheelStation = None
34  for sector in sectors:
35  name = getHistoName(wheel,station,sector)
36  hist = file.Get(name)
37  if hist:
38  print("Adding",hist.GetName())
39  if not histWheelStation: histWheelStation = hist.Clone( "h_W%d_St%d" % (wheel,station) )
40  else: histWheelStation.Add(hist)
41 
42  return histWheelStation
43 

References getHistoName(), print(), FastTimerService_cff.range, and str.

FastTimerService_cff.range
range
Definition: FastTimerService_cff.py:34
mergeVDriftHistosByStation.getHistoName
def getHistoName(wheel, station, sector)
Definition: mergeVDriftHistosByStation.py:7
str
#define str(s)
Definition: TestProcessor.cc:51
print
void print(TMatrixD &m, const char *label=nullptr, bool mathematicaFormat=false)
Definition: Utilities.cc:46
mergeVDriftHistosByStation.mergeHistosWheelStation
def mergeHistosWheelStation(file, wheel, station)
Definition: mergeVDriftHistosByStation.py:29
mergeVDriftHistosByStation.mergeHistosWheelSector
def mergeHistosWheelSector(file, wheel, sector)
Definition: mergeVDriftHistosByStation.py:15