Skip to content
Snippets Groups Projects

Compare revisions

Changes are shown as if the source revision was being merged into the target revision. Learn more about comparing revisions.

Source

Select target project
No results found

Target

Select target project
  • jlab/hallc/exp/polhe3/hallc_replay
  • wmhenry/hallc_replay
  • Sawatzky/hallc_replay
  • jhchen/hallc_replay
  • markkjones/hallc_replay
  • mingyu/hallc_replay
  • mrnycz/hallc_replay
  • murchhanaroy/hallc_replay
  • melanierehfuss/hallc_replay
9 results
Show changes
Commits on Source (6)
Showing
with 1178 additions and 788 deletions
#!/usr/bin/perl
#
## NOTES: This code is ugly and evolved from a 'quick and dirty' hack. Don't
# learn from it...
#
# TODO:
# - Could implement the parameter substitution that is used in some param files
# - That would allow checking the 'final' values hcana ends up with
#
# Brad Sawatzky <brads@jlab.org>
use strict;
use warnings;
use Data::Dumper;
use Term::ANSIColor qw(:constants);
use Getopt::Long;
use Scalar::Util qw(looks_like_number);
my $MAXSIG = 10;
my $help;
my $verbose=0;
my @cfiles;
GetOptions(
"h|help" => \$help,
"v|verbose+" => \$verbose,
"m|maxsigma=f" => \$MAXSIG,
"c|compare=s{2}" => \@cfiles
);
sub usage() {
print "Usage: $0 <files>
Parse and compare hcana parameter (PARAM/*.param) files.
You'll want to run this on a terminal that supports color.
By default, each file will sanity checked individually. Parsing
errors will be flagged, and (array only!) data that contain values
more than 'maxsigma' ($MAXSIG) std.dev away from the mean will be flagged.
Add '-v' to print out all parameters in a standardized format.
Two files (ie. before and after new calibration) can be compared with the
'-c' option. Differences are computed and evaluated between parameter
values.
** NOTE: Many flagged outliers are OK. It is up to /you/ to understand
what is OK (and why) and what is a problem/error!
FLAGS:
-c | --compare (Requires 2 files as arguments)
-m | --maxsigma (Warn if sigma exceeds value [$MAXSIG])
-v | --verbose
-h | --help
\n";
}
if($help) {
usage();
exit(0);
}
if( (@cfiles > 0) and (@cfiles != 2) ) {
print "-!-> '--compare requires 2 filenames as arguments\n\n";
print "ARGV: " . Dumper(@ARGV) . "\n";
print "cfiles: " . Dumper(@cfiles) . "\n";
exit(1);
}
sub load_file($) {
my $f = shift;
print "---> Parsing file: ", BLUE, "\t$f ", RESET, ". . . ";
open (my $fp, "<$f")
or die " -!-> Can't open file '$f': $!\n";
my %pfile;
my %params;
my $comment="";
my $last_comment="";
my $p = undef;
my @vals = ();
my $last_line="";
while(my $line = <$fp>) {
chomp($line);
if($line =~ s/\s*[#;](.*)\s*$//) { # strip comment
$comment .= " $1";
}
next if($line =~ /^\s*$/); # skip empty lines
$line =~ s/^\s*//; # strip leading whitespace
if($line =~ /([\w]+)\s*=\s*(.*)\s*$/) { # look for <param> = .... line
my $new_param=$1;
if( defined($p) ) { # store prior param=vals data (if present)
store_param($p, \@vals, $last_comment, $last_line, \%params);
$p = undef;
$last_comment = $comment;
$comment = "";
@vals=(); # clear @vals
} else {
if( ! exists( $pfile{comment} ) ) {
## Accumulated comment should header be from top of file
$pfile{comment} = $comment;
$last_comment = $comment;
$comment = "";
}
}
$p=$new_param;
push( @vals, split_vals($2) );
} else {
push( @vals, split_vals($line) );
}
$last_line = $line;
}
## Store final parameter
store_param($p, \@vals, $comment, $last_line, \%params);
close $fp or die "Can't close file '$f': $!\n";
$pfile{filename} = $f;
$pfile{params} = \%params;
$pfile{comment} = "" if( ! exists( $pfile{comment} ) );
print " Done.\n";
return(\%pfile);
}
sub store_param($$$$$) {
my $p = shift;
my $val_ref = shift;
my $comment = shift;
my $last_line = shift;
my $param_ref = shift;
if( defined($p) ) { # store prior param=vals data (if present)
if($last_line =~ /,\s*$/) {
print YELLOW, "\n-!-> WARNING: trailing comma on last line for param '$p'\n", RESET;
}
my ($type, $cleaned_vals) = validate_vals($p, @$val_ref ); # validiate AND clean up @vals (in-situ!)
$param_ref->{$p}{vals} = [ @$cleaned_vals ];
$param_ref->{$p}{type} = $type; # store parameter type (string or numeric)
$param_ref->{$p}{comment} = $comment; # store parameter description
}
}
sub split_vals($) {
## Attempt to catch the various 'parameter' types scattered through param files...
my $line=shift;
my @vals;
## All numereric, no math operators (but possible neg. sign)
## Assume space delimited, *not* comma delimited... (ie. hhodo_calib.param files)
if($line =~ /^[-.\s0-9]+$/) {
my @tmp = split(/\s+/, $line);
my $c=0;
foreach my $v ( @tmp ) { $c++ if looks_like_number($v); }
if( $c == scalar(@tmp) ) { # Confirm all tokens are actually numbers
push @vals, @tmp;
} else { # if not, strip spaces and assume it is a formula with a minus sign...
$line =~ s/\s+//g;
push @vals, $line;
}
return @vals;
}
## Generally assume comma delimited
$line =~ s/,\s*$//; # strip trailing comma on line
foreach my $v (split(/,/, $line)) {
if($v =~ /["'](.+?)["']/) { # assume this is quoted string
push @vals, $1;
next;
}
$v =~ s/\s+//g; # strip whitespace
if($v =~ /[-+.0-9\/\(\)]+/) { # all numbers or simple formula in first comma-sep 'value'
push @vals, $v;
} else { # otherwise assume whole line is one arguement/formula
push @vals, $line;
last;
}
}
return @vals;
}
sub validate_vals($@) {
my $param = shift;
my @vals;
my $type;
my $N_numeric=0;
my $i=-1; # so first val is index 0
foreach ( @_ ) {
$i++;
if(looks_like_number($_)) {
$N_numeric++;
push @vals, $_;
next;
}
if($_ =~ /^[-+*\s\/.0-9\(\)]+$/) { # Simple algebraic expression (no variables)
my $v = $_;
$v =~ s/\s+//g;
my $tmp = eval( $v );
if( defined($tmp) ) {
push @vals, $tmp;
$N_numeric++;
next;
} else {
print "\n", RED, "-!-> WARNING: Invalid calculated argument for parameter '$param' val[$i]: '$_'\n", RESET;
}
}
push @vals, $_; # Keep original value as fallback
}
if( $N_numeric == scalar(@vals) ) { $type="numeric"; }
elsif($N_numeric == 0) { $type="string"; }
else {
print "\n", RED, "-!-> WARNING: Mix of 'numeric' and 'string' entries for parameter '$param'\n", RESET;
print " Values = \"", RED, join(', ', @vals) . "\"\n", RESET;
$type = "inconsistent";
}
return $type, \@vals;
}
sub compare_params($$) {
my $pf1 = shift;
my $pf2 = shift;
my $fn1 = $pf1->{filename};
my $fn2 = $pf2->{filename};
my @k1 = sort (keys( %{$pf1->{params}} ));
my @k2 = sort (keys( %{$pf2->{params}} ));
print "Comparing parameters in files:\n";
print " $fn1\n";
print " $fn2\n";
print "\n";
#print "Keys: " . join(", ", @k1) . "\n";
print "--> Cross check params are all present in each file...\n";
foreach my $k (@k1) {
die "-!-> Param '$k' missing in '$fn2'\n" unless ( exists($pf2->{params}->{$k}) );
}
foreach my $k (@k2) {
die "-!-> Param '$k' missing in '$fn1'\n" unless ( exists($pf1->{params}->{$k}) );
}
print " Done.\n\n";
print "--> Comparing all parameters for each keyword...\n";
foreach my $k ( @k1 ) {
my @diffs;
my @percent_diffs;
print "----- $k -----\n";
print $pf1->{params}->{$k}{comment} . "\n";
my @vals1 = @{$pf1->{params}->{$k}{vals}};
my @vals2 = @{$pf2->{params}->{$k}{vals}};
my $type1 = $pf1->{params}->{$k}{type};
my $type2 = $pf2->{params}->{$k}{type};
if( $type1 ne $type2 ) {
print RED;
printf ("-|-> WARNING: Different value types for parameter (%s vs. %s)\n", $type1, $type2);
print RESET;
next; # skip additional cross-checks on this parameter
}
print "---> Parameter type: ", BLUE, "$type1\n", RESET;
if( $type1 eq "inconsistent") {
print RED, "-|-> WARNING: parameter type is INCONSISTENT (mix of numeric/string) for parameter '$k'\n", RESET;
next;
}
## Skip processing on non-numeric parameters
next if( $type1 ne "numeric");
if( scalar(@vals1) != scalar(@vals2) ) {
print RED;
printf "-|-> WARNING: Different array lengths for parameter (%d vs. %d)\n", scalar(@vals1), scalar(@vals2);
print RESET;
}
my $stats1 = stats_array(@vals1);
my $stats1_nz = stats_array_suppressZeroes(@vals1);
my $stats2 = stats_array(@vals2);
my $stats2_nz = stats_array_suppressZeroes(@vals2);
foreach ( 0 .. $#vals1 ) {
my $d = $vals1[$_] - $vals2[$_];
my $pdiff = $vals1[$_] != 0 ? $d / $vals1[$_] : $d;
push(@diffs, $d);
push(@percent_diffs, $pdiff);
}
my $diffstats = stats_array(@diffs);
print " DIFFERENCES between: ", BLUE, "$k($fn1)", BLACK " - ", BLUE, "$k($fn2)\n";
print_stats($diffstats);
print_table(\@diffs, $diffstats);
#print_table(\@percent_diffs); # Prints a table of computed 'percent diffs'; not useful either
#print_pdiff_table(@percent_diffs); # Prints a table of 'percent diff' indicators; not super useful in the end
print " $k($fn1)\n";
if(@vals1 > 1) {
print " (NOTE on stats: ", BLUE, "All data in array", RESET, "; ", MAGENTA, "Ignoring zeroes", RESET, ").\n";
print BLUE; print_stats($stats1);
print MAGENTA; print_stats($stats1_nz);
}
print_table(\@vals1, $stats1_nz);
print " $k($fn2)\n";
if(@vals2 > 1) {
print " (NOTE on stats: ", BLUE, "All data in array", RESET, "; ", MAGENTA, "Ignoring zeroes", RESET, ").\n";
print BLUE; print_stats($stats2);
print MAGENTA; print_stats($stats2_nz);
}
print_table(\@vals2, $stats2_nz);
print "-"x100 . "\n";
}
}
sub print_file_info($) {
my $pf1 = shift;
my $fn1 = $pf1->{filename};
my @k1 = sort (keys( %{$pf1->{params}} ));
my $print_header=0;
foreach my $k ( @k1 ) {
my @vals1 = @{$pf1->{params}->{$k}{vals}};
my $type1 = $pf1->{params}->{$k}{type};
my $stats1 = undef;
my $stats1_nz = undef;
if( $type1 eq "inconsistent") {
print RED, "-|-> WARNING: parameter type is INCONSISTENT (mix of numeric/string) for parameter '$k'\n", RESET;
}
if ($type1 eq "numeric") {
$stats1 = stats_array(@vals1);
$stats1_nz = stats_array_suppressZeroes(@vals1);
}
if( ($verbose > 0) or ( ($stats1->{stddev} > $MAXSIG) and ($stats1->{stddev} > 0) ) ) {
if($print_header++ < 1) {
print "="x100, "\n";
print "Information for file:", BLUE, "\t$fn1\n", RESET;
print GREEN, $pf1->{comment} . "\n", RESET;
print " (NOTE on stats: ", BLUE, "All data in array", RESET, "; ", MAGENTA, "Ignoring zeroes", RESET, ").\n";
}
print "----- $k -----\n";
print GREEN, $pf1->{params}->{$k}{comment} . "\n", RESET;
if( defined($stats1) and ($stats1->{stddev} > $MAXSIG)) {
print RED, "-!-> WARNING! : 'Anomalously' large standard deviation [> $MAXSIG] <-!-\n", RESET;
}
if( ($type1 eq "numeric") and (@vals1 > 1) ) {
print BLUE; print_stats($stats1);
print MAGENTA; print_stats($stats1_nz);
}
print RESET; print_table(\@vals1, $stats1_nz);
}
}
print "-"x100, "\n" if($print_header);
}
sub stats_array(@) {
my %stats;
my $N=scalar(@_);
my $tmp=0;
foreach ( @_ ) {
$tmp+=$_;
}
$stats{N}=$N;
$stats{sum}=$tmp;
$stats{mean}= $N==0 ? -1 : $tmp/$N;
$tmp=0;
foreach ( @_ ) {
$tmp+= ($_ - $stats{mean})**2
}
$stats{stddev}=$N==0 ? -1 : sqrt($tmp/$N);
return \%stats;
}
sub stats_array_suppressZeroes(@) {
my @tmp;
foreach ( @_ ) {
push @tmp, $_ if($_ != 0);
}
return stats_array(@tmp);
}
sub print_stats($) {
my $href=shift;
foreach my $k (sort keys(%$href) ) {
printf(" %s = %8.2f :", $k, $href->{$k});
}
print "\n";
}
sub print_pdiff_table() {
my $i=0;
print " Values:";
foreach my $p (@_) {
print "\n " unless ($i++ % 10);
if ( abs($p) <= 0.001) {print GREEN, " = "}
elsif( abs($p) <= 0.010) {print YELLOW, " . "}
elsif( abs($p) <= 0.100) {print MAGENTA, " x "}
else {print RED, " ! "};
}
print "\n", RESET;
}
sub print_table() {
my $vals=shift;
my $stats=shift;
my $i=0;
my $len = scalar(@$vals);
print " Values:";
if( defined($stats) ) {
print " [ ", YELLOW, ">1 stddev", RESET, "; ", RED, ">2 stddevs", RESET, " ]" if($len > 1);
}
my $stddev = defined($stats->{stddev}) ? $stats->{stddev} : -1;
foreach my $p (@$vals) {
print "\n" unless ($i++ % 10);
my $val;
if( looks_like_number($p) ) {
$val = sprintf("% 10.3f", $p);
} else {
$val = sprintf(" %s", $p);
}
if( $stddev > 0 ) {
my $d = abs($p - $stats->{mean})/$stddev;
print YELLOW if($d > 1);
print RED if($d > 2);
print RESET, ON_WHITE if($p==0);
}
print $val, RESET;
}
print "\n\n";
}
#######################################################################################
my @pfile_list;
if( @cfiles > 0 ) {
foreach my $f (@cfiles) {
my $dat = load_file($f);
push @pfile_list, $dat;
#print "\n";
print_file_info($dat);
}
print "\n"; compare_params($pfile_list[0], $pfile_list[1]);
} else {
foreach my $f (@ARGV) {
my $dat = load_file($f);
push @pfile_list, $dat;
print_file_info($dat);
}
}
This diff is collapsed.
! new fit to the SHMS extended target, global fit
! -0.000739206302 -0.00142606959 0.00110779242 0 00000
---------------------------------------------
0.282246121 -0.0469480361 0.0312875096 0.667153399 10000
-1.43030847 0.101807209 -0.0448589125 -0.265706749 01000
0.00400988979 -0.766855741 0.321342715 -0.00128007291 00100
-0.06969626 1.47823145 -2.03555322 -0.0894340584 00010
-0.67099857 0.236646041 -0.142675235 -1.95819072 20000
4.05496381 -1.33055561 0.751105261 14.5254699 11000
-3.52128932 -0.386577038 -0.303562288 -14.7683128 02000
-0.0974816105 4.41629926 -1.05634266 -0.67421213 10100
0.382838075 -2.29087664 0.95275118 1.6860641 01100
-0.0348434919 -0.0891321676 -0.0553536647 -1.06471281 00200
-0.227822111 -46.1514904 9.6651466 -0.38616236 10010
1.36927671 27.093834 -6.71293752 2.63422556 01010
0.513381872 0.405073944 0.688529004 1.82692667 00110
-2.34561446 6.03171286 -4.81332457 2.16863555 00020
3.95760448 -1.28744695 0.348734758 6.95241266 30000
-35.7500579 6.68515541 -1.83340624 -71.1762972 21000
92.9418661 -12.3608732 1.88077362 218.345425 12000
-59.770613 2.08178929 6.89323903 -149.452012 03000
1.847713 -26.6847016 4.77827008 -0.131920908 20100
-11.2600744 174.99879 -30.1506168 31.2372059 11100
13.3300635 -251.173735 38.255751 -101.143387 02100
1.06796523 -5.16825258 1.21496022 10.8913494 10200
-4.69591385 7.02349966 0.630843039 -0.267031569 01200
-0.188438198 1.89159532 -1.45393331 -0.170683087 00300
-8.23928972 256.368629 -48.8866924 -16.8303129 20010
46.8985178 -1736.87768 325.826611 -67.3108236 11010
-49.558746 2650.36525 -474.929386 322.020556 02010
-13.8381052 60.1771639 -12.7427167 -182.352086 10110
64.3803426 -137.19661 15.2820434 240.872342 01110
5.54988061 -4.40749901 19.9462604 -5.74748554 00210
67.889336 -82.2608201 9.73933582 460.460434 10020
-370.037076 293.426386 -25.5182471 -1535.5001 01020
-47.3503548 -170.086635 -114.720021 3.60570705 00120
145.020266 879.796872 303.362974 60.5709952 00030
-14.250846 -7.68823397 0.771964563 -14.2826759 40000
150.404348 113.614785 -12.205382 186.845598 31000
-414.634273 -623.792883 76.6060213 -800.174844 22000
-72.5498221 1399.25804 -167.34086 1214.13639 13000
950.442376 -793.526821 60.0867842 -234.780373 04000
-13.1836255 47.4609717 -6.96612987 15.1818966 30100
123.686051 -455.464347 61.4887826 -283.774899 21100
-305.055008 655.601293 -23.3154409 1247.01195 12100
160.389874 1023.61863 -272.300867 -1071.09369 03100
-7.08646959 -11.4825248 7.13467474 -28.4648732 20200
43.0965377 5.39293849 -9.49205944 76.3825835 11200
-37.5887948 191.744965 -65.4413141 -33.7632646 02200
4.45717709 -63.8583172 31.9707604 19.6121472 10300
-7.61423844 -52.247798 -6.27086773 -68.174109 01300
0.648382985 27.0345143 -6.63432867 -12.3156414 00400
57.393748 -571.312939 92.2710486 116.743681 30010
-444.832971 5715.42065 -958.611366 -377.730634 21010
702.935798 -10813.1537 1673.62813 450.226463 12010
-28.3639521 -5175.79549 1114.50465 -4506.44417 03010
43.4760413 138.677847 -104.508476 383.575703 20110
-332.789156 -46.6988409 211.245767 402.183396 11110
390.048478 -2773.86011 745.087381 559.259523 02110
-75.9809193 1105.40731 -478.995166 -250.265865 10210
107.530376 570.425411 95.119003 1218.11896 01210
-3.4786756 -246.44909 41.5378866 129.262735 00310
76.4844268 -1075.48667 628.232041 -2128.65479 20020
-171.365708 5327.53464 -1924.6285 -3113.60264 11020
25.7690128 2398.99956 -1207.12757 -639.860161 02020
564.251617 -6393.88556 2510.86482 584.175154 10120
-919.286914 -1494.16898 -714.88048 -3393.68669 01120
-14.4348139 1651.68264 -207.212384 -560.255043 00220
-569.111961 17209.8278 -4523.87309 -383.167868 10030
-386.816688 3106.50401 -1151.58376 -500.540224 01030
5.99832177 -3599.78731 266.245248 708.682182 00130
-15.2618775 -1377.60558 148.753009 249.999843 00040
5.48815034 83.4230576 -11.2302355 -7.2356411 50000
-144.76117 -907.309836 117.063246 60.9384923 41000
762.478866 3171.91251 -395.047967 -165.368284 32000
-771.326252 -2439.32586 279.162423 126.346427 23000
-964.954497 -2925.21382 279.257295 254.189956 14000
-587.787355 -1705.45264 130.367847 397.459782 05000
-10.2718605 104.633795 -22.1295009 -83.9714915 40100
5.20135863 -1094.10517 228.399435 1280.47511 31100
125.730311 3502.28495 -661.042327 -5435.80599 22100
21.0365837 -3265.32179 505.526913 3917.91024 13100
25.2251125 -4366.02754 771.062511 4721.51784 04100
26.4812978 78.1317855 -42.437548 160.669472 30200
-277.000988 -136.339146 161.799785 -1470.35849 21200
709.365924 -740.087553 -113.539042 3803.97338 12200
-526.497002 2951.35169 -377.010993 -5268.00971 03200
-5.67258941 211.521843 -60.4864026 23.5887834 20300
-13.7516233 171.695934 -200.149825 -679.870127 11300
129.864554 -300.573443 435.67357 2194.89905 02300
3.54453402 42.6870576 -4.13923009 -71.5784841 10400
2.30258483 -437.120477 60.8497571 456.689968 01400
-0.0906967256 186.060956 -61.9379875 -9.67856063 00500
21.6125667 -107.742645 2.33710474 -436.00193 40010
122.148126 411.784137 -18.3803122 1890.14889 31010
-555.064899 2940.69081 -676.950865 2360.88545 22010
-422.590353 1337.35963 -314.519086 1623.2691 13010
-202.783509 282.479483 -60.0428196 840.602295 04010
-12.8750249 -720.71932 333.063491 -943.482821 30110
211.779121 113.106845 -649.734619 4746.99874 21110
113.181466 443.678319 -176.850281 609.992834 12110
-46.7876658 532.93509 -15.4677407 -730.839786 03110
161.278675 -4151.0798 1530.21863 598.998199 20210
-629.134594 -630.919297 -172.750487 -859.465574 11210
175.648964 -2193.21893 194.697017 -921.214445 02210
-64.2863209 12.305927 120.248007 464.747594 10310
142.119418 3206.67842 -593.368174 -2816.79138 01310
-19.184106 -1650.2793 574.261283 183.468825 00410
81.1002019 4339.87003 -923.074236 1792.78178 30020
-61.5019299 -210.677421 710.44254 515.524135 21020
-53.4533608 -219.863341 378.195051 -108.469253 12020
-38.4867168 -32.5389827 136.044828 -215.896274 03020
11.2473198 20659.6711 -5909.43573 -721.124351 20120
-51.6294332 4888.05709 -1689.11904 -817.171968 11120
47.6601634 884.398191 -422.137054 -406.643721 02120
70.6443139 -761.103172 -551.214495 -614.081888 10220
174.760825 633.038589 -290.723626 -269.113197 01220
139.927861 5738.61327 -1737.27359 -562.173653 00320
112.492022 6654.81201 -2097.96619 -402.195562 20030
32.6897921 1550.9748 -550.012745 -150.006508 11030
17.1405976 353.640952 -145.447168 -55.0578267 02030
62.0181192 -240.163838 -252.633388 -16.5448678 10130
53.0069163 85.3293202 -99.8348661 -10.4322299 01130
-13.2789564 2346.72527 -592.20148 -182.735064 00230
19.79591 144.312612 -124.52352 6.33640721 10040
11.7965996 51.4043195 -37.122889 2.5860752 01040
-8.63280584 464.15252 -105.34975 -33.0662278 00140
-2.03517181 60.8067748 -11.6214429 -5.71215558 00050
58.7762691 -137.515946 26.7869428 0 60000
-490.337276 1077.92811 -217.948535 0 51000
842.760004 -1709.73117 363.198224 0 42000
633.143922 -1443.15203 218.221019 0 33000
300.416027 -706.913592 67.8116591 0 24000
118.708544 -290.672153 13.1504388 0 15000
43.3910285 -117.332666 1.32417068 0 06000
150.671725 -316.910225 75.2330761 0 50100
-1096.21106 2595.30048 -641.806677 0 41100
1417.15024 -4108.93459 1169.67848 0 32100
1065.4627 -3561.57943 936.348672 0 23100
485.806182 -1912.0541 467.066561 0 14100
182.497007 -857.382822 195.564462 0 05100
47.3313951 -89.8977838 8.86552241 0 40200
-278.25182 940.361515 -404.77705 0 31200
391.137746 -2630.12104 951.871417 0 22200
270.972196 -1355.35894 560.491022 0 13200
119.247391 -380.187752 203.471841 0 04200
-72.1140667 611.159889 -208.268163 0 30300
667.982786 -4181.5157 1071.5002 0 21300
-1125.6485 8085.25483 -2317.51686 0 12300
-861.250174 5730.16387 -1681.02713 0 03300
-96.3166899 -138.342453 67.8966036 0 20400
839.137682 -120.112524 -189.640405 0 11400
-1789.9777 -575.24427 669.142691 0 02400
-22.1237136 -603.580281 202.369853 0 10500
23.9051711 -1119.01762 338.403385 0 01500
-15.3335919 -27.8884111 8.48976071 0 00600
-406.563907 27.8573825 246.673981 0 50010
1840.69059 -573.032456 -936.367874 0 41010
978.766816 -792.516852 -303.233219 0 32010
371.748956 -445.813834 -63.7795876 0 23010
122.452813 -196.325901 -7.72941703 0 14010
36.6179355 -76.4071241 1.47220394 0 05010
-172.397867 113.834662 702.28141 0 40110
10.1410741 3263.42975 -1788.98525 0 31110
112.545248 891.757772 -645.501973 0 22110
77.4849368 137.57357 -162.463567 0 13110
37.3764419 -2.89945811 -31.4765549 0 04110
59.4246939 -411.439148 401.085475 0 30210
-219.711933 -223.127194 453.374108 0 21210
-212.226914 782.708224 -88.9703507 0 12210
-120.823501 568.492456 -124.757208 0 03210
147.550838 1837.28778 -474.921377 0 20310
-169.514422 1809.9345 -692.734896 0 11310
-292.338595 680.158593 -206.995367 0 02310
39.2022142 7393.21977 -2156.42894 0 10410
348.129741 775.170676 -528.171211 0 01410
40.4006539 -139.373793 82.9722276 0 00510
596.522037 -2717.40808 -816.121639 0 40020
152.79024 26.2878519 -531.166356 0 31020
52.6916763 90.8409898 -184.341853 0 22020
20.1618306 27.7309183 -52.5719379 0 13020
7.68298248 4.96301215 -13.3680388 0 04020
-433.121563 -1135.84983 1100.40218 0 30120
-133.662452 -329.073189 303.925049 0 21120
-48.6672867 5.22528463 52.9316915 0 12120
-20.0209216 46.8572572 0.558943565 0 03120
36.4818183 -2224.7399 549.077369 0 20220
-53.8739287 -187.600917 17.344155 0 11220
-47.3770042 25.9893045 -18.0622291 0 02220
81.6492705 1641.58304 -444.97652 0 10320
82.450046 246.913496 -140.232992 0 01320
247.601987 -605.529952 117.82034 0 00420
-144.188435 -388.437557 334.356784 0 30030
-37.5907341 -125.240325 93.3173396 0 21030
-10.733209 -22.1521908 21.0249895 0 12030
-3.64308151 0.859538231 3.50996292 0 03030
-5.70809747 -725.71498 205.145634 0 20130
-13.3774218 -107.970271 26.7583554 0 11130
-7.95740346 -11.3519879 0.438605167 0 02130
22.3494634 127.541951 -27.8847504 0 10230
15.3953231 16.3762209 -15.1069076 0 01230
79.8258524 -239.408544 43.6362452 0 00330
-3.9868582 -149.059457 47.5849346 0 20040
-2.91404437 -24.0266494 6.90385242 0 11040
-1.33704179 -2.86553847 0.239450922 0 02040
4.71826899 -24.9700806 8.45226288 0 10140
2.55498831 -6.68294 0.258246965 0 01140
17.1712631 -52.4922098 10.5867997 0 00240
0.735189351 -6.1917164 1.8511068 0 10050
0.36691872 -1.69422178 0.174803871 0 01050
3.09350261 -10.6949417 2.47117239 0 00150
0.499913274 -2.35220012 0.605331749 0 00060
0.292838822 -0.0779452895 0.044292394 0.845582884 00001
-1.40937257 0.301926272 -0.187978798 -2.47726545 10001
3.33484635 -0.862548002 0.574689547 10.5041925 01001
0.013045016 4.51258325 -0.861523847 0.0259132153 00101
-0.0618394303 -47.7437684 8.94535901 -0.107744042 00011
-1.06632062 0.16674145 -0.107916202 -1.3022916 00002
---------------------------------------------
......@@ -4,9 +4,10 @@
hcal_pos_gain_cor= 12.36, 4.92, 9.01, 9.26, 8.65, 11.89, 10.86, 11.02, 8.99, 13.89, 12.75, 10.86, 11.47,
9.41, 10.94, 6.35, 11.91, 7.36, 5.63, 7.67, 6.38, 7.93, 8.06, 9.32, 11.27, 11.20,
21.59, 12.58, 15.08, 20.22, 13.91, 16.04, 20.14, 15.74, 18.63, 22.88, 13.20, 17.16, 18.49,
32.14, 17.81, 22.37, 21.93, 20.67, 22.30, 25.65, 21.99, 23.71, 23.26, 22.88, 24.09, 18.74,
32.14, 17.81, 22.37, 21.93, 20.67, 22.30, 25.65, 21.99, 23.71, 23.26, 22.88, 24.09, 18.74
hcal_neg_gain_cor= 15.16, 15.36, 12.39, 10.39, 10.89, 11.96, 12.87, 16.16, 11.27, 10.79, 10.16, 11.23, 10.83,
12.60, 12.34, 14.47, 12.03, 15.08, 14.74, 14.54, 14.93, 15.33, 11.37, 13.29, 12.14, 7.28,
0.00, 0.00, 0.00, 0.00, 0.00, 0.00, 0.00, 0.00, 0.00, 0.00, 0.00, 0.00, 0.00,
0.00, 0.00, 0.00, 0.00, 0.00, 0.00, 0.00, 0.00, 0.00, 0.00, 0.00, 0.00, 0.00,
0.00, 0.00, 0.00, 0.00, 0.00, 0.00, 0.00, 0.00, 0.00, 0.00, 0.00, 0.00, 0.00
......@@ -4,8 +4,9 @@
hcal_pos_gain_cor= 12.32, 5.47, 8.95, 9.24, 8.84, 11.86, 11.18, 11.03, 8.61, 13.80, 12.67, 11.32, 8.71,
9.60, 11.27, 6.92, 12.63, 7.40, 5.91, 7.90, 6.60, 7.94, 8.04, 9.50, 11.87, 10.49,
22.12, 12.67, 15.18, 20.60, 14.22, 16.29, 20.54, 16.11, 19.04, 23.07, 13.46, 17.53, 17.92,
30.32, 17.78, 21.81, 20.90, 19.61, 21.23, 23.94, 20.83, 22.49, 22.37, 21.80, 22.41, 18.85,
30.32, 17.78, 21.81, 20.90, 19.61, 21.23, 23.94, 20.83, 22.49, 22.37, 21.80, 22.41, 18.85
hcal_neg_gain_cor= 15.07, 14.61, 12.64, 10.65, 10.87, 12.09, 12.50, 16.52, 12.00, 11.14, 10.45, 10.95, 11.90,
12.69, 12.09, 13.96, 11.43, 15.15, 14.53, 14.56, 14.64, 15.46, 11.57, 13.33, 11.71, 10.08,
0.00, 0.00, 0.00, 0.00, 0.00, 0.00, 0.00, 0.00, 0.00, 0.00, 0.00, 0.00, 0.00,
0.00, 0.00, 0.00, 0.00, 0.00, 0.00, 0.00, 0.00, 0.00, 0.00, 0.00, 0.00, 0.00,
0.00, 0.00, 0.00, 0.00, 0.00, 0.00, 0.00, 0.00, 0.00, 0.00, 0.00, 0.00, 0.00
......@@ -16,5 +16,5 @@ hcer_region = 30, -30, 0,
20, 20, 60,
30, 30, 30,
.1, .1, .1,
.1, .1, .1
.1, .1, .1
; SHMS aerogel gain factors from 0.5% C production run 4698
; SHMS aerogel gain fators from LH2 production 4965
paero_neg_gain = 1./13.0561, 1./10.9350, 1./12.7182, 1./11.8223, 1./10.5835, 1./8.43767, 1./12.9098,
paero_pos_gain = 1./7.32454, 1./9.78246, 1./10.4120, 1./12.7322, 1./10.4748, 1./10.6406, 1./10.6904,
paero_neg_gain = 1./13.0561, 1./10.9350, 1./12.7182, 1./11.8223, 1./10.5835, 1./8.43767, 1./12.9098
paero_pos_gain = 1./7.32454, 1./9.78246, 1./10.4120, 1./12.7322, 1./10.4748, 1./10.6406, 1./10.6904
; SHMS aerogel gain factors from 0.5% C production run 4698
paero_neg_gain = 1./13.0028, 1./10.9573, 1./12.5605, 1./11.7673, 1./10.4386, 1./8.43599, 1./12.7153,
paero_pos_gain = 1./7.3107, 1./9.89528, 1./10.4261, 1./12.6266, 1./10.4952, 1./10.6188, 1./10.7433,
paero_neg_gain = 1./13.0028, 1./10.9573, 1./12.5605, 1./11.7673, 1./10.4386, 1./8.43599, 1./12.7153
paero_pos_gain = 1./7.3107, 1./9.89528, 1./10.4261, 1./12.6266, 1./10.4952, 1./10.6188, 1./10.7433
; Calibration constants for file shms_replay_production_all_7109_500000, 26606 events processed
;pcal_neg_gain_cor = 0.00, 30.14, 25.74, 15.50, 19.70, 15.53, 26.19, 30.16, 17.18, 25.95, 20.34, 18.94, 19.31, 0.00,
;pcal_pos_gain_cor = 0.00, 15.52, 21.25, 21.53, 21.22, 21.46, 16.55, 15.88, 23.98, 18.74, 27.22, 27.62, 0.00, 0.00,
;pcal_neg_gain_cor = 0.00, 30.14, 25.74, 15.50, 19.70, 15.53, 26.19, 30.16, 17.18, 25.95, 20.34, 18.94, 19.31, 0.00
;pcal_pos_gain_cor = 0.00, 15.52, 21.25, 21.53, 21.22, 21.46, 16.55, 15.88, 23.98, 18.74, 27.22, 27.62, 0.00, 0.00
;pcal_arr_gain_cor = 0.00, 0.00, 0.00, 0.00, 0.00, 0.00, 0.00, 0.00, 0.00, 0.00, 0.00, 0.00, 0.00, 0.00, 0.00, 0.00,
; 0.00, 0.00, 0.00, 0.00, 0.00, 0.00, 0.00, 0.00, 0.00, 0.00, 0.00, 0.00, 0.00, 0.00, 0.00, 0.00,
; 0.00, 0.00, 0.00, 25.01, 48.26, 56.36, 29.61, 0.00, 0.00, 0.00, 0.00, 0.00, 0.00, 0.00, 0.00, 0.00,
......@@ -15,12 +15,12 @@
; 0.00, 0.00, 59.09, 33.38, 27.97, 37.41, 19.72, 15.23, 0.00, 0.00, 0.00, 0.00, 0.00, 31.92, 0.00, 0.00,
; 0.00, 0.00, 0.00, 0.00, 42.05, 23.08, 18.68, 0.00, 0.00, 0.00, 0.00, 0.00, 0.00, 0.00, 0.00, 0.00,
; 0.00, 0.00, 0.00, 0.00, 0.00, 0.00, 0.00, 0.00, 0.00, 0.00, 0.00, 0.00, 0.00, 0.00, 0.00, 0.00,
; 0.00, 0.00, 0.00, 0.00, 0.00, 0.00, 0.00, 0.00, 0.00, 0.00, 0.00, 0.00, 0.00, 0.00, 0.00, 0.00,
; 0.00, 0.00, 0.00, 0.00, 0.00, 0.00, 0.00, 0.00, 0.00, 0.00, 0.00, 0.00, 0.00, 0.00, 0.00, 0.00
; Calibration constants for file shms_replay_production_all_7110_500000, 55611 events processed
;pcal_neg_gain_cor = 0.00, 34.29, 26.22, 15.20, 19.68, 15.32, 26.14, 30.69, 17.56, 26.02, 20.68, 19.25, 20.75, 0.00,
;pcal_pos_gain_cor = 0.00,102.71, 21.34, 21.76, 21.24, 21.51, 16.79, 15.73, 23.75, 18.73, 27.05, 27.71, 23.34, 0.00,
;pcal_neg_gain_cor = 0.00, 34.29, 26.22, 15.20, 19.68, 15.32, 26.14, 30.69, 17.56, 26.02, 20.68, 19.25, 20.75, 0.00
;pcal_pos_gain_cor = 0.00,102.71, 21.34, 21.76, 21.24, 21.51, 16.79, 15.73, 23.75, 18.73, 27.05, 27.71, 23.34, 0.00
;pcal_arr_gain_cor = 0.00, 0.00, 0.00, 0.00, 0.00, 0.00, 0.00, 0.00, 0.00, 0.00, 0.00, 0.00, 0.00, 0.00, 0.00, 0.00,
; 0.00, 0.00, 0.00, 0.00, 0.00, 0.00, 0.00, 0.00, 0.00, 0.00, 0.00, 0.00, 0.00, 0.00, 0.00, 0.00,
; 0.00, 0.00, 0.00, 27.09, 50.31, 56.29, 30.82, 0.00, 0.00, 0.00, 0.00, 0.00, 0.00, 0.00, 0.00, 0.00,
......@@ -34,12 +34,12 @@
; 0.00, 0.00, 59.83, 34.78, 28.68, 38.46, 19.57, 31.14, 0.00, 0.00, 0.00, 0.00, 35.10, 22.48, 0.00, 0.00,
; 0.00, 0.00, 0.00, 26.35, 33.08, 33.50,-12.38, 0.00, 0.00, 0.00, 0.00, 0.00, 0.00, 0.00, 0.00, 0.00,
; 0.00, 0.00, 0.00, 0.00, 0.00, 0.00, 0.00, 0.00, 0.00, 0.00, 0.00, 0.00, 0.00, 0.00, 0.00, 0.00,
; 0.00, 0.00, 0.00, 0.00, 0.00, 0.00, 0.00, 0.00, 0.00, 0.00, 0.00, 0.00, 0.00, 0.00, 0.00, 0.00,
; 0.00, 0.00, 0.00, 0.00, 0.00, 0.00, 0.00, 0.00, 0.00, 0.00, 0.00, 0.00, 0.00, 0.00, 0.00, 0.00
; Calibration constants for file shms_defocused.root (SHMS 9643, 9644, 9645, 9646, 9648, 9649, 9650, 9652 and 9654) 306065 events processed
;pcal_neg_gain_cor = 23.98, 26.50, 27.96, 17.52, 22.82, 16.46, 22.16, 29.95, 30.88, 43.38, 21.45, 22.89, 21.67, 55.90,
;pcal_pos_gain_cor = 11.72, 53.90, 23.71, 24.34, 28.44, 30.40, 23.79, 26.81, 28.26, 18.71, 26.45, 29.51, 22.84, 0.00,
;pcal_neg_gain_cor = 23.98, 26.50, 27.96, 17.52, 22.82, 16.46, 22.16, 29.95, 30.88, 43.38, 21.45, 22.89, 21.67, 55.90
;pcal_pos_gain_cor = 11.72, 53.90, 23.71, 24.34, 28.44, 30.40, 23.79, 26.81, 28.26, 18.71, 26.45, 29.51, 22.84, 0.00
;pcal_arr_gain_cor = 0.00, 0.00, 0.00, 8.94, 26.83, 22.93, 56.80, 38.60, 28.83, 62.52, 44.36, 0.00, 0.00, 0.00, 0.00, 0.00,
; 0.00, 27.21, 29.68, 35.31, 27.88, 36.87, 33.00, 30.82, 35.13, 30.02, 34.52, 26.17, 0.00, 0.00, 0.00, 0.00,
; 0.00, 45.97, 27.32, 37.10, 29.30, 31.68, 28.79, 31.26, 30.81, 26.81, 30.30, 33.84, 27.26, 0.00, 0.00, 0.00,
......@@ -53,12 +53,12 @@
; 9.24, 25.62, 26.91, 24.97, 26.43, 31.29, 30.08, 27.68, 31.54, 33.71, 31.36, 32.03, 29.98, 33.83, 34.00, 0.00,
; 0.00, 26.08, 23.04, 26.06, 29.22, 30.54, 28.60, 27.62, 26.95, 27.16, 27.36, 30.72, 28.00, 20.02, 0.00, 0.00,
; 0.00, 31.38, 26.62, 32.41, 57.55, 28.71, 23.28, 26.16, 27.63, 22.19, 22.46, 36.94, 0.00, 0.00, 0.00, 0.00,
; 0.00, 0.00, 0.00, 0.00, 42.28, 5.81, 45.36, 25.30, 21.53, 46.54, 16.55, 0.00, 0.00, 0.00, 0.00, 0.00,
; 0.00, 0.00, 0.00, 0.00, 42.28, 5.81, 45.36, 25.30, 21.53, 46.54, 16.55, 0.00, 0.00, 0.00, 0.00, 0.00
; Calibration constants for file shms_defocused, (SHMS 9643, 9644, 9645, 9646, 9648, 9649, 9650, 9652 and 9654) 326733 events processed
pcal_neg_gain_cor = 26.19, 24.42, 28.19, 17.60, 22.85, 16.45, 21.68, 29.98, 32.77, 44.84, 21.70, 22.98, 21.72, 54.30,
pcal_pos_gain_cor = 26.76, 21.87, 23.81, 24.39, 28.55, 30.59, 24.10, 27.71, 28.46, 18.77, 26.59, 29.75, 23.02, 64.24,
pcal_neg_gain_cor = 26.19, 24.42, 28.19, 17.60, 22.85, 16.45, 21.68, 29.98, 32.77, 44.84, 21.70, 22.98, 21.72, 54.30
pcal_pos_gain_cor = 26.76, 21.87, 23.81, 24.39, 28.55, 30.59, 24.10, 27.71, 28.46, 18.77, 26.59, 29.75, 23.02, 64.24
pcal_arr_gain_cor = 0.00, 38.72, 0.00, 10.29, 26.93, 23.15, 59.96, 43.89, 28.80, 61.87, 43.64, 0.00, 0.00, 0.00, 0.00, 0.00,
22.92, 27.11, 29.95, 35.28, 27.96, 36.88, 32.90, 30.61, 34.46, 29.93, 34.49, 25.16, 0.00, 0.00, 0.00, 0.00,
23.98, 25.05, 27.47, 37.12, 29.40, 31.72, 28.74, 31.03, 30.21, 26.67, 30.32, 33.89, 28.52, 0.00, 0.00, 0.00,
......@@ -72,4 +72,4 @@ pcal_arr_gain_cor = 0.00, 38.72, 0.00, 10.29, 26.93, 23.15, 59.96, 43.89, 28.8
30.01, 23.08, 26.52, 24.76, 26.38, 31.47, 30.19, 27.90, 31.69, 32.70, 30.64, 31.73, 29.87, 33.76, 34.35, 0.00,
22.89, 23.19, 22.74, 26.03, 29.24, 30.61, 28.71, 27.36, 26.97, 26.11, 26.73, 30.37, 28.02, 86.51, 0.00, 0.00,
0.00, 32.55, 26.33, 32.11, 63.70, 28.72, 23.02, 24.32, 27.76, 21.37, 21.78, 41.10, 0.00, 0.00, 0.00, 0.00,
0.00, 0.00, 0.00, 0.00, 28.23, 30.73, 24.23, 58.08, 20.99, 41.94, 12.27, 0.00, 0.00, 0.00, 0.00, 0.00,
\ No newline at end of file
0.00, 0.00, 0.00, 0.00, 28.23, 30.73, 24.23, 58.08, 20.99, 41.94, 12.27, 0.00, 0.00, 0.00, 0.00, 0.00
......@@ -15,7 +15,7 @@
; 101.17, 36.05, 63.39, 36.22, 30.48, 41.64, 18.73, 15.46, 0.00, 0.00, 0.00, 0.00, 35.11, 24.73, 0.00, 0.00,
; 0.00, 38.01, 26.39, 32.23, 43.53, 40.56, 0.00, 0.00, 0.00, 0.00, 0.00, 0.00, 0.00, 0.00, 0.00, 0.00,
; 0.00, 46.92, 19.22, 63.43, 0.00, 0.00, 0.00, 0.00, 0.00, 0.00, 0.00, 0.00, 0.00, 0.00, 0.00, 0.00,
; 0.00, 0.00, 0.00, 0.00, 0.00, 0.00, 0.00, 0.00, 0.00, 0.00, 0.00, 0.00, 0.00, 0.00, 0.00, 0.00,
; 0.00, 0.00, 0.00, 0.00, 0.00, 0.00, 0.00, 0.00, 0.00, 0.00, 0.00, 0.00, 0.00, 0.00, 0.00, 0.00
; =:=:=:=:=:=:=:=:=:=:=:=:=:=:=:=:=:=:=:=:=:=:=:=:=:=:=:=:=:=:=:=:=:=:=:=:=:=:=:=:=:=:=:=:=:=:=:=:=:=:=:=:=:=:=:
......@@ -26,19 +26,19 @@
; pcal_neg_gain_cor = 38.95, 24.60, 26.04, 25.35, 27.34, 25.04, 30.20, 30.72, 24.99, 27.74, 26.58, 26.41, 0.00, 0.00,
; pcal_pos_gain_cor = 38.19, 25.14, 25.89, 24.85, 28.32, 29.20, 26.21, 21.12, 27.85, 25.34, 29.06, 26.76, 0.00, 0.00,
; pcal_arr_gain_cor = 0.00, 0.00, 0.00,-11.64, 4.29, 0.00, 0.00, 0.00, 0.00, 0.00, 0.00, 0.00, 0.00, 0.00, 0.00, 0.00,
; 0.00, 28.21, 56.12, 42.75, 44.30, 36.46, 0.00, 0.00, 0.00, 0.00, 0.00, 0.00, 0.00, 0.00, 0.00, 0.00,
; 32.73, 35.38, 35.25, 33.49, 56.12, 59.50, 37.06, 0.00, 0.00, 0.00, 0.00, 0.00, 0.00, 0.00, 0.00, 0.00,
; 43.51, 43.92, 35.55, 44.65, 37.11, 28.56, 78.64, 55.86, 0.00, 0.00, 0.00, 0.00, 0.00, 0.00, 0.00, 0.00,
; 18.75, 31.64, 29.44, 27.06, 61.24, 53.66, 43.56, 30.47, 32.11, 38.01, 0.00, 0.00, 0.00, 0.00, 0.00, 0.00,
; 0.00, 39.60, 29.88, 67.58, 17.45, 39.64, 41.69, 54.30, 70.41, 34.80, 42.62, 50.36, 72.84, 0.00, 0.00, 0.00,
; 0.00, 32.36, 51.20, 43.14, 24.31, 43.12, 54.58, 42.75, 37.13, 37.11, 32.18, 22.32, 39.83, 33.32, 0.00, 0.00,
; 20.07, 11.30, 16.15, 13.13, 17.60, 12.34, 17.88, 21.70, 11.98, 17.60, 25.71, 20.57, 27.83, 16.88, 29.82, 0.00,
; 54.99, 36.93, 30.76, 32.41, 51.16, 43.07, 24.65, 44.56, 62.24, 71.86, 26.94, 63.35, 26.87, 25.91, 0.00, 0.00,
; 79.05, 53.53, 19.55, 40.76, 24.26, 58.01, 45.21, 55.56, 34.07, 19.31, 30.35, 37.24, 53.66, 32.34, 0.00, 0.00,
; 0.00, 39.99, 66.96, 41.52, 33.98, 43.03, 20.42, 35.30, 0.00, 0.00, 0.00, 0.00, 32.19, 24.30, 0.00, 0.00,
; 0.00, 47.57, 31.89, 37.61, 45.30, 41.20, 16.54, 0.00, 0.00, 0.00, 0.00, 0.00, 0.00, 0.00, 0.00, 0.00,
; 0.00, 0.00, 25.58, 61.96, 60.39, 0.00, 0.00, 0.00, 0.00, 0.00, 0.00, 0.00, 0.00, 0.00, 0.00, 0.00,
; 0.00, 0.00, 0.00, 0.00, 0.00, 0.00, 0.00, 0.00, 0.00, 0.00, 0.00, 0.00, 0.00, 0.00, 0.00, 0.00,
; 0.00, 28.21, 56.12, 42.75, 44.30, 36.46, 0.00, 0.00, 0.00, 0.00, 0.00, 0.00, 0.00, 0.00, 0.00, 0.00,
; 32.73, 35.38, 35.25, 33.49, 56.12, 59.50, 37.06, 0.00, 0.00, 0.00, 0.00, 0.00, 0.00, 0.00, 0.00, 0.00,
; 43.51, 43.92, 35.55, 44.65, 37.11, 28.56, 78.64, 55.86, 0.00, 0.00, 0.00, 0.00, 0.00, 0.00, 0.00, 0.00,
; 18.75, 31.64, 29.44, 27.06, 61.24, 53.66, 43.56, 30.47, 32.11, 38.01, 0.00, 0.00, 0.00, 0.00, 0.00, 0.00,
; 0.00, 39.60, 29.88, 67.58, 17.45, 39.64, 41.69, 54.30, 70.41, 34.80, 42.62, 50.36, 72.84, 0.00, 0.00, 0.00,
; 0.00, 32.36, 51.20, 43.14, 24.31, 43.12, 54.58, 42.75, 37.13, 37.11, 32.18, 22.32, 39.83, 33.32, 0.00, 0.00,
; 20.07, 11.30, 16.15, 13.13, 17.60, 12.34, 17.88, 21.70, 11.98, 17.60, 25.71, 20.57, 27.83, 16.88, 29.82, 0.00,
; 54.99, 36.93, 30.76, 32.41, 51.16, 43.07, 24.65, 44.56, 62.24, 71.86, 26.94, 63.35, 26.87, 25.91, 0.00, 0.00,
; 79.05, 53.53, 19.55, 40.76, 24.26, 58.01, 45.21, 55.56, 34.07, 19.31, 30.35, 37.24, 53.66, 32.34, 0.00, 0.00,
; 0.00, 39.99, 66.96, 41.52, 33.98, 43.03, 20.42, 35.30, 0.00, 0.00, 0.00, 0.00, 32.19, 24.30, 0.00, 0.00,
; 0.00, 47.57, 31.89, 37.61, 45.30, 41.20, 16.54, 0.00, 0.00, 0.00, 0.00, 0.00, 0.00, 0.00, 0.00, 0.00,
; 0.00, 0.00, 25.58, 61.96, 60.39, 0.00, 0.00, 0.00, 0.00, 0.00, 0.00, 0.00, 0.00, 0.00, 0.00, 0.00,
; 0.00, 0.00, 0.00, 0.00, 0.00, 0.00, 0.00, 0.00, 0.00, 0.00, 0.00, 0.00, 0.00, 0.00, 0.00, 0.00
; =:=:=:=:=:=:=:=:=:=:=:=:=:=:=:=:=:=:=:=:=:=:=:=:=:=:=:=:=:=:=:=:=:=:=:=:=:=:=:=:=:=:=:=:=:=:=:=:=:=:=:=:=:=:=:
......@@ -49,26 +49,26 @@
; pcal_neg_gain_cor = 33.27, 25.04, 25.96, 25.48, 27.68, 25.35, 30.30, 31.58, 25.17, 27.97, 26.54, 26.21, 32.49, 0.00,
; pcal_pos_gain_cor = 42.02, 25.46, 26.41, 25.19, 28.60, 29.37, 26.38, 21.22, 27.51, 25.29, 29.79, 26.99, 0.00, 0.00,
; pcal_arr_gain_cor = 0.00, 0.00, 0.00, 0.00, 12.79, 0.00, 0.00, 0.00, 0.00, 0.00, 0.00, 0.00, 0.00, 0.00, 0.00, 0.00,
; 0.00, 28.09, 53.66, 41.74, 45.15, 38.23, 0.00, 0.00, 0.00, 0.00, 0.00, 0.00, 0.00, 0.00, 0.00, 0.00,
; 0.00, 35.53, 35.73, 33.54, 56.71, 60.27, 37.73, 0.00, 0.00, 0.00, 0.00, 0.00, 0.00, 0.00, 0.00, 0.00,
; 35.14, 45.14, 36.07, 45.27, 37.60, 29.02, 79.43, 57.41, 0.00, 0.00, 0.00, 0.00, 0.00, 0.00, 0.00, 0.00,
; 21.29, 31.62, 29.72, 27.45, 61.87, 54.67, 44.22, 30.75, 32.90, 28.49, 0.00, 34.06, 36.96, 70.21, 0.00, 0.00,
; 0.00, 39.83, 30.13, 68.67, 17.71, 40.29, 42.30, 54.94, 71.11, 35.47, 45.08, 51.12, 72.58, 17.21, 0.00, 0.00,
; 0.00, 32.87, 51.93, 43.69, 24.65, 43.80, 55.15, 43.32, 37.54, 37.62, 32.55, 22.44, 39.60, 35.36, 17.72, 0.00,
; 23.55, 11.12, 16.39, 13.52, 17.89, 12.45, 18.10, 22.01, 11.90, 17.74, 25.98, 20.74, 28.24, 16.76, 5.93, 0.00,
; 44.44, 37.17, 31.14, 32.76, 51.70, 43.66, 24.91, 44.91, 62.18, 72.64, 27.38, 63.76, 27.50, 26.35, 0.00, 0.00,
; 73.08, 53.51, 19.98, 41.49, 24.59, 58.70, 45.56, 56.93, 33.88, 53.89, 47.60, 37.75, 53.80, 33.01, 17.75, 0.00,
; 0.00, 40.39, 67.77, 41.87, 33.67, 42.68, 20.94, 34.60, 0.00, 0.00, 0.00, 0.00, 33.82, 26.39, 0.00, 0.00,
; 0.00, 46.80, 32.43, 38.12, 44.70, 42.21, 17.12, 0.00, 0.00, 0.00, 0.00, 0.00, 0.00, 0.00, 0.00, 0.00,
; 0.00, 0.00, 48.66, 52.75, 70.51, 0.00, 0.00, 0.00, 0.00, 0.00, 0.00, 0.00, 0.00, 0.00, 0.00, 0.00,
; 0.00, 0.00, 0.00, 0.00, 0.00, 0.00, 0.00, 0.00, 0.00, 0.00, 0.00, 0.00, 0.00, 0.00, 0.00, 0.00,
; 0.00, 28.09, 53.66, 41.74, 45.15, 38.23, 0.00, 0.00, 0.00, 0.00, 0.00, 0.00, 0.00, 0.00, 0.00, 0.00,
; 0.00, 35.53, 35.73, 33.54, 56.71, 60.27, 37.73, 0.00, 0.00, 0.00, 0.00, 0.00, 0.00, 0.00, 0.00, 0.00,
; 35.14, 45.14, 36.07, 45.27, 37.60, 29.02, 79.43, 57.41, 0.00, 0.00, 0.00, 0.00, 0.00, 0.00, 0.00, 0.00,
; 21.29, 31.62, 29.72, 27.45, 61.87, 54.67, 44.22, 30.75, 32.90, 28.49, 0.00, 34.06, 36.96, 70.21, 0.00, 0.00,
; 0.00, 39.83, 30.13, 68.67, 17.71, 40.29, 42.30, 54.94, 71.11, 35.47, 45.08, 51.12, 72.58, 17.21, 0.00, 0.00,
; 0.00, 32.87, 51.93, 43.69, 24.65, 43.80, 55.15, 43.32, 37.54, 37.62, 32.55, 22.44, 39.60, 35.36, 17.72, 0.00,
; 23.55, 11.12, 16.39, 13.52, 17.89, 12.45, 18.10, 22.01, 11.90, 17.74, 25.98, 20.74, 28.24, 16.76, 5.93, 0.00,
; 44.44, 37.17, 31.14, 32.76, 51.70, 43.66, 24.91, 44.91, 62.18, 72.64, 27.38, 63.76, 27.50, 26.35, 0.00, 0.00,
; 73.08, 53.51, 19.98, 41.49, 24.59, 58.70, 45.56, 56.93, 33.88, 53.89, 47.60, 37.75, 53.80, 33.01, 17.75, 0.00,
; 0.00, 40.39, 67.77, 41.87, 33.67, 42.68, 20.94, 34.60, 0.00, 0.00, 0.00, 0.00, 33.82, 26.39, 0.00, 0.00,
; 0.00, 46.80, 32.43, 38.12, 44.70, 42.21, 17.12, 0.00, 0.00, 0.00, 0.00, 0.00, 0.00, 0.00, 0.00, 0.00,
; 0.00, 0.00, 48.66, 52.75, 70.51, 0.00, 0.00, 0.00, 0.00, 0.00, 0.00, 0.00, 0.00, 0.00, 0.00, 0.00,
; 0.00, 0.00, 0.00, 0.00, 0.00, 0.00, 0.00, 0.00, 0.00, 0.00, 0.00, 0.00, 0.00, 0.00, 0.00, 0.00
; =:=:=:=:=:=:=:=:=:=:=:=:=:=:=:=:=:=:=:=:=:=:=:=:=:=:=:=:=:=:=:=:=:=:=:=:=:=:=:=:=:=:=:=:=:=:=:=:=:=:=:=:=:=:=:
; Calibration constants for file shms_coin_replay_production_all_7093_300000, 19948 events processed
pcal_neg_gain_cor = 0.00, 0.00, 29.96, 18.37, 23.69, 17.82, 30.19, 33.96, 20.64, 29.90, 23.05, 21.93, 90.81, 0.00,
pcal_pos_gain_cor = 0.00, 20.95, 24.47, 24.83, 24.24, 24.51, 19.26, 18.06, 27.47, 21.54, 31.39, 30.25, 0.00, 0.00,
pcal_neg_gain_cor = 0.00, 0.00, 29.96, 18.37, 23.69, 17.82, 30.19, 33.96, 20.64, 29.90, 23.05, 21.93, 90.81, 0.00
pcal_pos_gain_cor = 0.00, 20.95, 24.47, 24.83, 24.24, 24.51, 19.26, 18.06, 27.47, 21.54, 31.39, 30.25, 0.00, 0.00
pcal_arr_gain_cor = 0.00, 0.00, 0.00, 0.00, 0.00, 0.00, 0.00, 0.00, 0.00, 0.00, 0.00, 0.00, 0.00, 0.00, 0.00, 0.00,
0.00, 0.00, 0.00, 0.00, 0.00, 0.00, 0.00, 0.00, 0.00, 0.00, 0.00, 0.00, 0.00, 0.00, 0.00, 0.00,
0.00, 0.00, 0.00, 32.61, 52.89, 62.11, 45.26, 0.00, 0.00, 0.00, 0.00, 0.00, 0.00, 0.00, 0.00, 0.00,
......@@ -82,4 +82,4 @@ pcal_arr_gain_cor = 0.00, 0.00, 0.00, 0.00, 0.00, 0.00, 0.00, 0.00, 0.0
0.00, 0.00, 0.00, 39.79, 32.19, 43.27, 23.10, 24.25, 0.00, 0.00, 0.00, 0.00, 46.25, 37.68, 0.00, 0.00,
0.00, 0.00, 0.00, 0.00, 0.00, 0.00, 57.35, 0.00, 0.00, 0.00, 0.00, 0.00, 0.00, 0.00, 0.00, 0.00,
0.00, 0.00, 0.00, 0.00, 0.00, 0.00, 0.00, 0.00, 0.00, 0.00, 0.00, 0.00, 0.00, 0.00, 0.00, 0.00,
0.00, 0.00, 0.00, 0.00, 0.00, 0.00, 0.00, 0.00, 0.00, 0.00, 0.00, 0.00, 0.00, 0.00, 0.00, 0.00,
\ No newline at end of file
0.00, 0.00, 0.00, 0.00, 0.00, 0.00, 0.00, 0.00, 0.00, 0.00, 0.00, 0.00, 0.00, 0.00, 0.00, 0.00
; Calibration constants for file shms_replay_production_all_7109_500000, 26606 events processed
pcal_neg_gain_cor = 0.00, 30.14, 25.74, 15.50, 19.70, 15.53, 26.19, 30.16, 17.18, 25.95, 20.34, 18.94, 19.31, 0.00,
pcal_pos_gain_cor = 0.00, 15.52, 21.25, 21.53, 21.22, 21.46, 16.55, 15.88, 23.98, 18.74, 27.22, 27.62, 0.00, 0.00,
pcal_neg_gain_cor = 0.00, 30.14, 25.74, 15.50, 19.70, 15.53, 26.19, 30.16, 17.18, 25.95, 20.34, 18.94, 19.31, 0.00
pcal_pos_gain_cor = 0.00, 15.52, 21.25, 21.53, 21.22, 21.46, 16.55, 15.88, 23.98, 18.74, 27.22, 27.62, 0.00, 0.00
pcal_arr_gain_cor = 0.00, 0.00, 0.00, 0.00, 0.00, 0.00, 0.00, 0.00, 0.00, 0.00, 0.00, 0.00, 0.00, 0.00, 0.00, 0.00,
0.00, 0.00, 0.00, 0.00, 0.00, 0.00, 0.00, 0.00, 0.00, 0.00, 0.00, 0.00, 0.00, 0.00, 0.00, 0.00,
0.00, 0.00, 0.00, 25.01, 48.26, 56.36, 29.61, 0.00, 0.00, 0.00, 0.00, 0.00, 0.00, 0.00, 0.00, 0.00,
......@@ -15,4 +15,4 @@ pcal_arr_gain_cor = 0.00, 0.00, 0.00, 0.00, 0.00, 0.00, 0.00, 0.00, 0.0
0.00, 0.00, 59.09, 33.38, 27.97, 37.41, 19.72, 15.23, 0.00, 0.00, 0.00, 0.00, 0.00, 31.92, 0.00, 0.00,
0.00, 0.00, 0.00, 0.00, 42.05, 23.08, 18.68, 0.00, 0.00, 0.00, 0.00, 0.00, 0.00, 0.00, 0.00, 0.00,
0.00, 0.00, 0.00, 0.00, 0.00, 0.00, 0.00, 0.00, 0.00, 0.00, 0.00, 0.00, 0.00, 0.00, 0.00, 0.00,
0.00, 0.00, 0.00, 0.00, 0.00, 0.00, 0.00, 0.00, 0.00, 0.00, 0.00, 0.00, 0.00, 0.00, 0.00, 0.00,
0.00, 0.00, 0.00, 0.00, 0.00, 0.00, 0.00, 0.00, 0.00, 0.00, 0.00, 0.00, 0.00, 0.00, 0.00, 0.00
; Initial calibration using beam centering run
; Calibration constants for file shms_replay_production_wph_9589_-1, 22053 events processed
pcal_neg_gain_cor = 26.31, 26.37, 28.62, 17.85, 23.44, 16.81, 22.63, 30.65, 31.33, 45.10, 21.56, 22.57, 21.67, 0.00,
pcal_pos_gain_cor = 0.00, 29.28, 24.29, 25.40, 29.67, 31.72, 26.03, 28.91, 29.67, 18.59, 26.51, 29.10, 23.31, 0.00,
pcal_neg_gain_cor = 26.31, 26.37, 28.62, 17.85, 23.44, 16.81, 22.63, 30.65, 31.33, 45.10, 21.56, 22.57, 21.67, 0.00
pcal_pos_gain_cor = 0.00, 29.28, 24.29, 25.40, 29.67, 31.72, 26.03, 28.91, 29.67, 18.59, 26.51, 29.10, 23.31, 0.00
pcal_arr_gain_cor = 37.00, 37.00, 37.00, 20.60, 37.00, 37.00, 37.00, 37.00, 37.00, 37.00, 37.00, 37.00, 37.00, 37.00, 37.00, 37.00,
37.00, 37.00, 29.78, 32.95, 27.44, 33.52, 37.00, 37.00, 37.00, 37.00, 37.00, 37.00, 37.00, 37.00, 37.00, 37.00,
37.00, 37.00, 27.34, 24.26, 27.96, 31.54, 24.74, 37.00, 37.00, 37.00, 37.00, 37.00, 37.00, 37.00, 37.00, 37.00,
......@@ -16,4 +16,4 @@ pcal_arr_gain_cor = 37.00, 37.00, 37.00, 20.60, 37.00, 37.00, 37.00, 37.00, 37.0
37.00, 29.18, 26.79, 25.08, 26.39, 30.40, 28.08, 24.63, 26.96, 30.42, 28.16, 29.80, 28.77, 33.23, 35.17, 37.00,
37.00, 27.16, 23.02, 25.29, 30.30, 28.83, 27.12, 37.00, 37.00, 37.00, 19.72, 27.16, 27.97, 43.60, 57.21, 37.00,
37.00, 37.00, 14.52, 30.69, 37.00, 37.00, 37.00, 37.00, 37.00, 37.00, 37.00, 37.00, 37.00, 37.00, 37.00, 37.00,
37.00, 37.00, 37.00, 37.00, 37.00, 37.00, 37.00, 37.00, 37.00, 37.00, 37.00, 37.00, 37.00, 37.00, 37.00, 37.00,
37.00, 37.00, 37.00, 37.00, 37.00, 37.00, 37.00, 37.00, 37.00, 37.00, 37.00, 37.00, 37.00, 37.00, 37.00, 37.00
......@@ -9,10 +9,10 @@ SHMS_CentralPathLen = 18.1*100 ; 18.1 m (or 1810 cm)
;p_recon_coeff_filename = "DATFILES/shms_dipole_2plow.dat"
;p_recon_coeff_filename = "DATFILES/shms-2017-optimized.dat"
;p_recon_coeff_filename = "DATFILES/shms-2017-optimized_delta_newfit3.dat"
;p_recon_coeff_filename = "DATFILES/shms-2019-newopt-Jan19.dat"
; New SHMS Optics by Holly from August 2020
p_recon_coeff_filename = "DATFILES/hsv_fit_global.dat"
;p_recon_coeff_filename = "DATFILES/hsv_fit_global.dat"
p_recon_coeff_filename = "DATFILES/newfit_global_zbin_allA1n.dat"
; fall 2019 defocused tune -> Q2 current set to 120% of nominal tune
; p_recon_coeff_filename = "DATFILES/shms-2017-26cm-monte_quads_p18_q2_120_rec.dat"
\ No newline at end of file
; p_recon_coeff_filename = "DATFILES/shms-2017-26cm-monte_quads_p18_q2_120_rec.dat"
......@@ -34,8 +34,7 @@ pntracks_max_fp = 10
; No small angle approximation for cosmic ray tests
pSmallAngleApprox = 1
;
when selecting stub for chamber
; when selecting stub for chamber
; be sure stub_xp - stub_x*fRatio_xpfp_to_xfp < pstub_max_xpdiff
; fRatio_xpfp_to_xfp is set in THcDriftChamber::ReadDatabase according to the spectrometer
pstub_max_xpdiff=.2
......
......@@ -15,7 +15,7 @@
pdelta_offset = 0.0; (%) hdelta_tar = hdelta_tar + hdelta_offset
;
ptheta_offset = 0.0 ; (rad) hyp_tar = hyp_tar + htheta_offset
pphi_offset = -8.681269905E-4; (rad) hxp_tar = hxp_tar + hphi_offset
pphi_offset = -7.39206302E-4; (rad) hxp_tar = hxp_tar + hphi_offset
; The following offsets are applied to the central kinematic variables
; ptheta_lab=htheta_lab + pthetacentral_offset/degree
......
......@@ -10,7 +10,7 @@ phgcer_num_regions = 4;
; Number of regions in which tracks can be matched too
; phgcer_region: 8 values for each region (1 per mirror + sum)
; central x,y,dx,dy values and x,y,dx,dy half widths.
; Defined in clomuns, region 1, region 2, region 3, region 4...
; Defined in columns, region 1, region 2, region 3, region 4...
; Assumes rectangular volume with x = 55 cm and y = 50 cm
; FIX ME! Waiting for numbers from detector
phgcer_region = 27.5, 27.5, -27.5, -27.5,
......@@ -20,4 +20,4 @@ phgcer_region = 27.5, 27.5, -27.5, -27.5,
27.5, 27.5, 27.5, 27.5,
25.0, 25.0, 25.0, 25.0,
0.15, 0.15, 0.15, 0.15,
0.1, 0.1, 0.1, 0.1
\ No newline at end of file
0.1, 0.1, 0.1, 0.1
This diff is collapsed.
......@@ -50,8 +50,8 @@ std::string output_file_pattern(string_view path, string_view content, string_vi
int replay_shms(
Int_t RunNumber = 7160, Int_t MaxEvent = -1, Int_t FirstEvent = 0,
const std::string& mode = "default",
const std::string& odef_file = "DEF-files/HMS/PRODUCTION/pstackana_production.def",
const std::string& cut_file = "DEF-files/HMS/PRODUCTION/CUTS/pstackana_production_cuts.def",
const std::string& odef_file = "DEF-files/SHMS/PRODUCTION/pstackana_production.def",
const std::string& cut_file = "DEF-files/SHMS/PRODUCTION/CUTS/pstackana_production_cuts.def",
const bool do_coin = false) {
// ===========================================================================
// Setup logging
......