Skip to content
Snippets Groups Projects
  1. May 12, 2019
    • Mark Jones's avatar
      Updated THcHallCSpectrometer.cxx · 7815f151
      Mark Jones authored
      In method TrackCalc get the proper THcDCTrack array index
      from the golden track by using method GetTrkNum
      for use in the THcDC method
      SetFocalPlaneBestTrack.
      
      When creating the THaTrack array in THcDC::CoarseTrack
      the array index between THaTrack and THcDCTrack arrays
       match. The THaTrack is also associated with the THcDCTrack
      array index with the call SetTrkNum(index+1)
      
      When selecting best track by lowest chi-squared the
      THaTrack are sorted from lowest to highest chi-squared
      The code made a mistake in the index used in
       SetFocalPlaneBestTrack. It used the array index of the
      THaTrack which is now not in sync with the THcDCTrack.
      Fixed problem by using the THaTrack method GetTrkNum
      which gets the proper THcDCTrack array index.
      
      
      This did NOT effect reconstructed target variables or
      physics variables. It only effected the focal plane
      varaiables that were selected as the "best" or "golden"
      to be used for the tree for dc.x_fp , dc.xp_fp,
      dc.y_fp , dc.yp_fp and for the residuals.
      7815f151
  2. May 02, 2019
    • Mark Jones's avatar
      Add THcScintPlaneClust, Modify THcHodoscope and THcScintillatorPlane · 42bc7a0d
      Mark Jones authored
      THcScintPlaneCluster is a new class to hold information
      about scintillator plane clusters of paddle hits.
      The clusters of paddles for each plane are formed in
      THcHodoscope::TrackEffTest which is used in the tracking
      efficiency.
      
      Modify THcScintillatorPlane so that the cluster information
      (number of clusters, size,pos, flag if cluster used)
      is in the tree.
      
      Modify THcHodoscope::TrackEffTest so position
      difference  are taken for all clusters in X1 (or Y1)
      with all clusters in X2 (Y2).
      42bc7a0d
    • Mark Jones's avatar
      Modify THcDC · 0015a43c
      Mark Jones authored
      In THcDC.h change MAXTRACKS from 10 to 50. The maximum
      number of tracks is set by parameter ntracks_max_fp
      
      Previously the LinkStubs method would not create
      a track if the total number of spacepoints in
      the two chambers was larger than 10.
      
      Now LinkStubs will create a vector of THcSpacePoints
      of up to 100 spacepoints with no more than
      50 spacepoints from chamber 1 and use that
      to find possible tracks.
      
      I
      0015a43c
    • Mark Jones's avatar
      Modify HallCSpectrometer · 47654018
      Mark Jones authored
          Add variable fPruneSelect which is a flag for which prune
          test selected the good track.
      
          Put into tree as tr.PruneSelect
          PruneSelect = -1 if no track found
          PruneSelect = 0 if only one track found
          PruneSelect > 0 when more then one track found.
      
          Method BestTrackUsingPrune goes through the tests in order and
           if a track fails the test then it is flagged as bad and not
           tested in the subsequent tests.
           When only one track is left then fPruneSelect is set to the number of
           the test.
      
      
        fPruneSelect = 1  if xptar
        fPruneSelect = 2  if yptar
        fPruneSelect = 3  if ytar
        fPruneSelect = 4  if delta
        fPruneSelect = 5  if track beta
        fPruneSelect = 6  if track reduced degrees of freedom (NHits-4)
        fPruneSelect = 7  if Number of PMT
        fPruneSelect = 8  if track beta chi2
        fPruneSelect = 9  if track focal plane time
        fPruneSelect = 10 if track hit S2Y plane
        fPruneSelect = 11 if track hit S2X plane
        fPruneSelect = 12 if track chisq
      47654018
    • Mark Jones's avatar
      Update THcCoinTime · eca27468
      Mark Jones authored
          Add variable fTRIG1_RAW_CoinTime for raw cointime calculated by
          difference in SHMS trigger (TRIG1) in ROC1 minus
          SHMS trigger in ROC2.
      
          Add variable fTRIG4_RAW_CoinTime for raw cointime calculated by
          difference in HMS trigger (TRIG4) in ROC1 minus
          HMS trigger in ROC2.
      
          Add new variables using these raw time differences
          fTRIG1_epCoinTime
          fTRIG4_epCoinTime
          fTRIG1_eKCoinTime
          fTRIG4_eKCoinTime
          fTRIG1_ePiCoinTime
          fTRIG4_ePiCoinTime
          fTRIG1_ePosCoinTime
          fTRIG4_ePosCoinTime
      eca27468
  3. Apr 25, 2019
    • Stephen A. Wood's avatar
      Improve THcHelicity · 76bbcc81
      Stephen A. Wood authored
        Previously the helicity code was not always setting the actual
        helicity.  It would then just use the helicity from the last event.
        This was almost always OK.  With this change, the helicity (T.helicity.hel)
        should be always defined.
        It is now sufficient to use just this variable when sorting events into
        plus and minus helicity.  The helicity value will be zero if the event
        occured during the settle period, or if the helicity decoder has not
        got enough data to have a seed.
      76bbcc81
    • Stephen A. Wood's avatar
  4. Apr 11, 2019
    • Mark Jones's avatar
      Fix mistake in THcCoinTime.h · 0e9c9872
      Mark Jones authored
      The pTRIG1_TdcTime_ROC1, pTRIG4_TdcTime_ROC1
      and pTRIG1_TdcTime_ROC2, pTRIG4_TdcTime_ROC2
      
      should have been Double_t instead of Int_t
      since the THcTrigDet.h function Get_CT_Trigtime
      returns a Double_t which is the time convert to ns.
      0e9c9872
  5. Feb 17, 2019
  6. Feb 16, 2019
    • Mark K Jones's avatar
      Updated THcCoinTime.cxx (#435) · 2df665ae
      Mark K Jones authored
      Do HMS pathlength correction using xptar and delta instead
      of the focal plane quantities.
      
      Fixed sign typo in fROC1_ePosCoinTime and fROC2_ePosCoinTime
      
      Fix sign error in DeltaSHMSpathLength and DeltaHMSpathLength
      
      Add tree variables
      DeltaSHMSPathLength
      DeltaHMSPathLength
      had_coinCorr_Positron
      elec_coinCorr
  7. Feb 13, 2019
  8. Jan 10, 2019
  9. Jan 07, 2019
    • Mark Jones's avatar
      Fix to THcScalerEvtHandler.cxx · de986a69
      Mark Jones authored
      In THcScalerEvtHandler::AnalyzeBuffer there is a loop over
      the scalers to keep track of scalers with a cut on the current.
      There was a mistake in using scal_prev_read[nscal-1] instead of
      dvars_prev_read[ivar] in the IF statement.
      de986a69
    • Stephen A. Wood's avatar
      6f9aa533
    • Ole Hansen's avatar
      THcHodoscope: clear fGoodFlags for each event. Add bugchecks. · 178fd5d8
      Ole Hansen authored
      fGoodFlags holds event-by-event data, but was never cleared,
      eventually growing to several hundred megabytes in a long analysis.
      The effciency calculations in THcHodoEff that rely on the contents
      of fGoodFlags have been most certainly garbage up to now.
      
      I've replaced the event-by-event ClearEvent() method with the
      standard virtual function Clear() and have added fGoodFlags.clear()
      there.
      
      Also, I've added assertions to the hodoscope code to check
      the validity of some non-obvious array indices. Nothing triggers;
      the index logic appears sound (despite its appearance ...)
      178fd5d8
    • Ole Hansen's avatar
      Correct a large number of memory leaks reported by valgrind · e1f461e0
      Ole Hansen authored
      This includes a particularly nasty leak in the shower code that caused
      several hundred bytes to be lost _per event_.
      e1f461e0
  10. Jan 06, 2019
  11. Dec 20, 2018
  12. Dec 19, 2018
  13. Nov 28, 2018
  14. Nov 20, 2018
    • Mark Jones's avatar
      Modify THcAerogel.cxx · 75125f22
      Mark Jones authored
      Modify THcAerogel::CoarseProcess
      
      
      
      For each PMT, fGoodPosAdcMult.at(npmt) was being set to the total number of positive PMTs with an
      adc hit and fGoodNegAdcMult.at(npmt) was being set to the total number of negative PMTs with an
      adc hit.
      
      To be like the other dectectors make fGoodPosAdcMult.at(npmt)
      and  GoodNegAdcMult.at(npmt) be the number of adc hits for that particular
      PMT.
      75125f22
  15. Nov 19, 2018
    • Stephen A. Wood's avatar
      Change threshold for helicity signals. · eeae921b
      Stephen A. Wood authored
        For KaonLT, the kPulsePedestal values being returned for
        the helicity signal channels was 0 and 16380.  For SIDIS, the
        values for off and on are ~2000 and ~1400.  Made the default
        threshold 8000 instead of 1000.  Also added an optional parameter,
        "helicity_fadcthreshold" so that this threshold can be changed
        at run time.
      eeae921b
  16. Nov 09, 2018
    • Stephen A. Wood's avatar
      Determine the beam helicity for each event. · 47c908bc
      Stephen A. Wood authored
      Undoes delayed helicity reporting by learning seed of pseudo random
      sequence used by injector helicity electronics.
      
      This detector class should be added to the Trigger apparatus.
      Delivers the global variables "hel" and "helrep".  "helrep" is the
      reported delayed helicity and "hel" is the actual helicity.  + and -
      helicity are reported as +1 and -1.  If the event is during a MPS
      settling period, then the helicity variables are zero.  For the first
      few seconds of a run, the "hel" variable will be zero as the pseudo
      random sequence seed has not been determined.  (If the trigger class
      is "T" and this detector is called "helicity", then these variables
      will be T.helicity.hel and T.helicity.helrep.
      
      By default, it is assumed that there is delayed reporting of 8 cycles
      and that Quartets are used.  If delayed helicity reporting is not in
      use, then set the parameter "helicity_delay" to zero.
      47c908bc
    • Stephen A. Wood's avatar
      Extract signals needed for Helicity decoding. · 7039ef27
      Stephen A. Wood authored
        These signals are plus and minus signals, the MPS indicator, and
        the start of quartet indicator.  The time from the TI (with overflow
        detection) is also retrieved as this is needed when dealing with
        delayed helicity reporting.
      
        The helicity signals are in FADC250 channels.  The roc/slot/channel
        assignments for these signals are currently hardwired into the code.
      7039ef27
    • Stephen A. Wood's avatar
  17. Nov 06, 2018
    • Mark Jones's avatar
      Modified THcShowerArray · f1d30001
      Mark Jones authored
      Add the tree variable goodAdcMult which is the number of raw ADC pulses
        in an ADC channel per event for a given shower array block.
      f1d30001
  18. Nov 01, 2018
    • Eric Pooser's avatar
      Merge pull request #414 from JeffersonLab/fall-2018-ver2 · aa18926f
      Eric Pooser authored
      Fix problems in THcTrigDet.cxx
    • Eric Pooser's avatar
    • Mark Jones's avatar
      Fix problems in THcTrigDet.cxx · 4a381a1d
      Mark Jones authored
      1) Read-in of the trigger reference time cuts was in ReadDatabase method
        when it should be in Init method. Moved to the Init method before
        call to InitHitList where the reference cuts are used.
      
      2) Modified the selection of the good TDC hit for filling the TdcTimeRaw
      and TdcTime. Previosly used the TdcTime but not picks the TDC hit with the TdcTimeRaw that is within
      the time min and max windows that can be set by parameters. Default windows are min=0 and max=10000.
      If two hits in the time window then selects last hit within window.
      If not hits within time window then TdcTimeRaw=0 and TdcTime=0.
      The TdcMultiplicity is always filled.
      4a381a1d
    • Mark Jones's avatar
      Fix problems in THcTrigDet.cxx · 24235e0a
      Mark Jones authored
      1) Read-in of the trigger reference time cuts was in ReadDatabase method
        when it should be in Init method. Moved to the Init method before
        call to InitHitList where the reference cuts are used.
      
      2) Modified the selection of the good TDC hit for filling the TdcTimeRaw
      and TdcTime. Previosly used the TdcTime but not picks the TDC hit with the TdcTimeRaw that is within
      the time min and max windows that can be set by parameters. Default windows are min=0 and max=10000.
      If two hits in the time window then selects last hit within window.
      If not hits within time window then TdcTimeRaw=0 and TdcTime=0.
      The TdcMultiplicity is always filled.
      24235e0a
  19. Oct 22, 2018
    • Mark Jones's avatar
      Modify THcCoinTime and THcTrigDet · 4d4418d0
      Mark Jones authored
      1) THcTrigDet
         a) Modify code to use string vector fTrigNames to identify which of the trigger
           trigger detector TDC signals to use for coincidence timing. This
            replaces the hard-coded names. The integer array fTrigId[4] keeps
           track of the array ID in the overall fTDcNames vector that goes
            with the fTrigNames[4]
         b) The fTrigNames must be in order of SHMS ROC1, HMS ROC1, SHMS ROC2
           and HMS ROC2.
         c) Default names are "pTRIG1_ROC1","pTRIG4_ROC1","pTRIG1_ROC2","pTRIG4_ROC2"
            The parameter is t_coin_trigNames
            For example:
            t_coin_trigNames="pTRIG1_ROC1 pTRIG4_ROC1 pTRIG1_ROC2 pTRIG4_ROC2"
            This parameter is read-in and the split into a string vector fTrigNames.
         d) In HcTrigDet::ReadDatabase , all members of fTrigID array are set
      to -1 then a loop over all Tdc in the trigger detector looks for match between
      fTdcNames amd fTrigNames to set fTrigId. If match not found the fTrigId = -1.
         e) In THcTrigDet.h made new method Get_CT_TrigTime(Int_t ii) to be used
      in in THcCoinTime to get the 4 trigger times: SHMS ROC1 (ii=0), HMS ROC1 (ii=1),
      SHMS ROC2 (ii=2) and HMS ROC2 (ii=3).  If fTrigId[ii]=0 then it returns 0
      otherwise returns fTdcTime[fTrigID[ii]].
      
      2) THcCoinTime
        a) Previously used the raw trigger times and had a hard-coded 0.1 ns/channel
      conversion. Now use the trigger times which already are in ns using the
      ns/channel conversion set in the TrigDet.
        b) Now use the new TrgiDet method Get_CT_TrigTime(ii) to get the
      trigger times for SHMS ROC1, HMS ROC1, SHMS ROC2 and HMS ROC2.
      4d4418d0
  20. Oct 05, 2018
    • Mark Jones's avatar
      Modify THcDriftChamberPlane · 1555f422
      Mark Jones authored
      Added TClonesArray* fRawHits which an array of THcDCHit object for all
      hits in the drift chamber. This is filled during Process method.
      
      Added tree variable raw.wirenum whihc is array of wire numbers for all hits in the drift chamber.
      1555f422
  21. Sep 20, 2018
    • Yero1990's avatar
      Mispoint param (#408) · f5dfd245
      Yero1990 authored
      * updated mispointing calculations
      
      * added TMath::Abs() for HMS angles, since it has a '-' sign in the kin. file
      f5dfd245
    • Stephen A. Wood's avatar
      Bug fixes borrowed from THaScalerEventHandler · 0d5b2a80
      Stephen A. Wood authored
      Don't confuse index of scalers with slot number
      
      See https://github.com/JeffersonLab/analyzer/commit/cd7c26b5b1161115a0e35a4824148b78a189e986
      
      NOTE:
      This changes the format of the "variable" lines in the db map file that
      defines the scaler layout.
      
      The number after the variable directive is now the slot number instead of
      the index of which scaler module (starting from zero) is being used.
      Updated DBASE/db_PScalevt.dat and DBASE/db_HScalevt.dat files which have
      been generated by an updated MAPS/SCALERS/make_scaler_db.py.  This change is
      made so that the "variable" line format is the same as used in
      THaScalerEvtHandler.cxx.
      0d5b2a80
  22. Sep 17, 2018
  23. Sep 14, 2018
  24. Sep 07, 2018
Loading