//____________________________________________________________________________________________ Double_t KVChIo::GetCanalGGFromVoltsDouble(Float_t volts) { if (!fChVoltGG || !fChVoltGG->GetStatus()) { return GetGGfromPG(GetCanalPGFromVoltsDouble(volts)); } return fChVoltGG->InvertDouble(volts) + GetPedestal("GG") - fChVoltGG->InvertDouble(0); }
//____________________________________________________________________________________________ Int_t KVChIo::GetCanalGGFromVolts(Float_t volts) { //Return raw GG channel number corresponding to a given detector signal in volts // //Any change in the coder pedestal between the current run and the effective pedestal //of the channel-volt calibration (GetCanal(V=0)) is automatically corrected for. // //Returns GG calculated from PG if GG <-> Volts calibration is not available if (!fChVoltGG || !fChVoltGG->GetStatus()) { return GetGGfromPG(GetCanalPGFromVolts(volts)); } Int_t chan = TMath::Nint(fChVoltGG->Invert(volts) + GetPedestal("GG") - fChVoltGG->Invert(0)); return chan; }
void TGaussFitAnalysedPulse::Draw(const TH1F* tpi_pulse)const{ if(tpi_pulse) { std::string name=tpi_pulse->GetName(); TF1* tap_pulse=new TF1((name+"_AP").c_str(),functions::gauss_lin,0,1000,5); // parameters: // 0: constant (pedestal) // 1: gradient // 2: Gauss amplitude // 3: Gauss mean // 4: Gauss width tap_pulse->SetParameters(GetPedestal(),fGradient,GetAmplitude(),GetTime(),fWidth); tap_pulse->Draw(); tap_pulse->Write(); } }
Double_t KVChIo::GetVoltsFromCanalPG(Double_t chan) { //Return calibrated detector signal in Volts calculated from PG channel number. //If "chan" is not given, the value of the "PG" acquisition parameter read from //data for this detector is used to calculate the signal. //If the PG parameter is not present (=-1) or no calib we return 0. //Any change in the coder pedestal between the current run and the effective pedestal //of the channel-volt calibration (GetCanal(V=0)) is automatically corrected for. if (!fChVoltPG || !fChVoltPG->GetStatus()) return 0; if (!chan) { chan = GetPG(); } if (chan < -0.5) return 0.; //PG parameter absent //correct for pedestal drift chan = chan - (Double_t) GetPedestal("PG") + fChVoltPG->Invert(0.); return (fChVoltPG->Compute(chan)); }
//____________________________________________________________________________________________ Double_t KVChIo::GetCanalPGFromVoltsDouble(Float_t volts) { if (!fChVoltPG || !fChVoltPG->GetStatus()) return -1; return fChVoltPG->InvertDouble(volts) + GetPedestal("PG") - fChVoltPG->InvertDouble(0); }