12 #include "StRHICfFunction.h"
14 StRHICfFunction::StRHICfFunction()
19 StRHICfFunction::~StRHICfFunction()
23 int StRHICfFunction::checkRunTypeForRHICf2017(
int runNum)
25 static const int starNoTL[17] = {18175022, 18175023, 18175024, 18175025, 18175026,
26 18175027, 18175029, 18175030, 18176011, 18176012,
27 18176014, 18176016, 18176017, 18176018, 18176019,
30 static const int starNoTS[29] = {18176033, 18176034, 18176035, 18176040, 18176042,
31 18176043, 18177001, 18177002, 18177003, 18177005,
32 18177043, 18177046, 18177047, 18177049, 18177050,
33 18177052, 18178002, 18178003, 18178004, 18178005,
34 18178006, 18178007, 18178008, 18178009, 18178011,
35 18178012, 18178015, 18178016, 18178017};
37 static const int starNoTOP[19] = {18177011, 18177012, 18177014, 18177015, 18177016,
38 18177017, 18177018, 18177019, 18177020, 18177024,
39 18177025, 18177026, 18177027, 18177028, 18177029,
40 18177031, 18177032, 18177034, 18177036};
43 for(
int idx=0; idx<29; idx++){
45 if(starNoTL[idx] == runNum){
52 if(starNoTS[idx] == runNum){
58 if(starNoTOP[idx] == runNum){
68 int StRHICfFunction::checkGSOBarSize(
int tower)
70 if(tower==0){
return kRHICfNbarSmall;}
71 else if(tower==1){
return kRHICfNbarLarge;}
72 else{
return kRHICfFatal;}
75 float StRHICfFunction::rescaleEnergyFactor(
int tower,
int layer)
78 cout <<
"StRHICfFunction::rescaleFactorByTower() - Not set the RunType !!!" << endl;
82 float rescaleFactor = 0.;
85 static const float factorByTowerTL[2] = {1.043, 1.042};
86 static const float factorByTowerTS[2] = {1.042, 1.061};
87 static const float factorByTowerTOP[2] = {1.055, 1.067};
90 static const float factorByLayer[2][16] = {{0.9687, 1.006, 0.9749, 1.06, 1.01,
91 0.9476, 1.069, 0.9761, 1.046, 1.055,
92 1.178, 1.349, 1.996, 2.593, 4.576,
94 {0.8955, 0.8995, 1.032, 1.032, 1.082,
95 0.9758, 0.9511, 1.008, 0.999, 1.023,
96 1.011, 1.2, 2.4, 2.946, 5.13,
99 if(mRunType == kRHICfTL){
100 rescaleFactor = factorByTowerTL[tower] / factorByLayer[tower][layer];
101 if(layer > 8){rescaleFactor = factorByTowerTL[tower];}
103 else if(mRunType == kRHICfTS){
104 rescaleFactor = factorByTowerTS[tower] / factorByLayer[tower][layer];
105 if(layer > 8){rescaleFactor = factorByTowerTS[tower];}
107 else if(mRunType == kRHICfTOP){
108 rescaleFactor = factorByTowerTOP[tower] / factorByLayer[tower][layer];
109 if(layer > 8){rescaleFactor = factorByTowerTOP[tower];}
111 return rescaleFactor;