ATLAS Offline Software
Loading...
Searching...
No Matches
CBNTAA_TBInfo.cxx
Go to the documentation of this file.
1/*
2 Copyright (C) 2002-2026 CERN for the benefit of the ATLAS collaboration
3*/
4
5#include "CBNTAA_TBInfo.h"
6
7#include "GaudiKernel/IToolSvc.h"
8
10
15
16#include <cmath>
17
18
19CBNTAA_TBInfo::CBNTAA_TBInfo(const std::string& name, ISvcLocator* pSvcLocator) :
20CBNT_TBRecBase(name, pSvcLocator)
21{
22 declareProperty("DBRead", m_DBRead=false);
23 declareProperty("BeamEnergy", m_beamener);
24 declareProperty("BeamType", m_beamtype);
25 declareProperty("ComputeBeamEnergy", m_computeBeamEnergy=false);
26 declareProperty("DumpBeamLine", m_dumpBeamLine=true);
27
28}
29
31{
32 delete m_quad_file;
33 delete m_quad_equip;
34 delete m_bend_file;
35 delete m_bend_equip;
36 delete m_trim_file;
37 delete m_trim_equip;
38 delete m_coll_file;
39 delete m_coll_equip;
40}
41
43
44 StatusCode sc;
45
46 addBranch("EVENT_RunEta", m_runEta_nt,"RunEta/D");
47 addBranch("EVENT_RunPartType", m_runParticleType_nt,"RunPartType/l");
48 addBranch("EVENT_RunEnergy", m_runEnergy_nt,"RunEnergy/l");
49 addBranch("EVENT_Energy", m_energy,"Energy/f");
50
51 if ( m_computeBeamEnergy ) {
52
53 addBranch("EVENT_ErrAbsEnergy", m_errAbsEnergy,"ErrAbsEnergy/f");
54 addBranch("EVENT_ErrCollimators", m_errCollimators,"ErrCollimators/f");
55 addBranch("EVENT_ErrCurrents", m_errCurrents,"ErrCurrents/f");
56 addBranch("EVENT_SyncLoss", m_sycLoss,"SyncLoss/f");
57 addBranch("EVENT_ErrSyncLoss", m_errSycLoss,"ErrSyncLoss/f");
58
59 if ( m_dumpBeamLine ) {
60
61 addBranch("EVENT_Quad_file", m_quad_file);
62 addBranch("EVENT_Quad_equip", m_quad_equip);
63
64 addBranch("EVENT_Bend_file", m_bend_file);
65 addBranch("EVENT_Bend_equip", m_bend_equip);
66
67 addBranch("EVENT_Trim_file", m_trim_file);
68 addBranch("EVENT_Trim_equip", m_trim_equip);
69
70 addBranch("EVENT_Coll_file", m_coll_file);
71 addBranch("EVENT_Coll_equip", m_coll_equip);
72 }
73
74 }
75
76 //VLE flag set to false
77 m_is_VLE=0;
78 //Bdl value of B8 magnet is also set to 0 - the case for HLE runs..
79 m_B8_Bdl=0.0;
80 //set a previous vars to -1
81 m_prevrunNum = -1;
82 m_prevEnergy = -1.0;
83 m_preverrAbsEnergy = -1.0;
85 m_preverrCurrents = -1.0;
86 m_prevsycLoss = -1.0;
87 m_preverrSycLoss = -1.0;
88 m_prevB3 = -1.0;
89 m_prevB4 = -1.0;
90 m_prevB8 = -1.0;
91
92 return StatusCode::SUCCESS;
93}
94
95
97
98 const EventContext& ctx = Gaudi::Hive::currentContext();
99
102
103 if ( m_DBRead ) {
104
105 int run = ctx.eventID().run_number();
106 uint64_t event = ctx.eventID().event_number();
107
108 ATH_MSG_VERBOSE( "run " << run );
109
110 if((event > 0) && (m_prevrunNum==-1))
111 m_prevrunNum=run;//initializing the prev run
112
113 // This tool handles the conversion between local and ctb coordinates
114 ATH_CHECK( m_coord.retrieve() );
115 m_runEta_nt = m_coord->beam_local_eta();
116
117 ATH_CHECK( m_runpar.retrieve() );
118
119 if ( m_computeBeamEnergy ) {
120
121 //below the calculation of all energies and their errors...
122 calculateAll(run,event);
123
124 ATH_MSG_DEBUG( "m_energy " << m_energy );
125 ATH_MSG_DEBUG( "m_errAbsEnergy " << m_errAbsEnergy );
126 ATH_MSG_DEBUG( "m_errCollimators " << m_errCollimators );
127 ATH_MSG_DEBUG( "m_errCurrents " << m_errCurrents );
128 ATH_MSG_DEBUG( "m_sycLoss " << m_sycLoss );
129 ATH_MSG_DEBUG( "m_errSycLoss " << m_errSycLoss );
130
131 }
132
133 }//end of if (m_DBRead)
134
135 return StatusCode::SUCCESS;
136}
137
138
139
140
141float CBNTAA_TBInfo::GetEnergy(float currB3, float currB4)
142{
143 float Bdltot = GetBdl3(currB3) + GetBdl4(currB4);
144
145 float energy = (0.3/41.)*Bdltot * 1000;
146
147 return energy;
148}
149
150
151
152float CBNTAA_TBInfo::GetBdl3(float current)
153{
154 float Bend3_low[2] = {0.0079347, 0.021813};
155 float Bend3_high[4] = {0.437329, 0.0212849, 0.00000355516, -0.0000000147542};
156
157 float Bdl3 = 0;
158
159 current = fabs(current);
160
161 if (current <= 824.12) Bdl3 = Bend3_low[0] + Bend3_low[1]*current;
162 else Bdl3 = Bend3_high[0] + Bend3_high[1]*current + Bend3_high[2]*(current-824.12)*(current-824.12) + Bend3_high[3]*(current-824.12)*(current-824.12)*(current-824.12);
163
164 return Bdl3;
165}
166
167
168float CBNTAA_TBInfo::GetBdl4(float current)
169{
170 float Bend4_low[2] = {0.00786406, 0.021814};
171 float Bend4_high[4] = {0.434258, 0.0212899, 0.00000356113, -0.0000000147379};
172
173 float Bdl4 = 0;
174
175 current = fabs(current);
176
177 if (current <= 824.12) Bdl4 = Bend4_low[0] + Bend4_low[1]*current;
178 else Bdl4 = Bend4_high[0] + Bend4_high[1]*current + Bend4_high[2]*(current-824.12)*(current-824.12) + Bend4_high[3]*(current-824.12)*(current-824.12)*(current-824.12);
179
180 return Bdl4;
181}
182
183
184float CBNTAA_TBInfo::GetErrColl(float coll3_down, float coll3_up, float coll9_down, float coll9_up)
185{
186 float coll3_opening = (fabs(coll3_down) + fabs(coll3_up))/2.0;
187 float coll9_opening = (fabs(coll9_down) + fabs(coll9_up))/2.0;
188
189 float errcoll = sqrt(coll3_opening*coll3_opening + coll9_opening*coll9_opening)*(1./27);
190
191 return errcoll;
192}
193
194float CBNTAA_TBInfo::GetErrAbsE(float energy)
195{
196 float fac = 25./energy;
197 float err_abs = sqrt(fac*fac + 0.5*0.5);
198
199 return err_abs;
200}
201
202
203float CBNTAA_TBInfo::GetErrCurr(float currB3, float currB4)
204{
205 float Bdl3 = GetBdl3(currB3);
206 float Bdl4 = GetBdl4(currB4);
207
208 float Bdl_tot = Bdl3 + Bdl4;
209
210 float errBdl3 = (GetBdl3(currB3 + 0.1) - GetBdl3(currB3 - 0.1))/2;
211 float errBdl4 = (GetBdl4(currB4 + 0.1) - GetBdl4(currB4 - 0.1))/2;
212 const float fac3 = errBdl3/Bdl3;
213 const float fac4 = errBdl4/Bdl4;
214 float errBdl = sqrt(fac3*fac3 + fac4*fac4)*Bdl_tot;
215
216 float resField = sqrt(0.0010*0.0010 + 0.0010*0.0010);
217
218 errBdl = sqrt(errBdl*errBdl + resField*resField + Bdl_tot*0.0003 * Bdl_tot*0.0003)/Bdl_tot*100;
219
220 return errBdl;
221}
222
223
224
225float CBNTAA_TBInfo::SyncLoss(float energy, float currB3, float currB4)
226{
227 float Lmag = 5.127;
228
229 float Bdl_B3 = GetBdl3(currB3);
230 float Bdl_B4 = GetBdl4(currB4);
231
232 float B2dl_B3 = (Bdl_B3 * Bdl_B3)*(1./(Lmag*9));
233 float B2dl_B4 = (Bdl_B4 * Bdl_B4)*(1./(Lmag*9));
234 float B2dl_tot = B2dl_B3 + B2dl_B4;
235
236 float B5suB34 = 0.19;
237 float B6suB34 = 0.22;
238 float B56lB34 = 0.25;
239
240 float B2dl_B5 = (B2dl_B3 + B2dl_B4)*B5suB34*B5suB34*B56lB34;
241 float B2dl_B6 = (B2dl_B3 + B2dl_B4)*B6suB34*B6suB34*B56lB34;
242
243 float loss = 0.00000127*energy*energy*(3*B2dl_tot/2 + B2dl_B5 + B2dl_B6);
244 return loss;
245}
246
247
248
250{
251 float errloss = loss * 0.02;
252 return errloss;
253}
254
255
256
258
259 return StatusCode::SUCCESS;
260}
261
262// Clear vectors
263
265{
266 if(m_quad_file) m_quad_file->clear();
267 if(m_quad_equip) m_quad_equip->clear();
268 if(m_bend_file) m_bend_file->clear();
269 if(m_bend_equip) m_bend_equip->clear();
270 if(m_trim_file) m_trim_file->clear();
271 if(m_trim_equip) m_trim_equip->clear();
272 if(m_coll_file) m_coll_file->clear();
273 if(m_coll_equip) m_coll_equip->clear();
274
275
276 return StatusCode::SUCCESS;
277}
278//new method which will clculate all energies and their errors using info provided by m_runpar variable
279void CBNTAA_TBInfo::calculateAll(int runNumber,int eventNumber) {
280
281 int run = runNumber;
282 int event = eventNumber;
283
284 ATH_MSG_VERBOSE( "run " << run );
285
286 //check if the run is a VLE run then set the flag
287 if (((run < 2101225) && (run >= 2101022)) || ((run < 2102165) && (run >= 2102003)))
288 m_is_VLE=1;
289
290 //starting from event=2 we dont have to recalculate the variables unless the run number changes
291 if (event > 1)
292 {
293 if (run == m_prevrunNum)
294 {
301
302 return;
303 }
304 else
306 }
307
308 m_runEnergy_nt= m_runpar->beam_energy();
309 m_runParticleType_nt = m_runpar->beam_type();
310
311 float bend_equip[9];
312 float coll_equip[24];
313
314 int nc_quad = 22;
315 int nc_bend = 9;
316 int nc_trim = 10;
317 int nc_coll = 24;
318
319 std::string folder;
320 if (m_dumpBeamLine == true)
321 {
322// const GenericDbTable* dcstbl_quad_file[22] = {0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0};
323// const GenericDbTable* dcstbl_quad_equip[22] = {0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0};
324// const GenericDbTable* dcstbl_bend_file[9] = {0,0,0,0,0,0,0,0,0};
325// const GenericDbTable* dcstbl_bend_equip[9] = {0,0,0,0,0,0,0,0,0};
326// const GenericDbTable* dcstbl_trim_file[10] = {0,0,0,0,0,0,0,0,0,0};
327// const GenericDbTable* dcstbl_trim_equip[10] = {0,0,0,0,0,0,0,0,0,0};
328// const GenericDbTable* dcstbl_coll_file[24] = {0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0};
329// const GenericDbTable* dcstbl_coll_equip[24] = {0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0};
330
331// int ncol_quad_file[22], nrow_quad_file[22];
332// int ncol_bend_file[9], nrow_bend_file[9];
333// int ncol_trim_file[10], nrow_trim_file[10];
334// int ncol_coll_file[24], nrow_coll_file[24];
335// int ncol_quad_equip[22], nrow_quad_equip[22];
336// int ncol_bend_equip[9], nrow_bend_equip[9];
337// int ncol_trim_equip[10], nrow_trim_equip[10];
338// int ncol_coll_equip[24], nrow_coll_equip[24];
339
340// std::vector<std::string> names_quad_file[22], rows_quad_file[22];
341// std::vector<std::string> names_bend_file[9], rows_bend_file[9];
342// std::vector<std::string> names_trim_file[10], rows_trim_file[10];
343// std::vector<std::string> names_coll_file[24], rows_coll_file[24];
344// std::vector<std::string> names_quad_equip[22], rows_quad_equip[22];
345// std::vector<std::string> names_bend_equip[9], rows_bend_equip[9];
346// std::vector<std::string> names_trim_equip[10], rows_trim_equip[10];
347// std::vector<std::string> names_coll_equip[24], rows_coll_equip[24];
348
349 float quad_file[22];
350 float bend_file[9];
351 float trim_file[10];
352 float coll_file[24];
353 float quad_equip[22];
354 float trim_equip[10];
355
356 m_quad_file->reserve(nc_quad);
357 m_quad_equip->reserve(nc_quad);
358 for (int i=0; i<nc_quad; i++)
359 {
360 quad_file[i] = -1;
361 quad_equip[i] = -1;
362 unsigned int val1;
363 unsigned int val2;
364
365#if 0
366 if (run < 1000454)
367 {
368 folder = "/TILE/DCS/SYSTEM1/BEAM";
369 }
370 else
371#endif
372 {
373 folder = "/TILE/DCS/SYSTEM1/BEAM";
374 }
375 val1 = i+6;
376 val2 = i+48;
377
378 if (StatusCode::SUCCESS!=m_runpar->getVal(folder,val1,quad_file[i])) {
379 ATH_MSG_ERROR( "Cannot find val" << val1 );
380 }
381 if (StatusCode::SUCCESS!=m_runpar->getVal(folder,val2,quad_equip[i])){
382 ATH_MSG_ERROR( "Cannot find val" << val2 );
383 }
384
385 (*m_quad_file)[i] = quad_file[i];
386 (*m_quad_equip)[i] = quad_equip[i];
387 }
388
389
390 m_bend_file->reserve(nc_bend);
391 m_bend_equip->reserve(nc_bend);
392 for (int i=0; i<nc_bend; i++)
393 {
394 bend_file[i] = -1;
395 bend_equip[i] = -1;
396 unsigned int val1;
397 unsigned int val2;
398
399 if (run < 1000454)
400 {
401 folder = "/TILE/DCS/SYSTEM1/BEAM";
402 }
403 else
404 {
405 folder = "/TILE/DCS/TILE_LV_62/BEAM";
406 }
407 val1 = i+28;
408 val2 = i+70;
409
410 if (StatusCode::SUCCESS!=m_runpar->getVal(folder,val1,bend_file[i])) {
411 ATH_MSG_ERROR( "Cannot find val" << val1 );
412 }
413 if (StatusCode::SUCCESS!=m_runpar->getVal(folder,val2,bend_equip[i])) {
414 ATH_MSG_ERROR( "Cannot find val" << val2 );
415 }
416
417 (*m_bend_file)[i] = bend_file[i];
418 (*m_bend_equip)[i] = bend_equip[i];
419
420 //added on 12.03.2006 by H.Hakobyan for caching purposes
421 if (!m_is_VLE)
422 {
423 //if the currents B3 and B4 are the same as in previous event then quit..
424 if((m_prevB3 == bend_equip[2]) && (m_prevB4 == bend_equip[3]))
425 return;
426 }
427 else
428 {
429 //if the current B8 is the same as in previous event then quit..
430 if(m_prevB8 == bend_equip[7])
431 return;
432 }
433
434 }
435
436 m_trim_file->reserve(nc_trim);
437 m_trim_equip->reserve(nc_trim);
438 for (int i=0; i<nc_trim; i++)
439 {
440 trim_file[i] = -1;
441 trim_equip[i] = -1;
442 unsigned int val1;
443 unsigned int val2;
444
445 if (run < 1000454)
446 {
447 folder = "/TILE/DCS/SYSTEM1/BEAM";
448 }
449 else
450 {
451 folder = "/TILE/DCS/TILE_LV_62/BEAM";
452 }
453 val1 = i+37;
454 val2 = i+79;
455
456 if (StatusCode::SUCCESS!=m_runpar->getVal(folder,val1,trim_file[i])) {
457 ATH_MSG_ERROR( "Cannot find val" << val1 );
458 }
459 if (StatusCode::SUCCESS!=m_runpar->getVal(folder,val2,trim_equip[i])) {
460 ATH_MSG_ERROR( "Cannot find val" << val2 );
461 }
462
463 (*m_trim_file)[i] = trim_file[i];
464 (*m_trim_equip)[i] = trim_equip[i];
465 }
466
467
468 m_coll_file->reserve(nc_coll);
469 m_coll_equip->reserve(nc_coll);
470 for (int i=0; i<nc_coll; i++)
471 {
472 coll_file[i] = -1;
473 coll_equip[i] = -1;
474 unsigned int val1;
475 unsigned int val2;
476
477
478 if (run < 1000454)
479 {
480 folder = "/TILE/DCS/SYSTEM1/BEAM";
481 }
482 else
483 {
484 folder = "/TILE/DCS/TILE_LV_62/BEAM";
485 }
486 val1 = i+90;
487 val2 = i+115;
488
489 if (StatusCode::SUCCESS!=m_runpar->getVal(folder,val1,coll_file[i])) {
490 ATH_MSG_ERROR( "Cannot find val" << val1 );
491 }
492 if (StatusCode::SUCCESS!=m_runpar->getVal(folder,val2,coll_equip[i])) {
493 ATH_MSG_ERROR( "Cannot find val" << val2 );
494 }
495
496 (*m_coll_file)[i] = coll_file[i];
497 (*m_coll_equip)[i] = coll_equip[i];
498 }
499
500
501 for (int i=0; i<nc_quad; i++)
502 {
503 ATH_MSG_DEBUG( "Q" << i+1 << " from file " << (*m_quad_file)[i] );
504 }
505 for (int i=0; i<nc_bend; i++)
506 {
507 ATH_MSG_DEBUG( "B" << i+1 << " from file " << (*m_bend_file)[i] );
508 }
509 for (int i=0; i<nc_trim; i++)
510 {
511 ATH_MSG_DEBUG( "Trim" << i+1 << " from file " << (*m_trim_file)[i] );
512 }
513 for (int i=0; i<nc_coll; i++)
514 {
515 int j = i/2;
516 if (i == 2*j)
517 {
518 ATH_MSG_DEBUG( "Coll" << j+1 << " from file (up or right position) " << (*m_coll_file)[i] );
519 ATH_MSG_DEBUG( "Coll" << j+1 << " from file (down or left position) " << (*m_coll_file)[i+1] );
520 }
521 }
522
523
524 for (int i=0; i<nc_quad; i++)
525 {
526 ATH_MSG_DEBUG( "Q" << i+1 << " from equipement " << (*m_quad_equip)[i] );
527 }
528 for (int i=0; i<nc_bend; i++)
529 {
530 ATH_MSG_DEBUG( "B" << i+1 << " from equipement " << (*m_bend_equip)[i] );
531 }
532 for (int i=0; i<nc_trim; i++)
533 {
534 ATH_MSG_DEBUG( "Trim" << i+1 << " from equipement " << (*m_trim_equip)[i] );
535 }
536 for (int i=0; i<nc_coll; i++)
537 {
538 int j = i/2;
539 if (i == 2*j)
540 {
541 ATH_MSG_DEBUG( "Coll" << j+1 << " from equipement (up or right position) " << (*m_coll_equip)[i] );
542 ATH_MSG_DEBUG( "Coll" << j+1 << " from file (down or left position) " << (*m_coll_equip)[i+1] );
543 }
544 }//for
545 }//end of if (m_dumpBeamLine = true)
546 else // if(m_dumpBeamLine == false)
547 {
548// const GenericDbTable* dcstbl_bend_equip[9] = {0,0,0,0,0,0,0,0,0};
549// const GenericDbTable* dcstbl_coll_equip[24] = {0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0};
550// int ncol_bend_equip[9], nrow_bend_equip[9];
551// int ncol_coll_equip[9], nrow_coll_equip[9];
552// std::vector<std::string> names_bend_equip[9], rows_bend_equip[9];
553// std::vector<std::string> names_coll_equip[9], rows_coll_equip[9];
554
555 for (int i=0; i<nc_bend; i++)
556 {
557 bend_equip[i] = -1;
558 unsigned int val2;
559
560 if (run < 1000454)
561 {
562 folder = "/TILE/DCS/SYSTEM1/BEAM";
563 }
564 else
565 {
566 folder = "/TILE/DCS/TILE_LV_62/BEAM";
567 }
568 val2 = i+70;
569 if (StatusCode::SUCCESS!=m_runpar->getVal(folder,val2,bend_equip[i])) {
570 ATH_MSG_ERROR( "Cannot find val" << val2 );
571 }
572 }
573
574
575 for (int i=0; i<nc_coll; i++)
576 {
577 coll_equip[i] = -1;
578 unsigned int val2;
579
580 if (run < 1000454)
581 {
582 folder = "/TILE/DCS/SYSTEM1/BEAM";
583 }
584 else
585 {
586 folder = "/TILE/DCS/TILE_LV_62/BEAM";
587 }
588 val2 = i+115;
589 if (StatusCode::SUCCESS!=m_runpar->getVal(folder,val2,coll_equip[i])) {
590 ATH_MSG_ERROR( "Cannot find val" << val2 );
591 }
592 }
593
594 }//end of if(m_dumpBeamLine = false)
595
596 //check if the run is a VLE run then set the flag
597 //if (((run < 2101225) && (run >= 2101022)) || ((run < 2102165) && (run >= 2102003)))
598 // m_is_VLE=1;
599
600 // --- modifying the code introducing two cases - for VLE and HLE, with different beam energy calculations ---
601 if(m_is_VLE)//run is a VLE run
602 {
603
604 //ATH_MSG_INFO( "THIS is a VLE run..." );
605 //ATH_MSG_INFO( "B8 current=" << bend_equip[7] );
606
607 //a polynomial function giving the values of Bdl for any given B8 current value...MIGRAD method for 4th order polynome ...:)
608 // m_B8_Bdl = 0.00525593*bend_equip[7] + 0.00000410442*bend_equip[7]*bend_equip[7] -
609 // 0.00000000906592*bend_equip[7]*bend_equip[7]*bend_equip[7]+
610 // 0.00000000000345019*bend_equip[7]*bend_equip[7]*bend_equip[7]*bend_equip[7];
611
612 //a polynomial function giving the values of Bdl for any given B8 current value...MINOS method ...for 5th order polynome:)
613 m_B8_Bdl = 0.00530982*bend_equip[7] + 0.00000328502*bend_equip[7]*bend_equip[7] -
614 0.00000000532397*bend_equip[7]*bend_equip[7]*bend_equip[7]-
615 0.00000000000276483*bend_equip[7]*bend_equip[7]*bend_equip[7]*bend_equip[7]+
616 0.000000000000003368*bend_equip[7]*bend_equip[7]*bend_equip[7]*bend_equip[7]*bend_equip[7];
617
618 //beam energy calculation basedon a famous formula..
619 m_energy = 2.49826 * m_B8_Bdl;
621
622 ATH_MSG_DEBUG( "B8dl=" << m_B8_Bdl );
623 ATH_MSG_DEBUG( "m_energy=" << m_energy );
624
625 //C12 opening calculations... C12 is the onlycollimator which is responsible for VLE runs
626 float coll12_opening = (fabs(coll_equip[11]) + fabs(coll_equip[23]))/2.0;
627 m_errCollimators = sqrt(coll12_opening*coll12_opening)*(1./27);
628
629 //calculation of errors of magnet currents..
630 m_errCurrents = GetErrCurr(bend_equip[6], bend_equip[7]);
631 m_sycLoss = SyncLoss(m_energy, bend_equip[6], bend_equip[7]);
633
634 //for caching purposes
635 m_prevB8 = bend_equip[7];
636 }
637 else//run is a HLE run
638 {
639 m_energy = GetEnergy(bend_equip[2], bend_equip[3]);
641 m_errCollimators = GetErrColl(coll_equip[4], coll_equip[5], coll_equip[16], coll_equip[17]);
642 m_errCurrents = GetErrCurr(bend_equip[2], bend_equip[3]);
643 m_sycLoss = SyncLoss(m_energy, bend_equip[2], bend_equip[3]);
645
646 //for caching purposes
647 m_prevB3 = bend_equip[2];
648 m_prevB4 = bend_equip[3];
649 }
650
651 //assigning the previous vars for caching..
658
659
660}
661
#define ATH_CHECK
Evaluate an expression and check for errors.
#define ATH_MSG_ERROR(x)
#define ATH_MSG_VERBOSE(x)
#define ATH_MSG_DEBUG(x)
CaloPhiRange class declaration.
int GetEnergy()
Definition GetEnergy.cxx:81
static Double_t sc
Gaudi::Details::PropertyBase & declareProperty(Gaudi::Property< T, V, H > &t)
virtual StatusCode CBNT_clear() override
float m_preverrSycLoss
long m_runParticleType_nt
ToolHandle< ICaloCoordinateTool > m_coord
bool m_computeBeamEnergy
ToolHandle< TBCondRunParTool > m_runpar
std::vector< float > * m_quad_file
std::vector< float > * m_quad_equip
std::vector< float > * m_trim_file
std::vector< float > * m_bend_file
float SyncLoss(float energy, float currB3, float currB4)
float SyncLossErr(float loss)
float m_preverrCurrents
float GetBdl3(float current)
virtual StatusCode CBNT_finalize() override
virtual StatusCode CBNT_execute() override
std::vector< float > * m_trim_equip
CBNTAA_TBInfo(const std::string &name, ISvcLocator *pSvcLocator)
void calculateAll(int runNumber, int eventNumber)
virtual ~CBNTAA_TBInfo()
float GetEnergy(float CurrB3, float CurrB4)
std::vector< float > * m_bend_equip
float GetBdl4(float current)
float m_errCollimators
std::vector< float > * m_coll_equip
float GetErrAbsE(float energy)
float GetErrCurr(float currB3, float currB4)
float m_preverrAbsEnergy
float m_preverrCollimators
float GetErrColl(float coll3_down, float coll3_up, float coll9_down, float coll9_up)
virtual StatusCode CBNT_initialize() override
std::vector< float > * m_coll_file
void addBranch(const std::string &branchname, T &obj, const std::string &leaflist)
CBNT_TBRecBase(const std::string &name, ISvcLocator *pSvcLocator)
int run(int argc, char *argv[])