ATLAS Offline Software
Loading...
Searching...
No Matches
LArHVGainsPredictor.py File Reference

Go to the source code of this file.

Classes

class  LArHVGainsPredictor.OracleGainReader
class  LArHVGainsPredictor.GainPredictor

Namespaces

namespace  LArHVGainsPredictor

Variables

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