From cd0bd6b3048dd4f5742a48dd4336c1de8957b7c3 Mon Sep 17 00:00:00 2001 From: YannickSoehngen <60179883+YannickSoehngen@users.noreply.github.com> Date: Wed, 18 Dec 2024 18:36:48 +0100 Subject: [PATCH] Update StETofCalibMaker.cxx --- StRoot/StETofCalibMaker/StETofCalibMaker.cxx | 21 +++++++++++++------- 1 file changed, 14 insertions(+), 7 deletions(-) diff --git a/StRoot/StETofCalibMaker/StETofCalibMaker.cxx b/StRoot/StETofCalibMaker/StETofCalibMaker.cxx index 9ee4a4bad12..5cb3fb32dae 100644 --- a/StRoot/StETofCalibMaker/StETofCalibMaker.cxx +++ b/StRoot/StETofCalibMaker/StETofCalibMaker.cxx @@ -128,7 +128,7 @@ StETofCalibMaker::StETofCalibMaker( const char* name ) mDbEntryStart(0), mDbEntryStop(0), mGlobalCounter(1), - mCalState(false) + mCalState(true) { @@ -2173,9 +2173,15 @@ StETofCalibMaker::applyCalibration( StETofDigi* aDigi, StETofHeader* etofHeader int get4Id = 144 * ( aDigi->sector() - 13 ) + 48 * ( aDigi->zPlane() -1 ) + 16 * ( aDigi->counter() - 1 ) + 8 * ( aDigi->side() - 1 ) + ( ( aDigi->strip() - 1 ) / 4 ); double stateCorr =0; - if(mGet4StateMap[get4Id] == 1) stateCorr = 6.25; - else if(mGet4StateMap[get4Id] == 2) stateCorr = -6.25; - + if(mGet4StateMap[get4Id] == 1){ + stateCorr = 6.25; + }else if(mGet4StateMap[get4Id] == 2){ + stateCorr = -6.25; + }else if(mGet4StateMap[get4Id] == 3){ + stateCorr = 6.25; + }else if(mGet4StateMap[get4Id] == 4){ + stateCorr = -6.25; + } // only calibrate here if flag is set if(!mCalState) stateCorr = 0; @@ -2188,7 +2194,7 @@ StETofCalibMaker::applyCalibration( StETofDigi* aDigi, StETofHeader* etofHeader + stateCorr; - if(mGet4StateMap[get4Id] == 3){ + if(mGet4StateMap[get4Id] == 5){ calibTime = 0; // mask digis with undefined state (e.g. one hit with jump and one without in same event) } @@ -2782,6 +2788,7 @@ void StETofCalibMaker::readGet4State(int fileNr, short forward){ if(fileZero){ mDbEntryStart = 0; + mDbEntryStop = 99999999; } sort( mMasterStartVec.begin(), mMasterStartVec.end() ); @@ -2912,8 +2919,8 @@ void StETofCalibMaker::decodeInt( std::vector& intVec ,std::v } if(i < (eTofConst::nGet4sInSystem/4) ){ - mGet4DefaultStateMap[Get4Id1] = get4state1; - mGet4DefaultStateMap[Get4Id2] = get4state2; + mGet4DefaultStateMap[Get4Id1] = get4state1 + 1; // counting from 1 here + mGet4DefaultStateMap[Get4Id2] = get4state2 + 1; // counting from 1 here } break;