Commit Graph

39 Commits

Author SHA1 Message Date
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 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
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 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 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 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 13bfafe9c4 modified: Armory/ClassPW.h
modified:   TrackRecon.C
2026-01-18 15:41:54 -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 39e8f41ab1 modified: Analyzer.C implemented basic trackreconstruction
modified:   Armory/ANASEN_model.C changed qqq radii
	modified:   Armory/ClassPW.h implemented basic trackreconstruction
2025-02-27 10:34:41 -05:00
Vignesh Sitaraman 9225620426 modified: Analyzer.C
modified:   Armory/ClassPW.h edited to account for the 4 wire offset instead of 3 in cathodes. This has been crossreferenced using the alpha source data in QQQ coinincidence to confirm
    the position of the source.
2025-02-21 15:40:52 -05:00
Vignesh Sitaraman 2225b3a942 modified: .gitignore 2025-02-17 17:06:33 -05:00
Vignesh Sitaraman cb72c14ca4 modified: Analyzer.C modfied the algorithm for selection of valid cathodes, the section is now based on geometry
modified:   Armory/ClassPW.h the rotation of the cathodes was reversed
2025-02-17 16:59:08 -05:00
Vignesh Sitaraman 5995081396 modified: Analyzer.C
modified:   Armory/ClassPW.h
    adjusted the Cathode geometry to  incorporate the offsett of 3 wires
2025-02-05 14:59:02 -05:00
Vignesh Sitaraman d623e0cd17 modified: Analyzer.C
made changes to correct for geomtry and eliminating redundant variables to a make the  code more readable
	modified:   Armory/ClassPW.h
    made changes to correct for the fact that the physical geometry of the detector is not the same as the geometry in the simulation, it is reversed and has an offset of 3
2025-02-05 08:23:23 -05:00
vs19g 42e093b104 modified: .vscode/c_cpp_properties.json
modified:   .vscode/settings.json
	modified:   Analyzer.C
	new file:   Armory/#ClassPW.h#
	modified:   Armory/ClassDet.h
	modified:   Armory/ClassPW.h
	modified:   Armory/Mapper.cpp
2025-01-17 11:18:07 -05:00
dirac a10081ea81 modified: .vscode/settings.json
modified:   Analyzer.C
	modified:   Analyzer.h
	modified:   Armory/ClassDet.h
	modified:   Armory/ClassPW.h
	modified:   Armory/Mapper.cpp
	modified:   PCGainMatch.C
	modified:   ProcessRun.sh
	modified:   mapping.h
2024-10-25 15:02:59 -04:00
vs19g 4cb8a2c48c new file: Analyzer1.C
new file:   Analyzer1.h
2024-10-04 12:43:24 -04:00
vs19g fe6dbee171 Refactor PCGainMatch.C and Analyzer.C for improved efficiency and readability 2024-10-01 14:13:53 -04:00
Ryan@Home b0093563d5 added CircularMean to PW class 2024-04-29 15:24:16 -04:00
dirac ccab43f18c snapshot after 27Al experiment 2024-04-15 13:29:57 -04:00
splitPoleDAQ 88baa6a7dc bug fix on Mapper 2024-03-22 18:45:13 -04:00
splitPoleDAQ 4627125105 mirror the geometry 2024-02-09 14:27:59 -05:00
splitPoleDAQ 3b0b6be47e small improvement 2024-02-05 16:44:44 -05:00
Ryan Tang a668f64ab7 added uncertainties in calculating th etrack 2024-02-02 19:13:28 -05:00
Ryan Tang d710df842d bug fix wireID, FindWireID 2024-02-02 16:54:58 -05:00
Ryan Tang 6790ef41df PW, added CalTrack2, using distance to calculate the track 2024-02-02 16:20:33 -05:00
Ryan Tang e442fc1102 modify anasenMS.cpp for the last change 2024-02-02 15:40:43 -05:00
Ryan Tang 50b95b33ed move out SX3 and PW classes 2024-02-02 15:08:50 -05:00
Ryan Tang 9d7780416d added PW class for proportional wire 2024-02-02 13:49:45 -05:00
Ryan Tang 1bd035a7ab correct the SuperX3 strip order 2024-02-01 21:11:38 -05:00
Ryan Tang 010e70268d correct the Anasen model to match the ridiculous mapping. 2024-02-01 19:53:58 -05:00
Ryan Tang e470221c6c put stuffs in the Armory folder 2024-02-01 19:02:30 -05:00