Hi, On Wed, 14 Nov 2001 11:48:36 -0600 "Stephen J. Sanders" <ssanders@ku.edu> wrote concerning "How do I determine which year I'm in": > Hi Christian, > In you last purification of the multiplicity modules you removed the > instance of BrRunInfoManager. This is the way Flemming had suggested > to me earlier to find which run was being replayed so that the > the specific calculations appropriate for the 130 and 200 GeV > data could be performed. What I did, was to move the code you need to the only method that needed to know the run number. It's lines 230-233 in modules/centrality/BrMultCentModule.cxx that reads const BrRunInfo* runInfo = BrRunInfoManager::Instance()->GetCurrentRun(); if(runInfo && runInfo->GetRunNo() >= 3700) fMaxMult = 2050; You don't need to have a pointer to a BrRunInfo as a member of the class, since you only need the access at those lines, and also, BrRunInfoManager::Instance(), BrRunInfoManager::GetCurrentRun(), and BrRunInfo::GetRunNo() are all fast methods, so no time is lost compared to caching the BrRunInfo object. > How should I do this? I need to know the run to know how to use the > calibration. The only option I can see is to modify the calibration > module to keep and pass the run number. Is this what you envision?-- If you need similar stuff in other modules, do it the same way as done in BrMultCentModule. I don't get what you mean by "... to modify the calibration module to keep and pass run number ...". Ideally, you should store all information pertaining to the calibrations in the calibration database. For example, what would be the best thing to do in the case of BrMultCentModule and the centrality function stored in BrMultCentCalibtration, would to have MaxMult as one of the entries in the revision array. -- Whoops, I just realised that the BrMultCentCalibration class is not implmented yet! That gives us an advantage. Ok, here goes: The AM centrality calibrations are structured like this (yell if I'm wrong!): A 7'th degree polynomial for multiplicities less than LowMult A 9'th degree polynomial for multiplicities greater than LowMult A upper cut off MaxMult. That gives a total of 7 + 1 + 9 + 1 = 18 parameters. Hence, to have maximum flexibility with respekt to the revision stored etc. the array should be structured like this: element 1: LowMult element 2: LowOrder element 3 to LowOrder+3: Lower multiplicity polynimial element LowOrder+4: MaxMult element LowOrder+5: HighOrder element LowOrder+6 to LowOrder+6+HighOrder: Higher multiplicity polynimial I'd also really prefer if you'd store the coefficents of the pulser, conversion, and correction polynimials directly, rather than calculating derivatives etc. on-the-fly, since it means a performance penalty and loss of generallity. The same procedure as outlined for BrMultCentCalibration can be adopted. Now, in this way, the calibration database is selfsufficient! No external parameters need to be tuned and/or set in user/BRAT code. As it is now, LowMult and MaxMult is hardcoded into the module! Not very flexible and very error prone. The strategy outlined above is what has been adopted for most of the TMA and SMA calibrations, with the exception of the SMA pulser correction and the SMA energy to multiplicity conversion. These two a partly my fault. So to finally answer your question in the subject: Q: How do I determine which year I'm in? A: This is not a question a module should ask at all, since it can be avoided, and we can do much better. In fact, I'd go so far as to say it's illegal for a module to ask that question! Yours, Christian Holm Christensen ------------------------------------------- Address: Sankt Hansgade 23, 1. th. Phone: (+45) 35 35 96 91 DK-2200 Copenhagen N Cell: (+45) 28 82 16 23 Denmark Office: (+45) 353 25 305 Email: cholm@nbi.dk Web: www.nbi.dk/~cholm
This archive was generated by hypermail 2b30 : Wed Nov 14 2001 - 13:29:55 EST