#include <Calibrator.h>
Inheritance diagram for Calibrator:

|
|
Definition at line 1037 of file Calibrator.cxx. References fAttenCalibrator, fDriftCalibrator, fErrorHist, fFracErrorHist, fLinCalibrator, fMIPCalibrator, fPeCalibrator, fStripCalibrator, fThermometer, fTimeCalibrator, fVALinCalibrator, and CalScheme::PrintErrorStats(). 01038 {
01039 cout << endl << "Calibrator shutting down." << endl;
01040 PrintErrorStats();
01041 if(fTimeCalibrator) delete fTimeCalibrator; fTimeCalibrator = 0;
01042 if(fPeCalibrator) delete fPeCalibrator; fPeCalibrator = 0;
01043 if(fVALinCalibrator) delete fVALinCalibrator; fVALinCalibrator = 0;
01044 if(fDriftCalibrator) delete fDriftCalibrator; fDriftCalibrator= 0;
01045 if(fLinCalibrator) delete fLinCalibrator; fLinCalibrator = 0;
01046 if(fStripCalibrator) delete fStripCalibrator; fStripCalibrator = 0;
01047 if(fAttenCalibrator) delete fAttenCalibrator; fAttenCalibrator = 0;
01048 if(fMIPCalibrator) delete fMIPCalibrator; fMIPCalibrator = 0;
01049 if(fThermometer) delete fThermometer; fThermometer = 0;
01050
01051 for(int i=0; i<CalScheme::kNumberOfSchemeTypes; i++) {
01052 if(fErrorHist[i]) delete fErrorHist[i];
01053 if(fFracErrorHist[i]) delete fFracErrorHist[i];
01054 }
01055 }
|
|
|
Definition at line 988 of file Calibrator.cxx. References fCalibratorIsDirty, fErrorHist, fFracErrorHist, CfgPromptConfigurable::InitializeConfig(), ResetEventStats(), ResetHistograms(), and Registry::Set(). Referenced by Instance(). 00988 : 00989 fTimeCalibrator(0), 00990 fPeCalibrator(0), 00991 fVALinCalibrator(0), 00992 fDriftCalibrator(0), 00993 fLinCalibrator(0), 00994 fStripCalibrator(0), 00995 fAttenCalibrator(0), 00996 fMIPCalibrator(0), 00997 fThermometer(0) 00998 { 00999 // Use this to define global default. 01000 //Load this from a file, like the AlgConfigs? 01001 Registry r; 01002 r.SetName("Calibrator"); 01003 r.Set("TimeCalibrator", "PulserTimeCalScheme"); 01004 r.Set("PeCalibrator", "PEGainAggCalScheme"); 01005 r.Set("VALinCalibrator","VaLinearityCalScheme"); 01006 r.Set("DriftCalibrator","MuonDriftCalScheme"); 01007 r.Set("LinCalibrator", "PulserLinearityCalScheme"); 01008 r.Set("StripCalibrator","StripToStripCalScheme"); 01009 r.Set("AttenCalibrator","StripAttenCalScheme"); 01010 r.Set("MIPCalibrator", "MIPCalScheme"); 01011 r.Set("Thermometer", "TemperatureCalScheme"); 01012 01013 r.Set("TimeCalibratorConfig",Registry()); 01014 r.Set("PeCalibratorConfig",Registry()); 01015 r.Set("VALinCalibratorConfig",Registry()); 01016 r.Set("DriftCalibratorConfig",Registry()); 01017 r.Set("LinCalibratorConfig",Registry()); 01018 r.Set("StripCalibratorConfig",Registry()); 01019 r.Set("AttenCalibratorConfig",Registry()); 01020 r.Set("MIPCalibratorConfig",Registry()); 01021 r.Set("ThermometerConfig",Registry()); 01022 InitializeConfig(r); 01023 01024 for(int i=0;i<kNumberOfSchemeTypes; i++) { 01025 fCalibratorIsDirty[i]=1; 01026 fFracErrorHist[i] = 0; 01027 fErrorHist[i] = 0; 01028 } 01029 01030 ResetEventStats(); 01031 ResetHistograms(); 01032 }
|
|
|
|
|
|
Definition at line 45 of file Calibrator.h. References GetAttenCalibrator(), and Instance(). 00045 { return Instance().GetAttenCalibrator(); };
|
|
||||||||||||||||||||
|
Implimentation of PlexCalib::CalibStripEnd() Purpose: Called by the DigitListModule by way of the Plex. Calibrates a a given possible strip end alternative. Input: strip end id pixel spot id raw adc (pedestal-subtracted) raw time (in seconds) Output: a calibrated PlexSEIdAltLItem Implements PlexCalib. Definition at line 45 of file Calibrator.cxx. References DoubleErr, FloatErr, GetCalibratedTime(), GetDriftCorrected(), GetLinearized(), GetPhotoElectrons(), GetStripToStripCorrected(), and MSG. 00048 {
00062
00063 MSG("Calib", Msg::kVerbose)
00064 << "Calibrator::CalibStripEnd" << endl;
00065 FloatErr seidWeight=0; //Will be set by the Plex
00066 FloatErr seidPE = this->GetPhotoElectrons(adc, seid);
00067 FloatErr seidSigLin = this->GetLinearized(adc, seid);
00068 FloatErr seidSigDrift = this->GetDriftCorrected(seidSigLin, seid);
00069 FloatErr seidSigCorr = this->GetStripToStripCorrected(seidSigDrift, seid);
00070 DoubleErr seidTime = this->GetCalibratedTime(rawtime, adc, seid);
00071
00072 MSG("Calib", Msg::kVerbose)
00073 << seid << " ADC: "
00074 << adc << " PE: " << seidPE << " SigLin: " << seidSigLin
00075 << " SigCor: " << seidSigCorr << endl
00076 << " Time: " << rawtime << " TimeCor: " << seidTime << std::endl;
00077
00078 // Used in debugging phase.
00079 //if((adc/seidPE)<10 ) MSG("Calib",Msg::kError) << "Abnormally high gain ( " << (adc/seidPE) << " adc/pe) returned for SEID " << seid.AsString() << endl;
00080 //if((adc/seidPE)>500) MSG("Calib",Msg::kError) << "Abnormally low gain ( " << (adc/seidPE) << " adc/pe) returned for SEID " << seid.AsString() << endl;
00081
00082 PlexSEIdAltLItem item(seid, spotid, seidWeight, seidPE, seidSigDrift,
00083 seidSigCorr, seidTime);
00084 return item;
00085 }
|
|
|
This routine actually sets everything up if the configuration has changed. It creates each of the Calibrators (which are implimentations of the CalScheme class), pulls in their default config, and makes it jive with the current config. Reimplemented from CalScheme. Definition at line 874 of file Calibrator.cxx. References ConfigScheme(), DoReset(), fAttenCalibrator, fDriftCalibrator, fLinCalibrator, fMIPCalibrator, fPeCalibrator, fStripCalibrator, fThermometer, fTimeCalibrator, fVALinCalibrator, Registry::GetCharString(), CfgPromptConfigurable::GetConfig(), CalScheme::GetContext(), and SetScheme(). 00875 {
00884
00885 const Registry& r = this->GetConfig();
00886
00887 // First, create the Schema.
00888 SetScheme(fTimeCalibrator, r.GetCharString("TimeCalibrator"));
00889 SetScheme(fPeCalibrator, r.GetCharString("PeCalibrator"));
00890 SetScheme(fVALinCalibrator, r.GetCharString("VALinCalibrator"));
00891 SetScheme(fDriftCalibrator, r.GetCharString("DriftCalibrator"));
00892 SetScheme(fLinCalibrator, r.GetCharString("LinCalibrator"));
00893 SetScheme(fStripCalibrator, r.GetCharString("StripCalibrator"));
00894 SetScheme(fAttenCalibrator, r.GetCharString("AttenCalibrator"));
00895 SetScheme(fMIPCalibrator, r.GetCharString("MIPCalibrator"));
00896 SetScheme(fThermometer, r.GetCharString("Thermometer"));
00897
00898 // If we wanted to be good, we would now check that each scheme
00899 // implimented the routines we want. But that's a lot of work.
00900
00901 // Now, merge in any configuration that we have.
00902 // The SubCalibrators hold the definative version of the configuration.
00903 // The main Calibrator object holds only _modifications_ to them.
00904
00905 // Because of this, we now _delete_ any calibration we have after sending it on.
00906 ConfigScheme("TimeCalibratorConfig", fTimeCalibrator);
00907 ConfigScheme("PeCalibratorConfig", fPeCalibrator);
00908 ConfigScheme("VALinCalibratorConfig",fVALinCalibrator);
00909 ConfigScheme("DriftCalibratorConfig",fDriftCalibrator);
00910 ConfigScheme("LinCalibratorConfig", fLinCalibrator);
00911 ConfigScheme("StripCalibratorConfig",fStripCalibrator);
00912 ConfigScheme("AttenCalibratorConfig",fAttenCalibrator);
00913 ConfigScheme("MIPCalibratorConfig", fMIPCalibrator);
00914 ConfigScheme("ThermometerConfig", fThermometer);
00915
00916 // Make sure that all the calibrators have their contexts set:
00917 DoReset(GetContext());
00918 }
|
|
||||||||||||
|
Copy the stuff in the Calibrator sub-registry to the sub-calibrator. Then, delete the stuff in the sub-registry since it has been applied. Definition at line 965 of file Calibrator.cxx. References CfgPromptConfigurable::GetConfig(), Registry::GetRegistry(), CfgPromptConfigurable::Set(), and Registry::Size(). Referenced by ConfigModified(). 00966 {
00972
00973 Registry rs = GetConfig().GetRegistry(masterRegKey);
00974
00975 if(rs.Size()<=0) return;
00976 scheme->Set(rs);
00977
00978 Registry blank;
00979 Set(masterRegKey,blank);
00980 }
|
|
|
Definition at line 32 of file Calibrator.cxx. References MSG. Referenced by EnergyCorrections::CalibrationGroupEnergyCorrections(). 00033 {
00034 MSG("Calib",Msg::kWarning) << "* Some joker has just created a custom Calibrator object." << endl;
00035 MSG("Calib",Msg::kWarning) << "* I'll do as I'm told, but doing this is usually not neccessary" << endl;
00036 MSG("Calib",Msg::kWarning) << "* except for rare testing cases." << endl;
00037 MSG("Calib",Msg::kWarning) << "* (Error/call statistics reporting will now be screwed up.)" << endl;
00038 return new Calibrator();
00039 }
|
|
||||||||||||||||
|
Inverse-calibration for use by Monte-Carlo Purpose: Get atttenuation correction Input: Light expected if energy deposited in middle of strip True position of hit along strip Strip end Output: Light seen at end of WLS pigtail Must be implimented by: AttenCalibrator Calls the current fAttenCalibrator to do the calibration. Reimplemented from CalScheme. Definition at line 582 of file Calibrator.cxx. References CalScheme::DecalAttenCorrected(), fAttenCalibrator, fCalibratorIsDirty, FloatErr, CalScheme::GetContext(), CalScheme::IncrementCalls(), and CalScheme::Reset(). Referenced by PhotonCalibratedPeComputer::ComputePhotons(), PhotonCalibratedBlueComputer::ComputePhotons(), DecalAttenCorrectedTpos(), PhotonCompositeGreenTracker::GreenPhotonToPe(), and PhotonInjector::SimulateEvent(). 00583 {
00598 CalScheme::IncrementCalls(CalScheme::kAttenCalibrator);
00599 if(fCalibratorIsDirty[kAttenCalibrator]) {
00600 // Lazy context update.
00601 fAttenCalibrator->Reset(GetContext());
00602 fCalibratorIsDirty[kAttenCalibrator]=0;
00603 }
00604
00605 return fAttenCalibrator->DecalAttenCorrected(sigmap,stripX,seid);
00606 }
|
|
||||||||||||||||
|
Purpose: Gets SigCor Called by the Track, Shower, and Event algorithms. Input: Charge on end seid. Position of hit in 'tpos' of neighboring plane (i.e. 'lpos'): transverse strip coordinate. Which strip end to calibrate. Output: SigCorr Notes: Guts are ripped from old StripCalibrator. Massage the "lpos" coordinate, which is a tpos-like, into a 'strip-X' coordinate, which is strip-centered. Definition at line 140 of file Calibrator.cxx. References DecalAttenCorrected(), FloatErr, CalScheme::GetContext(), VldContext::GetDetector(), PlexPlaneId::GetPlaneView(), UgliGeomHandle::GetStripHandle(), UgliStripHandle::GlobalPos(), kU, and kV. 00143 {
00159
00160 FloatErr stripX = 0.;
00161
00162 // Caldet and Far are both symettric.
00163 if(GetContext().GetDetector()!=Detector::kNear) {
00164 if (seid.GetPlaneView()==PlaneView::kU) {
00165 stripX = -tpos;
00166 } else {
00167 stripX = tpos;
00168 }
00169 return DecalAttenCorrected(sigmap, stripX, seid);
00170 }
00171
00172 UgliGeomHandle ugli(GetContext());
00173 UgliStripHandle ustrip = ugli.GetStripHandle(seid);
00174
00175 const double rsqrt2 = 1.0/sqrt(2.0);
00176 const TVector3 kU(rsqrt2,rsqrt2,0.);
00177 const TVector3 kV(-rsqrt2,rsqrt2,0.);
00178
00179 if (seid.GetPlaneView()==PlaneView::kU) {
00180 float lambda = kV.Dot(ustrip.GlobalPos(0.));
00181 stripX = -tpos + lambda;
00182 } else {
00183 float lambda = kU.Dot(ustrip.GlobalPos(0.));
00184 stripX = tpos - lambda;
00185 }
00186 return DecalAttenCorrected(sigmap, stripX, seid);
00187 }
|
|
||||||||||||
|
Inverse-calibration for use by Monte-Carlo Purpose: Get gain drift Input: True gain of phototube in PEs, Strip end Output: Drifted gain of phototube Must be implimented by: DriftCalibrator Calls the current fDriftCalibrator to do the calibration. Reimplemented from CalScheme. Definition at line 411 of file Calibrator.cxx. References CalScheme::DecalDrift(), fCalibratorIsDirty, fDriftCalibrator, FloatErr, CalScheme::GetContext(), CalScheme::IncrementCalls(), and CalScheme::Reset(). Referenced by PhotonCalibratedPeComputer::ComputePhotons(), and MeuPlots::DriftDecalTwice(). 00412 {
00426 CalScheme::IncrementCalls(CalScheme::kDriftCalibrator);
00427 if(fCalibratorIsDirty[kDriftCalibrator]) {
00428 // Lazy context update.
00429 fDriftCalibrator->Reset(GetContext());
00430 fCalibratorIsDirty[kDriftCalibrator]=0;
00431 }
00432
00433 return fDriftCalibrator->DecalDrift(undrifted,seid);
00434 }
|
|
||||||||||||||||
|
Inverse-calibration for use by Monte-Carlo Purpose: Get PMT gain and width of single PE response Input: Pixel spot id Output: Gain and and width of 1-pe response in ADCs Must be implimented by: PeCalibrator Calls the current fPeCalibrator to do the calibration. Reimplemented from CalScheme. Definition at line 298 of file Calibrator.cxx. References CalScheme::DecalGainAndWidth(), fCalibratorIsDirty, FloatErr, fPeCalibrator, CalScheme::GetContext(), CalScheme::IncrementCalls(), and CalScheme::Reset(). 00300 {
00313 CalScheme::IncrementCalls(CalScheme::kPeCalibrator);
00314 if(fCalibratorIsDirty[kPeCalibrator]) {
00315 // Lazy context update.
00316 fPeCalibrator->Reset(GetContext());
00317 fCalibratorIsDirty[kPeCalibrator]=0;
00318 }
00319
00320 fPeCalibrator->DecalGainAndWidth(gain,width,psid);
00321 }
|
|
||||||||||||||||
|
Inverse-calibration for use by Monte-Carlo Purpose: Get PMT gain and width of single PE response Input: Strip end Output: Gain and and width of 1-pe response in ADCs Must be implimented by: PeCalibrator Calls the current fPeCalibrator to do the calibration. Reimplemented from CalScheme. Definition at line 274 of file Calibrator.cxx. References CalScheme::DecalGainAndWidth(), fCalibratorIsDirty, FloatErr, fPeCalibrator, CalScheme::GetContext(), CalScheme::IncrementCalls(), and CalScheme::Reset(). Referenced by SimPmt::GetGainAndWidth(). 00275 {
00288 CalScheme::IncrementCalls(CalScheme::kPeCalibrator);
00289 if(fCalibratorIsDirty[kPeCalibrator]) {
00290 // Lazy context update.
00291 fPeCalibrator->Reset(GetContext());
00292 fCalibratorIsDirty[kPeCalibrator]=0;
00293 }
00294
00295 fPeCalibrator->DecalGainAndWidth(gain,width,seid);
00296 }
|
|
||||||||||||
|
Inverse-calibration for use by Monte-Carlo Purpose: Apply nonlinearity function. Input: Linear charge expected from a perfect phototube, Strip end Output: Realistic charge after PMT and electronics nonlinearity Must be implimented by: LinCalibrator Calls the current fLinCalibrator to do the calibration. Reimplemented from CalScheme. Definition at line 467 of file Calibrator.cxx. References CalScheme::DecalLinearity(), fCalibratorIsDirty, fLinCalibrator, FloatErr, CalScheme::GetContext(), CalScheme::IncrementCalls(), and CalScheme::Reset(). Referenced by SimVaElectronics::GenSimulatedADC(), SimQiePerfectElectronics::GenSimulatedADC(), and SimQieElectronics::GenSimulatedADC(). 00468 {
00482 CalScheme::IncrementCalls(CalScheme::kLinCalibrator);
00483 if(fCalibratorIsDirty[kLinCalibrator]) {
00484 // Lazy context update.
00485 fLinCalibrator->Reset(GetContext());
00486 fCalibratorIsDirty[kLinCalibrator]=0;
00487 }
00488
00489 return fLinCalibrator->DecalLinearity(lin,seid);
00490 }
|
|
||||||||||||
|
Inverse-calibration for use by Monte-Carlo Purpose: Get atttenuation correction Input: True energy of hit in MIPs Strip end (may be ignored, depending on implimentation) Output: SigMaps that this hit will result in. Must be implimented by: MIPCalibrator Calls the current fStripCalibrator to do the calibration. Reimplemented from CalScheme. Definition at line 641 of file Calibrator.cxx. References CalScheme::DecalMIP(), fCalibratorIsDirty, FloatErr, fMIPCalibrator, CalScheme::GetContext(), CalScheme::IncrementCalls(), and CalScheme::Reset(). Referenced by PhotonCalibratedPeComputer::ComputePhotons(), and PhotonCalibratedBlueComputer::ComputePhotons(). 00642 {
00656 CalScheme::IncrementCalls(CalScheme::kMIPCalibrator);
00657 if(fCalibratorIsDirty[kMIPCalibrator]) {
00658 // Lazy context update.
00659 fMIPCalibrator->Reset(GetContext());
00660 fCalibratorIsDirty[kMIPCalibrator]=0;
00661 }
00662
00663 return fMIPCalibrator->DecalMIP(sigmip,seid);
00664 }
|
|
||||||||||||
|
Inverse-calibration for use by Monte-Carlo Purpose: Get strip-to-strip variation Input: Charge expected from a perfect strip with a perfect phototube Strip end Output: Charge expected from this strip, including PMT gain Must be implimented by: StripCalibrator Calls the current fStripCalibrator to do the calibration. Reimplemented from CalScheme. Definition at line 525 of file Calibrator.cxx. References CalScheme::DecalStripToStrip(), fCalibratorIsDirty, FloatErr, fStripCalibrator, CalScheme::GetContext(), CalScheme::IncrementCalls(), and CalScheme::Reset(). Referenced by PhotonCalibratedPeComputer::ComputePhotons(), PhotonCalibratedBlueComputer::ComputePhotons(), NtpSRModule::FillNtpShower(), UberModuleLite::FillNtpTrack(), UberModule::FillNtpTrack(), and NtpSRModule::FillNtpTrack(). 00526 {
00540 CalScheme::IncrementCalls(CalScheme::kStripCalibrator);
00541 if(fCalibratorIsDirty[kStripCalibrator]) {
00542 // Lazy context update.
00543 fStripCalibrator->Reset(GetContext());
00544 fCalibratorIsDirty[kStripCalibrator]=0;
00545 }
00546
00547 return fStripCalibrator->DecalStripToStrip(sigcorr,seid);
00548 }
|
|
||||||||||||||||
|
Inverse-calibration for use by Monte-Carlo Purpose: Go from calibrated time to raw time Input: True time Strip end Output: Raw, uncalibrated time. Calls the current fTimeCalibrator to do the calibration. Reimplemented from CalScheme. Definition at line 219 of file Calibrator.cxx. References CalScheme::DecalTime(), DoubleErr, fCalibratorIsDirty, FloatErr, fTimeCalibrator, CalScheme::GetContext(), CalScheme::IncrementCalls(), and CalScheme::Reset(). Referenced by NtpSRModule::FillNtpShower(), UberModuleLite::FillNtpTrack(), UberModule::FillNtpTrack(), and NtpSRModule::FillNtpTrack(). 00220 {
00232 CalScheme::IncrementCalls(CalScheme::kTimeCalibrator);
00233 if(fCalibratorIsDirty[kTimeCalibrator]) {
00234 // Lazy context update.
00235 fTimeCalibrator->Reset(GetContext());
00236 fCalibratorIsDirty[kTimeCalibrator]=0;
00237 }
00238
00239 return fTimeCalibrator->DecalTime(caltime,charge,seid);
00240 }
|
|
||||||||||||
|
Inverse-calibration for use by Monte-Carlo Purpose: Apply VA nonlinearity Input: linear charge channel ID Output: nonlinear charge Must be implimented by: VALinCalibrator Reimplemented from CalScheme. Definition at line 354 of file Calibrator.cxx. References CalScheme::DecalVALinearity(), fCalibratorIsDirty, FloatErr, fVALinCalibrator, CalScheme::GetContext(), CalScheme::IncrementCalls(), and CalScheme::Reset(). 00355 {
00368 CalScheme::IncrementCalls(CalScheme::kVALinCalibrator);
00369 if(fCalibratorIsDirty[kVALinCalibrator]) {
00370 // Lazy context update.
00371 fVALinCalibrator->Reset(GetContext());
00372 fCalibratorIsDirty[kVALinCalibrator]=0;
00373 }
00374
00375 return fVALinCalibrator->DecalVALinearity(adc,rcid);
00376 }
|
|
|
Resets the current context to update all calibrators and all database tables. Reimplemented from CalScheme. Definition at line 779 of file Calibrator.cxx. References fCalibratorIsDirty. Referenced by ConfigModified(). 00780 {
00785 for(int i=0;i<kNumberOfSchemeTypes; i++) {
00786 fCalibratorIsDirty[i]=1;
00787 }
00788 }
|
|
|
Definition at line 1128 of file Calibrator.cxx. References fErrorHist, and fFracErrorHist. 01129 {
01130 static TCanvas* sCanvas1 = 0;
01131 if(!sCanvas1) sCanvas1 = new TCanvas("calCanvas1","Calibrator Summary 1");
01132 sCanvas1->cd();
01133 sCanvas1->Divide(2,4,0,0,kWhite);
01134
01135 static TCanvas* sCanvas2 = 0;
01136 if(!sCanvas2) sCanvas2 = new TCanvas("calCanvas2","Calibrator Summary 2");
01137 sCanvas2->cd();
01138 sCanvas2->Divide(2,4,0,0,kWhite);
01139
01140 int ipad = 0;
01141 int types[] = { CalScheme::kTimeCalibrator,
01142 CalScheme::kVALinCalibrator,
01143 CalScheme::kPeCalibrator,
01144 CalScheme::kLinCalibrator,
01145 CalScheme::kDriftCalibrator,
01146 CalScheme::kStripCalibrator,
01147 CalScheme::kAttenCalibrator,
01148 CalScheme::kMIPCalibrator };
01149
01150 for(int itype=0; itype<8; itype++) {
01151 int type = types[itype];
01152
01153 ipad++;
01154 sCanvas1->cd(ipad);
01155 fErrorHist[type]->Draw();
01156 sCanvas2->cd(ipad);
01157 fFracErrorHist[type]->Draw();
01158 }
01159 }
|
|
|
Definition at line 42 of file Calibrator.h. References GetDriftCalibrator(), and Instance(). Referenced by atmo_set_calibrator(), far_mc_set_calibrator(), far_set_calibrator(), near_mc_set_calibrator(), and near_set_calibrator(). 00042 { return Instance().GetDriftCalibrator(); };
|
|
|
Definition at line 55 of file Calibrator.h. Referenced by AttenCalibrator(), and MinosCompactEvent::MinosCompactEvent(). 00055 { return *fAttenCalibrator; };
|
|
||||||||||||||||
|
Purpose: Correct for attenuation along strip. In: sigcorr, position along strip (in strip coordinates: 0 is center of strip.) strip end Out: position-corrected charge (SigMap) Must be implimented by: AttenCalibrator Calls the current fAttenCalibrator to do the calibration. Reimplemented from CalScheme. Definition at line 553 of file Calibrator.cxx. References DoubleErr, fAttenCalibrator, fCalibratorIsDirty, fErrorHist, fEventCalls, fEventTotal, fFracErrorHist, FloatErr, CalScheme::GetAttenCorrected(), CalScheme::GetContext(), ValueErr< T >::GetError(), ValueErr< T >::GetFracError(), ValueErr< T >::GetValue(), CalScheme::IncrementCalls(), and CalScheme::Reset(). Referenced by NtpMaker::FillFitTrackInfo(), NtpMaker::FillShowerInfo(), NtpMaker::FillStripInfo(), NtpMaker::FillTrackInfo(), Anp::FillMuonId::Get(), GetAttenCorrectedTpos(), AlgFarDetEvent::GetShower(), and MinosCompactEvent::MinosCompactEvent(). 00554 {
00567 CalScheme::IncrementCalls(CalScheme::kAttenCalibrator);
00568 if(fCalibratorIsDirty[kAttenCalibrator]) {
00569 // Lazy context update.
00570 fAttenCalibrator->Reset(GetContext());
00571 fCalibratorIsDirty[kAttenCalibrator]=0;
00572 }
00573
00574 FloatErr result = fAttenCalibrator->GetAttenCorrected(sigcorr,stripX,seid);
00575 fEventTotal[CalScheme::kAttenCalibrator]+= DoubleErr(result.GetValue(),result.GetError());
00576 fEventCalls[CalScheme::kAttenCalibrator]++;
00577 fErrorHist[CalScheme::kAttenCalibrator] ->Fill(result.GetError());
00578 fFracErrorHist[CalScheme::kAttenCalibrator]->Fill(result.GetFracError());
00579 return result;
00580 }
|
|
||||||||||||||||
|
Purpose: Gets SigMap Called by the Track, Shower, and Event algorithms. Input: Charge on end seid. Position of hit in 'tpos' of neighboring plane (i.e. 'lpos'): transverse strip coordinate. Which strip end to calibrate. Output: SigMap Notes: Guts are ripped from old StripCalibrator. Massage the "lpos" coordinate, which is a tpos-like, into a 'strip-X' coordinate, which is strip-centered. Definition at line 90 of file Calibrator.cxx. References FloatErr, GetAttenCorrected(), CalScheme::GetContext(), VldContext::GetDetector(), PlexPlaneId::GetPlaneView(), UgliGeomHandle::GetStripHandle(), UgliStripHandle::GlobalPos(), kU, and kV. Referenced by MeuPlots::CalAttenSyst(), AlgShowerCam::CalculateShowerEnergy(), AlgReco::Calibrate(), MeuAnalysis::Recalibrate(), MeuAnalysis::RecalibrateAtNu(), AlgTrackAtNu::RunAlg(), and AlgShowerAtNu::RunAlg(). 00093 {
00109
00110 FloatErr stripX = 0.;
00111
00112 // Caldet and Far are both symettric.
00113 if(GetContext().GetDetector()!=Detector::kNear) {
00114 if (seid.GetPlaneView()==PlaneView::kU) {
00115 stripX = -tpos;
00116 } else {
00117 stripX = tpos;
00118 }
00119 return GetAttenCorrected(sigcorr, stripX, seid);
00120 }
00121
00122 UgliGeomHandle ugli(GetContext());
00123 UgliStripHandle ustrip = ugli.GetStripHandle(seid);
00124
00125 const double rsqrt2 = 1.0/sqrt(2.0);
00126 const TVector3 kU(rsqrt2,rsqrt2,0.);
00127 const TVector3 kV(-rsqrt2,rsqrt2,0.);
00128
00129 if (seid.GetPlaneView()==PlaneView::kU) {
00130 float lambda = kV.Dot(ustrip.GlobalPos(0.));
00131 stripX = -tpos + lambda;
00132 } else {
00133 float lambda = kU.Dot(ustrip.GlobalPos(0.));
00134 stripX = tpos - lambda;
00135 }
00136 return GetAttenCorrected(sigcorr, stripX, seid);
00137 }
|
|
||||||||||||||||
|
Purpose: Apply time calibration In: raw time in seconds strip end Out: calibrated time. Calls the current fTimeCalibrator to do the calibration. Reimplemented from CalScheme. Definition at line 193 of file Calibrator.cxx. References DoubleErr, fCalibratorIsDirty, fErrorHist, fEventCalls, fEventTotal, fFracErrorHist, FloatErr, fTimeCalibrator, CalScheme::GetCalibratedTime(), CalScheme::GetContext(), ValueErr< T >::GetError(), ValueErr< T >::GetFracError(), CalScheme::IncrementCalls(), and CalScheme::Reset(). Referenced by CalibStripEnd(), and NtpSRModule::FillNtpShieldStrip(). 00194 {
00205 CalScheme::IncrementCalls(CalScheme::kTimeCalibrator);
00206 if(fCalibratorIsDirty[kTimeCalibrator]) {
00207 // Lazy context update.
00208 fTimeCalibrator->Reset(GetContext());
00209 fCalibratorIsDirty[kTimeCalibrator]=0;
00210 }
00211 DoubleErr result = fTimeCalibrator->GetCalibratedTime(rawtime,charge,seid);
00212 fEventTotal[CalScheme::kTimeCalibrator] += result;
00213 fEventCalls[CalScheme::kTimeCalibrator]++;
00214 fErrorHist[CalScheme::kTimeCalibrator] ->Fill(result.GetError());
00215 fFracErrorHist[CalScheme::kTimeCalibrator]->Fill(result.GetFracError());
00216 return result;
00217 }
|
|
|
Returns an amalgam of the complete configuration of the entire calibration scheme at present. This can be re-applied to the current calibrator using Calibrator::Instance().Set() Definition at line 800 of file Calibrator.cxx. References fAttenCalibrator, fDriftCalibrator, fLinCalibrator, fMIPCalibrator, fPeCalibrator, fStripCalibrator, fThermometer, fTimeCalibrator, fVALinCalibrator, CfgPromptConfigurable::GetConfig(), and Registry::Set(). 00801 {
00809
00810 static Registry r;
00811 r = GetConfig();
00812 r.Set("TimeCalibratorConfig", fTimeCalibrator ->GetConfig());
00813 r.Set("PeCalibratorConfig", fPeCalibrator ->GetConfig());
00814 r.Set("VALinCalibratorConfig", fVALinCalibrator->GetConfig());
00815 r.Set("DriftCalibratorConfig", fDriftCalibrator->GetConfig());
00816 r.Set("LinCalibratorConfig", fLinCalibrator ->GetConfig());
00817 r.Set("StripCalibratorConfig", fStripCalibrator->GetConfig());
00818 r.Set("AttenCalibratorConfig", fAttenCalibrator->GetConfig());
00819 r.Set("MIPCalibratorConfig", fMIPCalibrator ->GetConfig());
00820 r.Set("ThermometerConfig", fThermometer ->GetConfig());
00821 return r;
00822 }
|
|
|
Definition at line 52 of file Calibrator.h. Referenced by DriftCalibrator(), and CDAnalysis::SetRootFileObjects(). 00052 { return *fDriftCalibrator; };
|
|
||||||||||||
|
Purpose: Apply drift correction In: raw adc strip end Out: drift-corrected adcs Must be implimented by: DriftCalibrator Calls the current fDriftCalibrator to do the calibration. Reimplemented from CalScheme. Definition at line 383 of file Calibrator.cxx. References DoubleErr, fCalibratorIsDirty, fDriftCalibrator, fErrorHist, fEventCalls, fEventTotal, fFracErrorHist, FloatErr, CalScheme::GetContext(), CalScheme::GetDriftCorrected(), ValueErr< T >::GetError(), ValueErr< T >::GetFracError(), ValueErr< T >::GetValue(), CalScheme::IncrementCalls(), and CalScheme::Reset(). Referenced by EnergyCorrections::CalibrationGroupEnergyCorrections(), CalibStripEnd(), MeuPlots::DriftCalibrate(), SimPmt::GetGainAndWidth(), MeuAnalysis::Recalibrate(), CDAnalysis::ReCalibrate(), and MeuAnalysis::RecalibrateAtNu(). 00384 {
00396 CalScheme::IncrementCalls(CalScheme::kDriftCalibrator);
00397 if(fCalibratorIsDirty[kDriftCalibrator]) {
00398 // Lazy context update.
00399 fDriftCalibrator->Reset(GetContext());
00400 fCalibratorIsDirty[kDriftCalibrator]=0;
00401 }
00402
00403 FloatErr result = fDriftCalibrator->GetDriftCorrected(rawcharge,seid);
00404 fEventTotal[CalScheme::kDriftCalibrator]+= DoubleErr(result.GetValue(),result.GetError());
00405 fEventCalls[CalScheme::kDriftCalibrator]++;
00406 fErrorHist[CalScheme::kDriftCalibrator] ->Fill(result.GetError());
00407 fFracErrorHist[CalScheme::kDriftCalibrator]->Fill(result.GetFracError());
00408 return result;
00409 }
|
|
|
Definition at line 167 of file Calibrator.h. References fErrorHist. 00167 { return fErrorHist[(int)type]; };
|
|
|
Definition at line 163 of file Calibrator.h. References DoubleErr, and fEventCalls. 00163 { return fEventCalls[(int)type]; };
|
|
|
Definition at line 162 of file Calibrator.h. References DoubleErr, and fEventTotal. 00162 { return fEventTotal[(int)type]; };
|
|
|
Definition at line 166 of file Calibrator.h. References fFracErrorHist. 00166 { return fFracErrorHist[(int)type]; };
|
|
|
Definition at line 53 of file Calibrator.h. Referenced by LinCalibrator(), and LIAnalysis::WriteGainsTextFile(). 00053 { return *fLinCalibrator; };
|
|
||||||||||||
|
Purpose: Apply linearity correction In: drifted-corrected or raw ADC, strip end Out: linearized adc (siglin) Must be implimented by: LinCalibrator Calls the current fStripCalibrator to do the calibration. Reimplemented from CalScheme. Definition at line 439 of file Calibrator.cxx. References DoubleErr, fCalibratorIsDirty, fErrorHist, fEventCalls, fEventTotal, fFracErrorHist, fLinCalibrator, FloatErr, CalScheme::GetContext(), ValueErr< T >::GetError(), ValueErr< T >::GetFracError(), CalScheme::GetLinearized(), ValueErr< T >::GetValue(), CalScheme::IncrementCalls(), and CalScheme::Reset(). Referenced by CalibStripEnd(), MeuAnalysis::Recalibrate(), MeuAnalysis::RecalibrateAtNu(), and LIAnalysis::WriteGainsTextFile(). 00440 {
00452 CalScheme::IncrementCalls(CalScheme::kLinCalibrator);
00453 if(fCalibratorIsDirty[kLinCalibrator]) {
00454 // Lazy context update.
00455 fLinCalibrator->Reset(GetContext());
00456 fCalibratorIsDirty[kLinCalibrator]=0;
00457 }
00458
00459 FloatErr result = fLinCalibrator->GetLinearized(sigdrift,seid);
00460 fEventTotal[CalScheme::kLinCalibrator]+= DoubleErr(result.GetValue(),result.GetError());
00461 fEventCalls[CalScheme::kLinCalibrator]++;
00462 fErrorHist[CalScheme::kLinCalibrator] ->Fill(result.GetError());
00463 fFracErrorHist[CalScheme::kLinCalibrator]->Fill(result.GetFracError());
00464 return result;
00465 }
|
|
||||||||||||
|
Purpose: Linearize a VA channel to charge injection data. Usually applies only to pin diodes In: raw adc raw channel ID Out: number of pes. Must be implimented by: VALinCalibrator Reimplemented from CalScheme. Definition at line 325 of file Calibrator.cxx. References DoubleErr, fCalibratorIsDirty, fErrorHist, fEventCalls, fEventTotal, fFracErrorHist, FloatErr, fVALinCalibrator, CalScheme::GetContext(), ValueErr< T >::GetError(), ValueErr< T >::GetFracError(), CalScheme::GetLinearizedVA(), ValueErr< T >::GetValue(), CalScheme::IncrementCalls(), and CalScheme::Reset(). 00326 {
00338
00339 CalScheme::IncrementCalls(CalScheme::kVALinCalibrator);
00340 if(fCalibratorIsDirty[kVALinCalibrator]) {
00341 // Lazy context update.
00342 fVALinCalibrator->Reset(GetContext());
00343 fCalibratorIsDirty[kVALinCalibrator]=0;
00344 }
00345
00346 FloatErr result = fVALinCalibrator->GetLinearizedVA(rawcharge,rcid);
00347 fEventTotal[CalScheme::kVALinCalibrator]+= DoubleErr(result.GetValue(),result.GetError());
00348 fEventCalls[CalScheme::kVALinCalibrator]++;
00349 fErrorHist[CalScheme::kVALinCalibrator] ->Fill(result.GetError());
00350 fFracErrorHist[CalScheme::kVALinCalibrator]->Fill(result.GetFracError());
00351 return result;
00352 }
|
|
||||||||||||
|
|
Definition at line 56 of file Calibrator.h. Referenced by MIPCalibrator(). 00056 { return *fMIPCalibrator; };
|
|
|
Definition at line 50 of file Calibrator.h. Referenced by PeCalibrator(). 00050 { return *fPeCalibrator; };
|
|
||||||||||||
|
|
Definition at line 54 of file Calibrator.h. Referenced by StripCalibrator(). 00054 { return *fStripCalibrator; };
|
|
||||||||||||
|
Purpose: Apply strip-to-strip correction i.e. scintillator light output, PMT gain, and light loss By default, assumes hit is in center of strip. In: linearized or raw adc (siglin) strip end Out: corrected adc (sigcorr) Must be implimented by: StripCalibrator Calls the current fStripCalibrator to do the calibration. Reimplemented from CalScheme. Definition at line 495 of file Calibrator.cxx. References DoubleErr, fCalibratorIsDirty, fErrorHist, fEventCalls, fEventTotal, fFracErrorHist, FloatErr, fStripCalibrator, CalScheme::GetContext(), ValueErr< T >::GetError(), ValueErr< T >::GetFracError(), CalScheme::GetStripToStripCorrected(), ValueErr< T >::GetValue(), CalScheme::IncrementCalls(), and CalScheme::Reset(). Referenced by CalibStripEnd(), MeuAnalysis::Recalibrate(), CDAnalysis::ReCalibrate(), MeuAnalysis::RecalibrateAtNu(), and MeuPlots::ugliClearFibre(). 00496 {
00511 CalScheme::IncrementCalls(CalScheme::kStripCalibrator);
00512 if(fCalibratorIsDirty[kStripCalibrator]) {
00513 // Lazy context update.
00514 fStripCalibrator->Reset(GetContext());
00515 fCalibratorIsDirty[kStripCalibrator]=0;
00516 }
00517
00518 FloatErr result = fStripCalibrator->GetStripToStripCorrected(siglin,seid);
00519 fEventTotal[CalScheme::kStripCalibrator]+= DoubleErr(result.GetValue(),result.GetError());
00520 fEventCalls[CalScheme::kStripCalibrator]++;
00521 fErrorHist[CalScheme::kStripCalibrator] ->Fill(result.GetError());
00522 fFracErrorHist[CalScheme::kStripCalibrator]->Fill(result.GetFracError());
00523 return result;
00524 }
|
|
|
Definition at line 696 of file Calibrator.cxx. References RawChannelId::GetDetector(), and RawChannelId::GetElecType(). Referenced by PulserTimeCalScheme::CalibrateByPulser(), GetTDCFromTime(), GetTimeFromTDC(), and SimQieClock::Reset(). 00697 {
00698 // This code shamelessly lifted from AlgDigit.
00699
00700 // Convert from 0.1*Munits:ns to standard Munits base time units (sec).
00701 Double_t tdc_convert = 0.1; // REROOT, non-VA, non-QIE scale factor
00702
00703 // Switch on type of readout electronics
00704 switch (rcid.GetElecType()) {
00705
00706 // VA electronics, tick = 1.5625 ns (640MHz)
00707 case (ElecType::kVA):
00708 tdc_convert = 1.5625;
00709 break;
00710
00711 // QIE electronics, tick = 18.832 ns (RF clock)
00712 case (ElecType::kQIE):
00713 tdc_convert = 1000./53.1; // clock is 53.1MHz
00714
00715 // CalDet has yet a different clock frequency
00716 if (rcid.GetDetector() == Detector::kCalDet)
00717 tdc_convert = 1.5625*16.0*58.0/77.0;
00718 break;
00719
00720 // Use whatever value we started with
00721 default:
00722 break;
00723 }
00724 return tdc_convert * Munits::ns;
00725 }
|
|
||||||||||||
|
Purpose: Convert from TDC ticks to nanoseconds. Does not calibrate. In: raw time in TDC ticks raw channel id Out: time in ns Definition at line 751 of file Calibrator.cxx. References GetTDCConvert(). Referenced by ChopModule::Ana(), SimVaElectronics::GenSimulatedTDC(), ChopHelper::GetChopHelp(), AlgChopListSharp2::RunAlg(), AlgChopListSharp::RunAlg(), AlgChopListMitre::RunAlg(), and AlgChopListGeneric::RunAlg(). 00752 {
00761
00762 // This code shamelessly lifted from AlgDigit.
00763
00764 // Convert TDC counts to Double_t.
00765 Double_t tdc = time / GetTDCConvert(rcid);
00766
00767 //return (int)round(tdc); // round() not available on IRIX
00768 return TMath::Nint(tdc);
00769 }
|
|
|
Request temperature at current vld context Purpose: Get temperature Input: User-defined. Output: Temperature in degrees Celcius Must be implimented by: Thermometer Reimplemented from CalScheme. Definition at line 670 of file Calibrator.cxx. References fCalibratorIsDirty, fThermometer, CalScheme::GetContext(), CalScheme::GetTemperature(), CalScheme::IncrementCalls(), and CalScheme::Reset(). Referenced by CDTrackerModule::Ana(), PhotonStatSummarizer::FillTrees(), StripToStripCalScheme::GetTemperatureCorrection(), PulserSigLinCalScheme::GetVATemperatureCorrection(), PulserDriftCalScheme::GetVATemperatureCorrection(), CDAnalysis::ReCalibrate(), and CDAnalysis::StoppingMuonCalibration(). 00671 {
00683 CalScheme::IncrementCalls(CalScheme::kThermometer);
00684 if(fCalibratorIsDirty[kThermometer]) {
00685 // Lazy context update.
00686 fThermometer->Reset(GetContext());
00687 fCalibratorIsDirty[kThermometer]=0;
00688 }
00689
00690 return fThermometer->GetTemperature(mode);
00691 }
|
|
|
Definition at line 57 of file Calibrator.h. Referenced by Thermometer(). 00057 { return *fThermometer; };
|
|
|
Definition at line 49 of file Calibrator.h. Referenced by TimeCalibrator(). 00049 { return *fTimeCalibrator; };
|
|
||||||||||||
|
Purpose: Convert from TDC ticks to nanoseconds. Does not calibrate. In: raw time in TDC ticks raw channel id Out: time in ns Definition at line 727 of file Calibrator.cxx. References DoubleErr, and GetTDCConvert(). Referenced by NoiseFilterModule::Ana(), SimDigit::ComputeTime(), NtpSRModule::FillNtpEventSummary(), MergeEvent::Reco(), BiggestChopModule::Reco(), AlgMCDigit::RunAlg(), AlgDigit::RunAlg(), AlgDIConvert::RunAlg(), AlgCaldetDigit::RunAlg(), and Coroner::UpdateLiHitList(). 00728 {
00737
00738 // Convert TDC counts to Double_t.
00739
00740 DoubleErr tdc_and_err(tdc,1.0);
00741
00742 // Flag error on FD:
00743 //if(rcid.GetElecType==ElecType::kVA)
00744 // if( (tdc & 0x1F) == 0x08 ) tdc_and_err.SetError(8.);
00745
00746 DoubleErr t = tdc_and_err * GetTDCConvert(rcid);
00747
00748 return t;
00749 }
|
|
|
Definition at line 51 of file Calibrator.h. Referenced by VALinCalibrator(). 00051 { return *fVALinCalibrator; };
|
|
|
|
Definition at line 43 of file Calibrator.h. References GetLinCalibrator(), and Instance(). 00043 { return Instance().GetLinCalibrator(); };
|
|
|
Definition at line 46 of file Calibrator.h. References GetMIPCalibrator(), and Instance(). 00046 { return Instance().GetMIPCalibrator(); };
|
|
|
|
|
|
Definition at line 40 of file Calibrator.h. References GetPeCalibrator(), and Instance(). 00040 { return Instance().GetPeCalibrator(); };
|
|
|
Prints out the current configuration status Should be overridden by implimentation. Reimplemented from CalScheme. Definition at line 824 of file Calibrator.cxx. References fAttenCalibrator, fDriftCalibrator, fLinCalibrator, fMIPCalibrator, fPeCalibrator, fStripCalibrator, fThermometer, fTimeCalibrator, fVALinCalibrator, Registry::GetCharString(), CfgPromptConfigurable::GetConfig(), and CalScheme::PrintConfig(). Referenced by MeuAnalysis::RecalibrateAtNu(), and CDAnalysis::SetRootFileObjects(). 00825 {
00826 // Printout of current configuration.
00827 os << endl;
00828 os << "-----------------------------------------------------" << endl;
00829 os << "TimeCalibrator: " << GetConfig().GetCharString("TimeCalibrator") << endl;
00830 fTimeCalibrator->PrintConfig(os);
00831
00832 os << endl;
00833 os << "-----------------------------------------------------" << endl;
00834 os << "PeCalibrator: " << GetConfig().GetCharString("PeCalibrator") << endl;
00835 fPeCalibrator->PrintConfig(os);
00836
00837 os << endl;
00838 os << "-----------------------------------------------------" << endl;
00839 os << "VALinCalibrator: " << GetConfig().GetCharString("VALinCalibrator") << endl;
00840 fVALinCalibrator->PrintConfig(os);
00841
00842 os << endl;
00843 os << "-----------------------------------------------------" << endl;
00844 os << "DriftCalibrator: " << GetConfig().GetCharString("DriftCalibrator") << endl;
00845 fDriftCalibrator->PrintConfig(os);
00846
00847 os << endl;
00848 os << "-----------------------------------------------------" << endl;
00849 os << "LinCalibrator: " << GetConfig().GetCharString("LinCalibrator") << endl;
00850 fLinCalibrator->PrintConfig(os);
00851
00852 os << endl;
00853 os << "-----------------------------------------------------" << endl;
00854 os << "StripCalibrator: " << GetConfig().GetCharString("StripCalibrator") << endl;
00855 fStripCalibrator->PrintConfig(os);
00856
00857 os << endl;
00858 os << "-----------------------------------------------------" << endl;
00859 os << "AttenCalibrator: " << GetConfig().GetCharString("AttenCalibrator") << endl;
00860 fAttenCalibrator->PrintConfig(os);
00861
00862 os << endl;
00863 os << "-----------------------------------------------------" << endl;
00864 os << "MIPCalibrator: " << GetConfig().GetCharString("MIPCalibrator") << endl;
00865 fMIPCalibrator->PrintConfig(os);
00866
00867 os << endl;
00868 os << "-----------------------------------------------------" << endl;
00869 os << "Thermometer: " << GetConfig().GetCharString("Thermometer") << endl;
00870 fThermometer->PrintConfig(os);
00871 }
|
|
|
Definition at line 1104 of file Calibrator.cxx. References fEventCalls, fEventTotal, Form(), and MSG. 01105 {
01106 MSG("Calib",Msg::kInfo) << "Event statistics: ----------------------" << endl;
01107
01108 for(int i=0; i<CalScheme::kNumberOfSchemeTypes; i++) {
01109 if(i==CalScheme::kUnknown) continue;
01110 else {
01111 MSG("Calib",Msg::kInfo) << Form("%16s | Total %8s: %10.1f +- %8.1f Mean %8s: %6.1f +- %6.1f",
01112 CalScheme::SchemeTypeName(i),
01113 CalScheme::UnitName(i),
01114 fEventTotal[i].GetValue(),
01115 fEventTotal[i].GetError(),
01116 CalScheme::UnitName(i),
01117 (fEventCalls[i]>0) ?
01118 (fEventTotal[i]/fEventCalls[i]).GetValue() : -1
01119 ,
01120 (fEventCalls[i]>0) ?
01121 (fEventTotal[i]/fEventCalls[i]).GetError() : -1
01122 )
01123 << endl;
01124 }
01125 }
01126 }
|
|
|
Definition at line 101 of file Calibrator.h. References CalScheme::Reset(). Referenced by NtpMaker::Ana(), MeuAnalysis::Recalibrate(), CDAnalysis::ReCalibrate(), MeuAnalysis::RecalibrateAtNu(), MergeEvent::Reco(), AlgTrackCam::RunAlg(), AlgTrackAtNu::RunAlg(), AlgShowerCam::RunAlg(), AlgShowerAtNu::RunAlg(), AlgFarDetEvent::RunAlg(), AlgDIConvert::RunAlg(), Anp::FillMuonId::Select(), AlgFitTrackCam::SetPropertiesFromFinderTrack(), AlgFitTrackCam::SetTrackProperties(), and CDAnalysis::StoppingMuonCalibration(). 00101 { Reset(vldc); }; // alternate name, backwards compatability.
|
|
|
Definition at line 1058 of file Calibrator.cxx. References fEventCalls, fEventTotal, and ValueErr< T >::Set(). Referenced by Calibrator(). 01059 {
01060 for(int i=0; i<CalScheme::kNumberOfSchemeTypes; i++) {
01061 fEventTotal[i].Set(0,0);
01062 fEventCalls[i] = 0;
01063 }
01064 }
|
|
|
Rebuild histograms. Definition at line 1066 of file Calibrator.cxx. References fErrorHist, fFracErrorHist, Form(), and CalScheme::SchemeTypeName(). Referenced by Calibrator(). 01067 {
01071 for(int i=0; i<CalScheme::kNumberOfSchemeTypes; i++) {
01072
01073 if(fErrorHist[i]) {
01074 fErrorHist[i]->Reset();
01075 } else {
01076 if(i==CalScheme::kTimeCalibrator)
01077 fErrorHist[i] = new TH1F(Form("hError_%s",SchemeTypeName(i)),
01078 Form("Error, %s",SchemeTypeName(i)),
01079 500,0,100.*Munits::ns);
01080 else
01081 fErrorHist[i] = new TH1F(Form("hError_%s",SchemeTypeName(i)),
01082 Form("Error, %s",SchemeTypeName(i)),
01083 500,0,1e4);
01084
01085 fErrorHist[i] -> SetXTitle(Form("Error per calibration (%s)",CalScheme::UnitName(i)));
01086 fErrorHist[i] -> SetYTitle("Number of calibrations");
01087 }
01088 fErrorHist[i] -> SetDirectory(0); // Make sure it's only memory-resident.
01089
01090 if(fFracErrorHist[i]) {
01091 delete fFracErrorHist[i];
01092 } else {
01093 fFracErrorHist[i] = new TH1F(Form("hFracError_%s",SchemeTypeName(i)),
01094 Form("Fractional Error, %s",SchemeTypeName(i)),
01095 20,0,1.0);
01096 fFracErrorHist[i] -> SetXTitle("Fractional error");
01097 fFracErrorHist[i] -> SetYTitle("Number of calibrations");
01098 }
01099 fFracErrorHist[i] -> SetDirectory(0); // Make sure it's only memory-resident.
01100
01101 }
01102 }
|
|
|
Definition at line 795 of file Calibrator.cxx. References MsgService::GetStream(), MsgService::Instance(), and MsgStream::SetLogLevel(). 00796 {
00797 MsgService::Instance()->GetStream("Calib")->SetLogLevel((Msg::LogLevel_t)lvl);
00798 }
|
|
||||||||||||
|
Definition at line 921 of file Calibrator.cxx. References MSG. Referenced by ConfigModified(). 00922 {
00923 if(scheme) {
00924 // object exists. Is it the right kind?
00925 if(strcmp(scheme->GetName(),name)==0) {
00926 // It is. Do nothing.
00927 return;
00928 }
00929 }
00930
00931 // Make a new one.
00932 CalScheme* newscheme = 0;
00933 assert(gROOT);
00934
00935 TClass* theclass = gROOT->GetClass(name);
00936 if(!theclass) {
00937 MSG("Calib",Msg::kError) << "Calibrator: Unable to find requested Scheme: " << name << endl;
00938 } else {
00939 void* p = theclass->New();
00940 TObject* obj = (TObject*) p;
00941 newscheme = dynamic_cast<CalScheme*>(obj);
00942 if(!newscheme) {
00943 MSG("Calib",Msg::kError) << "Calibrator: " << name << " is not a CalScheme!" << endl;
00944 }
00945 }
00946
00947 if(!newscheme) {
00948 if(!scheme) {
00949 MSG("Calib",Msg::kError) << " Cannot generate calibration scheme " << name
00950 << " so I have to die! Sorry! ";
00951 assert(0);
00952 } else {
00953 MSG("Calib",Msg::kError) << " Cannot generate calibration scheme " << name
00954 << " so I'll keep the old one: " << scheme->GetName() << endl;
00955 return;
00956 }
00957 }
00958
00959 // All is well. Make the sucker.
00960 if(scheme) delete scheme;
00961 scheme = newscheme;
00962 }
|
|
|
Definition at line 44 of file Calibrator.h. References GetStripCalibrator(), and Instance(). Referenced by apply_spectrometer_fudge(), and SetCalibrator(). 00044 { return Instance().GetStripCalibrator(); };
|
|
|
Definition at line 47 of file Calibrator.h. References GetThermometer(), and Instance(). 00047 { return Instance().GetThermometer(); };
|
|
|
Definition at line 39 of file Calibrator.h. References GetTimeCalibrator(), and Instance(). Referenced by atmo_set_calibrator(), far_set_calibrator(), and set_calibrator_far(). 00039 { return Instance().GetTimeCalibrator(); };
|
|
|
Definition at line 41 of file Calibrator.h. References GetVALinCalibrator(), and Instance(). 00041 { return Instance().GetVALinCalibrator(); };
|
|
|
Definition at line 143 of file Calibrator.h. |
|
|
Definition at line 152 of file Calibrator.h. Referenced by ConfigModified(), DecalAttenCorrected(), GetAttenCorrected(), GetCompleteConfiguration(), PrintConfig(), and ~Calibrator(). |
|
|
Definition at line 155 of file Calibrator.h. Referenced by Calibrator(), DecalAttenCorrected(), DecalDrift(), DecalGainAndWidth(), DecalLinearity(), DecalMIP(), DecalStripToStrip(), DecalTime(), DecalVALinearity(), DoReset(), GetAttenCorrected(), GetCalibratedTime(), GetDriftCorrected(), GetLinearized(), GetLinearizedVA(), GetMIP(), GetPhotoElectrons(), GetStripToStripCorrected(), and GetTemperature(). |
|
|
Definition at line 149 of file Calibrator.h. Referenced by ConfigModified(), DecalDrift(), GetCompleteConfiguration(), GetDriftCorrected(), PrintConfig(), and ~Calibrator(). |
|
|
Definition at line 176 of file Calibrator.h. Referenced by Calibrator(), DrawHistograms(), GetAttenCorrected(), GetCalibratedTime(), GetDriftCorrected(), GetErrorHist(), GetLinearized(), GetLinearizedVA(), GetMIP(), GetPhotoElectrons(), GetStripToStripCorrected(), ResetHistograms(), and ~Calibrator(). |
|
|
Definition at line 172 of file Calibrator.h. Referenced by GetAttenCorrected(), GetCalibratedTime(), GetDriftCorrected(), GetEventCalls(), GetLinearized(), GetLinearizedVA(), GetMIP(), GetPhotoElectrons(), GetStripToStripCorrected(), PrintEventStats(), and ResetEventStats(). |
|
|
Definition at line 171 of file Calibrator.h. Referenced by GetAttenCorrected(), GetCalibratedTime(), GetDriftCorrected(), GetEventTotal(), GetLinearized(), GetLinearizedVA(), GetMIP(), GetPhotoElectrons(), GetStripToStripCorrected(), PrintEventStats(), and ResetEventStats(). |
|
|
Definition at line 175 of file Calibrator.h. Referenced by Calibrator(), DrawHistograms(), GetAttenCorrected(), GetCalibratedTime(), GetDriftCorrected(), GetFracErrorHist(), GetLinearized(), GetLinearizedVA(), GetMIP(), GetPhotoElectrons(), GetStripToStripCorrected(), ResetHistograms(), and ~Calibrator(). |
|
|
Definition at line 28 of file Calibrator.cxx. Referenced by Instance(), and Calibrator::Cleaner::~Cleaner(). |
|
|
Definition at line 150 of file Calibrator.h. Referenced by ConfigModified(), DecalLinearity(), GetCompleteConfiguration(), GetLinearized(), PrintConfig(), and ~Calibrator(). |
|
|
Definition at line 153 of file Calibrator.h. Referenced by ConfigModified(), DecalMIP(), GetCompleteConfiguration(), GetMIP(), PrintConfig(), and ~Calibrator(). |
|
|
Definition at line 147 of file Calibrator.h. Referenced by ConfigModified(), DecalGainAndWidth(), GetCompleteConfiguration(), GetPhotoElectrons(), PrintConfig(), and ~Calibrator(). |
|
|
Definition at line 151 of file Calibrator.h. Referenced by ConfigModified(), DecalStripToStrip(), GetCompleteConfiguration(), GetStripToStripCorrected(), PrintConfig(), and ~Calibrator(). |
|
|
Definition at line 154 of file Calibrator.h. Referenced by ConfigModified(), GetCompleteConfiguration(), GetTemperature(), PrintConfig(), and ~Calibrator(). |
|
|
Definition at line 146 of file Calibrator.h. Referenced by ConfigModified(), DecalTime(), GetCalibratedTime(), GetCompleteConfiguration(), PrintConfig(), and ~Calibrator(). |
|
|
Definition at line 148 of file Calibrator.h. Referenced by ConfigModified(), DecalVALinearity(), GetCompleteConfiguration(), GetLinearizedVA(), PrintConfig(), and ~Calibrator(). |
1.3.9.1