Commit Graph

134 Commits

Author SHA1 Message Date
Sudarsan Balakrishnan f6f07a1b0c Another commit in between many breaking changes. Has Hammer+Tweezer approach for 27Al and 17F applied.
* Analyzing 17F approach will require the use of a #define in addition to globals. Not ideal but it is what it is.

* No new clever tricks other than beam eloss being treated to account for more effects.

* Urgent pending alignments:

	- geometry between sx3/qqq/pc to reflect vertexz in agreement with sourcez

	- better dynamic range correction for a1c2 wire handover points

	- need to resolve dE layer for different particle groups. No luck yet with just a *sinTheta

	- p+a dataset seems to be getting closer and closer to fully fleshed out

* Do not use this commit for future analyses. Pushed under sleep deprivation and fatigue.
2026-06-08 17:49:52 -04:00
Vignesh Sitaraman 4de5507285 modified: Armory/HistPlotter.h replaced omap with map for alphanumeric sorting of histograms 2026-06-07 08:49:01 -04:00
Sudarsan Balakrishnan 2f43903269 * Main logic broken up into subunits that aim to be self-contained. The entirety of the analysis is aimed to follow:
- find sx3 events, gainmatch them, calibrate, make a vector of these called SX3_Events
	- same step for QQQ, call it QQQ_Events
	- find anodeWire clusters, cathodeWire clusters, make vectors of these
	- make PC_Events from wire clusters, save 'anode only' and 'cathode only' cases just in case

* since PC_Events, QQQ_Events, SX3_Events are all STL containers, we can pass them to functions that perform modular analyses
* In this commit:
	- 4-wire offsets used, along with reliably figuring out phi-offset between QQQ/SX3/PC. We are close, except for some QQQ fine-tuning due to their angular extent not being 90 deg
	- the pczfix step now makes sense, 1-wire calculations also loosely match between guess and pcz
	- the nonlinearity correction/dynamic range fix is just adding to the resolution
	- p(a,a) data analysable by QQQ alphas show good kinematics, when doing the following gates:
		>  A1C1 event pczs dithered, A1C2 events made into pczfix
		>  phicut (45 deg) to gate out p+a correlations, SiE < 5 MeV && PCa > 6000 to select the alpha blob in p+a
		>  Some selection on VertexReconXY so that the Perp() of the vertex is < 6mm
		>  Selection on VertexReconZ so that z is in [-173.6, 100]. Fine alignment pending

	- Doing all the above gives reasonable p(a,a) kinematic curves with good statistics, Ex peaked at -0.7 MeV, close but not perfect
	- The above steps, when repeated with oneWire anode events stored in aClusters also yields a very reasonable kinematic locus, and Ex value, even more statistics
	- Not sure how much of this is autocorrelation stuff but
		> VertexReconZ vs Ef in QQQ (Ef is eloss-fixed alpha energy using path length) shows sensible trends.
	- Why Ex is not centered around zero might need more thought.
	- VertexReconXY is suspiciously well-centered, might need some more thought as well.

* Some infrastructure that allows processing of 17F data is also in the pipeline now.
* One fairly important bug got fixed which was ignoring qqq.id[0] when making QQQ_Events

* Ideally, follow-ups to the above done on 27Al, 17F will make their own functions that are then called separately using booleans at the very top.
* The fate of proton dE signals is out to jury.
2026-05-29 17:45:57 -04:00
Sudarsan Balakrishnan 7be45f35df Partial commit with key changes as follows:
- wireOffset is now 4 not 3. Phew. Gosh Golly. Change in Armory/ClassPW.h
	- Concomitant changes made to Armory/PC_Stepladder_Correction.h. In this particular version, a shift of 2 anodes in run*.sh has been replaced by an offset in z
	- The above needs to be worked out carefully.
	- The rho_vs_z fixes have NOT been corrected for. This version will likely yield nonsensical results, hence. To be fixed by a subsequent push that also cleans up the histogram plotting somewhat.

*Read again*

