diff --git a/docs/Doxyfile b/docs/Doxyfile index abd3cd9a297b9475b29ddc124ca4b89be4cda9f0..92f09deae2e67250ca196a0a91491738ccf17c56 100644 --- a/docs/Doxyfile +++ b/docs/Doxyfile @@ -414,7 +414,7 @@ EXTRACT_PACKAGE = NO # included in the documentation. # The default value is: NO. -EXTRACT_STATIC = NO +EXTRACT_STATIC = YES # If the EXTRACT_LOCAL_CLASSES tag is set to YES classes (and structs) defined # locally in source files will be included in the documentation. If set to NO @@ -524,7 +524,7 @@ SORT_MEMBER_DOCS = YES # name. If set to NO the members will appear in declaration order. # The default value is: NO. -SORT_BRIEF_DOCS = NO +SORT_BRIEF_DOCS = YES # If the SORT_MEMBERS_CTORS_1ST tag is set to YES then doxygen will sort the # (brief and detailed) documentation of class members so that constructors and @@ -886,7 +886,7 @@ USE_MDFILE_AS_MAINPAGE = README.md # also VERBATIM_HEADERS is set to NO. # The default value is: NO. -SOURCE_BROWSER = NO +SOURCE_BROWSER = YES # Setting the INLINE_SOURCES tag to YES will include the body of functions, # classes and enums directly into the documentation. diff --git a/docs/groups.md b/docs/groups.md index 7e530d10849208e474dbcc30c2d62113e204657e..0fa9723cacd752595d5693f27bb42c3b37305d71 100644 --- a/docs/groups.md +++ b/docs/groups.md @@ -2,3 +2,5 @@ \defgroup DetSupport Classes supporting detectors \defgroup Base hcana infrastructure \defgroup PhysMods Physics modules +\defgroup Apparatuses Spectrometers and other apparatus +\defgroup Decoders Decoder classes specific to Hall C diff --git a/src/Scaler9001.cxx b/src/Scaler9001.cxx index 6406efa9e8679fb837d945002379648c1b01ac54..3950b97d2292b52ee640cfad99ab037e68938d32 100644 --- a/src/Scaler9001.cxx +++ b/src/Scaler9001.cxx @@ -1,9 +1,11 @@ -//////////////////////////////////////////////////////////////////// -// -// TI scalers -// Identified by a 9001 bank -// -///////////////////////////////////////////////////////////////////// +/** + \class Scaler9001 + \ingroup Decoders + + \brief Decoder module to retrieve the TI scalers. + + These scalers are identified by a bank with the tag 9001. +*/ #include "Scaler9001.h" diff --git a/src/Scaler9250.cxx b/src/Scaler9250.cxx index a3ed21f1d0515bf45855c75d41625755c1395aac..0dbd1017f8fe84f247e488c8b64a2a9afe3774b6 100644 --- a/src/Scaler9250.cxx +++ b/src/Scaler9250.cxx @@ -1,8 +1,11 @@ -//////////////////////////////////////////////////////////////////// -// -// FADC250 scalers -// -///////////////////////////////////////////////////////////////////// +/** + \class Scaler9250 + \ingroup Decoders + + \brief Decoder module to read the FADC250 scalers. + + These scalers are identified by a bank with the tag 9250. +*/ #include "Scaler9250.h" diff --git a/src/THcAerogelHit.cxx b/src/THcAerogelHit.cxx index c32361e43a81191bfd9c22e4ee4854ace54bff9a..d82565dd49ae7c18173c2241de9f6edce33cf605 100644 --- a/src/THcAerogelHit.cxx +++ b/src/THcAerogelHit.cxx @@ -1,14 +1,11 @@ /** \class THcAerogelHit \ingroup DetSupport -Raw Aerogel Hit Info -Inherits from THcRawHodoHit - - Contains plane, counter and pos/neg adc - - + \brief Raw Aerogel Hit Info + Inherits from THcRawHodoHit + Contains plane, counter and pos/neg adc */ #include "THcAerogelHit.h" diff --git a/src/THcBCMCurrent.cxx b/src/THcBCMCurrent.cxx index a65a41f4edc8cea03c2d7122c62ce4993242bf2c..d2407852374e0cd79dbac990be2d17ddbbfdf091 100644 --- a/src/THcBCMCurrent.cxx +++ b/src/THcBCMCurrent.cxx @@ -1,5 +1,9 @@ -/* +/** + \class THcBCMCurrent + \ingroup PhysMods + \brief Read BCM current from scalers and compare to thresholds + This physics module does: - Read average BCM beam current values from scaler parameter file. - Write the values into bcm#.AvgCurrent for each event diff --git a/src/THcCherenkovHit.cxx b/src/THcCherenkovHit.cxx index 21f23533b7610d1129fff1a486cc17f76e3ddb2b..505fa997e17f5a5aaa368b4a27bca163dbd0d568 100644 --- a/src/THcCherenkovHit.cxx +++ b/src/THcCherenkovHit.cxx @@ -1,13 +1,14 @@ /** \class THcCherenkovHit \ingroup DetSupport -Class representing Cherenkov PMT hit -Inherits from THcRawHodoHit + \brief Class representing a Cherenkov PMT hit - Contains plane, counter and pos/neg adc + Inherits from THcRawHodoHit + Contains plane, counter and pos/neg adc -\author Zafar Ahmed + + \author Zafar Ahmed */ diff --git a/src/THcConfigEvtHandler.cxx b/src/THcConfigEvtHandler.cxx index e19d1be5baaf818edc9cc646e0b1b5a2b6206def..a6d13335d2af741cb70ae6af29ca730278a7e856 100644 --- a/src/THcConfigEvtHandler.cxx +++ b/src/THcConfigEvtHandler.cxx @@ -1,19 +1,24 @@ /** \class THcConfigEvtHandler - \ingroup base + \ingroup Base - Event handler for Hall C prestart config event. Type 125 + \brief Analyze Hall C Configuration events. (Event type 125). - To use as a plugin with your own modifications, you can do this in - your analysis script + Hall C Configuration events contain information such as FADC250 + thresholds, mode settings, window settings, pulse mode settings, etc. + or CAEN1190 window and resolution settings. - gHaEvtHandlers->Add (new THcConfigEvtHandler("hallcpre","for evtype 125")); + To analyze these events, add - As config data is found, Hall C parameters will be created to hold the configuration - data. + gHaEvtHandlers->Add (new THcConfigEvtHandler("hallcpre","for evtype 125")); - All the configuation data can also be printed out with the PrintConfig method + to the analysis script. The first argument ("hallcpre") is an arbitrary + name that will be used to construct THcParmList type parameters with names + of the form ghallcpre_*. These parameters hold the configuration information + that is found in the events. -\author Stephen Wood (saw@jlab.org) + All the configuation data can also be printed out with the PrintConfig method + + \author Stephen Wood (saw@jlab.org) */ #include "THcConfigEvtHandler.h" diff --git a/src/THcDCHit.cxx b/src/THcDCHit.cxx index f2a5f389b3459c9cefbef46a40357690667b1127..c28c146a5ef0094d5cd2e9af6e13799e34018df6 100644 --- a/src/THcDCHit.cxx +++ b/src/THcDCHit.cxx @@ -1,7 +1,7 @@ /** \class THcDCHit \ingroup DetSupport -Drift chamber wire hit info + \brief Drift chamber wire hit info */ #include "THcDCHit.h" diff --git a/src/THcDCLookupTTDConv.cxx b/src/THcDCLookupTTDConv.cxx index 4fc3909bb8747c5c0e3792285b393080db1ebe63..cfedc55685ecd2df41beded7c620ce6b85501113 100644 --- a/src/THcDCLookupTTDConv.cxx +++ b/src/THcDCLookupTTDConv.cxx @@ -1,6 +1,7 @@ /** \class THcDCLookupTTDConv \ingroup DetSupport + \brief Drift time to distance conversion via lookup table. */ #include "THcDCLookupTTDConv.h" diff --git a/src/THcDCTimeToDistConv.cxx b/src/THcDCTimeToDistConv.cxx index 0ff710da74df49de44aba7ff6926dc4a0a492a59..7d7007e0abaa69e70df8b892abc78865553df547 100644 --- a/src/THcDCTimeToDistConv.cxx +++ b/src/THcDCTimeToDistConv.cxx @@ -1,7 +1,7 @@ /** \class THcDCTimeToDistConv \ingroup DetSupport - + \brief Base class for algorithms to convert time into perpendicular drift distance */ #include "THcDCTimeToDistConv.h" diff --git a/src/THcDCTrack.cxx b/src/THcDCTrack.cxx index be7e64a491a53b12b3d43a83984c3e2d353638bd..413d5075cc10452f4a42b396a4f8c067c6335690 100644 --- a/src/THcDCTrack.cxx +++ b/src/THcDCTrack.cxx @@ -1,7 +1,7 @@ /** \class THcDCTrack \ingroup DetSupport - Class representing a track found from linking DC Space points + \brief Class representing a track found from linking DC Space points */ diff --git a/src/THcDriftChamber.cxx b/src/THcDriftChamber.cxx index 592af15be52ca372b69cfbf7b9695e1ad16ac0a2..9733e90be5f4e559d2b77edab28bc24a5d3d3b04 100644 --- a/src/THcDriftChamber.cxx +++ b/src/THcDriftChamber.cxx @@ -1,11 +1,12 @@ /** \class THcDriftChamber \ingroup DetSupport -Subdetector class to hold a bunch of planes constituting a chamber -This class will be created by the THcDC class which will also create -the plane objects. + \brief Subdetector class for a single drift chamber with several planes. -The THcDC class will then pass this class a list of the planes. + This class will be created by the THcDC class which will also create + the plane objects. + + The THcDC class will then pass this class a list of the planes. */ diff --git a/src/THcDriftChamberPlane.cxx b/src/THcDriftChamberPlane.cxx index 1f9ef31d9bddb09a0c65b6257a18e51523612961..fa9bef12879d5102ed1c84107bf1587c1da6d3f7 100644 --- a/src/THcDriftChamberPlane.cxx +++ b/src/THcDriftChamberPlane.cxx @@ -1,7 +1,7 @@ /** \class THcDriftChamberPlane \ingroup DetSupport -Class for a a single Hall C horizontal drift chamber plane + \brief Class for a a single Hall C horizontal drift chamber plane */ diff --git a/src/THcDummySpectrometer.cxx b/src/THcDummySpectrometer.cxx index d16ab9f6078cd550bf0dbfeec2806ea6655ab157..ea47c7f8d76869d5cf651538ffef424a0436398b 100644 --- a/src/THcDummySpectrometer.cxx +++ b/src/THcDummySpectrometer.cxx @@ -1,6 +1,6 @@ /** \class THcDummySpectrometer -\ingroup Base +\ingroup Apparatuses \brief A dummy spectrometer apparatus for testing detectors. diff --git a/src/THcExtTarCor.cxx b/src/THcExtTarCor.cxx index 81a3a2b918bb81dc174103d2cf36ee1ee5720a12..6f3bdd39219b016a8e8eb42fba9aaad7eee42974 100644 --- a/src/THcExtTarCor.cxx +++ b/src/THcExtTarCor.cxx @@ -1,4 +1,10 @@ -///////////////////////////////////////////////////////////////////////// +/** + \class THcExtTarCor + \ingroup PhysMods + + \brief Extended target corrections physics module. + +*/ #include "THcExtTarCor.h" #include "THaVertexModule.h" diff --git a/src/THcHallCSpectrometer.cxx b/src/THcHallCSpectrometer.cxx index db697cfc4c5f64deed36b0e42ed197e4ae6a3835..48541e69e8ace24d41bdae56902f22664fa98b11 100644 --- a/src/THcHallCSpectrometer.cxx +++ b/src/THcHallCSpectrometer.cxx @@ -1,52 +1,81 @@ -/** \class THcHallCSpectrometer - \ingroup Base +/** + \class THcHallCSpectrometer + \ingroup Apparatuses -\brief A standard Hall C spectrometer apparatus + \brief A standard Hall C spectrometer apparatus + + The usual name of this object is either "H", "P", "S" + for HMS, suPerHMS, or SOS respectively - Uses the standard optics polynomials to trace back to target + Defines the functions FindVertices() and TrackCalc(), which are common + to the HMS, SHMS and SOS. - Contains no standard detectors. All detectors must be added. + FindVertices() transports all the tracks in focal plane transport coordinates to + the target using the method CalculateTargetQuantities() which uses the standard + optics polynomials. The tracks are then rotated to the LAB coordinate system + where +Z points to beam dump, +Y is up, and +X is beam left. The Golden track + is then selected using one of the methods BestTrackSimple(), + BestTrackUsingPrune(), BestTrackUsingScin(), depending on parameter settings. - The usual name of this object is either "H", "S", "P" - for HMS, SOS, or suPerHMS respectively + \author S. A. Wood - In method ReadDatabase calls the THaSpectrometer::SetCentralAngles(th_geo,ph_geo,bend_down) - bend_down is flag that should equal kFALSE for Hall C spectrometers - th_geo and ph_geo in degrees. - Define the LAB coordinate system so the +Z points to beam dump, +Y is up, +X is beam left - th_geo is rotation about the Y axis in XZ plane to coordinates X',Y=Y',Z' - After th_geo rotation, ph_geo rotation is about the X' axis in the Y'Z' plane. - Calls THaAnalysisObject::GeoToSph to calculate the spherical angles. th_sph and ph_sph - th_sph is rotation about the Y axis in XZ plane to coordinates X',Y=Y',Z - After th_sph rotation, ph_sph rotation is about the original Z axis - In Lab coordinate system: - X = r*sin(th_geo)*cos(ph_geo) X = r*sin(th_sph)*cos(ph_sph) - Y = r*sin(ph_geo) Y = r*sin(th_sph)*sin(ph_sph) - Z = r*cos(th_geo)*cos(ph_geo) Z = r*cos(th_sph) + \fn THcHallCSpectrometer::ReadDatabase( const TDatime& date ) + \brief Loads parameters to characterize a Hall C spectrometer. - cos(th_sph) = cos(th_geo)*cos(ph_geo) - cos(ph_sph) = sin(th_geo)*cos(ph_geo)/sqrt(1-cos^2(th_geo)*cos^2(ph_geo)) + \fn THcHallCSpectrometer::EnforcePruneLimits() + \brief Enforce minimum values for the prune cuts - GeoToSph is coded so that - 1) negative th_geo and ph_geo = 0 returns th_sph=abs(th_geo) and ph_sph =180 - 2) positive th_geo and ph_geo = 0 returns th_sph=th_geo and ph_sph =0 + \fn THcHallCSpectrometer::FindVertices( TClonesArray& tracks ) + \brief Reconstruct target coordinates. - Using the spherical angles, the TRotation fToLabRot and inverse fToTraRot are calculated - fToLabRot is rotation matrix from the spectrometer TRANSPORT system to Lab system - TRANSPORT coordinates are +X_tra points vertically down, +Z_tra is along the central ray and +Y_tra = ZxX - For ph_sph = 0 X_lab = Y_tra*cos(th_sph) + Z_tra*sin(th_sph) - Y_lab = -X_tra - Z_lab = -Y_tra*sin(th_sph) + Z_tra*cos(th_sph) - For ph_sph = 180 X_lab = Y_tra*cos(th_sph) - Z_tra*sin(th_sph) - Y_lab = -X_tra - Z_lab = Y_tra*sin(th_sph) + Z_tra*cos(th_sph) + \fn THcHallCSpectrometer::CalculateTargetQuantities(THaTrack* track,Double_t& xtar,Double_t& xptar,Double_t& ytar,Double_t& yptar,Double_t& delta) + \brief Transport focal plane track to target. + \fn THcHallCSpectrometer::BestTrackSimple() + \brief Choose best track based on Chisq. - + \fn THcHallCSpectrometer::BestTrackUsingScin() + \brief Choose best track using closeness to scintillator hits. - + \fn THcHallCSpectrometer::BestTrackUsingPrune() + \brief Choose best track after pruning. + +*/ + +/* + THESE comments need to be reviewed. + + th_geo is rotation about the Y axis in XZ plane to coordinates X',Y=Y',Z' + After th_geo rotation, ph_geo rotation is about the X' axis in the Y'Z' plane. + + + Calls THaAnalysisObject::GeoToSph to calculate the spherical angles. th_sph and ph_sph + th_sph is rotation about the Y axis in XZ plane to coordinates X',Y=Y',Z + After th_sph rotation, ph_sph rotation is about the original Z axis + In Lab coordinate system: + + X = r*sin(th_geo)*cos(ph_geo) X = r*sin(th_sph)*cos(ph_sph) + Y = r*sin(ph_geo) Y = r*sin(th_sph)*sin(ph_sph) + Z = r*cos(th_geo)*cos(ph_geo) Z = r*cos(th_sph) + + cos(th_sph) = cos(th_geo)*cos(ph_geo) + cos(ph_sph) = sin(th_geo)*cos(ph_geo)/sqrt(1-cos^2(th_geo)*cos^2(ph_geo)) + + GeoToSph is coded so that + 1. negative th_geo and ph_geo = 0 returns th_sph=abs(th_geo) and ph_sph =180 + 2. positive th_geo and ph_geo = 0 returns th_sph=th_geo and ph_sph =0 + + Using the spherical angles, the TRotation fToLabRot and inverse fToTraRot are calculated + fToLabRot is rotation matrix from the spectrometer TRANSPORT system to Lab system + TRANSPORT coordinates are +X_tra points vertically down, +Z_tra is along the central ray and +Y_tra = ZxX + + For ph_sph = 0 X_lab = Y_tra*cos(th_sph) + Z_tra*sin(th_sph) + Y_lab = -X_tra + Z_lab = -Y_tra*sin(th_sph) + Z_tra*cos(th_sph) + For ph_sph = 180 X_lab = Y_tra*cos(th_sph) - Z_tra*sin(th_sph) + Y_lab = -X_tra + Z_lab = Y_tra*sin(th_sph) + Z_tra*cos(th_sph) -\author S. A. Wood */ ////////////////////////////////////////////////////////////////////////// @@ -149,6 +178,19 @@ void THcHallCSpectrometer::InitializeReconstruction() //_____________________________________________________________________________ Int_t THcHallCSpectrometer::ReadDatabase( const TDatime& date ) { + /** + Loads parameters including the + angle settings of the spectrometer, various offsets, and the name + of the file containing the hut to target transformation polynomials. + Also loads parameters to control best track selection. + + Reads the hut to target transformation polynomial coefficients for + use by CalculateTargetQuantities(). + + Calls SetCentralAngles(th_geo,ph_geo,bend_down) + where bend_down is a flag that should equal kFALSE for Hall C + spectrometers. th_geo and ph_geo are in degrees. + */ static const char* const here = "THcHallCSpectrometer::ReadDatabase"; @@ -335,7 +377,6 @@ Int_t THcHallCSpectrometer::ReadDatabase( const TDatime& date ) //_____________________________________________________________________________ void THcHallCSpectrometer::EnforcePruneLimits() { - // Enforce minimum values for the prune cuts fPruneXp = TMath::Max( 0.08, fPruneXp); fPruneYp = TMath::Max( 0.04, fPruneYp); @@ -351,11 +392,17 @@ void THcHallCSpectrometer::EnforcePruneLimits() //_____________________________________________________________________________ Int_t THcHallCSpectrometer::FindVertices( TClonesArray& tracks ) { - // Reconstruct target coordinates for all tracks found in the focal plane. + /** + Reconstruct target coordinates for all tracks found in the focal plane. + + In Hall A, this is passed off to the tracking detectors. + + In Hall C, we do the target traceback here since the traceback should + not depend on which tracking detectors are used. - // In Hall A, this is passed off to the tracking detectors. - // In Hall C, we do the target traceback here since the traceback should - // not depend on which tracking detectors are used. + Select the best track. + + */ fNtracks = tracks.GetLast()+1; @@ -393,49 +440,57 @@ Int_t THcHallCSpectrometer::FindVertices( TClonesArray& tracks ) // void THcHallCSpectrometer::CalculateTargetQuantities(THaTrack* track,Double_t& xtar,Double_t& xptar,Double_t& ytar,Double_t& yptar,Double_t& delta) { - Double_t hut[5]; - Double_t hut_rot[5]; - - hut[0] = track->GetX()/100.0 + fZTrueFocus*track->GetTheta() + fDetOffset_x;//m - hut[1] = track->GetTheta() + fAngOffset_x;//radians - hut[2] = track->GetY()/100.0 + fZTrueFocus*track->GetPhi() + fDetOffset_y;//m - hut[3] = track->GetPhi() + fAngOffset_y;//radians - - hut[4] = xtar/100.0; - - // Retrieve the focal plane coordnates - // Do the transpormation - // Stuff results into track - hut_rot[0] = hut[0]; - hut_rot[1] = hut[1] + hut[0]*fAngSlope_x; - hut_rot[2] = hut[2]; - hut_rot[3] = hut[3] + hut[2]*fAngSlope_y; - hut_rot[4] = hut[4]; - - // Compute COSY sums - Double_t sum[4]; - for(Int_t k=0;k<4;k++) { - sum[k] = 0.0; - } - for(Int_t iterm=0;iterm<fNReconTerms;iterm++) { - Double_t term=1.0; - for(Int_t j=0;j<5;j++) { - if(fReconTerms[iterm].Exp[j]!=0) { - term *= pow(hut_rot[j],fReconTerms[iterm].Exp[j]); - } - } - for(Int_t k=0;k<4;k++) { - sum[k] += term*fReconTerms[iterm].Coeff[k]; + /** + Transport a track in the the focal plane coordinate system to the + target using the reconstruction matrix elements. + + If Xsatcorr is 2000, apply a specific correction to delta for + saturation effects. + */ + + Double_t hut[5]; + Double_t hut_rot[5]; + + hut[0] = track->GetX()/100.0 + fZTrueFocus*track->GetTheta() + fDetOffset_x;//m + hut[1] = track->GetTheta() + fAngOffset_x;//radians + hut[2] = track->GetY()/100.0 + fZTrueFocus*track->GetPhi() + fDetOffset_y;//m + hut[3] = track->GetPhi() + fAngOffset_y;//radians + + hut[4] = xtar/100.0; + + // Retrieve the focal plane coordnates + // Do the transformation + // Stuff results into track + hut_rot[0] = hut[0]; + hut_rot[1] = hut[1] + hut[0]*fAngSlope_x; + hut_rot[2] = hut[2]; + hut_rot[3] = hut[3] + hut[2]*fAngSlope_y; + hut_rot[4] = hut[4]; + + // Compute COSY sums + Double_t sum[4]; + for(Int_t k=0;k<4;k++) { + sum[k] = 0.0; + } + for(Int_t iterm=0;iterm<fNReconTerms;iterm++) { + Double_t term=1.0; + for(Int_t j=0;j<5;j++) { + if(fReconTerms[iterm].Exp[j]!=0) { + term *= pow(hut_rot[j],fReconTerms[iterm].Exp[j]); } } - xptar=sum[0] + fPhiOffset; - ytar=sum[1]; - yptar=sum[2] + fThetaOffset; - delta=sum[3] + fDeltaOffset; - if (fSatCorr == 2000) { - Double_t p0corr = 0.82825*fPcentral-1.223 ; - delta = delta + p0corr*xptar/100.; + for(Int_t k=0;k<4;k++) { + sum[k] += term*fReconTerms[iterm].Coeff[k]; } + } + xptar=sum[0] + fPhiOffset; + ytar=sum[1]; + yptar=sum[2] + fThetaOffset; + delta=sum[3] + fDeltaOffset; + if (fSatCorr == 2000) { + Double_t p0corr = 0.82825*fPcentral-1.223 ; + delta = delta + p0corr*xptar/100.; + } } // //_____________________________________________________________________________ @@ -461,6 +516,10 @@ Int_t THcHallCSpectrometer::TrackCalc() //_____________________________________________________________________________ Int_t THcHallCSpectrometer::BestTrackSimple() { + /** + Choose the track with the lowest tracking fitting Chisq to be + the "best track" + */ if( GetTrSorting() ) fTracks->Sort(); @@ -477,6 +536,13 @@ Int_t THcHallCSpectrometer::BestTrackSimple() //_____________________________________________________________________________ Int_t THcHallCSpectrometer::BestTrackUsingScin() { + /** + Select as best track the track closest to a S2Y hit. If there + are no S2Y hits, select the track closest to a S2X hit. + + Also reject tracks if they fail dEdx, beta, or calorimeter energy cuts. + */ + Double_t chi2Min; if( fNtracks > 0 ) { @@ -628,7 +694,13 @@ Int_t THcHallCSpectrometer::BestTrackUsingScin() //_____________________________________________________________________________ Int_t THcHallCSpectrometer::BestTrackUsingPrune() { - + /** + Select as best track the track with the lowest Chisq after pruning + tracks that don't meet various criteria such as xptar, yptar, ytar + delta, beta, degrees of freedom (of track fit), difference between + measured beta and beta from p, chisq of beta fit, focal plane time + and number of PMT hit. + */ Int_t nGood; Double_t chi2Min; diff --git a/src/THcHodoHit.cxx b/src/THcHodoHit.cxx index 63b16b8c46a615587244a840906d245e3aace4de..a1fa98ba9f9b6b50fe6788c7fae8b37bbdc697fe 100644 --- a/src/THcHodoHit.cxx +++ b/src/THcHodoHit.cxx @@ -1,7 +1,7 @@ /** \class THcHodoHit \ingroup DetSupport - Class representing a single hit for the Hodoscopes + \brief Class representing a single hit for the Hodoscopes */ #include "THcHodoHit.h" diff --git a/src/THcHodoscope.cxx b/src/THcHodoscope.cxx index 4071241f84c547895593762f14677f169a528f19..52690582a0fc1ae3e3cab399841c17a9fdc9340f 100644 --- a/src/THcHodoscope.cxx +++ b/src/THcHodoscope.cxx @@ -70,13 +70,15 @@ THcHodoscope::THcHodoscope( ) : //_____________________________________________________________________________ void THcHodoscope::Setup(const char* name, const char* description) { + /** + Create the scintillator plane objects for the hodoscope. + + Uses the Xhodo_num_planes and Xhodo_plane_names to get the number of + planes and their names. - // static const char* const here = "Setup()"; - // static const char* const message = - // "Must construct %s detector with valid name! Object construction failed."; + Gets a pointer to the Cherenkov named "cer" ("hgcer" in the case of the SHMS.) - // cout << "In THcHodoscope::Setup()" << endl; - // Base class constructor failed? + */ if( IsZombie()) return; // fDebug = 1; // Keep this at one while we're working on the code @@ -180,13 +182,6 @@ THaAnalysisObject::EStatus THcHodoscope::Init( const TDatime& date ) } } - // Replace with what we need for Hall C - // const DataDest tmp[NDEST] = { - // { &fRTNhit, &fRANhit, fRT, fRT_c, fRA, fRA_p, fRA_c, fROff, fRPed, fRGain }, - // { &fLTNhit, &fLANhit, fLT, fLT_c, fLA, fLA_p, fLA_c, fLOff, fLPed, fLGain } - // }; - // memcpy( fDataDest, tmp, NDEST*sizeof(DataDest) ); - fNScinHits = new Int_t [fNPlanes]; fGoodPlaneTime = new Bool_t [fNPlanes]; fNPlaneTime = new Int_t [fNPlanes]; @@ -215,21 +210,17 @@ THaAnalysisObject::EStatus THcHodoscope::Init( const TDatime& date ) //_____________________________________________________________________________ Int_t THcHodoscope::ReadDatabase( const TDatime& date ) { + /** + Read this detector's parameters from the ThcParmlist. - // Read this detector's parameters from the database file 'fi'. - // This function is called by THaDetectorBase::Init() once at the - // beginning of the analysis. - // 'date' contains the date/time of the run being analyzed. - + This function is called by THaDetectorBase::Init() once at the + beginning of the analysis. + */ // static const char* const here = "ReadDatabase()"; char prefix[2]; char parname[100]; - // Read data from database - // Pull values from the THcParmList instead of reading a database - // file like Hall A does. - - // Will need to determine which spectrometer in order to construct + // Determine which spectrometer in order to construct // the parameter names (e.g. hscin_1x_nr vs. sscin_1x_nr) prefix[0]=tolower(GetApparatus()->GetName()[0]); @@ -537,7 +528,9 @@ Int_t THcHodoscope::ReadDatabase( const TDatime& date ) //_____________________________________________________________________________ Int_t THcHodoscope::DefineVariables( EMode mode ) { - // Initialize global variables and lookup table for decoder + /** + Initialize global variables for histograms and Root tree + */ // cout << "THcHodoscope::DefineVariables called " << GetName() << endl; if( mode == kDefine && fIsSetup ) return kOK; fIsSetup = ( mode == kDefine ); @@ -1554,11 +1547,9 @@ void THcHodoscope::TrackEffTest(void) // void THcHodoscope::OriginalTrackEffTest(void) { - //----------------------------------------------------------------------- - // - // Trnslation of h_track_tests.f file for tracking efficiency - // - //----------------------------------------------------------------------- + /** + Translation of h_track_tests.f file for tracking efficiency + */ //************************now look at some hodoscope tests // *second, we move the scintillators. here we use scintillator cuts to see diff --git a/src/THcParmList.cxx b/src/THcParmList.cxx index 15dd0708f85fd54e0cf69a225894a972cb521aa1..c0a14c2058e63a90ff58a40e04b0cb9717b9896f 100644 --- a/src/THcParmList.cxx +++ b/src/THcParmList.cxx @@ -18,6 +18,24 @@ to retrieve a set of parameters from the list. An instance of THaTextvars is created to hold the string parameters. +\fn THcParmList::Load( const char* fname, Int_t RunNumber ) +\brief Load the parameter cache by reading a CTP style parameter file. + +\fn THcParmList::LoadParmValues(const DBRequest* list, const char* prefix) +\brief Retrieve parameter values from the parameter cache. + +\fn THcParmList::GetArray(const char* attr, Int_t* array, Int_t size) +\brief Read in a set of Int_t's in to a C-style array. + +\fn THcParmList::GetArray(const char* attr, Double_t* array, Int_t size) +\brief Read in a set of Double_t's in to a vector. + +\fn THcParmList::ReadArray(const char* attrC, T* array, Int_t size) +\brief Copy values from parameter store to array. + +\fn THcParmList::PrintFull( Option_t* option ) +\brief Print all the numeric parameter desciptions and value and text parameters. + */ #define INCLUDESTR "#include" @@ -59,8 +77,7 @@ inline static bool IsComment( const string& s, string::size_type pos ) void THcParmList::Load( const char* fname, Int_t RunNumber ) { /** -\brief Load the parameter cache by reading a CTP style parameter file. Most -parameter files used in the ENGINE should work. +Most parameter files used in the ENGINE should work. A line in the file of the form ~~~ @@ -498,9 +515,6 @@ The ENGINE CTP support parameter "blocks" which were marked with Int_t THcParmList::LoadParmValues(const DBRequest* list, const char* prefix) { /** - -\brief Retrieve parameter values from the parameter cache. - The following example loads several parameters held in the `gHcParms` parameter cache into scalar variables or arrays. ~~~ @@ -609,19 +623,11 @@ zero), then there will be no error if the parameter is missing. //_____________________________________________________________________________ Int_t THcParmList::GetArray(const char* attr, Int_t* array, Int_t size) { - /** - \brief Read in a set of Int_t's in to a C-style array. - */ - return ReadArray(attr,array,size); } //_____________________________________________________________________________ Int_t THcParmList::GetArray(const char* attr, Double_t* array, Int_t size) { - /** - \brief Read in a set of Double_t's in to a vector. - */ - return ReadArray(attr,array,size); } @@ -630,8 +636,7 @@ template<class T> Int_t THcParmList::ReadArray(const char* attrC, T* array, Int_t size) { /** - \brief Copy values from parameter store to array. - No resizing is done, so only 'size' elements may be stored. + No resizing is done, so only 'size' elements may be stored. */ Int_t cnt=0; @@ -671,8 +676,6 @@ Int_t THcParmList::ReadArray(const char* attrC, T* array, Int_t size) //_____________________________________________________________________________ void THcParmList::PrintFull( Option_t* option ) const { - /** \brief Print all the numeric parameter desciptions and value and text parameters. - */ THaVarList::PrintFull(option); TextList->Print(); } diff --git a/src/THcPrimaryKine.cxx b/src/THcPrimaryKine.cxx index 365f0ac74437f05d0086472115902abf499599d6..3a6acb9d4ba4a323b691956c3b7888cf64df1181 100644 --- a/src/THcPrimaryKine.cxx +++ b/src/THcPrimaryKine.cxx @@ -1,5 +1,5 @@ /** \class THcPrimaryKine - \ingroup Physics + \ingroup PhysMods \brief Class for the Calculate kinematics of scattering of the primary (beam) particle. These are usually the electron kinematics. diff --git a/src/THcRaster.cxx b/src/THcRaster.cxx index f3ea29648186b46662c03193428cb39257d59425..86a009169b5b47629827af3e8c8971beef27a923 100644 --- a/src/THcRaster.cxx +++ b/src/THcRaster.cxx @@ -1,13 +1,13 @@ /** \class THcRaster - \ingroup DetSupport + \ingroup Detectors - A class to - the fast raster signals. - Measures the two magnet currents which are proportional to horizontal and - vertical beam position + \brief Detector class for fast raster. -\author Buddhini Waidyawansa -\author Burcu Duran - Melanie Rehfuss (2017) + Measures the two magnet currents which are proportional to horizontal and + vertical beam position + + \author Buddhini Waidyawansa + \author Burcu Duran - Melanie Rehfuss (2017) */ #include "TMath.h" diff --git a/src/THcRasterRawHit.cxx b/src/THcRasterRawHit.cxx index 65ac89ac41323408d2d586fb04fea6751245104e..7a7bdeca1532c3970d9892668170aa89ed900717 100644 --- a/src/THcRasterRawHit.cxx +++ b/src/THcRasterRawHit.cxx @@ -1,15 +1,19 @@ -// Author : Buddhini Waidyawansa -// Date : 23-01-2014 -//Author : Burcu Duran - Melanie Rehfuss (2017) +/** + \class THcRasterRawHit + \ingroup DetSupport + \brief Class representing a single raw hit for the raster. + + Contains the X, Y raster voltage signals and sync signals + + \author Buddhini Waidyawansa (January 2014) + \author Burcu Duran, Melanie Rehfuss (2017) +*/ /////////////////////////////////////////////////////////////////////////////// // // // THcRasterRawHit // // // -// Class representing a single raw hit for the raster // -// // -// Contains the X, Y raster voltage signals and sync signals // // // /////////////////////////////////////////////////////////////////////////////// diff --git a/src/THcRawDCHit.cxx b/src/THcRawDCHit.cxx index 00f14b6bf84761412f3466dac739fcafde2d5d92..a8e9eff231bb89fc87f18346583de812624f6a06 100644 --- a/src/THcRawDCHit.cxx +++ b/src/THcRawDCHit.cxx @@ -1,8 +1,8 @@ /** \class THcRawDCHit \ingroup DetSupport - Class representing for drift chamber wire (or other device with - a single multihit TDC channel per detector element + \brief Class representing for drift chamber wire (or other device with + a single multihit TDC channel per detector element */ diff --git a/src/THcRawHit.cxx b/src/THcRawHit.cxx index 82debf24d37a20e2701670a61af48f553c435d73..ab86ce303ce8e28a28cdb196121fbadeb59544c7 100644 --- a/src/THcRawHit.cxx +++ b/src/THcRawHit.cxx @@ -1,9 +1,9 @@ /** \class THcRawHit \ingroup DetSupport - Abstract class for a single raw hit + \brief Base class detector specific raw hit that go into hit lists - Contains plane, counter and at least one data value + Contains plane, counter and at least one data value */ diff --git a/src/THcReactionPoint.cxx b/src/THcReactionPoint.cxx index f6f45ac5b4c4cd7daa525cd988a800d3e53dff22..65032aa86dca7a38ad301e4fbcdbc6a1a4ecd9f5 100644 --- a/src/THcReactionPoint.cxx +++ b/src/THcReactionPoint.cxx @@ -1,4 +1,11 @@ -//*-- Author : Mark Jones, March 2018 +/** + \class THcReactionPoint + \ingroup PhysMods + + \brief Calculate vertex coordinates. + + \author Mark Jones +*/ #include "THcReactionPoint.h" #include "THaSpectrometer.h" diff --git a/src/THcScintillatorPlane.cxx b/src/THcScintillatorPlane.cxx index 76e09a984b6353fbaa93eeda2a29cff3eb6251d3..63c039283209932cf0af9c35eae0fa96d2fbb258 100644 --- a/src/THcScintillatorPlane.cxx +++ b/src/THcScintillatorPlane.cxx @@ -158,7 +158,6 @@ THcScintillatorPlane::~THcScintillatorPlane() //______________________________________________________________________________ THaAnalysisObject::EStatus THcScintillatorPlane::Init( const TDatime& date ) { - // Extra initialization for scintillator plane: set up DataDest map // cout << "THcScintillatorPlane::Init called " << GetName() << endl; @@ -383,7 +382,9 @@ Int_t THcScintillatorPlane::ReadDatabase( const TDatime& date ) //_____________________________________________________________________________ Int_t THcScintillatorPlane::DefineVariables( EMode mode ) { - // Initialize global variables and lookup table for decoder + /** + Initialize global variables for histograms and Root tree + */ // cout << "THcScintillatorPlane::DefineVariables called " << GetName() << endl; diff --git a/src/THcSecondaryKine.cxx b/src/THcSecondaryKine.cxx index ed51124521cdebe3109b882aa6255fd6d87bb218..fe6ec834172592befcd5825701a1fb8fe19d6189 100644 --- a/src/THcSecondaryKine.cxx +++ b/src/THcSecondaryKine.cxx @@ -1,5 +1,5 @@ /** \class THcSecondaryKine - \ingroup Physics + \ingroup PhysMods \brief Class for the Calculate kinematics of scattering of the secondary (hadron) particle. */ diff --git a/src/THcShowerPlane.cxx b/src/THcShowerPlane.cxx index 0222de31a9f223113d15a0066a2efb6a65521763..a709e27302875d7d17b00e2d732aafd55a3f74bf 100644 --- a/src/THcShowerPlane.cxx +++ b/src/THcShowerPlane.cxx @@ -1,7 +1,7 @@ /** \class THcShowerPlane - \group DetSupport + \ingroup DetSupport -One plane of shower blocks with side readout + \brief One plane of shower blocks with side readout */ diff --git a/src/THcSpacePoint.cxx b/src/THcSpacePoint.cxx index f9dd04ea98b0844e058b7f67547180b0a01e09e0..ff8499219b2713575b56e9bb13a024d525e99b69 100644 --- a/src/THcSpacePoint.cxx +++ b/src/THcSpacePoint.cxx @@ -1,7 +1,7 @@ /** \class THcSpacePoint \ingroup DetSupport - Class representing a single hit DC + \brief Class representing a single hit DC */ diff --git a/src/THcTimeSyncEvtHandler.cxx b/src/THcTimeSyncEvtHandler.cxx index 3e72cc1c031e6dc5daad41348e760b80f315654c..01757aeecc6141b706953c7cf267030750328223 100644 --- a/src/THcTimeSyncEvtHandler.cxx +++ b/src/THcTimeSyncEvtHandler.cxx @@ -1,23 +1,31 @@ /** \class THcTimeSyncEvtHandler - \ingroup base + \ingroup Base - Event handler for to check syncronization of 4ns clock times - recorded by the TIs and the FADCs. + \brief Event handler to check TI and FADC synchronization. - To use as a plugin, add to the analysis script: + Check syncronization of 4ns clock times recorded by the TIs and the FADCs. + Also can be used to detect CAEN1190 TDC syncronization problems and + write out a new coda file that corrects the synchronization. (These + TDC synchronization problems were occuring in the spring of 2018.) - THcTimeSyncEvtHandler *timesync = new THcTimeSyncEvtHandler("timesync","ADC/TI Time synchrnoziation")); - timesync->AddEvtType(1); - timesync->AddEvtType(2); - ... - gHaEvtHandlers->Add(timesync); + This event handler is typically not used in normal anlysis scripts. It is + used with custom to check suspect runs and write synchronization corrected + data files. - Assumes that all FADCs are in banks with the tag 250 and all - TIblob banks are tag 4. And that these banks are contained - without further structure in ROC banks. Also asssumes that the - only banks containing banks are ROC banks. + To use as a plugin, add to the analysis script: -\author Stephen Wood (saw@jlab.org) + THcTimeSyncEvtHandler *timesync = new THcTimeSyncEvtHandler("timesync","ADC/TI Time synchrnoziation")); + timesync->AddEvtType(1); + timesync->AddEvtType(2); + ... + gHaEvtHandlers->Add(timesync); + + Assumes that all FADCs are in banks with the tag 250 and all + TIblob banks are tag 4. And that these banks are contained + without further structure in ROC banks. Also asssumes that the + only banks containing banks are ROC banks. + + \author Stephen Wood (saw@jlab.org) */ /* This version will deal with bad run coin_all_03302.dat. diff --git a/src/THcTrigApp.cxx b/src/THcTrigApp.cxx index 7ead2c8e6c7c5e77b022fbbef83e500cb6665c2c..60db89514d5b5554c8e583db45519f26966f722e 100644 --- a/src/THcTrigApp.cxx +++ b/src/THcTrigApp.cxx @@ -1,6 +1,6 @@ /** \class THcTrigApp -\ingroup Base +\ingroup Apparatuses \brief A mock spectrometer to hold all trigger related data. diff --git a/src/TIBlobModule.cxx b/src/TIBlobModule.cxx index 97f393ff321df6d09a878e2cc0cf672ed4b1182d..adced9b8e3ed4e18884443a57c94ce0217334747 100644 --- a/src/TIBlobModule.cxx +++ b/src/TIBlobModule.cxx @@ -1,12 +1,11 @@ -///////////////////////////////////////////////////////////////////// -// -// TIBlob -// author Stephen Wood -// -// Decoder module to pull information out of the TI blob that -// read in each ROC. -// -///////////////////////////////////////////////////////////////////// +/** + \class TIBlobModule + \ingroup Decoders + + \brief Decoder module to pull information out of the TI blob that is read in each ROC. + + The TI blob is identified by a bank with the tag 4. +*/ #include "TIBlobModule.h" #include "THaSlotData.h"