diff --git a/examples/DBASE/raster_test.database b/examples/DBASE/raster_test.database index cb15f86e18e3de3afed20bfa2de3bc6b8c937dd8..76fef1a57294cfe9dbdcee523afd6367dc232077 100644 --- a/examples/DBASE/raster_test.database +++ b/examples/DBASE/raster_test.database @@ -5,6 +5,12 @@ g_ctp_parm_filename ="PARAM/general.param" g_decode_map_filename ="MAPS/raster_jun04.map" g_ctp_kinematics_filename ="DBASE/jan05.kinematics" + +52947 +g_ctp_parm_filename ="PARAM/general.param" +g_decode_map_filename ="MAPS/raster_jun04.map" +g_ctp_kinematics_filename ="DBASE/jan05.kinematics" + 52426 g_ctp_parm_filename ="DBASE/52426.param" g_decode_map_filename ="HCANA_MAPS/july04.map" diff --git a/examples/MAPS/raster_jun04.map b/examples/MAPS/raster_jun04.map index 9d3783619e6a9885d801dbcf02eeb10cdebfd9cb..8f0a847b40a23a9bce34258d71c275cde1e2190e 100644 --- a/examples/MAPS/raster_jun04.map +++ b/examples/MAPS/raster_jun04.map @@ -1980,17 +1980,18 @@ Slot= 5 ! ADC Second set of tubes on first two layers ! detector= 18 ! RASTER ! -! buddhini-w :To make things easier and consistent between detectors, we now use the plane and signal to identify the different raster signals 02-12-2014 +! buddhini-w :To make things easier and consistent between detectors, +! we now use the plane and signal to identify the different raster signals 02-12-2014 !.............................................................................. ! For raster : 0-->ADC X-sync ! 1-->ADC Y-signal ! 2-->ADC Y-sync ! 3-->ADC Y-signal - 12, 1, 1, 0 !ADC ROC#1 Sl#13 Ch#12 Fast Raster X-sync - 13, 1, 1, 1 !ADC ROC#1 Sl#13 Ch#13 Fast Raster X-signal - 14, 1, 1, 2 !ADC ROC#1 Sl#13 Ch#14 Fast Raster Y-sync - 15, 1, 1, 3 !ADC ROC#1 Sl#13 Ch#15 Fast Raster Y-signal + 12, 2, 1, 0 !ADC ROC#1 Sl#13 Ch#12 Fast Raster X-sync + 13, 2, 1, 1 !ADC ROC#1 Sl#13 Ch#13 Fast Raster X-signal + 14, 2, 1, 2 !ADC ROC#1 Sl#13 Ch#14 Fast Raster Y-sync + 15, 2, 1, 3 !ADC ROC#1 Sl#13 Ch#15 Fast Raster Y-signal ! detector= 6 ! GMISC ! diff --git a/examples/raster_test.C b/examples/raster_test.C index b707af63cc96745e2e9adeefe582f83f06c67e91..a28f4143692854df3c89ce19877887ad0285f3bd 100644 --- a/examples/raster_test.C +++ b/examples/raster_test.C @@ -5,9 +5,9 @@ // Steering script to test raster signal decoding // - Int_t RunNumber=50017; - char* RunFileNamePattern="daq04_%d.log.0"; - + Int_t RunNumber=52947; + char* RunFileNamePattern="/cache/mss/hallc/daq04/raw/daq04_52947.log.0"; + // Open the database // @@ -90,7 +90,7 @@ // Define the analysis parameters // analyzer->SetEvent(event); - analyzer->SetOutFile("raster_test.root"); + analyzer->SetOutFile("raster_compare_52947.root"); analyzer->SetOdefFile("output_bpw.def"); analyzer->SetCutFile("hodtest_cuts.def"); // optional analyzer->SetCountMode(2);// Counter event number same as gen_event_ID_number diff --git a/src/THcRaster.cxx b/src/THcRaster.cxx index 0d8aa4c728d58621b7c2a426751353ee67064668..de128f3ded4c1376305ace0ea67a03b6d9337a39 100644 --- a/src/THcRaster.cxx +++ b/src/THcRaster.cxx @@ -280,8 +280,7 @@ Int_t THcRaster::Decode( const THaEvData& evdata ) //_____________________________________________________________________________ Int_t THcRaster::Process( ){ - Double_t tmp = 0; - Double_t eBeam = 0; + Double_t eBeam = 0.001; /* calculate raster position from ADC value. From ENGINE/g_analyze_misc.f - @@ -301,14 +300,10 @@ Int_t THcRaster::Process( ){ gfrx = (gfrx_adc/gfrx_adcpercm)*(gfr_cal_mom/ebeam) 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. - eBeam=0.0001; + if(gHcParms->Find("gpbeam")){ eBeam=*(Double_t *)gHcParms->Find("gpbeam")->GetValuePointer(); } - // cout <<"e Beam = "<< eBeam << " " << fgpbeam << endl; - - // eBeam = 4.02187; fXpos = (fXADC/fFrXADCperCM)*(fFrCalMom/eBeam); fYpos = (fYADC/fFrYADCperCM)*(fFrCalMom/eBeam);