The sort uses rho from the 3 wireOffset cases in MakeVertex.C
The code assumes wireOffset=4.
Anywhere this matters, this version will break - caveat Emptor. Pushing here to plant a flag, but to also make sure the key changes are communicated across branches.
2026-05-14 18:18:17 -04:00
Sudarsan Balakrishnan 1e0af0fe9d Updates showing decent convergence on a(p,p) reaction, demonstrating a pcz offset of close to -5.0 mm for agreement
1) eloss calculations from pycatima folded in externally
2) stepladder correction moved into Armory
3) a(p,p) calculations live in their own function
4) first steps towards looking at one-wire dE/E signals, and one-wire anodes vs si-phi correlations
2026-04-28 17:36:02 -04:00
Sudarsan Balakrishnan 1ace406746 Fix gitignore, add eloss calculator files and improved sx3 gainmatch files 2026-04-20 15:10:53 -04:00
Sudarsan Balakrishnan d70581784a - Path-dependent Eloss calculations added to MakeVertex.C, made dependable on a text/csv input file read into a TGraph.
- Added calculations investigating QQQ-SX3 coincidences for a(p,p) scattering reaction analysis.
- General bookkeeping on naming conventions: made it QQQ_Events, SX3_Events, PC_Events.
- Pending a long cleanup.
2026-04-18 12:06:20 -04:00
Sudarsan Balakrishnan eb54b6ab68 Improved sx3 strip range, and added step-ladder correction to PCZ
1) Environment variables allowing flip and offset of anode wires
2) Environment variables allowing for selection of runs' start and stop time positions, to help with phi scanning runs
3) *fix histograms defined that incorporate step-ladder corrections applied to pcz, hard-coded currently in sx3cal/sx3z_vs_pcz/testmodel.h. Will need a better home in the future
4) EXFit2.C has the capability to now gainmatch all sx3 pads, and position along strip is still found from the central three pad edges. Treatment for (backE-missingfrontE) is being considered.
2026-04-14 14:07:18 -04:00
Sudarsan Balakrishnan e61a63ea13 global variables setup to explore wire geometry 2026-04-08 14:36:12 -04:00
Sudarsan Balakrishnan 39f7f7da37 1) pc-calibration macros added, 2) mild bookkeeping changes to handle multiple datasets with minimal changes. more changes to delta-t etc still pending 2026-03-25 19:28:38 -04:00
Sudarsan Balakrishnan d3305b24cc Revert "New pc-calibration macros, some bookkeeping updates in how MakeVertex.C handles different datasets."
This reverts commit 76baa16390.

Rsync had some errors, reverting this commit..
2026-03-25 19:24:36 -04:00
Sudarsan Balakrishnan 76baa16390 New pc-calibration macros, some bookkeeping updates in how MakeVertex.C handles different datasets.
- pending goal, make the 'parameter set' for a particular data analysis uniquely drawn from a database or a collection of files.
- reduce human intervention when sorting
2026-03-25 19:20:12 -04:00
Sudarsan Balakrishnan 103ddb3958 new sx3 gainmatch for 17F data's first part 2026-03-24 15:55:40 -04:00
Sudarsan Balakrishnan 623e72a197 Update README 2026-03-12 12:51:54 -04:00
Sudarsan Balakrishnan 1c63cca714 Add README 2026-03-12 12:46:43 -04:00
Sudarsan Balakrishnan 9aced93bec Add fem simulation files 2026-03-12 12:27:03 -04:00
Vignesh Sitaraman cbd4bf42a7 modified: MakeVertex.C 2026-02-26 12:42:02 -05:00
Vignesh Sitaraman 601caa3881 modified: MakeVertex.C 2026-02-24 21:06:24 -05:00
Vignesh Sitaraman 2938411c35 modified: .gitignore
new file:   ELoss/Eloss_17F
	new file:   ELoss/Eloss_27Al
	new file:   ELoss/Eloss_alpha
	new file:   ELoss/Eloss_p
	modified:   MakeVertex.C
	deleted:    MakeVertex.C:Zone.Identifier
	deleted:    MakeVertex.h:Zone.Identifier
2026-02-24 11:59:01 -05:00
Vignesh Sitaraman 8c2657255c modified: Armory/ClassPW.h
new file:   Armory/SX3Geom.h
	modified:   MakeVertex.C
	renamed:    sx3cal/sx3cal/EXFit.C -> sx3cal/EXFit.C
	renamed:    sx3cal/sx3cal/LRFit.C -> sx3cal/LRFit.C
	renamed:    sx3cal/sx3cal/backgains.dat -> sx3cal/backgains.dat
	renamed:    sx3cal/sx3cal/backgains.dat.unity -> sx3cal/backgains.dat.unity
	renamed:    sx3cal/sx3cal/frontgains.dat -> sx3cal/frontgains.dat
	renamed:    sx3cal/sx3cal/frontgains.dat.unity -> sx3cal/frontgains.dat.unity
	renamed:    sx3cal/sx3cal/rightgains.dat -> sx3cal/rightgains.dat
	renamed:    sx3cal/sx3cal/rightgains.dat.unity -> sx3cal/rightgains.dat.unity
