Skip to content
Snippets Groups Projects
Commit 52189a05 authored by Buddhini Waidyawansa's avatar Buddhini Waidyawansa
Browse files

Merge branch 'develop' of github.com:buddhiniw/hcana into compare

parents 857df591 ed1739af
No related branches found
No related tags found
No related merge requests found
This diff is collapsed.
This diff is collapsed.
......@@ -18,6 +18,7 @@
// Open and load parameter files
//
gHcParms->Load(gHcParms->GetString("g_ctp_kinematics_filename"), RunNumber);
gHcParms->Load(gHcParms->GetString("g_ctp_parm_filename"));
// parameters not found in usual engine parameter files
gHcParms->Load("PARAM/hcana.param");
......
......@@ -96,6 +96,7 @@ Int_t THcRaster::ReadDatabase( const TDatime& date )
{"fr_cal_mom",&fFrCalMom, kDouble},
{"frx_adcpercm",&fFrXADCperCM, kDouble},
{"fry_adcpercm",&fFrYADCperCM, kDouble},
{"pbeam",&fgpbeam, kDouble},
{0}
};
......@@ -301,12 +302,13 @@ Int_t THcRaster::Process( ){
gfry = (gfry_adc/gfry_adcpercm)*(gfr_cal_mom/ebeam)
*/
// bpw- Iam not sure how to access the global variables. the below code doesnt work. so for now, hard code the beam energy.
if(gHcParms->Find("ebeam")){
tmp=*(Double_t *)gHcParms->Find("ebeam")->GetValuePointer();
cout <<"e Beam = "<< tmp << endl;
eBeam=0.0001;
if(gHcParms->Find("gpbeam")){
eBeam=*(Double_t *)gHcParms->Find("gpbeam")->GetValuePointer();
}
// cout <<"e Beam = "<< eBeam << " " << fgpbeam << endl;
eBeam = 4.02187;
// eBeam = 4.02187;
fXpos = (fXADC/fFrXADCperCM)*(fFrCalMom/eBeam);
fYpos = (fYADC/fFrYADCperCM)*(fFrCalMom/eBeam);
......
......@@ -40,6 +40,8 @@ class THcRaster : public THaBeamDet, public THcHitList {
Int_t ReadDatabase( const TDatime& date );
Int_t DefineVariables( EMode mode );
Double_t fgpbeam; //
Double_t fXADC; // X current
Double_t fYADC; // Y current
Double_t fXpos; // X position
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment