From: Christian Holm Christensen (cholm@hehi03.nbi.dk)
Date: Thu Oct 31 2002 - 15:55:19 EST
Hi Steve, Stephen Sanders <ssanders@ku.edu> wrote concerning Re: Reading SMA and TMA calibrations [Thu, 31 Oct 2002 12:13:06 -0600] ---------------------------------------------------------------------- > Hi Christian, > The current code should only run through the if--else sequence if > a file specific to the run number if not found. This sequence tries > to point to an appropriate "default" calibration. However, I like your > solution to avoid having to change "defaults" since is is always the > closest available calibration with a lower run number that is > wanted. The code will return the run number if it's found in the list, otherwise the closest lower number - I think that's what we want - right? At least that's how it's done in the DB code (when policy == -1). > I'd be happy if you commit your changes since they should be transparent > and will avoid having to keep updating these files in the future. I'm commiting it right now. In the long run, we should move all this calibration stuff into the MySQL database. We need to add some code to the regular Br{Tile,Si}Calibration classes for that. Also, we should not store the various function parameters, such that the modules have to make calculations to use the numbers (it's a wast of time, and not very flexible). In stead, the data stored in the database should encode the function directly. That is, rather than storing a, b, c of / a^2*x + b*x + c x <= x1 f(x) = < \ f(x1) + 2*a*(x-x1) + b we should store a', b', c', d', e', l1, n1, n2 of / pol(n1,x) [= a'*x^2 + b'*x + x] x <= l1 f(x) = < \ pol{n2,x) [= d'*x + e] x > l1 where a' = a d' = 2*a b' = b e' = b - 2*a*l1 + a'^2*l1 + b'*l1 + c' c' = c These are simple calculations and should only be done once: When the calibration is made, and not as done now: For each and every event, once for each hit. Let's discuss this off-list if you like, and no-one objects. I've tagged BRAT to BRAT-2-6-1 and bumped the micro-version (revision). Here's a changelog: 2002-10-31 Christian Holm Christensen <cholm@rcas0014.rcf.bnl.gov> * configure.in: Bumped minor version to 2.6.1 * data/calib/BrMultCalibration.h, data/calib/BrSiCalibration.cxx, data/calib/BrTileCalibration.cxx, data/calib/BrMultCalibration.cxx: Added the member funvtion FindClosestRun to BrMultTmpCalibration, that based on the files in <prefix>/share/brat/params/mult will find the run number that closest to the passed runnumber. The code in Br{Tile,Si}TmpCalibration will then open the appropiate file. 2002-10-26 Flemming Videbaek, BNL, x4106 <videbaek@rcas0014.rcf.bnl.gov> * util/BrVector3D.cxx, util/BrDetectorList.cxx, util/BrIostream.h, util/BrLine3D.cxx, test/RotateGeoFile.cxx, test/SetGeometryFiles.cxx, test/TestBase.cxx, test/TestChkvParameters.cxx, modules/track/tpc/BrTpcFitCluster.cxx, modules/io/BrGeantInput.cxx, modules/abc/BrModuleContainer.cxx, modules/abc/BrModule.cxx, modules/abc/BrModule.h, managers/BrAppOption.cxx, db/test/TestCalibDb.cxx, db/test/TestMainDb.cxx, db/test/TestRunsDb.cxx, db/run/BrDbRun.cxx, db/run/BrRunInfoManager.cxx, db/run/BrDbConditionsData.cxx, db/run/BrDbConditionsKeithley.cxx, db/run/BrDbConditionsVar.cxx, db/run/BrDbFile.cxx, db/run/BrDbMagnet.cxx, db/pass/BrPassInfoManager.cxx, db/pass/BrRdbmPassDb.cxx, db/pass/BrRootPassDb.cxx, db/pass/BrPassInfo.cxx, db/params/BrDetectorParamsBase.cxx, db/geometry/BrDbDetectorVolume.cxx, db/geometry/BrRdbmGeometriesDb.cxx, db/calib/BrDbRevision.cxx, db/calib/BrRdbmCalibrationsDb.cxx, db/calib/BrRootCalibrationsDb.cxx, db/apps/CreateCalib.cxx, db/apps/CreateDetector.cxx,! db/apps/CreateParameter.cxx, db/apps/CreatePass.cxx, db/apps/CreatePerson.cxx, db/apps/CreateRun.cxx, db/apps/DbUtils.h, db/abc/BrDb.cxx, data/vertex/BrInelVertex.cxx, data/vertex/BrVertex.cxx, data/vertex/BrBbVertex.cxx, data/track/BrTpcCluster.cxx, data/track/BrTpcHit.cxx, data/track/BrTpcTrackCandidate.cxx, data/track/BrTrackCandidate.cxx, data/track/BrTrack.cxx, data/track/BrTrackResidual.cxx, data/track/BrHit.cxx, data/track/BrTofTrackMatch.cxx, data/track/BrTpcAdcTable.cxx, data/rdo/BrBbRdo.cxx, data/rdo/BrChkvRdo.cxx, data/rdo/BrMultRdo.cxx, data/rdo/BrTofRdo.cxx, data/rdo/BrZdcRdo.cxx, data/raw/BrC1Dig.cxx, data/raw/BrTpcSequence.cxx, data/pid/BrC1Pid.cxx, data/pid/BrPid.cxx, data/pid/BrRichPid.cxx, data/params/BrChkvParameters.cxx, data/calib/BrTileCalibration.cxx, data/calib/BrTofCalibration.cxx, data/calib/BrZdcCalibration.cxx, data/calib/BrBbCalibration.cxx, data/calib/BrChkvCalibration.cxx, data/calib/BrMultCentCalibration.cxx, data/calib/BrSiCalibration.cxx, dat! a/calib/BrTestCalibration.cxx, data/abc/BrDataObject.cxx, data/abc/BrFileTag.cxx, data/abc/BrVersion.cxx: Ensure cout,cerr is in scope by essnetially added using namespace std whereever iostrem.h was included * configure.in: Increment version to 2.6.0 2002-10-25 Christian Holm Christensen <cholm@rcas0014.rcf.bnl.gov> * modules/io/BrGeantInput.cxx: Added a verbose message * data/track/BrDetectorHit.h, data/track/BrDetectorHit.cxx, data/raw/BrZdcDig.h, data/raw/BrZdcDig.cxx, data/raw/BrTofDig.cxx, data/raw/BrC1Dig.cxx, data/raw/BrBbDig.cxx: Nicer print outs (one line) that makes it easier to see what's going on * data/geant/BrGeantTrack.h, data/geant/BrGeantTrack.cxx, data/geant/BrGeantHit.h, data/geant/BrGeantHit.cxx, data/geant/BrGeantHeader.h, data/geant/BrGeantHeader.cxx: Added Print methods to these classes. 2002-10-18 Eun-Joo Kim, BNL, x4448 <ejkim@rcas0014.rcf.bnl.gov> * data/rdo/BrTrackTree.h, data/rdo/BrTrackTree.cxx: Add TpcRdo Objects -- I need them 2002-10-11 Christian Holm Christensen <cholm@rcas0014.rcf.bnl.gov> * modules/track/tpc/README, modules/track/tpc/Makefile.am, modules/track/tpc/LinkDef.h, modules/track/tpc/Include.h, modules/track/tpc/BrTpcCandidate2TrackModule.h, modules/track/tpc/BrTpcCandidate2TrackModule.cxx: Added the module BrTpcCandidate2TrackModule which converts a table of BrTpcCandidateTrack to BrDetectorTrack, which what is used in the combining code. This module is temporary until such a time as when the combining code uses BrTrack objects. Flemming, I hope you used tags for that large fix above :-) Yours, ____ | Christian Holm Christensen |_| | ------------------------------------------------------------- | | Address: Sankt Hansgade 23, 1. th. Phone: (+45) 35 35 96 91 _| DK-2200 Copenhagen N Cell: (+45) 24 61 85 91 _| Denmark Office: (+45) 353 25 305 ____| Email: cholm@nbi.dk Web: www.nbi.dk/~cholm | |
This archive was generated by hypermail 2.1.5 : Thu Oct 31 2002 - 14:56:15 EST