diff --git a/Software/AttenuationScan/AttenuationScan.C b/Software/AttenuationScan/AttenuationScan.C index 5136823..6cad739 100644 --- a/Software/AttenuationScan/AttenuationScan.C +++ b/Software/AttenuationScan/AttenuationScan.C @@ -97,8 +97,8 @@ gROOT->ProcessLine("#include "); // Do some fanciness to get the directory right. - string inputDirectory = "~/TestStand/AnalysisResults/"+string(sensor)+"/AttenuationScan"; - string outputDirectory = "~/TestStand/AnalysisResults/"+string(sensor)+"/AttenuationScan"; + string inputDirectory = "/disk/groups/hep/flionett/TestStand/AnalysisResults/"+string(sensor)+"/AttenuationScan"; + string outputDirectory = "/disk/groups/hep/flionett/TestStand/AnalysisResults/"+string(sensor)+"/AttenuationScan"; if (externalPath!=0) outputDirectory = string(outputDirectory+"/"+externalPath); cout << "The input directory is: " << inputDirectory << endl; diff --git a/Software/AutomatedMeasurements/ElectronicMonkeyFocusing.py b/Software/AutomatedMeasurements/ElectronicMonkeyFocusing.py index 2bba757..e41968e 100644 --- a/Software/AutomatedMeasurements/ElectronicMonkeyFocusing.py +++ b/Software/AutomatedMeasurements/ElectronicMonkeyFocusing.py @@ -9,6 +9,7 @@ After the measurement, the position of the laser along x and z is reset. Parameters: +- , the type of sensor; - , the type of measurement; - , the parameter identifying the measurement; - , the first x position; @@ -25,10 +26,10 @@ More functionalities can be implemented. How to run it: -python ElectronicMonkeyFocusing.py --m --p --fx --lx --sx --fz --lz --sz --date +python ElectronicMonkeyFocusing.py --s --m --p --fx --lx --sx --fz --lz --sz --date For example: -python ElectronicMonkeyFocusing.py --f CCEBiasVoltageScan --p 200 --fx 0 --lx 50 --sx 2 --fz -400 --lz -200 --sz 20 --date 20150106 +python ElectronicMonkeyFocusing.py --s Hans410 --m CCEBiasVoltageScan --p 200 --fx 0 --lx 50 --sx 2 --fz -400 --lz -200 --sz 20 --date 20150106 Arduino device ID: DEVICE ID 2341:0042 on Bus 001 Address 045, Communications Device (in hexadecimal) @@ -48,6 +49,7 @@ parser = argparse.ArgumentParser(description='Define the parameters of the automated measurement for focusing.') +parser.add_argument('--s',help='type of sensor') parser.add_argument('--m',help='type of measurement') parser.add_argument('--p',help='parameter identifying the measurement') parser.add_argument('--fx',type=int,help='first x position') @@ -63,6 +65,7 @@ args = parser.parse_args() # Parameters and configuration. +sensor = args.s measurement = args.m par = args.p @@ -82,6 +85,7 @@ filename = '' config = '/home/hep/flionett/TestStand/Repository/TestStandRepository/Software/AutomatedMeasurements/FocusingConfig' +print 'Type of sensor: ', sensor print 'Type of measurement: ', measurement print 'First x position: %i steps' % firstx @@ -124,14 +128,14 @@ time.sleep(1) # Take a pedestal run. -if not os.path.exists(folder+"/Hans410/"+measurement): - os.makedirs(folder+"/Hans410/"+measurement) +if not os.path.exists(folder+"/"+sensor+"/"+measurement): + os.makedirs(folder+"/"+sensor+"/"+measurement) if (measurement == "CCEBiasVoltageScan") : - filename = folder+"/Hans410/"+measurement+"/"+str(yyyymmdd)+"-"+par+"V"+"-216-"+"ped.ali" + filename = folder+"/"+sensor+"/"+measurement+"/"+str(yyyymmdd)+"-"+par+"V"+"-216-"+"ped.ali" elif (measurement == "CCEAttenuationScan") : - filename = folder+"/Hans410/"+measurement+"/"+str(yyyymmdd)+"-"+par+"dB"+"-216-"+"ped.ali" + filename = folder+"/"+sensor+"/"+measurement+"/"+str(yyyymmdd)+"-"+par+"dB"+"-216-"+"ped.ali" else : - filename = folder+"/Hans410/"+measurement+"/"+str(yyyymmdd)+"-216-"+"ped.ali" + filename = folder+"/"+sensor+"/"+measurement+"/"+str(yyyymmdd)+"-216-"+"ped.ali" printcommand = "echo alibava-gui --no-gui --nevts="+str(nevents)+" --out="+filename+" --pedestal "+config command = "alibava-gui --no-gui --nevts="+str(nevents)+" --out="+filename+" --pedestal "+config print '***' @@ -145,11 +149,11 @@ print 'Position along z: %i steps' % posz if (measurement == "CCEBiasVoltageScan") : - filename = folder+"/Hans410/"+measurement+"/"+str(yyyymmdd)+"-"+par+"V"+"-216-"+str(posx)+"x-"+str(posz)+"z-las.ali" + filename = folder+"/"+sensor+"/"+measurement+"/"+str(yyyymmdd)+"-"+par+"V"+"-216-"+str(posx)+"x-"+str(posz)+"z-las.ali" elif (measurement == "CCEAttenuationScan") : - filename = folder+"/Hans410/"+measurement+"/"+str(yyyymmdd)+"-"+par+"dB"+"-216-"+str(posx)+"x-"+str(posz)+"z-las.ali" + filename = folder+"/"+sensor+"/"+measurement+"/"+str(yyyymmdd)+"-"+par+"dB"+"-216-"+str(posx)+"x-"+str(posz)+"z-las.ali" else : - filename = folder+"/Hans410/"+measurement+"/"+str(yyyymmdd)+"-216-"+str(posx)+"x-"+str(posz)+"z-las.ali" + filename = folder+"/"+sensor+"/"+measurement+"/"+str(yyyymmdd)+"-216-"+str(posx)+"x-"+str(posz)+"z-las.ali" printcommand = "echo alibava-gui --no-gui --nevts="+str(nevents)+" --out="+filename+" --laser "+config command = "alibava-gui --no-gui --nevts="+str(nevents)+" --out="+filename+" --laser "+config diff --git a/Software/CheckAlignment/CheckAlignment.C b/Software/CheckAlignment/CheckAlignment.C index 2ffd59d..a12f348 100644 --- a/Software/CheckAlignment/CheckAlignment.C +++ b/Software/CheckAlignment/CheckAlignment.C @@ -114,9 +114,7 @@ gROOT->ProcessLine("#include "); // Do some fanciness to get the directory right. - // string inputDirectory = "~/TestStand/AnalysisResults/"+string(sensor)+"/Alignment"; string inputDirectory = "/disk/groups/hep/flionett/TestStand/AnalysisResults/"+string(sensor)+"/Alignment"; - // string outputDirectory = "~/TestStand/AnalysisResults/"+string(sensor)+"/Alignment"; string outputDirectory = "/disk/groups/hep/flionett/TestStand/AnalysisResults/"+string(sensor)+"/Alignment"; if (externalPath!=0) outputDirectory = string(outputDirectory+"/"+externalPath); diff --git a/Software/Focusing/Focusing.C b/Software/Focusing/Focusing.C index dc94da7..4a4afb3 100644 --- a/Software/Focusing/Focusing.C +++ b/Software/Focusing/Focusing.C @@ -414,7 +414,11 @@ // Mu - left edge. // Mu - style for left fit results. - gStyle->SetStatX(0.65); + /* + gStyle->SetStatX(0.65); + gStyle->SetStatY(0.9); + */ + gStyle->SetStatX(0.93); gStyle->SetStatY(0.9); TGraphErrors *gmuLeft = new TGraphErrors(stepsz,z,muLeft,uz,umuLeft); @@ -433,7 +437,7 @@ // Mu - right edge. // Mu - style for right fit results. - gStyle->SetStatX(0.85); + gStyle->SetStatX(0.93); gStyle->SetStatY(0.9); TGraphErrors *gmuRight = new TGraphErrors(stepsz,z,muRight,uz,umuRight); @@ -450,7 +454,7 @@ DrawGraphErrors(cmuRight,gmuRight,"AP",path_to_figures); // Sigma - style for fit results. - gStyle->SetStatX(0.85); + gStyle->SetStatX(0.75); gStyle->SetStatY(0.9); // Sigma - parameters. diff --git a/Software/Tools/SCurve.C b/Software/Tools/SCurve.C index 3560e9d..793f99b 100644 --- a/Software/Tools/SCurve.C +++ b/Software/Tools/SCurve.C @@ -469,6 +469,60 @@ // fitLeft->SetParLimits(3,150.,220.); } + else if (filename == "ProcessRawData-201503232-216") { + // Right. + if (zvalue < 150.) { + *minRight = 120.; + *maxRight = 200.; + } + else { + *minRight = 110.; + *maxRight = 200.; + } + + // Left. + if (zvalue < 170.) { + *minLeft = 240.; + *maxLeft = 320.; + } + else if (zvalue < 250.) { + *minLeft = 220.; + *maxLeft = 310.; + } + else { + *minLeft = 220.; + *maxLeft = 300.; + } + + // Right. + parSCurves[0] = 2.5; + parSCurves[1] = 150.; + parSCurves[2] = 10.; + parSCurves[3] = 3.; + + // parSCurves[4] = 10.; + // parSCurves[5] = 20.; + parSCurves[6] = 120.; + parSCurves[7] = 180.; + parSCurves[8] = 3.; + parSCurves[9] = 20.; + // parSCurves[10] = 8.; + // parSCurves[11] = 18.; + + // Left. + parSCurves[12] = 2.5; + parSCurves[13] = 275.; + parSCurves[14] = 10.; + parSCurves[15] = 3.; + + // fitLeft->SetParLimits(0,90.,170.); + parSCurves[18] = 250.; + parSCurves[19] = 300.; + parSCurves[20] = 3.; + parSCurves[21] = 20.; + // fitLeft->SetParLimits(3,150.,220.); + } + return; } @@ -568,6 +622,36 @@ // parSigma[17] = ?.; } + else if (filename == "ProcessRawData-201503232-216") { + // Sigma left. + parSigma[0] = 0.01; + parSigma[1] = 550.; + parSigma[2] = 5.; + + parSigma[3] = 0.001; + parSigma[4] = 1.; + + parSigma[5] = 500.; + parSigma[6] = 700.; + + // parSigma[7] = ?.; + // parSigma[8] = ?.; + + // Sigma right. + parSigma[9] = 0.01; + parSigma[10] = 580.; + parSigma[11] = 5.; + + parSigma[12] = 0.001; + parSigma[13] = 1.; + + parSigma[14] = 500.; + parSigma[15] = 700.; + + // parSigma[16] = ?.; + // parSigma[17] = ?.; + } + return; }