/////////////////////////////////////////////////////////////////////// // // EnergyPartialRhoZ // // Uses Segmentor and poisson correction to convert from NHits to an // energy estimator (H). H(rho, z) is converted to an effective H0 // using a function form in rho and z. The energy is // then estimated using a proportional conversion constant // // Author: Josie Paton -- contact person // // REVISION HISTORY: // - 2020/11/13: Creation // /////////////////////////////////////////////////////////////////////// #ifndef __RAT_Methods_EnergyPartialRhoZ__ #define __RAT_Methods_EnergyPartialRhoZ__ #include #include #include namespace RAT{ namespace DS { class FitResult; } namespace Methods{ class EnergyPartialRhoZ : public SeededMethod { public: // Name getters std::string GetName() const { return EnergyPartialRhoZ::Name(); } static std::string Name() { return std::string("energyPartialRhoZ"); } // Initialise the method, index is optional index in the DB void Initialise(const std::string& index) { fIndex = index; } // BeginOfRun to load constants from the database void BeginOfRun(DS::Run& run); // Nothing to do in EndOfRun void EndOfRun(DS::Run&) {} // Set the seed to a default value (origin) void DefaultSeed(); // Calculate and return best fit value DS::FitResult GetBestFit(); private: //Applies detector state correction to fHAtEnergy void ApplyDetectorStateCorrection(double coorActiveChannels, double coorChanEff); std::string fIndex; // Optional index override for the DB table //EDITS: change this when appropriate double fRCutoff; // Upper radius beyond which fits are invalid double fZLowCutoff; // Lower z beyond which fits are invalid double fZHighCutoff; // Upper z beyond which fits are invalid double fEScaling; //Proportionality constant between H and E (from calibration) double fZoff; //AV offset std::vector fF0Pol; //Parameters for the F0 function in z std::vector fRhoCPol; //Parameters for the RhoC function in z std::vector fAPol; //Parameters for the A function in z std::vector fB2Pol; //Parameters for the B2 function in z std::vector fB3Pol; //Parameters for the B3 function in z }; } // Methods } // RAT #endif