2026-02-19 14:49:49 -05:00
Vignesh Sitaraman 00f8460e36 modified: MakeVertex.C
new file:   sx3cal/sx3cal/EXFit.C
	new file:   sx3cal/sx3cal/LRFit.C
	new file:   sx3cal/sx3cal/backgains.dat
	new file:   sx3cal/sx3cal/backgains.dat.unity
	new file:   sx3cal/sx3cal/frontgains.dat
	new file:   sx3cal/sx3cal/frontgains.dat.unity
	new file:   sx3cal/sx3cal/rightgains.dat
	new file:   sx3cal/sx3cal/rightgains.dat.unity
2026-02-18 16:01:55 -05:00
Vignesh Sitaraman 7260d42d8d modified: Armory/ANASEN_model.C
modified:   Armory/ClassPW.h
	modified:   MakeVertex.C
	modified:   TrackRecon.C
2026-02-18 12:06:54 -05:00
Vignesh Sitaraman 4401ae8eb2 new file: MakeVertex.C
new file:   MakeVertex.C:Zone.Identifier
	new file:   MakeVertex.h
	new file:   MakeVertex.h:Zone.Identifier
	modified:   TrackRecon.C
2026-02-11 15:08:11 -05:00
Vignesh Sitaraman 282aa5ecea modified: .gitignore
new file:   Armory/ClassData.h
	new file:   Armory/Hit.h
	modified:   Armory/Makefile
	new file:   Armory/fsuReader.h
	new file:   Armory/macro.h
	new file:   BatchProcess.sh
	modified:   ProcessRun.sh
	modified:   process_mapped_run.sh
2026-02-10 17:01:27 -05:00
Vignesh Sitaraman 9f949edd00 new file: RunTimeSummary.C
new file:   Timing_Summary_Matplotlib.png
	modified:   TrackRecon.C
	modified:   process_mapped_run.sh
2026-02-09 16:11:07 -05:00
Vignesh Sitaraman 56cc900b61 modified: .gitignore
modified:   TrackRecon.C
	deleted:    batchproces_mapped_run.sh
	modified:   process_mapped_run.sh
2026-02-05 15:20:17 -05:00
Vignesh Sitaraman 17ab8c884a modified: TrackRecon.C
new file:   batchproces_mapped_run.sh
	new file:   process_mapped_run.sh
2026-01-30 10:53:34 -05:00
Vignesh Sitaraman 67199cdb60 modified: QQQ_Calcheck.C
modified:   TrackRecon.C
	new file:   qqq_Calib.dat
	new file:   qqq_GainMatch.dat
	renamed:    slope_intercept_cathode.txt -> slope_intercept_cathode.dat
	renamed:    slope_intercept_results.txt -> slope_intercept_results.dat
	renamed:    slope_intercept_results_anode.txt -> slope_intercept_results_anode.dat
2026-01-28 14:27:42 -05:00
Vignesh Sitaraman ac035370b4 modified: QQQ_Calcheck.C made changes to bring it in line with the new consistent Wedge-Ring mapping
modified:   TrackRecon.C
2026-01-25 14:15:45 -05:00
Vignesh Sitaraman c4b543bdeb modified: ProcessRun.sh
modified:   TrackRecon.C
	modified:   mapping.h corrrrected QQQ0 rings
2026-01-25 11:23:27 -05:00
Vignesh Sitaraman 0a8432e4e3 modified: TrackRecon.C phi and theta plots for PC and QQQ included 2026-01-23 17:55:55 -05:00
Vignesh Sitaraman 0883ebdb6e modified: Armory/Makefile
deleted:    Armory/README.md
	modified:   Calibration.C Sudarsan pointed out that the gain match and calibration stages have the ring and wedge swapped, so I fixed that.
	modified:   ProcessRun.sh changes for running on laptop
	modified:   TrackRecon.C same inconsistency as in Calibration.C fixed
	deleted:    makeplots.C not used anymore
	modified:   mapping.h corrected teh mapping for the QQQs poptentially, need to confirm
	modified:   mapping_old.txt
