14 m_config(nullptr), m_jetAlgo(
""), m_calibAreaTag(
""), m_isData(false)
19 m_config(
config), m_jetAlgo(std::move(jetAlgo)), m_calibAreaTag(std::move(calibAreaTag)), m_isData(isData)
30 ATH_MSG_ERROR(
"BCID offset correction tool received a null config pointer.");
31 return StatusCode::FAILURE;
51 ATH_MSG_ERROR(
"You are attempting to apply the BCID offset correction to the EMEC3 or HEC back wheel cells which is not implemented.");
52 return StatusCode::FAILURE;
55 ATH_MSG_ERROR(
"You are attempting to apply the BCID offset correction to the outer small FCal cells which is not implemented.");
56 return StatusCode::FAILURE;
59 ATH_MSG_ERROR(
"You are attempting to apply the BCID offset correction to the large FCal1/2 cells which is not implemented.");
60 return StatusCode::FAILURE;
63 ATH_MSG_ERROR(
"You are attempting to apply the BCID offset correction to the inner small FCal cells which is not implemented.");
64 return StatusCode::FAILURE;
70 TString BCIDFile =
m_config->GetValue(
"BCIDOffsetFile",
"");
71 if ( BCIDFile.EqualTo(
"empty") ) {
73 return StatusCode::FAILURE;
80 return StatusCode::FAILURE;
104 return StatusCode::SUCCESS;
112 return StatusCode::SUCCESS;
117 jetStartP4 =
jet.jetP4();
119 float startPt=
jet.pt();
120 float calibPt=
jet.pt();
125 return StatusCode::SUCCESS;
129 if (jetEventInfo.
runNumber()>=334842 && jetEventInfo.
runNumber()<=340453) is8b4e=
true;
135 if (bcidGapBeforeTrain<=15) bcidDistanceFromFront+=55;
138 if (bcidGapBeforeTrain==5 && bcidGapBeforeTrainMinus12==5) bcidDistanceFromFront+=24;
139 if (bcidGapBeforeTrain>5 && bcidGapBeforeTrain<20) bcidDistanceFromFront+=60;
140 if (bcidGapBeforeTrain==5 && bcidGapBeforeTrainMinus12>5 && bcidGapBeforeTrainMinus12<20) bcidDistanceFromFront+=72;
141 if (bcidGapBeforeTrain==5 && bcidGapBeforeTrainMinus12>20) bcidDistanceFromFront+=12;
145 calibP4 =
jet.jetP4();
147 float detEta=DetectorEtaAcc(
jet);
148 float mu=jetEventInfo.
mu();
151 if ((bcidDistanceFromFront>=0 && bcidDistanceFromFront<12) || (bcidDistanceFromFront>=55 && bcidDistanceFromFront<67)){
152 for (
unsigned int i=1;
i<=7;
i++){
162 if (bcidDistanceFromFront>=0 && bcidDistanceFromFront<115){
163 for (
unsigned int i=1;
i<=7;
i++){
173 if ((bcidDistanceFromFront>=0 && bcidDistanceFromFront<10) || (bcidDistanceFromFront>=55 && bcidDistanceFromFront<65) || bcidDistanceFromFront==47 || bcidDistanceFromFront==102){
174 for (
unsigned int i=1;
i<=4;
i++){
184 if (bcidDistanceFromFront>=0 && bcidDistanceFromFront<115){
185 for (
unsigned int i=1;
i<=4;
i++){
195 if ((bcidDistanceFromFront>=0 && bcidDistanceFromFront<10) || (bcidDistanceFromFront>=55 && bcidDistanceFromFront<65) || bcidDistanceFromFront==47 || bcidDistanceFromFront==102){
196 for (
unsigned int i=1;
i<=3;
i++){
206 if (bcidDistanceFromFront>=0 && bcidDistanceFromFront<115){
207 for (
unsigned int i=1;
i<=3;
i++){
217 if ((bcidDistanceFromFront>=0 && bcidDistanceFromFront<12) || (bcidDistanceFromFront>=55 && bcidDistanceFromFront<67)){
218 for (
unsigned int i=1;
i<=6;
i++){
227 if (bcidDistanceFromFront>=0 && bcidDistanceFromFront<115){
228 for (
unsigned int i=1;
i<=6;
i++){
237 calibP4*=calibPt/startPt;
241 jet.setJetP4( calibP4 );
243 return StatusCode::SUCCESS;