diff --git a/.gitignore b/.gitignore index bdc7423..d0fb214 100644 --- a/.gitignore +++ b/.gitignore @@ -17,6 +17,7 @@ data/ data_proton/ Sudarshan/ wires2d/ +myenv/ Analyzer_C_ACLiC_dict0713aaa966_dictContent.h .gitignore Analyzer_C_ACLiC_dict5411fecd5c_dictUmbrella.h diff --git a/Armory/SX3Geom.h b/Armory/SX3Geom.h index 1b72241..dc7a632 100755 --- a/Armory/SX3Geom.h +++ b/Armory/SX3Geom.h @@ -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; diff --git a/MakeVertex.C b/MakeVertex.C index 6dc9778..a8cdb6d 100755 --- a/MakeVertex.C +++ b/MakeVertex.C @@ -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? diff --git a/MakeVertex.h b/MakeVertex.h index 776ec5a..dd14d32 100644 --- a/MakeVertex.h +++ b/MakeVertex.h @@ -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(){ diff --git a/run_sx3.sh b/run_sx3.sh index e298c58..6424932 100755 --- a/run_sx3.sh +++ b/run_sx3.sh @@ -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; diff --git a/sx3cal/27Al/backgains.dat b/sx3cal/27Al/backgains.dat index d1af840..278ae78 100755 --- a/sx3cal/27Al/backgains.dat +++ b/sx3cal/27Al/backgains.dat @@ -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 diff --git a/sx3cal/27Al/backgains.dat.Apr2026 b/sx3cal/27Al/backgains.dat.Apr2026 new file mode 100644 index 0000000..b111f4d --- /dev/null +++ b/sx3cal/27Al/backgains.dat.Apr2026 @@ -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 diff --git a/sx3cal/27Al/frontgains.dat.unity b/sx3cal/27Al/frontgains.dat.unity index 7f21ff5..a6df93c 100755 --- a/sx3cal/27Al/frontgains.dat.unity +++ b/sx3cal/27Al/frontgains.dat.unity @@ -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.