2026-01-22 15:07:10 -05:00
Vignesh Sitaraman 9c20c4abfe modified: TrackRecon.C QQQ wedge channels flipped but the energy gains have not, thus QQQ energy needs to be recalibrated. 2026-01-21 11:56:32 -05:00
Vignesh Sitaraman 13bfafe9c4 modified: Armory/ClassPW.h
modified:   TrackRecon.C
2026-01-18 15:41:54 -05:00
Vignesh Sitaraman 22e32c7ebc Refactor plotting logic in TrackRecon::Process for clarity and added neighbour checks for anode and cathode hits 2026-01-16 16:36:25 -05:00
Vignesh Sitaraman 4599ad2a38 modified: TrackRecon.C 2026-01-13 17:55:27 -05:00
Vignesh Sitaraman c1ffaa8340 modified: TrackRecon.C 2026-01-13 17:51:01 -05:00
Vignesh Sitaraman 19286055ea modified: TrackRecon.C inlcuded timing plots for the PC 2026-01-13 12:04:14 -05:00
Vignesh Sitaraman 82c2127b4d modified: TrackRecon.C included test cases for 1,2,&3 cathode events. Also stopped sorting the cathode anmd anodehits arrays. 2026-01-09 15:49:32 -05:00
Vignesh Sitaraman d81e35d5e4 modified: Analyzer.C
modified:   TrackRecon.C Reconstruction only for the QQQ tracks
	new file:   TrackRecon.h
2025-12-19 11:56:10 -05:00
Vignesh Sitaraman 97880940be modified: .gitignore
modified:   .vscode/settings.json
	modified:   Analyzer.C
	modified:   Calibration.C
	modified:   GainMatchQQQ.C
	modified:   QQQ_Calcheck.C
2025-12-16 15:41:21 -05:00
Vignesh Sitaraman aee3a2467d modified: Calibration.C
modified:   GainMatchQQQ.C
	modified:   QQQ_Calcheck.C
	modified:   makeplots.C
2025-12-01 13:49:23 -05:00
Vignesh Sitaraman c32215e293 modified: .vscode/settings.json
modified:   Calibration.C
	modified:   GainMatchQQQ.C
	new file:   QQQ_Calcheck.C
	new file:   QQQ_Calcheck.h
	new file:   makeplots.C
2025-11-26 11:32:16 -05:00
Vignesh Sitaraman 535afcb704 modified: Calibration.C
modified:   GainMatchQQQ.C
2025-11-17 18:33:11 -05:00
Vignesh Sitaraman 0773b9e6cc modified: .gitignore
modified:   .vscode/settings.json
	renamed:    HistPlotter.h -> Armory/HistPlotter.h
	new file:   Armory/LICENSE
	new file:   Armory/README.md
	modified:   Calibration.C
	modified:   GainMatchQQQ.C
	modified:   GainMatchSX3.C
	modified:   sx3_GainMatchfront.txt
2025-11-17 09:33:08 -05:00
Vignesh Sitaraman 7582731de4 new file: sx3_BackGains.txt
new file:   sx3_GainMatchfront.txt
2025-10-29 17:47:40 -04:00
Vignesh Sitaraman 49de3b64a8 modified: Analyzer.C
modified:   GainMatchSX3.C
	modified:   GainMatchSX3Front.C
	new file:   HistPlotter.h
2025-10-29 17:42:54 -04:00
Vignesh Sitaraman 61473ca14e modified: Calibration.C use both front and back gains
modified:   GainMatchSX3.C changed structure a bit
	modified:   GainMatchSX3Front.C removed some redundant code that I was trying out
2025-10-06 15:11:31 -04:00
Vignesh Sitaraman ecd755e09c modified: Calibration.C looking at 1d hists for sx3 backs 2025-09-30 15:45:16 -04:00
Vignesh Sitaraman 265ebd3372 modified: Calibration.C
modified:   GainMatchQQQ.C
	modified:   GainMatchSX3.C
	modified:   GainMatchSX3Front.C trying out not doing back gainmatching to see if that improves fits.
2025-09-30 15:17:00 -04:00