modified: Armory/SX3Geom.h

modified:   MakeVertex.C
	modified:   MakeVertex.h
	modified:   run_sx3.sh
	modified:   sx3cal/27Al/backgains.dat
	new file:   sx3cal/27Al/backgains.dat.Apr2026
	modified:   sx3cal/27Al/frontgains.dat.unity
This commit is contained in:
Vignesh Sitaraman 2026-05-11 14:01:12 -04:00
parent 164a3e2e57
commit 4dd157bcb8
8 changed files with 120 additions and 37 deletions

1
.gitignore vendored
View File

@ -17,6 +17,7 @@ data/
data_proton/
Sudarshan/
wires2d/
myenv/
Analyzer_C_ACLiC_dict0713aaa966_dictContent.h
.gitignore
Analyzer_C_ACLiC_dict5411fecd5c_dictUmbrella.h

View File

@ -72,6 +72,7 @@ public:
void sx3::fillevent(const std::string& positionstring, const int subchannel, const float value) {
assert(subchannel>=0 && subchannel<4);
foundevent=1;
if(positionstring=="FRONT_L") {
frontL[subchannel].push_back(value);
unmatched_front_chans.insert(subchannel);
@ -127,7 +128,7 @@ void sx3::validate() {
for(auto thing: frontL[chan]) std::cout << thing << " " << std::flush;
std::cout << "\nR:" << std::endl;
for(auto thing: frontR[chan]) std::cout << thing << " " << std::flush;*/
if(frontL[chan].at(0) + frontR[chan].at(0)> maxFE) {
if(frontL[chan].at(0) + frontR[chan].at(0)>= maxFE) {
maxFE = frontL[chan].at(0) + frontR[chan].at(0);
//zpos = (frontL[chan].at(0)-frontR[chan].at(0))/maxFE;
fchan = chan;
@ -144,7 +145,7 @@ void sx3::validate() {
printf("foo\n");
//continue;
}
if(back[chan].at(0) > maxBE) {
if(back[chan].at(0) >= maxBE) {
maxBE = back[chan].at(0);
bchan = chan;
}
@ -156,6 +157,12 @@ void sx3::validate() {
- Total F and B energies (frontE, backE) *are*.
Sudarsan B, 31 Oct 2024
*/
if(fchan==-1 || bchan==-1) {
std::cout << "how" << std::endl;
std::cout << "fc " << std::flush; for(auto fc : valid_front_chans) std::cout << fc << " (" << frontL[fc].at(0) << "," << frontR[fc].at(0)<< ") "; std::cout << std::endl;
std::cout << "bc " << std::flush; for(auto bc : valid_back_chans) std::cout << bc << " " << back[bc].at(0) << std::flush; std::cout << std::endl;
}
float Eleft = frontL[fchan].at(0);
float Eright = frontR[fchan].at(0);
frontEL = Eleft;

View File

@ -1084,6 +1084,8 @@ Bool_t MakeVertex::Process(Long64_t entry)
plotter->Fill2D("Benchmark_SX3_VertexZ_Twisted_vs_0Cathode_sx3" + std::to_string(sx3event.ch2), 400, -200, 200, 400, -200, 200, r_rhoMin_fix.Z(), vertex_recon, "1wire");
plotter->Fill2D("Benchmark_SX3_VertexZ_Twisted_vs_0Cathode_anode" + std::to_string(aWireID), 400, -200, 200, 400, -200, 200, r_rhoMin_fix.Z(), vertex_recon, "1wire");
plotter->Fill2D("Benchmark_SX3XY" + std::to_string(sx3event.ch2), 400, -100, 100, 400, -100, 100, vector_minimisedto_z.X(), vector_minimisedto_z.Y(), "1wire");
plotter->Fill2D("Benchmark_SX3z_vs_VertexZ0C", 400, -200, 200, 400, -200, 200,sx3event.pos.Z(), vertex_recon , "1wire");
}
}
// ==============================================================================
@ -1140,7 +1142,7 @@ Bool_t MakeVertex::Process(Long64_t entry)
// ==============================================================================
// Look at how close we actually got to the Si Phi.
// If min_delta_phi > 0.1 radians, it means the track never truly matched the wire!
plotter->Fill1D("Benchmark_SX3_Min_DeltaPhi", 5000, -10, 10, min_delta_phi, "1wire");
plotter->Fill1D("Benchmark_SX3_Min_DeltaPhi", 5000, -200, 200, min_delta_phi/TMath::Pi()*180, "1wire");
// Standard benchmarking comparisons against the A1C2 Cathode baseline
plotter->Fill1D("Benchmark_SX3_PCZ_Diff_Scan", 800, -180, 180, pcz_minimized - pcevent.pos.Z(), "1wire");
@ -1531,7 +1533,6 @@ Bool_t MakeVertex::Process(Long64_t entry)
// B. Compare the Vertex Z-coordinate
plotter->Fill1D("Benchmark_VertexZ_Difference", 400, -100, 100, vertex_recon_twisted - r_rhoMin_fix.Z(), "1wire");
plotter->Fill1D("Benchmark_VertexZ_Difference", 400, -100, 100, vertex_recon_twisted - r_rhoMin_fix.Z(), "1wire");
plotter->Fill2D("Benchmark_VertexZ_Twisted_vs_Cathode", 400, -200, 200, 400, -200, 200, r_rhoMin_fix.Z(), vertex_recon_twisted, "1wire");
// C. Diagnostic: Where on the wire did it hit?

View File

@ -117,6 +117,7 @@ void MakeVertex::Init(TTree *tree){
fChain->SetBranchAddress("miscCh", &misc.ch, &b_miscCh);
fChain->SetBranchAddress("miscE", &misc.e, &b_miscE);
fChain->SetBranchAddress("miscT", &misc.t, &b_miscT);
fChain->SetBranchAddress("miscf", &misc.tf, &b_miscTf);
}
Bool_t MakeVertex::Notify(){

View File

@ -20,7 +20,7 @@ fi
export DATASET="27Al"
export flip180="0"
#root -q -b -x ../ANASEN_analysis/data/27Al_Data/Run_009_mapped.root -e 'tree->Process("MakeVertex.C+O")'; mv Analyzer_SX3.root results_run09.root;
if [[ 1 -eq 1 ]]; then
if [[ 1 -eq 0 ]]; then
#export timecut_low=230.0;
export timecut_low=400.0;
#export timecut_high=400.0;
@ -37,14 +37,14 @@ fi
#protons+gas, 27Al
#export flip180="1"
#export flip180="0"
if [[ 1 -eq 0 ]] ; then
if [[ 1 -eq 1 ]] ; then
export flipa=0
export anode_offset=0
export source_vertex=-200.0; #put the 'source' on the entrance window
root -q -b -x ../ANASEN_analysis/data/27Al_Data/Run_015_mapped.root -e 'tree->Process("MakeVertex.C+O")'; mv Analyzer_SX3.root results_run15.root;
exit
root -q -b -x ../ANASEN_analysis/data/27Al_Data/Run_017_mapped.root -e 'tree->Process("MakeVertex.C+O")'; mv Analyzer_SX3.root results_run17.root;
root -q -b -x ../ANASEN_analysis/data/27Al_Data/Run_018_mapped.root -e 'tree->Process("MakeVertex.C+O")'; mv Analyzer_SX3.root results_run18.root;
exit
root -q -b -x ../ANASEN_analysis/data/27Al_Data/Run_015_mapped.root -e 'tree->Process("MakeVertex.C+O")'; mv Analyzer_SX3.root results_run15.root;
root -q -b -x ../ANASEN_analysis/data/27Al_Data/Run_017_mapped.root -e 'tree->Process("MakeVertex.C+O")'; mv Analyzer_SX3.root results_run17.root;
root -q -b -x ../ANASEN_analysis/data/27Al_Data/Run_019_mapped.root -e 'tree->Process("MakeVertex.C+O")'; mv Analyzer_SX3.root results_run19.root;
root -q -b -x ../ANASEN_analysis/data/27Al_Data/Run_020_mapped.root -e 'tree->Process("MakeVertex.C+O")'; mv Analyzer_SX3.root results_run20.root;
root -q -b -x ../ANASEN_analysis/data/27Al_Data/Run_021_mapped.root -e 'tree->Process("MakeVertex.C+O")'; mv Analyzer_SX3.root results_run21.root;

View File

@ -1,28 +1,56 @@
1 front 0 back 2 4.03168
1 front 1 back 2 4.03168
1 front 2 back 2 4.11533
1 front 3 back 2 4.17315
7 front 0 back 2 4.26886
7 front 0 back 1 3.44529
7 front 1 back 2 4.26886
7 front 1 back 1 3.44529
7 front 2 back 2 4.26886
7 front 2 back 1 3.46759
7 front 3 back 2 4.26886
7 front 3 back 1 3.44529
9 front 0 back 2 3.63215
9 front 0 back 1 3.42327
9 front 1 back 2 3.63215
9 front 1 back 1 3.42327
9 front 2 back 2 3.65694
9 front 2 back 1 3.46759
9 front 3 back 2 3.68208
9 front 3 back 1 3.42327
3 front 0 back 2 3.
3 front 0 back 1 3.
3 front 1 back 2 3.65694
3 front 1 back 1 3.68208
3 front 2 back 2 3.70756
3 front 2 back 1 3.78616
3 front 3 back 2 3.7334
3 front 3 back 1 3.68208
1 front 0 back 2 3.63215
1 front 0 back 3 3.23711
1 front 0 back 0 3.44529
1 front 1 back 2 3.63215
1 front 1 back 3 3.38008
1 front 1 back 0 3.46759
1 front 2 back 2 3.70756
1 front 2 back 3 3.21767
1 front 2 back 0 3.46759
1 front 3 back 2 3.75959
1 front 3 back 3 3.21767
1 front 3 back 0 3.44529
7 front 0 back 2 3.78616
7 front 0 back 1 3.07016
7 front 0 back 3 3.68208
7 front 0 back 0 3.14218
7 front 1 back 2 3.81311
7 front 1 back 1 3.12386
7 front 1 back 3 3.65694
7 front 1 back 0 3.14218
7 front 2 back 2 3.84045
7 front 2 back 1 3.14218
7 front 2 back 3 3.60769
7 front 2 back 0 3.14218
7 front 3 back 2 3.86817
7 front 3 back 1 3.12386
7 front 3 back 3 3.68208
7 front 3 back 0 3.14218
9 front 0 back 2 3.29688
9 front 0 back 1 3.12386
9 front 0 back 3 3.12386
9 front 0 back 0 3.03537
9 front 1 back 2 3.29688
9 front 1 back 1 3.12386
9 front 1 back 3 3.14218
9 front 1 back 0 3.05266
9 front 2 back 2 3.29688
9 front 2 back 1 3.14218
9 front 2 back 3 3.12386
9 front 2 back 0 3.05266
9 front 3 back 2 3.29688
9 front 3 back 1 3.12386
9 front 3 back 3 3.08785
9 front 3 back 0 3.03537
3 front 1 back 2 3.31729
3 front 1 back 1 3.38008
3 front 1 back 3 3.65694
3 front 1 back 0 3.53625
3 front 2 back 2 3.38008
3 front 2 back 1 3.44529
3 front 2 back 3 3.46759
3 front 2 back 0 3.51306
3 front 3 back 2 3.38008
3 front 3 back 1 3.33796
3 front 3 back 3 3.46759
3 front 3 back 0 3.46759

View File

@ -0,0 +1,41 @@
#1 front 0 back 2 4.03168
#1 front 1 back 2 4.03168
#1 front 2 back 2 4.11533
#1 front 3 back 2 4.17315
1 front 0 back 2 3.63215
1 front 0 back 3 3.23711
1 front 0 back 0 3.44529
1 front 1 back 2 3.63215
1 front 1 back 3 3.38008
1 front 1 back 0 3.46759
1 front 2 back 2 3.70756
1 front 2 back 3 3.21767
1 front 2 back 0 3.46759
1 front 3 back 2 3.75959
1 front 3 back 3 3.21767
1 front 3 back 0 3.44529
#
7 front 0 back 2 4.26886
7 front 0 back 1 3.44529
7 front 1 back 2 4.26886
7 front 1 back 1 3.44529
7 front 2 back 2 4.26886
7 front 2 back 1 3.46759
7 front 3 back 2 4.26886
7 front 3 back 1 3.44529
9 front 0 back 2 3.63215
9 front 0 back 1 3.42327
9 front 1 back 2 3.63215
9 front 1 back 1 3.42327
9 front 2 back 2 3.65694
9 front 2 back 1 3.46759
9 front 3 back 2 3.68208
9 front 3 back 1 3.42327
3 front 0 back 2 3.
3 front 0 back 1 3.
3 front 1 back 2 3.65694
3 front 1 back 1 3.68208
3 front 2 back 2 3.70756
3 front 2 back 1 3.78616
3 front 3 back 2 3.7334
3 front 3 back 1 3.68208

View File

@ -18,3 +18,7 @@
0 temp temp 1 0. 1.
0 temp temp 2 0. 1.
0 temp temp 3 0. 1.
3 temp temp 0 0. 1.
3 temp temp 1 0. 1.
3 temp temp 2 0. 1.
3 temp temp 3 0. 1.