From 54f09d11dd4b74bd900a32b52f2d93415ec00a35 Mon Sep 17 00:00:00 2001 From: Seunghwan Date: Fri, 28 Apr 2023 02:00:10 -0400 Subject: [PATCH] Remove some functions in StRHICfFunction all of the checking function is removed --- StRoot/StRHICfUtil/StRHICfFunction.cxx | 93 +------------------------- StRoot/StRHICfUtil/StRHICfFunction.h | 14 ---- 2 files changed, 1 insertion(+), 106 deletions(-) diff --git a/StRoot/StRHICfUtil/StRHICfFunction.cxx b/StRoot/StRHICfUtil/StRHICfFunction.cxx index 54576ce6bf2..d5c1e458f34 100644 --- a/StRoot/StRHICfUtil/StRHICfFunction.cxx +++ b/StRoot/StRHICfUtil/StRHICfFunction.cxx @@ -12,16 +12,8 @@ #include "StRHICfFunction.h" StRHICfFunction::StRHICfFunction() -{ - initChecker(); -} - -void StRHICfFunction::initChecker() { mRunType = 999; - mGSOBarNum = 0; -std::fill(mLeakageNum, mLeakageNum+3, 0); -std::fill(mValueForRecoNum, mValueForRecoNum+5, 0); } StRHICfFunction::~StRHICfFunction() @@ -117,87 +109,4 @@ float StRHICfFunction::rescaleEnergyFactor(int tower, int layer) if(layer > 8){rescaleFactor = factorByTowerTOP[tower];} } return rescaleFactor; -} - -bool StRHICfFunction::checkGSOBarEnergy(float val) -{ - if(val > -900.){mGSOBarNum += 1;} - if(mGSOBarNum == kRHICfNtower*kRHICfNlayer*kRHICfNxy*kRHICfNbarLarge-kRHICfNlayer*kRHICfNxy*kRHICfNbarSmall){ - return kRHICfOk; - } - else{return kRHICfFatal;} -} - -bool StRHICfFunction::checkGSOBarTable(float val) -{ - if(val > -900.){mGSOBarTableNum += 1;} - if(mGSOBarTableNum == kRHICfNtower*kRHICfNlayer*kRHICfNxy*kRHICfNbarLarge-kRHICfNlayer*kRHICfNxy*kRHICfNbarSmall){ - return kRHICfOk; - } - else{return kRHICfFatal;} -} - -bool StRHICfFunction::checkPlateEnergy(float val) -{ - if(val > -900.){mPlateNum += 1;} - if(mPlateNum == kRHICfNtower*kRHICfNplate){ - return kRHICfOk; - } - else{return kRHICfFatal;} -} - -bool StRHICfFunction::checkRecoValue(string opt, float val) -{ - transform(opt.begin(), opt.end(), opt.begin(), ::tolower); - if(opt=="resulthitpos"){ - if(val > -900.){mValueForRecoNum[0] += 1;} - if(mValueForRecoNum[0] == kRHICfNtower*kRHICfNxy){return kRHICfOk;} - else{return kRHICfFatal;} - } - else if(opt=="resulthitnum"){ - if(val > -900.){mValueForRecoNum[1] += 1;} - if(mValueForRecoNum[1] == kRHICfNtower){return kRHICfOk;} - else{return kRHICfFatal;} - } - else if(opt=="multihitpos"){ - if(val > -900.){mValueForRecoNum[2] += 1;} - if(mValueForRecoNum[2] == kRHICfNtower*2*kRHICfNxy*2){return kRHICfOk;} - else{return kRHICfFatal;} - } - else if(opt=="multipeakheight"){ - if(val > -900.){mValueForRecoNum[3] += 1;} - if(mValueForRecoNum[3] == kRHICfNtower*2*kRHICfNxy*2){return kRHICfOk;} - else{return kRHICfFatal;} - } - else if(opt=="overlap"){ - if(val > -900.){mValueForRecoNum[4] += 1;} - if(mValueForRecoNum[4] == kRHICfNtower*kRHICfNxy){return kRHICfOk;} - else{return kRHICfFatal;} - } - else if(opt=="runtype"){ - if(val < 3){return kRHICfOk;} - else{return kRHICfFatal;} - } - return kRHICfFatal; -} - -bool StRHICfFunction::checkLeakageTable(string opt, bool val) -{ - transform(opt.begin(), opt.end(), opt.begin(), ::tolower); - if(opt=="photonin"){ - if(val == true){mLeakageNum[0] += 1;} - if(mLeakageNum[0] == kRHICfNtower*kRHICfNplate){return kRHICfOk;} - else{return kRHICfFatal;} - } - else if(opt=="photonout"){ - if(val == true){mLeakageNum[1] += 1;} - if(mLeakageNum[1] == kRHICfNtower*kRHICfNplate){return kRHICfOk;} - else{return kRHICfFatal;} - } - else if(opt=="neutronout"){ - if(val == true){mLeakageNum[2] += 1;} - if(mLeakageNum[2] == kRHICfNtower){return kRHICfOk;} - else{return kRHICfFatal;} - } - return kRHICfFatal; -} +} \ No newline at end of file diff --git a/StRoot/StRHICfUtil/StRHICfFunction.h b/StRoot/StRHICfUtil/StRHICfFunction.h index 451a217df56..60b662e9f6b 100644 --- a/StRoot/StRHICfUtil/StRHICfFunction.h +++ b/StRoot/StRHICfUtil/StRHICfFunction.h @@ -44,28 +44,14 @@ class StRHICfFunction StRHICfFunction(); virtual ~StRHICfFunction(); - void initChecker(); - void setRunType(int type){mRunType = type;} int getRunType(){return mRunType;} int checkRunTypeForRHICf2017(int runNum); int checkGSOBarSize(int tower); // 0 = small, 1 = large - float rescaleEnergyFactor(int tower, int layer); - - bool checkGSOBarEnergy(float val); - bool checkGSOBarTable(float val); - bool checkPlateEnergy(float val); - bool checkRecoValue(string opt, float val); - bool checkLeakageTable(string opt, bool val); private: int mRunType; - int mGSOBarNum; - int mGSOBarTableNum; - int mPlateNum; - int mValueForRecoNum[5]; // in StRHICfRecoEnergy, check setting parameter[ResultHitPos, ResultHitNum, MultiHitPos, MultiPeakHeight, Overlap] - int mLeakageNum[3]; }; #endif