-
Notifications
You must be signed in to change notification settings - Fork 53
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Added README's for MuonFitter (#295)
* Added README's for MuonFitter * Updated torch warning and location of model files * Updated README file to clarify steps/issues regarding MuonFitter model generation * Fix to previous commit, deleted AutoDict_map_string_vector_double__.cxx --------- Co-authored-by: James Minock <[email protected]>
- Loading branch information
Showing
3 changed files
with
76 additions
and
0 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,24 @@ | ||
#MuonFitter Tool Documentation | ||
*********************** | ||
Created by: Julie He | ||
|
||
Maintained by: James Minock | ||
|
||
Last updated: 10-2-2024 | ||
*********************** | ||
|
||
This Tool functions for vertex and energy reconstruction, with the primary purpose being vertex reconstruction. This Tool operates on a ML generated model that fits tank tracks according to MRD information. | ||
|
||
This Tool is intended to act as a substitution to Michael's SimpleReconstruction Tool, filling "SimpleReco" values expected in PhaseIITreeMaker. | ||
|
||
The vertex saved to "SimpleRecoVtx" is given in meters and is oriented such that the center of the tank is represented by (0,-0.1446,1.681). | ||
|
||
There are additional variables created to be passed downstream including: | ||
|
||
FittedTrackLengthInWater - estimated track length in water of tank | ||
|
||
FittedMuonVertex - vertex of interaction assuming tank center at (0,0,0) | ||
|
||
RecoMuonKE - estimated kinetic energy of reconstructed muon | ||
|
||
Nlyrs - number of layers penetrated in MRD |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,50 @@ | ||
#MuonFitter Config | ||
|
||
*********************** | ||
#Description | ||
********************** | ||
|
||
Date created: 2024-10-02 | ||
The MuonFitter toolchain makes an attempt to fit muons using hit information. | ||
|
||
Configure files are simple text files for passing variables to the Tools. | ||
|
||
Text files are read by the Store class (src/Store) and automatically assigned to an internal map for the relevant Tool to use. | ||
|
||
MuonFitter has 2 functionalities. The first functionality is pre-reconstruction. It takes input information and outputs a text file providing information to be fitted. This text file is used in a script to generate an additional text file that contains the fitted information. | ||
|
||
The second functionality is reconstruction. It takes both text files and reconstructs the vertex based on the fitted paths. | ||
|
||
Therefore, in order to properly use this Tool in a ToolChain: The ToolChain must be ran twice on the same set of data. Instructions are below. | ||
|
||
************************ | ||
#Usage | ||
************************ | ||
|
||
Any line starting with a "#" will be ignored by the Store, as will blank lines. | ||
|
||
Variables should be stored one per line as follows: | ||
|
||
|
||
Name Value #Comments | ||
|
||
Note: Only one value is permitted per name and they are stored in a string stream and template cast back to the type given. | ||
|
||
|
||
To generate a model, run the following scripts in order: | ||
|
||
1. Data_prepare.py | ||
|
||
2. RNN_train.py | ||
|
||
WARNING: currently, Data_prepare.py requires input files that do not exist on the ANNIE gpvms. These scripts were created and used to create models outside of the ANNIE gpvms and ToolAnalysis container. These scripts are to be considered DEPRECATED until further notice. | ||
|
||
Please update any paths such that all files and models are available or copy all model files to configfiles/MuonFitter/RNNFit directory. All model files are currently located at /pnfs/annie/persistent/simulations/models/MuonFitter/ | ||
|
||
To run the Tool: | ||
|
||
1. First, run in "RecoMode 0". This will generate a file: ev_ai_eta_R{RUN}.txt with a {RUN} number corresponding to the WCSim run number. You do not need any Tools further along the ToolChain for this step. This text file is all you need. | ||
|
||
2. Second, run "python3 Fit_data.py ev_ai_eta_R{RUN}.txt". This will apply the fitting and generate another textfile to be ran in ToolAnalysis: tanktrackfitfile_r{RUN}_RNN.txt. ALSO: please update any paths such that all files and models are available. | ||
|
||
3. Finally, run in "RecoMode 1". This is running the ToolChain for real. Please set the paths for the ev_ai_eta_R{RUN}.txt and tanktrackfitfile_r{RUN}_RNN.txt accordingly so they can be read in with the corresponding data file. See the README.md in UserTools/MuonFitter/ for short descriptions of information saved to the DataModel and how to access them. |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters