ATLAS Offline Software
Loading...
Searching...
No Matches
LArHVGainsPredictor Namespace Reference

Classes

class  GainPredictor
class  OracleGainReader

Variables

 parser = OptionParser(add_help_option=False)
 configure options
 action
 type
 dest
 default
 options
 args
int error_code = 2
 hv_input_new = PlotCalibrationHV.L1CaloHVReader(options.hv_input_new)
 hv_input_ref = PlotCalibrationHV.L1CaloHVReader(options.hv_input_ref)
 geometry_convertor = PlotCalibrationGains.L1CaloGeometryConvertor()
 create instance of geometry convertor and load receiver-PPM map
 gain_predictor = GainPredictor(geometry_convertor)
 create instance of gain predictor
 h_orig_gains_em = PlotCalibrationGains.L1CaloMap("Em: orig. gains"," #eta bin","#phi bin")
 initialise histograms
 h_orig_gains_had = PlotCalibrationGains.L1CaloMap("Had: orig. gains"," #eta bin","#phi bin")
 h_pred_gains_em = PlotCalibrationGains.L1CaloMap("Em: pred. gains"," #eta bin","#phi bin")
 h_pred_gains_had = PlotCalibrationGains.L1CaloMap("Had: pred. gains"," #eta bin","#phi bin")
 h_diff_gains_em = PlotCalibrationGains.L1CaloMap("Em: (pred. gain - orig. gain) / orig. gain","#eta bin","#phi bin")
 h_diff_gains_had = PlotCalibrationGains.L1CaloMap("Had: (pred. gain - orig. gain) / orig. gain","#eta bin","#phi bin")
 output_text = open(options.output_files+".txt","w")
 initialise output .txt file
dict pred_gains = {}
 initialise empty dictionary for predicted gains
 channel_list = open(options.channel_list)
dict orig_gains = {}
 parts = channel.split()
dict receiver_list = orig_gains.keys()
 coolid = geometry_convertor.getPPMfromReceiver(receiver)
 check if channel list is empty
 eta_bin = geometry_convertor.getEtaBin(coolid)
 phi_bin = geometry_convertor.getPhiBin(coolid)
tuple num_layers = (hv_input_ref.GetNLayers())[receiver]
 retrieve num layers and layer names (from new or ref hv input)
list layer_names = [-1,-1,-1,-1]
list layer_corr_new = [1.,1.,1.,1.]
 retrieve hv corrections from new hv input
list layer_corr_ref = [1.,1.,1.,1.]
 retrieve hv corrections from ref hv input
dict orig_gain = orig_gains[receiver]
 pred_gain = gain_predictor.GetGain(receiver,orig_gain,layer_corr_ref,layer_corr_new,layer_names)
 calculate new gain for this receiver
tuple diff_gain = ((pred_gain - orig_gain) / orig_gain) * 100.0
str layer = "EM"
 fill histograms
 end
 print output to screen
 file
 write output to text file
 canvas = ROOT.TCanvas("canvas","",200,10,700,500)
 write output to .sqlite file

Variable Documentation

◆ action

LArHVGainsPredictor.action

Definition at line 196 of file LArHVGainsPredictor.py.

◆ args

LArHVGainsPredictor.args

Definition at line 204 of file LArHVGainsPredictor.py.

◆ canvas

LArHVGainsPredictor.canvas = ROOT.TCanvas("canvas","",200,10,700,500)

write output to .sqlite file

write output to .ps/pdf file

Definition at line 459 of file LArHVGainsPredictor.py.

◆ channel_list

LArHVGainsPredictor.channel_list = open(options.channel_list)

Definition at line 280 of file LArHVGainsPredictor.py.

◆ coolid

LArHVGainsPredictor.coolid = geometry_convertor.getPPMfromReceiver(receiver)

check if channel list is empty

loop over receivers

Definition at line 330 of file LArHVGainsPredictor.py.

◆ default

LArHVGainsPredictor.default

Definition at line 196 of file LArHVGainsPredictor.py.

◆ dest

LArHVGainsPredictor.dest

Definition at line 196 of file LArHVGainsPredictor.py.

◆ diff_gain

tuple LArHVGainsPredictor.diff_gain = ((pred_gain - orig_gain) / orig_gain) * 100.0

Definition at line 409 of file LArHVGainsPredictor.py.

◆ end

LArHVGainsPredictor.end

print output to screen

Definition at line 431 of file LArHVGainsPredictor.py.

◆ error_code

int LArHVGainsPredictor.error_code = 2

Definition at line 228 of file LArHVGainsPredictor.py.

◆ eta_bin

LArHVGainsPredictor.eta_bin = geometry_convertor.getEtaBin(coolid)

Definition at line 332 of file LArHVGainsPredictor.py.

◆ file

LArHVGainsPredictor.file

write output to text file

Definition at line 441 of file LArHVGainsPredictor.py.

◆ gain_predictor

LArHVGainsPredictor.gain_predictor = GainPredictor(geometry_convertor)

create instance of gain predictor

Definition at line 253 of file LArHVGainsPredictor.py.

