Skip to content
Snippets Groups Projects
  1. Apr 26, 2017
    • hallc-online's avatar
      Modify THcDC and THcHallCSpectrometer · d5134c3d
      hallc-online authored
      The purpose is to add a call in THcHallCSpectrometer:TrackCalc
      to fill variables in THcDC for the golden track.
      
      THcHallCSpectrometer.h
      ----------------------
      1) Add object THcDC* fDC
      2) Eliminate object fShower since it was not being used.
      
      THcHallCSpectrometer.cxx
      ----------------------
      1) in ReadDatabase method cast fDC in detector "dc" is defined
      2) in FindVertices method add call
          to fDC->SetFocalPlaneBestTrack(hit_gold_track)
          where hit_gold_track is the HaTracks array index
          of the golden track
      
      THcDC.h
      -------
      1) Add method SetFocalPlaneBestTrack
      
      THcDC.cxx
      ---------
      1) Eliminate filling of best focal plane quantities
         in CoarseTrack which defined "best" by lowest chi2
      2) Create method SetFocalPlaneBestTrack
         a)fills the best focal plane quantities using the golden track
         b) fills fResiduals using golden track
      d5134c3d
    • Carlos Yero's avatar
  2. Apr 20, 2017
    • hallc-online's avatar
      Updates to THcShower, THcShowerArray and THcSHowerHit · 2f9e340d
      hallc-online authored
      THcShowerHit.h and THcShowerHit.cxx
      ---------------
      1) Added fY for horizontal position
      2) Added fY to THcShowerHit
      
      THcShower.h
      -----------
      1) Added variables
      2) Added method addY, clY to get the cluster Y position
      
      THcShower.cxx
      --------------
      1) Added variables to the tree for "layer" detector
          either SHMS preshower or HMS layers
      2) Added variables if the SHMS "array" is used
      3) Added y position to THcShowerHit in CoarseProcess
      4) In FineProcess, if SHMS "array" used then fill X,Y info
           for the Cluster and the "best" track that matched the cluster
      
      THcShowerArray.h and THcShowerArray.cxx
      ---------------------------------------
      1) Added methods to Get the array cluster size, X and Y position
         and block number that has the highest energy in the cluster
      2) Added array fBlockClusterID for all blocks. initialized to -1
         for each block for each event and then filled with
         the cluster number if the block is included in the cluster
      3) Add variable fNhits and fNgoodhits
      2f9e340d
  3. Apr 18, 2017
  4. Apr 17, 2017
    • hallc-online's avatar
      Modified THcDriftChamberPlane.cxx and THcDriftChamberPlane.h · a4186aeb
      hallc-online authored
      Main purpose was to have option for per wire tzero offsets
      
      Modified THcDriftChamberPlane.h
      ------------------------------
      1) added fUsingTzeroPerWire as parameter flag to switch on per wire tzero offsets when parameter equals 1
      2) fTzeroWire is array of tzero offsets for each wire in plane
      
      Modified THcDriftChamberPlane.cxx
      ------------------------------
      1) THcDriftChamberPlane::ReadDatabase
          a)set a default value of fUsingTzeroPerWire=0
          b)added to DBRequest list option to read in fUsingTzeroPerWire
          c) if fUsingTzeroPerWire=1 then separate DBRequest to read in fTzeroWire
         d) if fUsingTzeroPerWire=0 then all fTzeroWire=0
      
      2) THcDriftChamberPlane::ProcessHits
      ------------------------------------
         a) Modify calcualation of drift time to subtract fTzeroWire
      Double_t time = -StartTime- rawtdc*fNSperChan + fPlaneTimeZero - fTzeroWire[wireNum-1];
      a4186aeb
  5. Apr 06, 2017
  6. Apr 04, 2017
    • hallc-online's avatar
      Fix problem in THcAerogel::CoarseProcess with fNpeSum · f64afe8c
      hallc-online authored
      The line fNpeSum += fNegNpeSum
      was basically double counting the fNegNpeSum
      Same for fNpeSum += fPosNpeSum
      since they were in a loop over Neg and Pos hits.
      
      Just set
      fNpeSum = fNegNpeSum + fPosNpeSum
      after the two loops over Neg and Pos hits
      f64afe8c
    • hallc-online's avatar
      Fix mistake in THcShowerArray and make the threshold a parameter · b3eb5a43
      hallc-online authored
      THcShowerArray
      1) in ProcessHits methodfFixed mistake in index of fThresh
         was using padnum instead of padnum-1
      2) add parameter pcal_arr_AdcThreshold so that threshold
         can be set by a parameter. Default is zero which gives
         the best resolution.
      
      THcShowerPlane
      1) Added the parameter cal_AdcNegThreshold and cal_AdcPosThreshold
         so that the threshold can be set through a parameter
         Previously it was hardcoded.
      b3eb5a43
  7. Apr 03, 2017
  8. Mar 31, 2017
    • Eric Pooser's avatar
      Complete rewrite of Aerogel and Cerenkov detector classes · e0d9b2a9
      Eric Pooser authored
      New parameters are added.  hallc_replay of 3/31/2017 or later is needed.
      
      As of now, the size of the TClonesArray objects are hard-coded in the
      respective header files. This is not okay in the long run. Ideally,
      the size of the TClonesArrays should be defined by the parameter which
      dictates how many readout detectors exist for the respective
      detector. I tried doing this in the Init method however, podd
      complained regarding the size of the TClonesArrays in the DEF-file
      histograms. I was unsuccessful in my first attempt. This should be
      addressed in the future even though things work for now.
      e0d9b2a9
  9. Mar 29, 2017
    • Stephen A. Wood's avatar
      THcScalerEvtHandler fixes · 6d9c4e25
      Stephen A. Wood authored
        Process slot with clock first so that time is available to other slots
        Add option to use data in first scaler event
           (handler->SetUseFirstEvent(Bool_t)) instead of subtracting first event
           from subsequent events
      6d9c4e25
  10. Mar 28, 2017
    • hallc-online's avatar
      Modify THcHodoscope.cxx · 820fbf88
      hallc-online authored
      The change was in part of code which calculates the fiducial
       area of the scintillators where the drift chamber should
       have had a track. This sets fGoodScintHits=1 or 0
       Used to calculate the DC track efficiency
      
      1) Eliminate variables fScinShould and fScindid. These will
         be defined in the cuts file.
      2) Eliminate code which determined bestXpScin and bestYpScin since
         since these variables were never used.
      3) Initialized  fHitSweet1X,fHitSweet1Y,fHitSweet2X and
         fHitSweet2Y to zero.
      4) Change so that loops over number of paddles do not
          assume that X (Y) planes for Ch1 and Ch2 have same number
          of paddles.
      820fbf88
    • hallc-online's avatar
      Modify THcShower, THcShowerPlane and THcShowerArray classes · 6ad9abcf
      hallc-online authored
      Main purposes:
      1) Add the possibility of multiple ADC hits per channel and
         select best ADC by a time window.
      2) Change ProcessHits method in ShowerPlane and ShowerArray to only
          fill "raw" TClonesArrays.
      3) Add CoarseProcessHits method to ShowerPlane and ShowerArray
          to fill the "good" data arrays from call in THcShower:CoarseProcess
      4) Moved code to fill Track object with energy from FineProcess
         to CoarseProcess so that the Track->Get(Energy) can be used by other
          detectors in their FineProcess.
      5) FineProcess loops over Track object add gets Track energy
      6) Add AdcErrorFlag TClonesArray to be filled to check for
         problems with FADC
      
      
      
      
      THcShower.h
      1) Add methods GetADCMode(),GetAdcTimeWindowMin(),GetAdcTimeWindowMax()
          so that the ShowerPlane can access these parameters
      2) Add parameters ADCMode,fAdcTimeWindowMin,fAdcTimeWindowMax
      3) Add variables
         fNclustTrack : NUmber of cluster that matches best track
         fXclustTrack : X pos of cluster that matches best track
         fXTrack      : X pos of best track that matches cluster
         fEtrack  : Cluster energy associated with best track
         fEtrackNorm  : Cluster energy/Track momentum associated with best track
      THcShower.cxx
      1) Add calls to THcShowerPlane and THcShowerArray CoarseProcessHits
          in CoarseProcess
      2) Moved filling of Energy in Track object to CoarseProcess
      3) In FineProcess get the "best" Track object and match
         Track energy and trajectory to cluster.
      
      THcShowerArray.h and cxx
      1)add parameters fADCMode, fAdcTimeWindowMin and fAdcTimeWindowMax
      2) Add method CoarseProcessHits
      3) In ProcessHits fill fPosThresh and fNegThresh with a fix
          value of 250 integrated channels above pedestal.
           Need to make this a parameter.
      
      THcShowerPlane.h and cxx
      1)Gets fADCMode, fAdcTimeWindowMin and fAdcTimeWindowMax from THcShower
      2) Add method CoarseProcessHits
      3) In ProcessHits fill fPosThresh and fNegThresh with a fix
          value of 250 integrated channels above pedestal.
           Need to make this a parameter.
      6ad9abcf
  11. Mar 23, 2017
    • hallc-online's avatar
      Add method to THcRawAdcHit · ea2682a3
      hallc-online authored
      Add method
      GetF250_PeakPedestalRatio() {return fPeakPedestalRatio;};
      
      so that a detector class can calculate the pedestal that was used
      in determining the pedestal subtracted FADC Pulse Integral.
      
      This is useful if the detector class wants to set a threshold
      above the pedestal.
      ea2682a3
    • hallc-online's avatar
      Modified THcHallCSpectrometer.cxx and THcHodoscope.cxx · 84bd549e
      hallc-online authored
      The change was made so that NonTrackingDetector could have information
      on the "best" track in their FineProcess method.
      
      In THcHallCSpectrometer::FindVertices the "best" track will be selected
      and the Track object will its SetIndex method to set the index to 0 for
      the best track. The other track will have index=1 or greater.
      
      In the NonTrackingDetector FineProcess, the track that is selected to
      be the "best" can be found by looping through the tracks checking
      track index using Track.GetIndex() for find the track with Index=0.
      
      In  the NonTrackingDetector's CoarseProcess they need to set quantities
      for the Track object needed for selection of "best" track for the
      "prune" and "usingscin" track selection methods.
      
      1) In THcHallCSpectrometer:
        a) Moved selection methods of "best" track from TrackCalc to FindVertices.
        b) Removed setting of Golden Track in the selection methods.
        c) Add setting of Track Index=0 for "best" track in each selection method.
        d) Modified TrackCalc method to loop through Track object and find
           the track with Index=0 and set the Golden Track equal to this Track.
      
      2) In THcHodoscope.cxx
        a) Moved all calculations in FineProcess into CoarseProcess
        b) CoarseProcess calculates the scintillator Beta for each Track
           and does Track->SetBeta.
        c) In determination "zcor" for corrected hits times
            use fBetaNominal instead fBetap from track. Still use Track
            to get distance.
        c) Eliminate fBetap variable which was using the Track momentum
        d) Add variable fBeta which is just from scintillator times.
        e) In FineProcess fill fBeta with the the beta associated
           with the "best" track determined by selecting Track with index=0
      84bd549e
  12. Mar 16, 2017
    • hallc-online's avatar
      Modified HcTrigDet::Init , Decode and ReadDatabase · e04a61b0
      hallc-online authored
      In HcTrigDet::Init moved InitHitList after gHcDetectorMap->FillMap so that the refindex can be filled for the trigger TDC modules
      In ReadDatabase add parameters fTdcOffset and fTdcChanperNS
      In Decode set fTdcTime[cnt] = rawTdcHit.GetTime()*fTdcChanperNS-fTdcOffset
      Ths makes the time into a positive number wiht units of ns
      Need to add the parameter to either thms.param or tshms.param or
      it will use defaults of 0.1 and 300.
      Need to eventually get the fTdcChanperNS from event 125.
      e04a61b0
    • Stephen A. Wood's avatar
  13. Mar 15, 2017
  14. Mar 14, 2017
  15. Mar 13, 2017
    • hallc-online's avatar
      Modify THcDC::CoarseTrack and THcDC::TrackFit · b140267a
      hallc-online authored
      Add variables fX_fp_best,fY_fp_best,fXp_fp_best,fYp_fp_best to THcDC.h
      Modified THcDC::CoarseTrack so that the variables are filled with the
      quantities from the track with the smallest chi-squared.
      Modified THcDC::TrackFit so that the fResidual per plane is filled with
      for the track with the lowest chi-squared.
      Modified THcDC::DefineVariables so that access the variables as
      dc.x_fp,dc.y_fp,dc.xp_fp and dc.yp_fp
      b140267a
  16. Mar 08, 2017
    • hallc-online's avatar
      Modified THcCherenkov.cxx and THcCherenkov.h · 30c8c0ea
      hallc-online authored
      Add array fADC_hit that is a flag if there is a hit in the ADC
      fADC_hit is set in Decode method
      The FADC has a threshold on accepting ADC hit
      Modified CoarseProcess method to eliminate old FASTBUS bias in the analysis
      30c8c0ea
  17. Mar 07, 2017
  18. Mar 06, 2017
    • Cdaq Account's avatar
      Modified hodoscope and scintillatorplane code for hodo calibration · 201bcda2
      Cdaq Account authored
      Temporarily set THcHodoscope.cxx so that only the first three planes are used to calculate the focal
      plane time and beta.
      In THcHodoscope , Modified format for writing out the dump file used in hodo calibration.
      Add cosmicflag to THcScintillatorPLane so the corrected time is done right for cosmics.
      Modified hc_hodo_calib/tofcal.f so that it uses detector 10 as the reference
      and that it writes out better defualts for parameters in there are not enough events for a PMT.
      201bcda2
  19. Mar 01, 2017
  20. Feb 27, 2017
  21. Feb 26, 2017
  22. Feb 25, 2017
    • Cdaq Account's avatar
      Modified THcHodoscope::FineProcess for dumping data for hodo calibrations · a3f7bc2c
      Cdaq Account authored
      Moved the writing out of the "0" to the fDumpOut for hodo calibrations
      to immediatiately after the TOF with track info calculations.
      Before it had been after then lines
      
        if ( !fChern || !fShower ) {
          return 0;
        }
      
      so if Cerenkov and shower were not used in replay the code would not get
      to write out the "0" which is used to denote the end of an event data for
      the calibration script.
      a3f7bc2c
  23. Feb 24, 2017
    • Jure Bericic's avatar
      Added capability to set F250 parameters from PSE125. · 7878074b
      Jure Bericic authored
      PSE125 holds information about setting of F250 modules. Now this
      information is used to set `fNPedestalSamples` and `fNPeakSamples`
      parameters of `THcRawAdcHit`.
      
      This is done through `THcHitList`, since it has information about
      which crate and module each channel is in. Currently, the information
      is set for each event, because of the hitlist and analyzer design.
      
      I added the neccessary support for these changes to all raw hit
      classes.
      7878074b
  24. Feb 23, 2017
  25. Feb 21, 2017
  26. Feb 20, 2017
    • Jure Bericic's avatar
      Refactored fScinHitPaddle handling. · 2cee44f8
      Jure Bericic authored
      fScinHitPaddle is a std::vector<std::vector<Double_t>>. It was
      cleared and rebuilt for each event with the same structure,
      instead of just zeroing out all the values.
      
      Now it is created in only one place, and than zeroed instead of
      cleared.
      
      Changed data type in fScinHitPaddle from Double_t to Int_t. Should
      be changed to bool, but then all logic should be changed.
      2cee44f8
  27. Feb 19, 2017
    • Jure Bericic's avatar
      Fixed a weird bug. · 46d8767a
      Jure Bericic authored
      There was a weird bug in the code, that only triggered for some runs.
      It turns out, in the `THcHodoscope::FineProcess` the hits in each plane
      were created only for number of paddles in first plane. SHMS, however,
      has 13 paddles in first plane and 14 and 21 paddles in last two planes.
      
      The problem is fixed now, but part of that code should be rewritten for
      efficiency.
      46d8767a
  28. Feb 13, 2017
  29. Feb 09, 2017
  30. Feb 08, 2017
  31. Feb 07, 2017
Loading