more work on GTreeManager and begin of first 2 Gamma Reconstruction in GParticleReconstruction
Uncharged 2 Hits Analysis somehow completed, improved structure of in- and outputtree
Added Init class to Particle Recon and tree manager + testing stage of goat.cc with seperate input files for Patrik and Cristina
Improved class structure, GoAT class is included to perform analysis controls, a preliminary meson reconstruction is included in the GParticleReconstruction. Current problems exist, as the Particle class seems to have zero values for *Getters* despite the inheritance of GTreeManager
Added Meson reconstruction and possible GTreeManager structure for output
USER: Full changes to Particle reconstruction and GTreeManager (responsible for the output of analysis trees). This commit contains the first code to output trees post reconstruction. Full meson reconstruction is performed including a reaction 4-vector check which includes charged pions to properly reconstruct mesons below 1.6 GeV. A chi-style fit which includes a width parameter is included which improves meson reconstruction (and reduces any bias towards the reconstruction of one particular meson). A pseudo sort function has been included into GoAT to also include the possibility of creating small tree files for fast physics analysis in particular analysis.
USER: Beginning to make the switch to E, theta, phi to deal with the following issue - when Px, Py, Pz, E are output from AcquRoot (which is before Particle ID has been done) the Px,Py,Pz, E has a zero mass assumed but this isn't correct! Once particle ID has been done these values can be stored (ie. from GoAT) but before this, only kinetic energy, theta and phi should be output as they will not change. In a future commit, I will change E to T for improved clarity on this issue. 4 vectors are now formed using a calculated E, p, and theta and phi. Particle reconstruction was changed slightly to account for this switch, and the Add Particle class forms a TLorentzVector such that variables are calculated correctly for composite systems. Issues in the resulting spectra appear, for example the typical theta structure is not seen and the typical mass peak is not seen. More investigation to follow.
USER: Switch to a raw tree file based on E-theta-phi (instead of E-Px-Py-Pz) is now complete. This move was required as the momentum components will only be accurate post particle identification. A new GetVector routine was written which takes E, theta, phi and the reconstructed mass and produces a 4vector. Px, Py, and Pz are stored in the output tree along with the E, theta, phi, and M.
USER: Added dE_E cuts to the Particle Identification routine. Cuts for proton and pion (TAPS and CB) are defined in the PostInit section. Next update will include a better reading in of user preferences. In the future with a GUI, this structure will likely need to be adapted, however for now, it works well. I will work towards the goal of a single config file which covers the full user options
USER: First version of GoAT with a working config file and some very nice terminal output! GoAT now expects the config file as the command argument (ex ./build bin/goat GoATHerder.dat). Currently sorting works but is done inside the GoAT class and this will change in the next commit such that sorting decisions (and handling of the sorting choices) is done inside the new GSort class which will be added on the next commit. A ReadConfig routine was written which returns the user input for a specified key. This was placed in the GTreeManager such that all classes above have access to this config call for initialisation.
USER: New class GSort used for handling Sorting preferences. This class sits above analysis classes so that it has full access to possible sorting criteria (inheritance of GoAT was changed for this purpose). A pre-sort is available for sorting on raw tree file variables which is checked before an event is analysed. This is done for speed. A second sort is applied to variables available after analysis (ex. # protons) to determine if the event should be written to file. Also, GoAT init function was changed such that only the config file name is passed to the function and reading of input/output file names is completed within GoAT as opposed to main function.
USER: More complete sorting algorithm with sorting on reconstructed particle properties. Some minor cleanup in GParticleReconstruction. Current tree output includes only the reconstruction tree. Next commits will include a full tree output including storage of other trees (trigger, tagger, etc) as well as changes to the Particle reconstruction class to store meson daughter properties, charged/neutral seperation, and a photon marker (likely fully neutral rootinos will become photons).
USER: Changes to GParticleReconstruction. Some sanity checks added for charged particle cuts to let users turn on some (but not all) charged particle cuts. Code for handling dE-E identification of electrons in the CB and TAPS is now included as well.
USER: Full tree output now completed. A root function (CloneTree) is used to make a public link of the original raw trees available for printing. This is done to avoid any chance of people changing the original tree information. This tree clone is done in a minimal way by invoking only CloneTree(0) and filling this tree when the conditions to write the event out (from the Sorting algorithm) have been satisfied. A test of the code (applying relatively strict sorting conditions which would be suitable for eta physics) allows a tree file, originating from a 3 GB raw file, to be analysed in 12.95 seconds (with sensible output!).
USER: daughter properties (E,Theta,Phi,PDG) if composite particles like pi0, eta, and eta' are now stored in the output tree! Additionally, some of the reconstruction routine was changed to give the daughter PDG codes properly. Also, despite no neutron identification being included, some of the code for this has been added to the reconstruction class. Neutron ID should wait until TOF is added.
USER: New physics class included for testing (will become base for future physics class). Used for testing to varify the rest of the code. A bug in the reconstruction class was found and fixed (Kinetic Energy actually was including the masses, oops!). Now a missing mass calculated off the pi0 comes out to the proton mass (exciting!)... Many changes were done to the base tree managers to make them more general (and more will be done as well). Routines were added to GoATTreeManager to allow for the physics classes to loop over entries in trees defined in the GoAT classes, and those defined by Acqu classes. The tree managers now have new names to reflect their new class names.
Fixing file PPi0.cc from last commit, a single line (which handles the beam 4vector) was erased. Follow last commit message for full update.
USER: New PPhysics class which works below example PPi0 class. PPi0 currently fills a set of histograms for eta and pi0 (eta included now for testing) and writes these to a histogram file. No user controls in config file.
USER: Added some eta class, not to be used as the general eta class, however it exists currently for testing purposes and verification of eta physics reconstruction. WARNING: input and output file are no longer declared in config file but are done via command line. This is prep for a future commit which will include a script to handle running goat (or physics routines) over multiple files.
USER: Added new functionality to perform charged particle and meson reconstruction over specific theta region only! Useful for the eta group, otherwise shouldn't *really* be used...