◆ geometry_convertor

LArHVGainsPredictor.geometry_convertor = PlotCalibrationGains.L1CaloGeometryConvertor()

create instance of geometry convertor and load receiver-PPM map

Definition at line 247 of file LArHVGainsPredictor.py.

◆ h_diff_gains_em

LArHVGainsPredictor.h_diff_gains_em = PlotCalibrationGains.L1CaloMap("Em: (pred. gain - orig. gain) / orig. gain","#eta bin","#phi bin")

Definition at line 263 of file LArHVGainsPredictor.py.

◆ h_diff_gains_had

LArHVGainsPredictor.h_diff_gains_had = PlotCalibrationGains.L1CaloMap("Had: (pred. gain - orig. gain) / orig. gain","#eta bin","#phi bin")

Definition at line 264 of file LArHVGainsPredictor.py.

◆ h_orig_gains_em

LArHVGainsPredictor.h_orig_gains_em = PlotCalibrationGains.L1CaloMap("Em: orig. gains"," #eta bin","#phi bin")

initialise histograms

Definition at line 257 of file LArHVGainsPredictor.py.

◆ h_orig_gains_had

LArHVGainsPredictor.h_orig_gains_had = PlotCalibrationGains.L1CaloMap("Had: orig. gains"," #eta bin","#phi bin")

Definition at line 258 of file LArHVGainsPredictor.py.

◆ h_pred_gains_em

LArHVGainsPredictor.h_pred_gains_em = PlotCalibrationGains.L1CaloMap("Em: pred. gains"," #eta bin","#phi bin")

Definition at line 260 of file LArHVGainsPredictor.py.

◆ h_pred_gains_had

LArHVGainsPredictor.h_pred_gains_had = PlotCalibrationGains.L1CaloMap("Had: pred. gains"," #eta bin","#phi bin")

Definition at line 261 of file LArHVGainsPredictor.py.

◆ hv_input_new

LArHVGainsPredictor.hv_input_new = PlotCalibrationHV.L1CaloHVReader(options.hv_input_new)

Definition at line 239 of file LArHVGainsPredictor.py.

◆ hv_input_ref

LArHVGainsPredictor.hv_input_ref = PlotCalibrationHV.L1CaloHVReader(options.hv_input_ref)

Definition at line 241 of file LArHVGainsPredictor.py.

◆ layer

str LArHVGainsPredictor.layer = "EM"

fill histograms

Definition at line 415 of file LArHVGainsPredictor.py.

◆ layer_corr_new

list LArHVGainsPredictor.layer_corr_new = [1.,1.,1.,1.]

retrieve hv corrections from new hv input

Definition at line 352 of file LArHVGainsPredictor.py.

◆ layer_corr_ref

list LArHVGainsPredictor.layer_corr_ref = [1.,1.,1.,1.]

retrieve hv corrections from ref hv input

Definition at line 367 of file LArHVGainsPredictor.py.

◆ layer_names

list LArHVGainsPredictor.layer_names = [-1,-1,-1,-1]

Definition at line 339 of file LArHVGainsPredictor.py.

◆ num_layers

tuple LArHVGainsPredictor.num_layers = (hv_input_ref.GetNLayers())[receiver]

retrieve num layers and layer names (from new or ref hv input)

Definition at line 337 of file LArHVGainsPredictor.py.

◆ options

LArHVGainsPredictor.options

Definition at line 204 of file LArHVGainsPredictor.py.

◆ orig_gain

dict LArHVGainsPredictor.orig_gain = orig_gains[receiver]

Definition at line 393 of file LArHVGainsPredictor.py.

◆ orig_gains

LArHVGainsPredictor.orig_gains = {}

Definition at line 290 of file LArHVGainsPredictor.py.

◆ output_text

LArHVGainsPredictor.output_text = open(options.output_files+".txt","w")

initialise output .txt file

Definition at line 268 of file LArHVGainsPredictor.py.

◆ parser

LArHVGainsPredictor.parser = OptionParser(add_help_option=False)

configure options

Definition at line 194 of file LArHVGainsPredictor.py.

◆ parts

LArHVGainsPredictor.parts = channel.split()

Definition at line 294 of file LArHVGainsPredictor.py.

◆ phi_bin

LArHVGainsPredictor.phi_bin = geometry_convertor.getPhiBin(coolid)

Definition at line 333 of file LArHVGainsPredictor.py.

◆ pred_gain

LArHVGainsPredictor.pred_gain = gain_predictor.GetGain(receiver,orig_gain,layer_corr_ref,layer_corr_new,layer_names)

calculate new gain for this receiver

Definition at line 401 of file LArHVGainsPredictor.py.

◆ pred_gains

dict LArHVGainsPredictor.pred_gains = {}

initialise empty dictionary for predicted gains

Definition at line 272 of file LArHVGainsPredictor.py.

◆ receiver_list

LArHVGainsPredictor.receiver_list = orig_gains.keys()

Definition at line 300 of file LArHVGainsPredictor.py.

◆ type

LArHVGainsPredictor.type

Definition at line 196 of file LArHVGainsPredictor.py.