27 declareInterface<IjTowerBuilder>(
this);
34 return StatusCode::SUCCESS;
43 jTowerContainerRaw->clearContainerMap();
44 jTowerContainerRaw->fillContainerMap();
70 for (
int ieta = 0; ieta < 14; ++ieta) {
71 float centre_eta = (0.1*ieta) + (0.05) ;
72 for (
int iphi = 0; iphi < 64; ++iphi) {
75 BuildSingleTower(jTowerContainerRaw, ieta, iphi, key_eta, 100000, -1, -1*centre_eta, centre_phi);
76 BuildSingleTower(jTowerContainerRaw, ieta, iphi, key_eta, 200000, 1, centre_eta, centre_phi);
83 int TRANS_MODIFIER = 14;
84 int tmpVal = TRANS_MODIFIER;
86 for (
int ieta = tmpVal; ieta < tmpVal + 1; ieta++) {
87 float centre_eta = (0.1*ieta) + (0.05);
88 for (
int iphi = 0; iphi < 64; ++iphi) {
91 BuildSingleTower(jTowerContainerRaw, ieta, iphi, key_eta, 300000, -1,-1*centre_eta, centre_phi);
92 BuildSingleTower(jTowerContainerRaw, ieta, iphi, key_eta, 400000, 1, centre_eta, centre_phi);
100 int EME_MODIFIER = 15;
101 int tmpVal = EME_MODIFIER;
103 for (
int ieta = tmpVal; ieta < tmpVal + 3; ++ieta) {
104 float centre_eta =(0.1*ieta) + (0.05) ;
105 for (
int iphi = 0; iphi < 64; ++iphi) {
108 BuildSingleTower(jTowerContainerRaw, ieta, iphi, key_eta, 500000, -1, -1*centre_eta, centre_phi);
109 BuildSingleTower(jTowerContainerRaw, ieta, iphi, key_eta, 600000, 1, centre_eta, centre_phi);
115 tmpVal = EME_MODIFIER;
116 for (
int ieta = tmpVal; ieta < tmpVal + 2; ++ieta) {
117 float centre_eta = (0.1*ieta) + (0.05);
118 for (
int iphi = 0; iphi < 64; ++iphi) {
121 BuildSingleTower(jTowerContainerRaw, ieta, iphi, key_eta, 500000, -1,-1*centre_eta, centre_phi);
122 BuildSingleTower(jTowerContainerRaw, ieta, iphi, key_eta, 600000, 1, centre_eta, centre_phi);
128 tmpVal = EME_MODIFIER;
129 for (
int ieta = tmpVal; ieta < tmpVal + 4; ++ieta) {
130 float centre_eta= (0.1*ieta) + (0.05) ;
131 for (
int iphi = 0; iphi < 64; ++iphi) {
134 BuildSingleTower(jTowerContainerRaw, ieta, iphi, key_eta, 500000, -1,-1*centre_eta, centre_phi);
135 BuildSingleTower(jTowerContainerRaw, ieta, iphi, key_eta, 600000, 1, centre_eta, centre_phi);
141 tmpVal = EME_MODIFIER;
142 for (
int ieta = tmpVal; ieta < tmpVal + 1; ++ieta) {
143 float centre_eta = (0.1*ieta) + (0.05);
144 for (
int iphi = 0; iphi < 64; ++iphi) {
148 BuildSingleTower(jTowerContainerRaw, ieta, iphi, key_eta, 500000, -1, -1*centre_eta, centre_phi);
149 BuildSingleTower(jTowerContainerRaw, ieta, iphi, key_eta, 600000, 1, centre_eta, centre_phi);
159 int EMIE_MODIFIER = 25;
160 int tmpVal = EMIE_MODIFIER;
161 int cellCountEta = 0;
163 for (
int ieta = tmpVal; ieta < tmpVal + 3; ++ieta) {
165 float centre_eta =(0.1*ieta) + (0.1*cellCountEta) ;
166 for (
int iphi = 0; iphi < 32; ++iphi) {
169 BuildSingleTower(jTowerContainerRaw, ieta, iphi, key_eta, 500000, -1, -1*centre_eta, centre_phi);
170 BuildSingleTower(jTowerContainerRaw, ieta, iphi, key_eta, 600000, 1, centre_eta, centre_phi);
175 tmpVal = EMIE_MODIFIER;
176 for (
int ieta = tmpVal; ieta < tmpVal + 1; ++ieta) {
177 float centre_eta = (0.1*ieta + 0.3) + (0.05);
178 for (
int iphi = 0; iphi < 32; ++iphi) {
181 BuildSingleTower(jTowerContainerRaw, ieta, iphi, key_eta, 500000, -1, -1*centre_eta, centre_phi);
182 BuildSingleTower(jTowerContainerRaw, ieta, iphi, key_eta, 600000, 1, centre_eta, centre_phi);
190 int FCAL_MODIFIER = 29;
191 int tmpVal = FCAL_MODIFIER;
206 float eta_width = 1.4;
207 int cellCountEta = 0;
208 int FCAL0_INITIAL = FCAL_MODIFIER;
209 std::vector<int> TT_etapos{31,33,34,36,37,39,40,42,43,45,46,48};
210 for (
int ieta = tmpVal; ieta < tmpVal + 12; ++ieta) {
211 int key_eta = ieta - FCAL0_INITIAL;
212 float centre_eta = (TT_etapos[cellCountEta]+eta_width/2)/10.0;
215 for (
int iphi = 0; iphi < 16; ++iphi) {
217 BuildSingleTower(jTowerContainerRaw, ieta, iphi, key_eta, 700000, -1, -1*centre_eta, centre_phi, 0);
218 BuildSingleTower(jTowerContainerRaw, ieta, iphi, key_eta, 800000, 1, centre_eta, centre_phi, 0);
226 tmpVal = FCAL_MODIFIER;
227 TT_etapos = {31,33,35,37,39,41,43,44};
228 int FCAL1_INITIAL = FCAL_MODIFIER;
229 for (
int ieta = tmpVal; ieta < tmpVal + 8; ++ieta) {
230 int key_eta = ieta - FCAL1_INITIAL;
231 float centre_eta = (TT_etapos[cellCountEta]+eta_width/2)/10.0;
233 for (
int iphi = 0; iphi < 16; ++iphi) {
235 BuildSingleTower(jTowerContainerRaw, ieta, iphi, key_eta, 900000, -1, -1*centre_eta, centre_phi, 1);
236 BuildSingleTower(jTowerContainerRaw, ieta, iphi, key_eta, 1000000, 1, centre_eta, centre_phi, 1);
245 tmpVal = FCAL_MODIFIER;
246 TT_etapos = {31,34,37,41};
247 int FCAL2_INITIAL = FCAL_MODIFIER;
248 for (
int ieta = tmpVal; ieta < tmpVal + 4; ++ieta) {
249 int key_eta = ieta - FCAL2_INITIAL;
250 float centre_eta = (TT_etapos[cellCountEta]+eta_width/2)/10.0;
252 for (
int iphi = 0; iphi < 16; ++iphi) {
254 BuildSingleTower(jTowerContainerRaw, ieta, iphi, key_eta, 1100000, -1, -1*centre_eta, centre_phi, 2);
255 BuildSingleTower(jTowerContainerRaw, ieta, iphi, key_eta, 1200000, 1, centre_eta, centre_phi, 2);
267 int HEC_MODIFIER = 29;
268 int tmpVal = HEC_MODIFIER;
269 for (
int ieta = tmpVal; ieta < tmpVal + 10; ++ieta){
270 for (
int iphi = 0; iphi < 64; ++iphi){
272 BuildSingleTower(jTowerContainerRaw, ieta, iphi, key_eta, 11100000, -1, ieta, iphi);
273 BuildSingleTower(jTowerContainerRaw, ieta, iphi, key_eta, 22200000, 1, ieta, iphi);
279 tmpVal = HEC_MODIFIER;
280 for (
int ieta = tmpVal; ieta < tmpVal + 4; ++ieta){
281 for (
int iphi = 0; iphi < 32; ++iphi){
283 BuildSingleTower(jTowerContainerRaw, ieta, iphi, key_eta, 11100000, -1, ieta, iphi);
284 BuildSingleTower(jTowerContainerRaw, ieta, iphi, key_eta, 22200000, 1, ieta, iphi);
292 void jTowerBuilder::BuildSingleTower(std::unique_ptr<jTowerContainer> & jTowerContainerRaw,
float eta,
float phi,
int key_eta,
float keybase,
int posneg,
float centre_eta,
float centre_phi,
int fcal_layer)
const {
293 int towerID = keybase + phi + (64 * key_eta);
294 jTowerContainerRaw->push_back(eta, phi, towerID, posneg, centre_eta, centre_phi, fcal_layer);
305 return StatusCode::FAILURE;
310 auto [CutJetEM, CutJetHad, CutMetEM, CutMetHad] = myDBTool->get_NoiseCuts( jtower->OnlineID() );
311 auto [PileUpWeightEM, PileUpWeightHad, InverseWeightEM, InverseWeightHad] = myDBTool->get_PileUpValues( jtower->OnlineID() );
314 int LSBscale_EM = 25;
315 int LSBscale_HAD = 25;
318 if(std::abs(jtower->centreEta()) < 1.5){
330 InverseWeightHad = 0;
333 jtower->setTTowerArea(PileUpWeightEM,0);
334 jtower->setTTowerArea(PileUpWeightHad,1);
336 jtower->setTTowerAreaInv(InverseWeightEM,0);
337 jtower->setTTowerAreaInv(InverseWeightHad,1);
339 jtower->setNoiseForMet(CutMetEM*LSBscale_EM,0);
340 jtower->setNoiseForMet(CutMetHad*LSBscale_HAD,1);
342 jtower->setNoiseForJet(CutJetEM*LSBscale_EM,0);
343 jtower->setNoiseForJet(CutJetHad*LSBscale_HAD,1);
346 return StatusCode::SUCCESS;