Skip to content
Snippets Groups Projects
Commit 18653b40 authored by Mark Jones's avatar Mark Jones Committed by Mark K Jones
Browse files

Update HMS DC map , cratemap, test stand script and PARAM

1. cratemap added tdc in slot 2 .
2. Copied old cratemaps to KPP_spring_2017
3. DC map updated for 12 GeV chamber hdc.map and hdc_htrig.map
4. Add perl scripts under make_dc_maps for making map files
5. Updated hdc_histos.def
parent 19ad3191
No related branches found
No related tags found
No related merge requests found
Showing
with 3442 additions and 18 deletions
# See $ANALYZER/examples/output_example.def for examples
#
block H.dc.*
block T.hms.*
#block H.scin.*
#SIMPLE DEF FILE TO TEST 12 GeV CHAMBERS: Will need to get updated after tests
#HMS Drift Chamber 1
TH1F hdc1u1_wm 'HDC 1U1 Wiremap' H.dc.1u1.wirenum 96 0.5 96.5
TH1F hdc1u2_wm 'HDC 1U2 Wiremap' H.dc.1u2.wirenum 96 0.5 96.5
TH1F hdc1x1_wm 'HDC 1X1 Wiremap' H.dc.1x1.wirenum 102 0.5 102.5
TH1F hdc1x2_wm 'HDC 1X2 Wiremap' H.dc.1x2.wirenum 102 0.5 102.5
TH1F hdc1v1_wm 'HDC 1V1 Wiremap' H.dc.1v1.wirenum 96 0.5 96.5
TH1F hdc1v2_wm 'HDC 1V2 Wiremap' H.dc.1v2.wirenum 96 0.5 96.5
TH1F hdc1u1_rawt 'HDC 1U1 Raw TDC' H.dc.1u1.rawtdc 500 0 2000
TH1F hdc1u2_rawt 'HDC 1U2 Raw TDC' H.dc.1u2.rawtdc 500 0 2000
TH1F hdc1x1_rawt 'HDC 1X1 Raw TDC' H.dc.1x1.rawtdc 500 0 2000
TH1F hdc1x2_rawt 'HDC 1X2 Raw TDC' H.dc.1x2.rawtdc 500 0 2000
TH1F hdc1v1_rawt 'HDC 1V1 Raw TDC' H.dc.1v1.rawtdc 500 0 2000
TH1F hdc1v2_rawt 'HDC 1V2 Raw TDC' H.dc.1v2.rawtdc 500 0 2000
TH1F hdc1u1_dt 'HDC 1U1 Drift Time' H.dc.1u1.time 200 -1000 1000
TH1F hdc1u2_dt 'HDC 1U2 Drift Time' H.dc.1u2.time 200 -1000 1000
TH1F hdc1x1_dt 'HDC 1X1 Drift Time' H.dc.1x1.time 200 -1000 1000
TH1F hdc1x2_dt 'HDC 1X2 Drift Time' H.dc.1x2.time 200 -1000 1000
TH1F hdc1v1_dt 'HDC 1V1 Drift Time' H.dc.1v1.time 200 -1000 1000
TH1F hdc1v2_dt 'HDC 1V2 Drift Time' H.dc.1v2.time 200 -1000 1000
TH1F hdc1u1_dd 'HDC 1U1 Drift Distance' H.dc.1u1.dist 300 -0.1 0.6
TH1F hdc1u2_dd 'HDC 1U2 Drift Distance' H.dc.1u2.dist 300 -0.1 0.6
TH1F hdc1x1_dd 'HDC 1X1 Drift Distance' H.dc.1x1.dist 300 -0.1 0.6
TH1F hdc1x2_dd 'HDC 1X2 Drift Distance' H.dc.1x2.dist 300 -0.1 0.6
TH1F hdc1v1_dd 'HDC 1V1 Drift Distance' H.dc.1v1.dist 300 -0.1 0.6
TH1F hdc1v2_dd 'HDC 1V2 Drift Distance' H.dc.1v2.dist 300 -0.1 0.6
#HMS Drift Chamber 2
TH1F hdc2u1_wm 'HDC 2U1 Wiremap' H.dc.2u1.wirenum 96 0.5 96.5
TH1F hdc2u2_wm 'HDC 2U2 Wiremap' H.dc.2u2.wirenum 96 0.5 96.5
TH1F hdc2x1_wm 'HDC 2X1 Wiremap' H.dc.2x1.wirenum 102 0.5 102.5
TH1F hdc2x2_wm 'HDC 2X2 Wiremap' H.dc.2x2.wirenum 102 0.5 102.5
TH1F hdc2v1_wm 'HDC 2V1 Wiremap' H.dc.2v1.wirenum 96 0.5 96.5
TH1F hdc2v2_wm 'HDC 2V2 Wiremap' H.dc.2v2.wirenum 96 0.5 96.5
TH1F hdc2u1_rawt 'HDC 2U1 Raw TDC' H.dc.2u1.rawtdc 500 0 2000
TH1F hdc2u2_rawt 'HDC 2U2 Raw TDC' H.dc.2u2.rawtdc 500 0 2000
TH1F hdc2x1_rawt 'HDC 2X1 Raw TDC' H.dc.2x1.rawtdc 500 0 2000
TH1F hdc2x2_rawt 'HDC 2X2 Raw TDC' H.dc.2x2.rawtdc 500 0 2000
TH1F hdc2v1_rawt 'HDC 2V1 Raw TDC' H.dc.2v1.rawtdc 500 0 2000
TH1F hdc2v2_rawt 'HDC 2V2 Raw TDC' H.dc.2v2.rawtdc 500 0 2000
TH1F hdc2u1_dt 'HDC 2U1 Drift Time' H.dc.2u1.time 200 -1000 1000
TH1F hdc2u2_dt 'HDC 2U2 Drift Time' H.dc.2u2.time 200 -1000 1000
TH1F hdc2x1_dt 'HDC 2X1 Drift Time' H.dc.2x1.time 200 -1000 1000
TH1F hdc2x2_dt 'HDC 2X2 Drift Time' H.dc.2x2.time 200 -1000 1000
TH1F hdc2v1_dt 'HDC 2V1 Drift Time' H.dc.2v1.time 200 -1000 1000
TH1F hdc2v2_dt 'HDC 2V2 Drift Time' H.dc.2v2.time 200 -1000 1000
TH1F hdc2u1_dd 'HDC 2U1 Drift Distance' H.dc.2u1.dist 300 -0.1 0.6
TH1F hdc2u2_dd 'HDC 2U2 Drift Distance' H.dc.2u2.dist 300 -0.1 0.6
TH1F hdc2x1_dd 'HDC 2X1 Drift Distance' H.dc.2x1.dist 300 -0.1 0.6
TH1F hdc2x2_dd 'HDC 2X2 Drift Distance' H.dc.2x2.dist 300 -0.1 0.6
TH1F hdc2v1_dd 'HDC 2V1 Drift Distance' H.dc.2v1.dist 300 -0.1 0.6
TH1F hdc2v2_dd 'HDC 2V2 Drift Distance' H.dc.2v2.dist 300 -0.1 0.6
\ No newline at end of file
==== Crate 1 type vme Bank Decoding
# slot model bank
2 1190 1190
3 250 250
4 250 250
5 250 250
6 250 250
7 250 250
8 250 250
9 250 250
10 250 250
13 250 250
14 250 250
15 250 250
16 250 250
17 250 250
18 250 250
19 250 250
20 1190 1190
==== Crate 3 type vme Bank Decoding
# slot model bank
4 1190 1190
5 1190 1190
7 1190 1190
8 1190 1190
10 1190 1190
13 1190 1190
14 1190 1190
16 1190 1190
17 1190 1190
==== Crate 5 type vme Bank Decoding
# slot model bank
\ No newline at end of file
==== Crate 3 type vme Bank Decoding
# slot model bank
2 1190 1190
4 1190 1190
5 1190 1190
7 1190 1190
......
This diff is collapsed.
This diff is collapsed.
HMS1
##12 GeV HMS Drift Chamber 1
## X plane
## Wire 0 is top (from beam perspective) REFERENCE WIRE: 52 (counting from Wire 1)
# cable w_start w_end N/C
cable Xc1 10 0 11,12,13,14,15
cable Xc2 26 11
cable Xc3 42 27
cable Xc4 43 58
cable Xc5 59 74
cable Xc6 75 90
cable Xc7 91 101 11,12,13,14,15
## X' plane
## Wire 0 is top (from beam perspective) REFERENCE WIRE: 51 (counting from Wire 1)
# cable w_start w_end N/C
cable Xc1p 10 0 11,12,13,14,15
cable Xc2p 26 11
cable Xc3p 42 27
cable Xc4p 58 43
cable Xc5p 59 74
cable Xc6p 75 90
cable Xc7p 91 101 11,12,13,14,15
## U plane
## Wire 0 is upper right corner (from beam perspective) REFERENCE WIRE: 49 (counting from Wire 1)
# cable w_start w_end N/C
cable Uc1 15 0
cable Uc2 31 16
cable Uc3 32 47
cable Uc4 48 63
cable Uc5 64 79
cable Uc6 80 95
## U' plane
## Wire 0 is upper left corner (from beam perspective) REFERENCE WIRE: 48 (counting from Wire 1)
# cable w_start w_end N/C
cable Uc1p 15 0
cable Uc2p 31 16
cable Uc3p 47 32
cable Uc4p 63 48
cable Uc5p 64 79
cable Uc6p 80 95
## V plane
## Wire 0 is upper right corner (from beam perspective) REFERENCE WIRE: 49 (counting from Wire 1)
# cable w_start w_end N/C
cable Vc1 15 0
cable Vc2 31 16
cable Vc3 32 47
cable Vc4 48 63
cable Vc5 64 79
cable Vc6 80 95
## V' plane
## Wire 0 is upper right corner (from beam perspective) REFERENCE WIRE: 48 (counting from Wire 1)
# cable w_start w_end N/C
cable Vc1p 15 0
cable Vc2p 31 16
cable Vc3p 47 32
cable Vc4p 63 48
cable Vc5p 64 79
cable Vc6p 80 95
## TDC mapping
# slot conn cable ref
tdc 2 A0 Vc4p
tdc 2 A1 Uc6
tdc 4 A0 Vc2
tdc 4 A1 Uc6p
tdc 4 B0 Vc3p
tdc 4 B1 Xc7
tdc 5 A0 Xc4p
tdc 5 A1 Xc6
tdc 5 B0 Vc2p
tdc 5 B1 Xc5
tdc 7 A0 Xc3p
tdc 7 A1 Uc5
tdc 7 B0 Xc2p
tdc 7 B1 Xc4
tdc 8 A0 Xc1p
tdc 8 A1 Uc4
tdc 8 B0 Vc1
tdc 8 B1 Uc5p
tdc 10 A0 Vc1p
tdc 10 A1 Uc3
tdc 10 B0 Vc6
tdc 10 B1 Uc4p
tdc 13 A0 Vc6p
tdc 13 A1 Uc2
tdc 13 B0 Xc7p
tdc 13 B1 Uc3p
tdc 14 A0 Xc6p
tdc 14 A1 Xc5p
tdc 14 B0 Uc2p
tdc 14 B1 Vc5
tdc 16 A0 Xc3
tdc 16 A1 Xc2
tdc 16 B0 Vc4
tdc 16 B1 Xc1
tdc 17 A0 Vc5p
tdc 17 A1 Uc1
tdc 17 B0 Vc3
tdc 17 B1 Uc1p
# vim: noexpandtab softtabstop=0 shiftwidth=8 tabstop=8
HMS2
##12 GeV HMS Drift Chamber 2
## X plane
## Wire 0 is top (from beam perspective) REFERENCE WIRE: 52 (counting from Wire 1)
# cable w_start w_end N/C
cable Xc1 10 0 11,12,13,14,15
cable Xc2 26 11
cable Xc3 42 27
cable Xc4 43 58
cable Xc5 59 74
cable Xc6 75 90
cable Xc7 91 101 11,12,13,14,15
## X' plane
## Wire 0 is top (from beam perspective) REFERENCE WIRE: 51 (counting from Wire 1)
# cable w_start w_end N/C
cable Xc1p 10 0 11,12,13,14,15
cable Xc2p 26 11
cable Xc3p 42 27
cable Xc4p 58 43
cable Xc5p 59 74
cable Xc6p 75 90
cable Xc7p 91 101 11,12,13,14,15
## U plane
## Wire 0 is upper right corner (from beam perspective) REFERENCE WIRE: 49 (counting from Wire 1)
# cable w_start w_end N/C
cable Uc1 15 0
cable Uc2 31 16
cable Uc3 32 47
cable Uc4 48 63
cable Uc5 64 79
cable Uc6 80 95
## U' plane
## Wire 0 is upper left corner (from beam perspective) REFERENCE WIRE: 48 (counting from Wire 1)
# cable w_start w_end N/C
cable Uc1p 15 0
cable Uc2p 31 16
cable Uc3p 47 32
cable Uc4p 63 48
cable Uc5p 64 79
cable Uc6p 80 95
## V plane
## Wire 0 is upper right corner (from beam perspective) REFERENCE WIRE: 49 (counting from Wire 1)
# cable w_start w_end N/C
cable Vc1 15 0
cable Vc2 31 16
cable Vc3 32 47
cable Vc4 48 63
cable Vc5 64 79
cable Vc6 80 95
## V' plane
## Wire 0 is upper right corner (from beam perspective) REFERENCE WIRE: 48 (counting from Wire 1)
# cable w_start w_end N/C
cable Vc1p 15 0
cable Vc2p 31 16
cable Vc3p 47 32
cable Vc4p 63 48
cable Vc5p 64 79
cable Vc6p 80 95
## TDC mapping
# slot conn cable ref
tdc 2 C0 Vc6
tdc 2 C1 Uc4p
tdc 4 C0 Vc6p
tdc 4 C1 Uc2
tdc 4 D0 Xc7p 111
tdc 4 D1 Uc3p
tdc 5 C0 Xc6p
tdc 5 C1 Xc5p
tdc 5 D0 Uc2p
tdc 5 D1 Vc5
tdc 7 C0 Xc3
tdc 7 C1 Xc2
tdc 7 D0 Vc4
tdc 7 D1 Xc1 127
tdc 8 C0 Vc5p
tdc 8 C1 Uc1
tdc 8 D0 Vc3
tdc 8 D1 Uc1p
tdc 10 C0 Vc4p
tdc 10 C1 Uc6
tdc 10 D0 Vc2
tdc 10 D1 Uc6p
tdc 13 C0 Vc3p
tdc 13 C1 Xc7 95
tdc 13 D0 Xc4p
tdc 13 D1 Xc6
tdc 14 C0 Vc2p
tdc 14 C1 Xc5
tdc 14 D0 Xc3p
tdc 14 D1 Uc5
tdc 16 C0 Xc2p
tdc 16 C1 Xc4
tdc 16 D0 Xc1p 111
tdc 16 D1 Uc4
tdc 17 C0 Vc1
tdc 17 C1 Uc5p
tdc 17 D0 Vc1p
tdc 17 D1 Uc3
# vim: noexpandtab softtabstop=0 shiftwidth=8 tabstop=8
#!/usr/bin/perl -w
use Data::Dumper;
my %cables;
my %tdc;
#my $refchan; # NOTE this assumption is a hack for the ESB setup (BDS)
## Return the first channel of a TDC connector (A0, A1, .. ,D1)
sub conn2ch($) {
my $conn = shift;
$conn =~ tr/ABCD/0123/;
if($conn =~ /([0-3])([01])/) {
return $1*32 + $2*16;
} else {
die "Invalid connector argument: $conn\n";
}
}
my $hms_mode=0;
my $chamber_number=1;
while(<>) {
next if(/^\s*$/);
next if(/^#/);
chomp;
my @f=split;
if($f[0] eq "HMS1") {
# $hms_mode=1;
$chamber_number=1;
next;
} elsif ($f[0] eq "HMS2") {
# $hms_mode=1;
$chamber_number=2;
next;
}
if($f[0] eq "tdc") {
my $slot=$f[1];
my $conn=$f[2];
my $cable=$f[3];
my @refs=();
@refs = split(/[, ]+/, $f[4]) if($#f == 4);
die("TDC dup:'$_'\n") if( exists($tdc{$slot}{$conn}) );
$tdc{$slot}{$conn}{"cable"} = $cable;
$tdc{$slot}{$conn}{"refs"} = \@refs;
$tdc{$slot}{"refs"} = [] if( !exists($tdc{$slot}{"refs"}) );
my @chans = map( conn2ch($conn) + $_, @refs );
push(@{$tdc{$slot}{"refs"}}, @chans);
next;
}
if($f[0] eq "cable") {
my $cable=$f[1];
my $w_start=$f[2];
my $w_end=$f[3];
my @NC=();
@NC = split(/[, ]+/, $f[4]) if($#f == 4);
if($hms_mode) {
$w_start--;
$w_end--;
}
die("Cable dup:'$_'\n") if( exists($cables{$cable}{"w_start"}) );
$cables{$cable}{"w_start"} = $w_start;
$cables{$cable}{"w_end"} = $w_end;
$cables{$cable}{"NC"} = \@NC;
die("Invalid pin count '$_'\n") if( 16 != abs($w_end - $w_start) + 1 + $#NC + 1);
next;
}
}
my %wiremap;
my @planes;
if ($hms_mode == 0) {
@planes = qw( U U' X X' V' V );
} else {
@planes = qw( U U' X X' V V' );
}
sub numerically { $a <=> $b };
foreach my $sl ( sort numerically keys %tdc ) {
foreach my $conn (keys %{$tdc{$sl}}) {
next if($conn eq "refs");
my $conn2chn = conn2ch($conn);
my $cab = $tdc{$sl}{$conn}{"cable"};
next unless ( $cab =~ /(.)c\d(p)?/ );
my $p = $1;
$p .= "'" if(defined($2));
my $w_st = $cables{$cab}{"w_start"};
my $w_end = $cables{$cab}{"w_end"};
my @wires = $w_st < $w_end ?
$cables{$cab}{"w_start"} .. $cables{$cab}{"w_end"} :
reverse($cables{$cab}{"w_end"} .. $cables{$cab}{"w_start"});
for my $i (0 .. $#wires) {
$wiremap{$p}[$wires[$i]] = [ $sl, $conn2chn + $i ];
}
}
}
sub print_wiremap {
my %wiremap = %{$_[0]};
print "====== WIREMAP ======\n";
foreach my $p (sort keys %wiremap) {
print "------- Plane $p -------\n";
printf("%6s %6s %6s\n","wire","slot","chan");
my @wires = @{$wiremap{$p}};
foreach $i (0 .. $#wires) {
printf("%6d %6d %6d\n", $i, @{$wires[$i]});
}
}
print "\n";
}
sub print_replaymap {
my %wiremap = %{$_[0]};
print "====== WIREMAP ======\n";
my $lastslot = -1;
foreach my $p (sort keys %wiremap) {
my $pnum=($chamber_number*6-5);
# my $pnum=1;
foreach $pname (@planes) {
last if($pname eq $p);
$pnum++;
}
my @wires = @{$wiremap{$p}};
foreach $i (0 .. $#wires) {
my $slot= ${$wires[$i]}[0];
my $chan= ${$wires[$i]}[1];
my $wirenum=$i+1;
if ($slot != $lastslot) {
print "SLOT=$slot\n";
print "REFINDEX=1\n";
#print "$refchan\";
}
print "$chan,$pnum,$wirenum ! Plane $p, wire $wirenum\n";
$lastslot=$slot;
}
}
print "\n";
}
sub print_tdcs {
my %tdc = %{$_[0]};
print "====== TDCs ======\n";
foreach my $sl (sort numerically keys %tdc) {
print "TDC Slot $sl\n";
print "\tRefs: " . join(", ", sort numerically @{$tdc{$sl}{"refs"}}) . "\n";
foreach my $conn (sort keys %{$tdc{$sl}}) {
next if($conn eq "refs");
print "\t$conn : $tdc{$sl}{$conn}{cable}";
print "\t\tRef: " . join(", ", @{$tdc{$sl}{$conn}{"refs"}}) . "\n";
}
}
print "\n";
}
sub print_cables {
my %cables = %{$_[0]};
print "====== CABLES ======\n";
printf(" %-6s %9s %9s : %s\n", "Cable", "wire_st", "wire_end", "Not Connected");
foreach my $cab (sort keys %cables) {
printf(" %-6s %9d %9d : %s\n",
$cab, $cables{$cab}{"w_start"}, $cables{$cab}{"w_end"},
join(", ", @{$cables{$cab}{"NC"}}));
}
print "\n";
}
#print_tdcs(\%tdc);
#print_cables(\%cables);
print_replaymap(\%wiremap);
#!/usr/bin/perl -w
use Data::Dumper;
my %cables;
my %tdc;
#my $refchan; # NOTE this assumption is a hack for the ESB setup (BDS)
## Return the first channel of a TDC connector (A0, A1, .. ,D1)
sub conn2ch($) {
my $conn = shift;
$conn =~ tr/ABCD/0123/;
if($conn =~ /([0-3])([01])/) {
return $1*32 + $2*16;
} else {
die "Invalid connector argument: $conn\n";
}
}
my $hms_mode=0;
my $chamber_number=1;
while(<>) {
next if(/^\s*$/);
next if(/^#/);
chomp;
my @f=split;
if($f[0] eq "HMS1") {
# $hms_mode=1;
$chamber_number=1;
next;
} elsif ($f[0] eq "HMS2") {
# $hms_mode=1;
$chamber_number=2;
next;
}
if($f[0] eq "tdc") {
my $slot=$f[1];
my $conn=$f[2];
my $cable=$f[3];
my @refs=();
@refs = split(/[, ]+/, $f[4]) if($#f == 4);
die("TDC dup:'$_'\n") if( exists($tdc{$slot}{$conn}) );
$tdc{$slot}{$conn}{"cable"} = $cable;
$tdc{$slot}{$conn}{"refs"} = \@refs;
$tdc{$slot}{"refs"} = [] if( !exists($tdc{$slot}{"refs"}) );
my @chans = map( conn2ch($conn) + $_, @refs );
push(@{$tdc{$slot}{"refs"}}, @chans);
next;
}
if($f[0] eq "cable") {
my $cable=$f[1];
my $w_start=$f[2];
my $w_end=$f[3];
my @NC=();
@NC = split(/[, ]+/, $f[4]) if($#f == 4);
if($hms_mode) {
$w_start--;
$w_end--;
}
die("Cable dup:'$_'\n") if( exists($cables{$cable}{"w_start"}) );
$cables{$cable}{"w_start"} = $w_start;
$cables{$cable}{"w_end"} = $w_end;
$cables{$cable}{"NC"} = \@NC;
die("Invalid pin count '$_'\n") if( 16 != abs($w_end - $w_start) + 1 + $#NC + 1);
next;
}
}
my %wiremap;
my @planes;
if ($hms_mode == 0) {
@planes = qw( V V' X' X U' U );
} else {
@planes = qw( U U' X X' V V' );
}
sub numerically { $a <=> $b };
foreach my $sl ( sort numerically keys %tdc ) {
foreach my $conn (keys %{$tdc{$sl}}) {
next if($conn eq "refs");
my $conn2chn = conn2ch($conn);
my $cab = $tdc{$sl}{$conn}{"cable"};
next unless ( $cab =~ /(.)c\d(p)?/ );
my $p = $1;
$p .= "'" if(defined($2));
my $w_st = $cables{$cab}{"w_start"};
my $w_end = $cables{$cab}{"w_end"};
my @wires = $w_st < $w_end ?
$cables{$cab}{"w_start"} .. $cables{$cab}{"w_end"} :
reverse($cables{$cab}{"w_end"} .. $cables{$cab}{"w_start"});
for my $i (0 .. $#wires) {
$wiremap{$p}[$wires[$i]] = [ $sl, $conn2chn + $i ];
}
}
}
sub print_wiremap {
my %wiremap = %{$_[0]};
print "====== WIREMAP ======\n";
foreach my $p (sort keys %wiremap) {
print "------- Plane $p -------\n";
printf("%6s %6s %6s\n","wire","slot","chan");
my @wires = @{$wiremap{$p}};
foreach $i (0 .. $#wires) {
printf("%6d %6d %6d\n", $i, @{$wires[$i]});
}
}
print "\n";
}
sub print_replaymap {
my %wiremap = %{$_[0]};
print "====== WIREMAP ======\n";
my $lastslot = -1;
foreach my $p (sort keys %wiremap) {
my $pnum=($chamber_number*6-5);
# my $pnum=1;
foreach $pname (@planes) {
last if($pname eq $p);
$pnum++;
}
my @wires = @{$wiremap{$p}};
foreach $i (0 .. $#wires) {
my $slot= ${$wires[$i]}[0];
my $chan= ${$wires[$i]}[1];
my $wirenum=$i+1;
if ($slot != $lastslot) {
print "SLOT=$slot\n";
print "REFINDEX=1\n";
#print "$refchan\";
}
print "$chan,$pnum,$wirenum ! Plane $p, wire $wirenum\n";
$lastslot=$slot;
}
}
print "\n";
}
sub print_tdcs {
my %tdc = %{$_[0]};
print "====== TDCs ======\n";
foreach my $sl (sort numerically keys %tdc) {
print "TDC Slot $sl\n";
print "\tRefs: " . join(", ", sort numerically @{$tdc{$sl}{"refs"}}) . "\n";
foreach my $conn (sort keys %{$tdc{$sl}}) {
next if($conn eq "refs");
print "\t$conn : $tdc{$sl}{$conn}{cable}";
print "\t\tRef: " . join(", ", @{$tdc{$sl}{$conn}{"refs"}}) . "\n";
}
}
print "\n";
}
sub print_cables {
my %cables = %{$_[0]};
print "====== CABLES ======\n";
printf(" %-6s %9s %9s : %s\n", "Cable", "wire_st", "wire_end", "Not Connected");
foreach my $cab (sort keys %cables) {
printf(" %-6s %9d %9d : %s\n",
$cab, $cables{$cab}{"w_start"}, $cables{$cab}{"w_end"},
join(", ", @{$cables{$cab}{"NC"}}));
}
print "\n";
}
#print_tdcs(\%tdc);
#print_cables(\%cables);
print_replaymap(\%wiremap);
......@@ -37,6 +37,7 @@
==== Crate 3 type vme Bank Decoding
# slot model bank
2 1190 1190
4 1190 1190
5 1190 1190
7 1190 1190
......
......@@ -5,7 +5,7 @@ hdriftbins = 138
hdrift1stbin=0
; bin size in ns
hdriftbinsz=2
hwc1x1fract=0.0020833,0.00489,0.00876,0.01394,0.02062,0.02905,0.03922,0.05139,0.06502
hwc1u1fract=0.0020833,0.00489,0.00876,0.01394,0.02062,0.02905,0.03922,0.05139,0.06502
0.08048,0.09728,0.11528,0.13442,0.15422,0.17474,0.19559,0.21654,0.23774,0.25912
0.28047,0.30213,0.32359,0.34477,0.36578,0.38669,0.40776,0.42815,0.44870,0.46871
0.48868,0.50838,0.52755,0.54678,0.56563,0.58450,0.60268,0.62064,0.63843,0.65606
......@@ -19,7 +19,7 @@ hwc1x1fract=0.0020833,0.00489,0.00876,0.01394,0.02062,0.02905,0.03922,0.05139,0.
0.99886,0.99892,0.99898,0.99904,0.99910,0.99916,0.99921,0.99928,0.99932,0.99936
0.99939,0.99944,0.99949,0.99952,0.99957,0.99960,0.99963,0.99966,0.99969,0.99973
0.99977,0.99980,0.99984,0.99987,0.99989,0.99991,0.99994,0.99996,1.00000
hwc1y1fract=0.00205,0.00455,0.00768,0.01195,0.01753,0.02471,0.03370,0.04490,0.05814
hwc1u2fract=0.00205,0.00455,0.00768,0.01195,0.01753,0.02471,0.03370,0.04490,0.05814
0.07344,0.09075,0.10958,0.12956,0.15050,0.17182,0.19342,0.21512,0.23648,0.25785
0.27889,0.29942,0.31985,0.33992,0.36003,0.37993,0.39944,0.41896,0.43804,0.45674
0.47550,0.49399,0.51218,0.53005,0.54795,0.56572,0.58314,0.60048,0.61775,0.63452
......@@ -33,7 +33,7 @@ hwc1y1fract=0.00205,0.00455,0.00768,0.01195,0.01753,0.02471,0.03370,0.04490,0.05
0.99884,0.99896,0.99907,0.99913,0.99922,0.99927,0.99932,0.99938,0.99942,0.99946
0.99950,0.99955,0.99959,0.99962,0.99966,0.99970,0.99974,0.99978,0.99981,0.99985
0.99987,0.99988,0.99991,0.99993,0.99994,0.99996,0.99997,0.99999,1.00000
hwc1u1fract=0.00163,0.00438,0.00852,0.01456,0.02322,0.03445,0.04830,0.06440,0.08241
hwc1x1fract=0.00163,0.00438,0.00852,0.01456,0.02322,0.03445,0.04830,0.06440,0.08241
0.10195,0.12225,0.14341,0.16483,0.18632,0.20821,0.22974,0.25135,0.27244,0.29345
0.31390,0.33434,0.35483,0.37481,0.39457,0.41407,0.43316,0.45251,0.47151,0.49016
0.50897,0.52720,0.54549,0.56342,0.58131,0.59852,0.61614,0.63295,0.64993,0.66659
......@@ -47,7 +47,7 @@ hwc1u1fract=0.00163,0.00438,0.00852,0.01456,0.02322,0.03445,0.04830,0.06440,0.08
0.99879,0.99886,0.99892,0.99898,0.99904,0.99910,0.99916,0.99920,0.99925,0.99929
0.99934,0.99938,0.99942,0.99946,0.99950,0.99955,0.99959,0.99964,0.99968,0.99972
0.99975,0.99977,0.99980,0.99984,0.99987,0.99991,0.99995,0.99998,1.00000
hwc1v1fract=0.00326,0.00757,0.01344,0.02136,0.03133,0.04381,0.05851,0.07537,0.09402
hwc1x2fract=0.00326,0.00757,0.01344,0.02136,0.03133,0.04381,0.05851,0.07537,0.09402
0.11379,0.13470,0.15577,0.17671,0.19840,0.21975,0.24141,0.26240,0.28335,0.30406
0.32477,0.34510,0.36494,0.38474,0.40449,0.42400,0.44309,0.46202,0.48081,0.49929
0.51791,0.53613,0.55407,0.57212,0.58982,0.60751,0.62458,0.64179,0.65867,0.67544
......@@ -61,7 +61,7 @@ hwc1v1fract=0.00326,0.00757,0.01344,0.02136,0.03133,0.04381,0.05851,0.07537,0.09
0.99843,0.99853,0.99861,0.99869,0.99876,0.99883,0.99890,0.99895,0.99900,0.99906
0.99911,0.99917,0.99922,0.99927,0.99933,0.99937,0.99942,0.99947,0.99952,0.99956
0.99961,0.99967,0.99972,0.99977,0.99982,0.99987,0.99991,0.99996,1.00000
hwc1y2fract=0.00193,0.00455,0.00809,0.01310,0.01984,0.02852,0.03980,0.05332,0.06932
hwc1v2fract=0.00193,0.00455,0.00809,0.01310,0.01984,0.02852,0.03980,0.05332,0.06932
0.08717,0.10672,0.12719,0.14894,0.17063,0.19259,0.21465,0.23669,0.25832,0.27981
0.30063,0.32150,0.34168,0.36171,0.38169,0.40121,0.42077,0.43999,0.45896,0.47755
0.49607,0.51430,0.53253,0.55062,0.56831,0.58598,0.60344,0.62062,0.63795,0.65466
......@@ -75,7 +75,7 @@ hwc1y2fract=0.00193,0.00455,0.00809,0.01310,0.01984,0.02852,0.03980,0.05332,0.06
0.99871,0.99880,0.99888,0.99897,0.99905,0.99912,0.99918,0.99924,0.99928,0.99932
0.99935,0.99938,0.99942,0.99947,0.99951,0.99956,0.99961,0.99965,0.99969,0.99973
0.99977,0.99979,0.99982,0.99984,0.99987,0.99990,0.99994,0.99997,1.00000
hwc1x2fract=0.00214,0.00519,0.00938,0.01501,0.02253,0.03198,0.04335,0.05660,0.07178
hwc1v1fract=0.00214,0.00519,0.00938,0.01501,0.02253,0.03198,0.04335,0.05660,0.07178
0.08830,0.10580,0.12474,0.14447,0.16464,0.18488,0.20578,0.22678,0.24791,0.26913
0.29016,0.31137,0.33272,0.35362,0.37431,0.39509,0.41542,0.43568,0.45557,0.47572
0.49528,0.51454,0.53377,0.55269,0.57108,0.58959,0.60758,0.62559,0.64321,0.66102
......@@ -89,7 +89,7 @@ hwc1x2fract=0.00214,0.00519,0.00938,0.01501,0.02253,0.03198,0.04335,0.05660,0.07
0.99863,0.99870,0.99876,0.99882,0.99888,0.99894,0.99901,0.99907,0.99912,0.99918
0.99922,0.99926,0.99932,0.99938,0.99943,0.99946,0.99951,0.99955,0.99958,0.99962
0.99964,0.99967,0.99971,0.99976,0.99981,0.99987,0.99991,0.99997,1.00000
hwc2x1fract=0.00282,0.00649,0.01120,0.01715,0.02503,0.03489,0.04686,0.06073,0.07660
hwc2v1fract=0.00282,0.00649,0.01120,0.01715,0.02503,0.03489,0.04686,0.06073,0.07660
0.09394,0.11289,0.13303,0.15429,0.17570,0.19740,0.21912,0.24106,0.26292,0.28456
0.30593,0.32713,0.34811,0.36891,0.38987,0.40995,0.43007,0.44995,0.46966,0.48954
0.50886,0.52793,0.54689,0.56586,0.58451,0.60329,0.62154,0.63981,0.65771,0.67513
......@@ -103,7 +103,7 @@ hwc2x1fract=0.00282,0.00649,0.01120,0.01715,0.02503,0.03489,0.04686,0.06073,0.07
0.99805,0.99818,0.99834,0.99846,0.99855,0.99865,0.99876,0.99885,0.99894,0.99902
0.99910,0.99918,0.99924,0.99930,0.99936,0.99943,0.99947,0.99952,0.99959,0.99964
0.99967,0.99972,0.99976,0.99979,0.99983,0.99987,0.99991,0.99995,1.00000
hwc2y1fract=0.00189,0.00437,0.00796,0.01268,0.01931,0.02809,0.03946,0.05361,0.06983
hwc2v2fract=0.00189,0.00437,0.00796,0.01268,0.01931,0.02809,0.03946,0.05361,0.06983
0.08841,0.10844,0.12939,0.15122,0.17297,0.19463,0.21635,0.23751,0.25820,0.27859
0.29834,0.31778,0.33715,0.35606,0.37499,0.39382,0.41228,0.43086,0.44913,0.46718
0.48513,0.50297,0.52122,0.53882,0.55692,0.57474,0.59256,0.61020,0.62773,0.64512
......@@ -117,7 +117,7 @@ hwc2y1fract=0.00189,0.00437,0.00796,0.01268,0.01931,0.02809,0.03946,0.05361,0.06
0.99693,0.99711,0.99728,0.99746,0.99766,0.99782,0.99796,0.99808,0.99823,0.99835
0.99846,0.99858,0.99872,0.99882,0.99891,0.99902,0.99912,0.99921,0.99930,0.99939
0.99948,0.99956,0.99963,0.99971,0.99978,0.99984,0.99988,0.99994,1.00000
hwc2u1fract=0.00156,0.00424,0.00842,0.01473,0.02373,0.03591,0.05072,0.06805,0.08744
hwc2x2fract=0.00156,0.00424,0.00842,0.01473,0.02373,0.03591,0.05072,0.06805,0.08744
0.10833,0.12980,0.15167,0.17372,0.19581,0.21770,0.23906,0.25996,0.28089,0.30146
0.32182,0.34209,0.36165,0.38152,0.40063,0.41985,0.43909,0.45814,0.47724,0.49609
0.51464,0.53343,0.55206,0.57025,0.58844,0.60651,0.62447,0.64237,0.65996,0.67724
......@@ -131,7 +131,7 @@ hwc2u1fract=0.00156,0.00424,0.00842,0.01473,0.02373,0.03591,0.05072,0.06805,0.08
0.99815,0.99829,0.99842,0.99853,0.99862,0.99872,0.99881,0.99889,0.99896,0.99904
0.99911,0.99916,0.99923,0.99929,0.99935,0.99942,0.99946,0.99951,0.99957,0.99962
0.99967,0.99972,0.99975,0.99978,0.99982,0.99986,0.99992,0.99996,1.00000
hwc2v1fract=0.00158,0.00407,0.00797,0.01387,0.02206,0.03355,0.04773,0.06452,0.08356
hwc2x1fract=0.00158,0.00407,0.00797,0.01387,0.02206,0.03355,0.04773,0.06452,0.08356
0.10442,0.12599,0.14806,0.17010,0.19200,0.21382,0.23534,0.25636,0.27717,0.29774
0.31812,0.33812,0.35791,0.37705,0.39600,0.41509,0.43412,0.45289,0.47167,0.49031
0.50884,0.52730,0.54585,0.56407,0.58212,0.60006,0.61801,0.63583,0.65331,0.67073
......@@ -145,7 +145,7 @@ hwc2v1fract=0.00158,0.00407,0.00797,0.01387,0.02206,0.03355,0.04773,0.06452,0.08
0.99777,0.99794,0.99811,0.99827,0.99841,0.99851,0.99865,0.99877,0.99886,0.99896
0.99904,0.99912,0.99919,0.99925,0.99932,0.99937,0.99940,0.99946,0.99953,0.99959
0.99963,0.99969,0.99974,0.99978,0.99983,0.99989,0.99993,0.99996,1.00000
hwc2y2fract=0.00176,0.00410,0.00723,0.01133,0.01696,0.02463,0.03465,0.04724,0.06251
hwc2u2fract=0.00176,0.00410,0.00723,0.01133,0.01696,0.02463,0.03465,0.04724,0.06251
0.07971,0.09831,0.11812,0.13832,0.15820,0.17828,0.19793,0.21688,0.23560,0.25369
0.27151,0.28900,0.30632,0.32373,0.34069,0.35720,0.37383,0.39021,0.40667,0.42293
0.43900,0.45512,0.47122,0.48702,0.50263,0.51787,0.53271,0.54747,0.56211,0.57635
......@@ -159,7 +159,7 @@ hwc2y2fract=0.00176,0.00410,0.00723,0.01133,0.01696,0.02463,0.03465,0.04724,0.06
0.99603,0.99627,0.99649,0.99673,0.99695,0.99712,0.99731,0.99747,0.99762,0.99781
0.99800,0.99814,0.99828,0.99843,0.99857,0.99872,0.99886,0.99900,0.99912,0.99922
0.99932,0.99941,0.99952,0.99961,0.99970,0.99978,0.99986,0.99994,1.00000
hwc2x2fract=0.00279,0.00651,0.01147,0.01804,0.02673,0.03748,0.05021,0.06558,0.08274
hwc2u1fract=0.00279,0.00651,0.01147,0.01804,0.02673,0.03748,0.05021,0.06558,0.08274
0.10160,0.12165,0.14276,0.16451,0.18676,0.20891,0.23091,0.25266,0.27384,0.29508
0.31632,0.33717,0.35768,0.37766,0.39763,0.41747,0.43736,0.45686,0.47616,0.49525
0.51418,0.53309,0.55170,0.56999,0.58823,0.60620,0.62427,0.64203,0.65959,0.67702
......
......@@ -20,5 +20,5 @@ hdc_fix_propcorr = 1 ; do propagation along wire each time hit appeears
; Zero time correction for each plane in ns that is added to TDC time.
hdc_plane_time_zero = 0.0,0.0,0.0,0.0,0.0,0.0,
0.0,0.0,0.0,0.0,0.0,0.0
hdc_plane_time_zero = 1300.0,1300.0,1300.0,1300.0,1300.0,1300.0,
1300.0,1300.0,1300.0,1300.0,1300.0,1300.0
......@@ -39,8 +39,8 @@ hdc_readoutTB = -1.0, 1.0, -1.0, 1.0, 1.0, -1.0
; CHAMBER POSITION PARAMETERS
; x, y and z position of center for each wire chamber in cm.
hdc_xcenter = 0.0; TODO - final survey
hdc_ycenter = 0.0;
hdc_xcenter = 0.0,0.0; TODO - final survey
hdc_ycenter = 0.0,0.0;
;
hdc_1_zpos = -52.0954;
......
......@@ -39,7 +39,7 @@ void replay_hdc_test_stand(Int_t RunNumber=0, Int_t MaxEvent=0) {
// Load the Hall C style detector map
gHcDetectorMap = new THcDetectorMap();
//gHcDetectorMap->Load(gHcParms->GetString("g_decode_map_filename"));
gHcDetectorMap->Load("MAPS/HMS/DETEC/DC/hdc_6gev_htrig.map");
gHcDetectorMap->Load("MAPS/HMS/DETEC/DC/hdc_htrig.map");
// Set up the equipment to be analyzed.
THaApparatus* HMS = new THcHallCSpectrometer("H", "HMS");
......@@ -93,7 +93,7 @@ void replay_hdc_test_stand(Int_t RunNumber=0, Int_t MaxEvent=0) {
analyzer->SetEvent(event);
analyzer->SetCrateMapFileName("MAPS/db_cratemap.dat");
analyzer->SetOutFile(ROOTFileName.Data());
analyzer->SetOdefFile("DEF-files/HMS/TEST_STANDS/DC/hdc_6gev_histos.def");
analyzer->SetOdefFile("DEF-files/HMS/TEST_STANDS/DC/hdc_histos.def");
analyzer->SetCutFile("DEF-files/HMS/TEST_STANDS/DC/hdcana_cuts.def"); // optional
// File to record cuts accounting information
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment