Difference between revisions of "ROOT Analyzer/Running"
(→Updating software) |
|||
Line 10: | Line 10: | ||
git pull | git pull | ||
− | in both the top hcana directory and the "podd" sub directory and make sure you are on the "master" branch for both. The hcana code should be at tag " | + | in both the top hcana directory and the "podd" sub directory and make sure you are on the "master" branch for both. The hcana code should be at tag "DCandHodoscopeHits" or later and the podd tag snould be "1.5.22_HC02" or later. |
− | == Decoding hodoscope hits == | + | == Decoding hodoscope and drift chamber hits == |
To demonstrate the analyzer decoding hits, retrieve the file [https://userweb.jlab.org/~saw/software/hcana_testing_work.tar.gz hcana_testing_work.tar.gz]. Unpack it into your hcana directory which will make a subdirectory "work". After making sure the analyzer is cleanly compiled, from "work" do: | To demonstrate the analyzer decoding hits, retrieve the file [https://userweb.jlab.org/~saw/software/hcana_testing_work.tar.gz hcana_testing_work.tar.gz]. Unpack it into your hcana directory which will make a subdirectory "work". After making sure the analyzer is cleanly compiled, from "work" do: |
Revision as of 15:25, 1 May 2012
As of the tag "HodoscopeHits" in the master branch, the Hall C++ analyzer will read Hall C style CTP parameter files, and read a Hall C data file and sort HMS hodoscope data into Hall C style hit lists.
Updating software
If you don't already have a copy of the Hall C Analyzer git repository, go to Analyzer/Git to set it up.
To make sure your git repository is up to date, do
git pull
in both the top hcana directory and the "podd" sub directory and make sure you are on the "master" branch for both. The hcana code should be at tag "DCandHodoscopeHits" or later and the podd tag snould be "1.5.22_HC02" or later.
Decoding hodoscope and drift chamber hits
To demonstrate the analyzer decoding hits, retrieve the file hcana_testing_work.tar.gz. Unpack it into your hcana directory which will make a subdirectory "work". After making sure the analyzer is cleanly compiled, from "work" do:
../hcana .x hodtest.C
hodtest.C is a script that sets up an analysis. Look in podd/examples for Hall A analyzer script examples.
The analyzer does nothing Hall C specific beyond printing hits. But it does serve as an example of how to decode hits for other detectors and as a starting point for writing detector analysis code.
Parameters
To try just reading parameters, run the analyzer from the top directory.
./hcana
Once it starts up, type
gHcParms->Load("hctest.input")
To dump the parameters read
gHcParms->PrintFull()
Some examples of accessing individual variables
analyzer [3] Double_t ProtonMass = *(Double_t *)gHcParms->Find("proton")->GetValuePointer(); analyzer [4] ProtonMass (Double_t)9.38272000000000048e+02
analyzer [5] Int_t *integerarray = (Int_t *)gHcParms->Find("integerarray")->GetValuePointer(); analyzer [6] integerarray[3] (Int_t)4