ATLAS Offline Software
VP1CaloCells.cxx
Go to the documentation of this file.
1 /*
2  Copyright (C) 2002-2024 CERN for the benefit of the ATLAS collaboration
3 */
4 
8 #include "VP1Base/VP1QtUtils.h"
10 
11 #include <Inventor/nodes/SoSeparator.h>
12 
14 #include "CaloDetDescr/CaloDetDescrElement.h"
15 #include "TileEvent/TileCell.h"
17 
23 
24 #include <stdexcept>
25 #include <sstream>
26 
27 // MBTS
29 #include <Inventor/nodes/SoTransform.h>
30 
31 // Epsilon for changing MBTS cell dimensions with respect to the volume dimensions
32 #define MBTS_EPS 10
33 
34 // ************ Base Class ***************
36  m_caloCell(caloCell)
37 {
38  // Cannot draw object if it has no Calo DDE
39  const CaloDetDescrElement* ddElement = m_caloCell->caloDDE();
40  if (!ddElement)
41  throw std::runtime_error("VP1CaloCell: Calo Cell has no Calo DDE");
42 }
43 
45 {
46 }
47 
49 {
50  return m_caloCell;
51 }
52 
54 {
55  return m_caloCell->ID();
56 }
57 
58 double VP1CaloCell::energyToTransverse(const double& e) const
59 {
60  return m_caloCell->sinTh()*e;
61 }
62 
64 {
65  // only do this if it's something significant
66  if (globalCuts.clipRadius<10e8){
67  if (!isInsideClipVolume(globalCuts)) return false;
68  // double radius = sqrt(m_caloCell->x()*m_caloCell->x() + m_caloCell->y()*m_caloCell->y() + m_caloCell->z()*m_caloCell->z());
69 
70  }
71 
72  // Check side and Eta cut
73  bool passed = (m_caloCell->eta()>=0 && globalCuts.sideA)
74  || (m_caloCell->eta()<0 && globalCuts.sideC);
75  passed = passed && globalCuts.allowedEta.contains(m_caloCell->eta());
76  if(!passed) return false;
77  // Check Phi Cut
78  passed = false;
79  for(const VP1Interval& i : globalCuts.allowedPhi){
80  if(i.contains(m_caloCell->phi())
81  ||i.contains(m_caloCell->phi()+2*M_PI)
82  ||i.contains(m_caloCell->phi()-2*M_PI)) {
83  passed = true;
84  break;
85  }
86  }
87  return passed;
88 }
89 
91  const CaloDetDescrElement* ddElement = m_caloCell->caloDDE();
92  double radius = ddElement->r();
93  double z = ddElement->z();
94  double radialDistance = sqrt(radius*radius + z*z);
95  if (radialDistance < globalCuts.clipRadius ) return true;
96  return false;
97 }
98 
100  bool useEt,
101  const QPair<bool,double>& scale,
102  bool outline,
103  const VP1CC_GlobalCuts& globalCuts)
104 {
105  if(cutPassed(globalCuts))
106  build3DObjects(node2cc,useEt,scale,outline, globalCuts);
107  else
108  remove3DObjects(node2cc);
109 }
110 
111 // ************ LAr ***************
113  VP1CaloCell(caloCell),
114  m_hit(0),
115  m_helper(0)
116 {
121 }
122 
124 {
125 }
126 
128 {
129  if(m_hit) {
130  node2cc->erase(m_hit);
132  m_hit = 0;
133  }
134 }
135 
136 // ************ LArEMB ***************
139  VP1CC_LAr(caloCell)
140 {
141  // define Separator type depending on Cell energy
142  if(!separators)
143  throw std::runtime_error("VP1CC_LArEMB: 0 pointer to VP1CC Separator Map");
144 
145  VP1CC_SeparatorTypes mySeparatorType;
146  if(caloCell->energy()<0)
147  mySeparatorType = VP1CC_SepLArEMBNeg;
148  else
149  mySeparatorType = VP1CC_SepLArEMBPos;
150 
151  // get SoSeparator from the map
152  VP1CC_SeparatorMap::const_iterator it = separators->find(mySeparatorType);
153  if(it ==separators->end())
154  throw std::runtime_error("VP1CC_LArEMB: Missing separator helper in the map");
155 
156  m_helper = it->second;
157 
158  if(!m_helper)
159  throw std::runtime_error("VP1CC_LArEMB: 0 pointer to separator helper");
160 }
161 
163 {
164 }
165 
167  bool useEt,
168  const QPair<bool,double>& scale,
169  bool outline,
170  const VP1CC_GlobalCuts& globalCuts)
171 {
172  bool createNewHit = false;
173  if(!m_hit){
174  m_hit = new SoGenericBox();
175  createNewHit = true;
176  }
177 
178  // Build new Hit object
179  const CaloDetDescrElement* ddElement = m_caloCell->caloDDE();
180 
181  // auxiliary variables
182  double eta = ddElement->eta();
183  double deta = ddElement->deta()*0.5;
184  double phi = ddElement->phi();
185  double dphi = ddElement->dphi()*0.5;
186  double radius = ddElement->r();
187  double energy = (useEt ? energyToTransverse(m_caloCell->energy()) : m_caloCell->energy());
188 
189  double z = std::fabs(ddElement->z());
190  double radialDistance = sqrt(radius*radius + z*z);
191 
192  double depth = cellDepth(scale,energy);
193  depth = std::min(depth, std::fabs(globalCuts.clipRadius - radialDistance ) ) ;
194 
195  // std::cout<<"z "<<ddElement->z()<<"\t radialDistance "<<radialDistance<<"\t clipRadius "<<globalCuts.clipRadius<<"\t depth "<<depth<<std::endl;
196 
197  m_hit->setParametersForBarrelEtaPhiCell( eta-deta,eta+deta,phi-dphi,phi+dphi,
198  depth, radius, 0.9, 0.9 );
199  m_hit->drawEdgeLines = outline;
200 
201  if(createNewHit) {
203  (*node2cc)[m_hit] = this;
204  }
205 }
206 
207 std::vector<std::string> VP1CC_LArEMB::ToString(const CaloCell_ID*, const std::string& extrainfos)
208 {
209  std::vector<std::string> result;
210  const CaloDetDescrElement* ddElement = m_caloCell->caloDDE();
211  std::ostringstream msg, msg1, msg2, msg3;
212 
213  std::string stars("***");
214  result.push_back(stars);
215 
216  msg << "LAr EMB. ID = " << m_caloCell->ID().getString() << " " << extrainfos;
217 
218  msg1 << " Eta = " << ddElement->eta()
219  << " Phi = " << ddElement->phi();
220 
221  msg2 << "Energy = " << m_caloCell->energy() << " (Mev)"
222  << " Gain " << m_caloCell->gain();
223 
224  msg3 << "Time = " << m_caloCell->time()
225  << " Quality = " << m_caloCell->quality()
226  << " Provenance = " << m_caloCell->provenance();
227 
228  result.push_back(msg.str());
229  result.push_back(msg1.str());
230  result.push_back(msg2.str());
231  result.push_back(msg3.str());
232 
233  result.push_back(stars);
234  return result;
235 }
236 
237 // ************ LArEMECHEC ***************
239  const CaloCell_ID* calo_id,
241  VP1CC_LAr(caloCell)
242 {
243  if(!separators)
244  throw std::runtime_error("VP1CC_LArEMECHEC: 0 pointer to VP1CC Separator Map");
245 
246  bool isEMEC = false;
247  if(calo_id->is_em_endcap(caloCell->ID()))
248  isEMEC = true;
249  else if(calo_id->is_hec(caloCell->ID()))
250  isEMEC = false;
251  else
252  throw std::runtime_error("VP1CC_LArEMECHEC: Calo Cell is neither EMEC nor HEC!");
253 
254  // define Separator type depending on Cell energy
255  VP1CC_SeparatorTypes mySeparatorType;
256  if(caloCell->energy()<0) {
257  if(isEMEC)
258  mySeparatorType = VP1CC_SepLArEMECNeg;
259  else
260  mySeparatorType = VP1CC_SepLArHECNeg;
261  } else {
262  if(isEMEC)
263  mySeparatorType = VP1CC_SepLArEMECPos;
264  else
265  mySeparatorType = VP1CC_SepLArHECPos;
266  }
267 
268  // get SoSeparator from the map
269  VP1CC_SeparatorMap::const_iterator it = separators->find(mySeparatorType);
270  if(it ==separators->end())
271  throw std::runtime_error("VP1CC_LArEMECHEC: Missing separator in the map");
272 
273  m_helper = it->second;
274 
275  if(!m_helper)
276  throw std::runtime_error("VP1CC_LArEMECHEC: 0 pointer to the separator helper");
277 }
278 
280 {
281 }
282 
283 std::vector<std::string> VP1CC_LArEMECHEC::ToString(const CaloCell_ID* calo_id, const std::string& extrainfos)
284 {
285  std::vector<std::string> result;
286  const CaloDetDescrElement* ddElement = m_caloCell->caloDDE();
287 
288  std::ostringstream msg, msg1, msg2, msg3;
289 
290  std::string stars("***");
291  result.push_back(stars);
292 
293  if(calo_id->is_em_endcap(m_caloCell->ID()))
294  msg << "LAr EMEC. ID = " << m_caloCell->ID().getString();
295  else
296  msg << "LAr HEC. ID = " << m_caloCell->ID().getString();
297  msg << " " << extrainfos;
298 
299  msg1 << " Eta = " << ddElement->eta()
300  << " Phi = " << ddElement->phi();
301 
302  msg2 << "Energy = " << m_caloCell->energy() << " (Mev)"
303  << " Gain " << m_caloCell->gain();
304 
305  msg3 << "Time = " << m_caloCell->time()
306  << " Quality = " << m_caloCell->quality()
307  << " Provenance = " << m_caloCell->provenance();
308 
309  result.push_back(msg.str());
310  result.push_back(msg1.str());
311  result.push_back(msg2.str());
312  result.push_back(msg3.str());
313 
314  result.push_back(stars);
315  return result;
316 }
317 
319  bool useEt,
320  const QPair<bool,double>& scale,
321  bool outline,
322  const VP1CC_GlobalCuts& globalCuts)
323 {
324  bool createNewHit = false;
325  if(!m_hit){
326  m_hit = new SoGenericBox();
327  createNewHit = true;
328  }
329 
330  // Build new Hit object
331  const CaloDetDescrElement* ddElement = m_caloCell->caloDDE();
332 
333  // auxiliary variables
334  double eta = ddElement->eta();
335  double deta = ddElement->deta()*0.5;
336  double phi = ddElement->phi();
337  double dphi = ddElement->dphi()*0.5;
338  double z = ddElement->z();
339  double energy = (useEt ? energyToTransverse(m_caloCell->energy()) : m_caloCell->energy());
340 
341  double depth = cellDepth(scale,energy);
342  depth = std::min(depth, std::fabs(globalCuts.clipRadius - z));
343 
344  m_hit->setParametersForEndCapEtaPhiCell( eta-deta,eta+deta,phi-dphi,phi+dphi,
345  depth, z, 0.9, 0.9 );
346  m_hit->drawEdgeLines = outline;
347 
348  if(createNewHit) {
350  (*node2cc)[m_hit] = this;
351  }
352 }
353 
354 // ************ LArFCAL ***************
357  VP1CC_LAr(caloCell)
358 {
359  if(!separators)
360  throw std::runtime_error("VP1CC_LArFCAL: 0 pointer to VP1CC Separator Map");
361 
362  // define Separator type depending on Cell energy
363  VP1CC_SeparatorTypes mySeparatorType;
364 
365  if(m_caloCell->energy()<0)
366  mySeparatorType = VP1CC_SepLArFCALNeg;
367  else
368  mySeparatorType = VP1CC_SepLArFCALPos;
369 
370  VP1CC_SeparatorMap::const_iterator it = separators->find(mySeparatorType);
371  if(it ==separators->end())
372  throw std::runtime_error("VP1CC_LArFCAL: Missing separator in the map");
373 
374  m_helper = it->second;
375 
376  if(!m_helper)
377  throw std::runtime_error("VP1CC_LArFCAL: Wrong 0 pointer to the separator helper");
378 }
379 
381 {
382 }
383 
384 std::vector<std::string> VP1CC_LArFCAL::ToString(const CaloCell_ID*, const std::string& extrainfos )
385 {
386  std::vector<std::string> result;
387  const CaloDetDescrElement* ddElement = m_caloCell->caloDDE();
388  std::ostringstream msg, msg1, msg2, msg3;
389 
390  std::string stars("***");
391  result.push_back(stars);
392 
393  msg << "LAr FCAL. ID = " << m_caloCell->ID().getString() << " " << extrainfos;
394 
395  msg1 << " Eta = " << ddElement->eta()
396  << " Phi = " << ddElement->phi();
397 
398  msg2 << " Energy = " << m_caloCell->energy() << " (Mev)"
399  << " Gain " << m_caloCell->gain();
400 
401  msg3 << "Time = " << m_caloCell->time()
402  << " Quality = " << m_caloCell->quality()
403  << " Provenance = " << m_caloCell->provenance();
404 
405  result.push_back(msg.str());
406  result.push_back(msg1.str());
407  result.push_back(msg2.str());
408  result.push_back(msg3.str());
409 
410  result.push_back(stars);
411  return result;
412 }
413 
415  bool useEt,
416  const QPair<bool,double>& scale,
417  bool outline,
418  const VP1CC_GlobalCuts& globalCuts)
419 {
420  bool createNewHit = false;
421  if(!m_hit) {
422  m_hit = new SoGenericBox();
423  createNewHit = true;
424  }
425 
426  // Build new Hit object
427  const CaloDetDescrElement* ddElement = m_caloCell->caloDDE();
428 
429  // auxiliary variables
430  double x = ddElement->x();
431  double dx = ddElement->dx()*0.5;
432  double y = ddElement->y();
433  double dy = ddElement->dy()*0.5;
434  double z = ddElement->z();
435  double dz = ddElement->dz()*0.5;
436  double energy = (useEt ? energyToTransverse(m_caloCell->energy()) : m_caloCell->energy());
437 
438  double halfdepth(0.5*cellDepth(scale,energy));
439  halfdepth = std::min(halfdepth, std::fabs(0.5 * (globalCuts.clipRadius - std::fabs(z))));
440  // std::cout<<"cellDepth: "<<0.5*cellDepth(scale,energy)<<"\t halfdepth: "<<halfdepth<<"\t z "<<z<<"\t dz "<<dz<<std::endl;
441  if(z>0){
442  m_hit->setParametersForBox( dx*0.9, dy*0.9, halfdepth,x,y,z-dz+halfdepth);
443  } else {
444  m_hit->setParametersForBox( dx*0.9, dy*0.9, halfdepth,x,y,z+dz-halfdepth);
445  }
446  m_hit->drawEdgeLines = outline;
447 
448  if(createNewHit) {
450  (*node2cc)[m_hit] = this;
451  }
452 }
453 
455  const TileID* tile_id):
456  VP1CaloCell(caloCell),
457  m_tileID(tile_id)
458 {
459 }
460 
462 {
463 }
464 
465 // ************ Tile ***************
467  const TileID* tile_id,
469  VP1CC_Tile(caloCell,tile_id),
470  m_hitUp(0),
471  m_hitDown(0)
472 {
478  if(!separators)
479  throw std::runtime_error("VP1CC_TileBarEc: 0 pointer to VP1CC Separator Map");
480 
481  // The CaloCell has to be of type TileCell
482  const TileCell* tile_cell = dynamic_cast<const TileCell*>(caloCell);
483  if(tile_cell==0)
484  throw std::runtime_error("VP1CC_TileBarEc: CaloCell is not TileCell");
485 
486  // define Separator types (Up/Down) depending on Cell energy
487  VP1CC_SeparatorTypes mySeparatorTypeUp;
488  VP1CC_SeparatorTypes mySeparatorTypeDown;
489 
490  double energy1 = tile_cell->ene1();
491  double energy2 = tile_cell->ene2();
492 
493  if(caloCell->energy()<0)
494  {
495  if(energy1>=0)
496  mySeparatorTypeDown = VP1CC_SepTileNegativePos;
497  else
498  mySeparatorTypeDown = VP1CC_SepTileNegativeDown;
499 
500  if(energy2>=0)
501  mySeparatorTypeUp = VP1CC_SepTileNegativePos;
502  else
503  mySeparatorTypeUp = VP1CC_SepTileNegativeUp;
504  }
505  else
506  {
507  if(energy1<=0)
508  mySeparatorTypeDown = VP1CC_SepTilePositiveNeg;
509  else
510  mySeparatorTypeDown = VP1CC_SepTilePositiveDown;
511 
512  if(energy2<=0)
513  mySeparatorTypeUp = VP1CC_SepTilePositiveNeg;
514  else
515  mySeparatorTypeUp = VP1CC_SepTilePositiveUp;
516  }
517 
518  VP1CC_SeparatorMap::const_iterator it = separators->find(mySeparatorTypeDown);
519  if(it ==separators->end())
520  throw std::runtime_error("VP1CC_TileBarEc: Missing separator helper in the map");
521 
522  m_helperDown = it->second;
523 
524  it = separators->find(mySeparatorTypeUp);
525  if(it ==separators->end())
526  throw std::runtime_error("VP1CC_TileBarEc: Missing separator helper in the map");
527 
528  m_helperUp = it->second;
529 
530  if(!m_helperDown || !m_helperUp)
531  throw std::runtime_error("VP1CC_TileBarEc: 0 pointer to one of separator helpers" );
532 }
533 
535 {
536 }
537 
538 std::vector<std::string> VP1CC_TileBarEc::ToString(const CaloCell_ID*, const std::string& extrainfos)
539 {
540  std::vector<std::string> result;
541  const TileCell* tile_cell = dynamic_cast<const TileCell*>(m_caloCell);
542  if (not tile_cell) return result;
543  Identifier cellid = m_caloCell->ID();
544 
545  double total_energy = m_caloCell->energy();
546  double total_time = m_caloCell->time();
547  double pmt_energy1 = tile_cell->ene1();
548  double pmt_time1 = tile_cell->time1();
549  double pmt_energy2 = tile_cell->ene2();
550  double pmt_time2 = tile_cell->time2();
551 
552  std::ostringstream msg, msg1, msg2, msg3, msg4;
553  msg << "Cell: " << id2name(cellid) << " " << extrainfos;
554  msg1 << "Energy = " << total_energy << " (Mev)";
555  msg2 << "Time = " << total_time;
556  msg3 << " PMT1 Energy = " << pmt_energy1 << " (Mev)"
557  << " PMT1 Time = " << pmt_time1;
558  msg4 << " PMT2 Energy = " << pmt_energy2 << " (Mev)"
559  << " PMT2 Time = " << pmt_time2;
560 
561  std::string stars("***");
562  result.push_back(stars);
563 
564  result.push_back(msg.str());
565  result.push_back(msg1.str());
566  result.push_back(msg2.str());
567  result.push_back(msg3.str());
568  result.push_back(msg4.str());
569 
570  result.push_back(stars);
571  return result;
572 }
573 
575  bool up,
576  int& frag,
577  int& channel)
578 {
579  HWIdentifier hwId;
580  IdContext context = tile_hw_id->channel_context();
581 
582  int result = 0;
583 
584  if(up)
585  result = tile_hw_id->get_id(m_caloCell->caloDDE()->onl2(),hwId,&context);
586  else
587  result = tile_hw_id->get_id(m_caloCell->caloDDE()->onl1(),hwId,&context);
588 
589  if(result!=0)
590  return result;
591 
592  frag = tile_hw_id->frag(hwId);
593  channel = tile_hw_id->channel(hwId);
594 
595  return 0;
596 }
597 
599  bool useEt,
600  const QPair<bool,double>& scale,
601  bool outline,
602  const VP1CC_GlobalCuts& globalCuts)
603 {
604  bool createNewHit = false;
605  if(!m_hitUp){
606  m_hitUp = new SoGenericBox();
607  m_hitDown = new SoGenericBox();
608  createNewHit = true;
609  }
610 
611  const TileCell* tile_cell = dynamic_cast<const TileCell*>(m_caloCell);
612  if (not tile_cell) return;
613  double energy1 = (useEt ? energyToTransverse(tile_cell->ene1()) : tile_cell->ene1());
614  double energy2 = (useEt ? energyToTransverse(tile_cell->ene2()) : tile_cell->ene2());
615 
616  const CaloDetDescrElement* ddElement = m_caloCell->caloDDE();
617 
618  double eta = ddElement->eta();
619  double deta = ddElement->deta()*0.5;
620  double phi = ddElement->phi();
621  double dphi = ddElement->dphi()*0.5;
622  double radius = ddElement->r();
623  double dradius = ddElement->dr()*0.5;
624 
625  double z = ddElement->z();
626  double minR = radius - dradius;
627  double radialDistance = sqrt(minR*minR + z*z);
628 
629 
630  double depth1 = cellDepth(scale,energy1);
631  depth1 = std::min(depth1, std::fabs(globalCuts.clipRadius - radialDistance));
632  double depth2 = cellDepth(scale,energy2);
633  depth2 = std::min(depth2, std::fabs(globalCuts.clipRadius - radialDistance));
634  // std::cout<<"VP1CC_TileBarEc clipRadius: "<<globalCuts.clipRadius<<"\t radius "<<radius<<"\t depth1 "
635  // <<cellDepth(scale,energy1)<<"\t depth2 "<<cellDepth(scale,energy2)<<"\t cd1 "<<depth1<<"\t cd1 "<<depth1<<std::endl;
636 
637  //double etaMin, double etaMax,
638  // double phiMin, double phiMax,
639  // double cellDepth, double cellDistance,
640  // double etasqueezefact, double phisqueezefact
642  depth1,radius-dradius,0.9,0.9);
643  m_hitUp->drawEdgeLines = outline;
645  depth2,radius-dradius,0.9,0.9);
646  m_hitDown->drawEdgeLines = outline;
647 
648  if(createNewHit) {
649  (*node2cc)[m_hitUp] = this;
650  (*node2cc)[m_hitDown] = this;
653  }
654 }
655 
657  const CaloDetDescrElement* ddElement = m_caloCell->caloDDE();
658  double z = ddElement->z();
659  double radius = ddElement->r();
660  double dradius = ddElement->dr()*0.5;
661  double minR = radius - dradius;
662 
663  double radialDistance = sqrt(minR*minR + z*z);
664 
665  if ( radialDistance > globalCuts.clipRadius ) return false;
666  return true;
667 }
668 
669 
671 {
672  if(m_hitUp) {
673  // Remove entries from node2cc map
674  node2cc->erase(m_hitUp);
675  node2cc->erase(m_hitDown);
676 
677  // Drop the hit from the scene and delete hit object
680 
681  m_hitUp = 0;
682  m_hitDown = 0;
683  }
684 }
685 
687 {
688  std::string name("");
689 
690  // Barrel/EC
691  if(m_tileID->is_tile_barrel(id))
692  name += std::string("LB");
693  else
694  name += std::string("EB");
695 
696  // Pos/Neg
697  if(m_tileID->side(id)==1)
698  name += std::string("A");
699  else
700  name += std::string("C");
701 
702  // Module number
703  std::ostringstream modnum;
704  modnum << m_tileID->module(id) + 1;
705  name += (modnum.str() + std::string(" "));
706 
707  // Sample
708  int sample = m_tileID->sample(id);
709  switch(sample)
710  {
711  case 0:
712  {
713  name += std::string("A");
714  break;
715  }
716  case 1:
717  {
718  if(m_tileID->is_tile_barrel(id))
719  {
720  name += std::string("B");
721  if(m_tileID->tower(id)<9)
722  name += std::string("C");
723  }
724  else
725  {
726  if(m_tileID->section(id)==2)
727  name += std::string("B");
728  else
729  name += std::string("C");
730  }
731  break;
732  }
733  case 2:
734  {
735  name += std::string("D");
736  break;
737  }
738  default:
739  break;
740  }
741 
742  // Tower
743  std::ostringstream townum;
744  if(m_tileID->sample(id)==2)
745  townum << m_tileID->tower(id)/2;
746  else
747  townum << m_tileID->tower(id)+1;
748 
749  name += townum.str();
750  return name;
751 }
752 
753 // ************ TileCrack ***************
754 VP1CC_TileCrack::VP1CC_TileCrack(const CaloCell* caloCell,const TileID* tile_id,
755  const VP1CC_SeparatorMap* separators):VP1CC_Tile(caloCell,tile_id), m_hit(0){
761  if(!separators)
762  throw std::runtime_error("VP1CC_TileCrack: 0 pointer to VP1CC Separator Map");
763 
764  // define Separator type depending on Cell energy
765  VP1CC_SeparatorTypes mySeparatorType;
766 
767  if(caloCell->energy()<0)
768  mySeparatorType = VP1CC_SepTileNegativeDown;
769  else
770  mySeparatorType = VP1CC_SepTilePositiveDown;
771 
772  VP1CC_SeparatorMap::const_iterator it = separators->find(mySeparatorType);
773  if(it ==separators->end())
774  throw std::runtime_error("VP1CC_TileCrack: Missing separator in the map");
775 
776  m_helper = it->second;
777 
778  if(!m_helper)
779  throw std::runtime_error("VP1CC_TileCrack: 0 pointer to the separator");
780 }
781 
783 {
784 }
785 
786 std::vector<std::string> VP1CC_TileCrack::ToString(const CaloCell_ID* calo_id, const std::string& extrainfos)
787 {
788  std::vector<std::string> result;
789  std::ostringstream msg, msg1;
790 
791  std::string stars("***");
792  result.push_back(stars);
793  result.push_back(std::string("TileCrack Calo Cell"));
794 
795  // Create cell name (string)
796  std::string cellName("EB");
797  if(calo_id->side(m_caloCell->ID()) > 0)
798  cellName += std::string("A");
799  else
800  cellName += std::string("C");
801 
802  // Module number
803  std::ostringstream modnum;
804  modnum << calo_id->module(m_caloCell->ID()) + 1;
805  cellName += (modnum.str() + std::string(" E"));
806 
807  switch(calo_id->tower(m_caloCell->ID()))
808  {
809  case 10:
810  {
811  cellName += std::string("1");
812  break;
813  }
814  case 11:
815  {
816  cellName += std::string("2");
817  break;
818  }
819  case 13:
820  {
821  cellName += std::string("3");
822  break;
823  }
824  case 15:
825  {
826  cellName += std::string("4");
827  break;
828  }
829  default:
830  break;
831  }
832 
833  msg << "Cell: " << cellName << " " << extrainfos;
834 
835  msg1 << " Energy = " << m_caloCell->energy() << " (Mev)"
836  << " Time = " << m_caloCell->time();
837  result.push_back(msg.str());
838  result.push_back(msg1.str());
839 
840  result.push_back(stars);
841  return result;
842 }
843 
845  bool /*up*/,//TK: Not used?
846  int& frag,
847  int& channel )
848 {
849  HWIdentifier hwId;
850  IdContext context = tile_hw_id->channel_context();
851 
852  int result = tile_hw_id->get_id(m_caloCell->caloDDE()->onl1(),hwId,&context);
853 
854  if(result!=0)
855  return result;
856 
857  frag = tile_hw_id->frag(hwId);
858  channel = tile_hw_id->channel(hwId);
859 
860  return 0;
861 }
862 
864  bool useEt,
865  const QPair<bool,double>& scale,
866  bool outline,
867  const VP1CC_GlobalCuts& globalCuts)
868 {
869  bool createNewHit = false;
870  if(!m_hit) {
871  m_hit = new SoGenericBox();
872  createNewHit = true;
873  }
874 
875  const CaloDetDescrElement* ddElement = m_caloCell->caloDDE();
876  double eta = ddElement->eta();
877  double deta = ddElement->deta()*0.5;
878  double phi = ddElement->phi();
879  double dphi = ddElement->dphi()*0.5;
880  double z = ddElement->z();
881  double dz = ddElement->dz()*0.5;
882  double energy = (useEt ? energyToTransverse(m_caloCell->energy()) : m_caloCell->energy());
883 
884  double radius = ddElement->r();
885  double minZ = std::fabs(z)-dz;
886  double radialDistance = sqrt(radius*radius + minZ*minZ);
887 
888  double depth = cellDepth(scale,energy);
889  depth = std::min(depth, std::fabs(globalCuts.clipRadius - radialDistance));
890  // std::cout<<"z "<<z<<"\t dz "<<dz<<"\t r "<<ddElement->r()<<"\t clipRadius"<<globalCuts.clipRadius<<"\t depth "<<depth<<"\t cellDepth "<<cellDepth(scale,energy)<<std::endl;
891 
892  // std::cout<<"VP1CC_TileCrack clipRadius: "<<globalCuts.clipRadius<<"\t radialDistance "<<radialDistance<<"\t depth "
893  // <<cellDepth(scale,energy)<<"\t cd1 "<<depth<<std::endl;
894 
895 
896  // double etaMin, double etaMax, double phiMin, double phiMax,
897  // double cellDepth, double cellDistance, double etasqueezefact, double phisqueezefact
898  m_hit->setParametersForEndCapEtaPhiCell( eta-deta,eta+deta,phi-dphi,phi+dphi,
899  depth,z-dz,0.9,0.9);
900  m_hit->drawEdgeLines = outline;
901 
902  if(createNewHit) {
903  (*node2cc)[m_hit] = this;
905  }
906 }
907 
909  const CaloDetDescrElement* ddElement = m_caloCell->caloDDE();
910  double z = ddElement->z();
911  double dz = ddElement->dz()*0.5;
912  double radius = ddElement->r();
913  double minZ = std::fabs(z)-dz;
914  double radialDistance = sqrt(radius*radius + minZ*minZ);
915 
916  if ( radialDistance > globalCuts.clipRadius ) return false;
917  return true;
918 }
919 
920 
922 {
923  if(m_hit) {
924  node2cc->erase(m_hit);
926  m_hit = 0;
927  }
928 }
929 
930 // ---------------------------------------------------
931 //
932 // *** *** MBTS *** ***
933 //
934 // ---------------------------------------------------
935 
937  const TileTBID* idhelper,
938  SoSeparator* separator,
939  bool run2Geo):
940  m_cell(cell),
941  m_idhelper(idhelper),
942  m_separator(separator),
943  m_run2Geo(run2Geo)
944 {
945 }
946 
948 {
949 }
950 
952  VP1CC_SoNode2MbtsMap* node2mbts,
953  double energy,
954  bool outline,
955  double clipRadius)
956 {
957  // Draw object only when cell energy is above threshold
958  if(m_cell->energy() < energy)
959  return false;
960 
961  // FIXME!
962  // std::cout<<"clipRadius "<<clipRadius<<std::endl;
963  if (clipRadius < 350 )
964  return false;
965 
966  // Decode cell identifier in order to find draw info - shape and transformation
967  Identifier id = m_cell->ID();
968 
969  int type = m_idhelper->type(id); // -1 neg, 1 pos
970  int module = m_idhelper->module(id); // 0-7 scintillator copy number
971  int channel = m_idhelper->channel(id); // 0 scin1, 1 scin2
972 
973  if(drawinfo->find(channel) ==drawinfo->end())
974  throw std::runtime_error("Unable to find scintillator global info");
975 
976  VP1CC_MbtsScinInfo* scinInfo = (*drawinfo)[channel];
977 
978  // Get the transform
979  SoTransform* scinXF = 0;
980  if(type == -1) {
981  if(scinInfo->cTransforms.find(module)==scinInfo->cTransforms.end())
982  throw std::runtime_error("Unable to find global transform for the scintillator");
983  scinXF = VP1LinAlgUtils::toSoTransform(scinInfo->cTransforms[module]);
984  }
985  else if( type == 1) {
986  if(scinInfo->aTransforms.find(module)==scinInfo->aTransforms.end())
987  throw std::runtime_error("Unable to find global transform for the scintillator");
988  scinXF = VP1LinAlgUtils::toSoTransform(scinInfo->aTransforms[module]);
989  } else
990  return false;
991 
992  // 3D object - Trd
993  SoGenericBox* scinTrd = new SoGenericBox();
994  scinTrd->setParametersForTrd(scinInfo->dx1 + MBTS_EPS,
995  scinInfo->dx2 + MBTS_EPS,
996  scinInfo->dy1 - MBTS_EPS,
997  scinInfo->dy2 - MBTS_EPS,
998  scinInfo->dz - MBTS_EPS);
999  scinTrd->drawEdgeLines = outline;
1000 
1001  // Now add the object to the scene
1002  SoSeparator* scinSep = new SoSeparator;
1003  scinSep->addChild(scinXF);
1004  scinSep->addChild(scinTrd);
1005  m_separator->addChild(scinSep);
1006 
1007  // Keep the pointer to the 3D object in the map
1008  (*node2mbts)[scinTrd] = this;
1009 
1010  // ________________________________________________________________________________________
1011  // RUN2: if channel=1 draw two scintillators instead of one
1012  if(m_run2Geo && channel==1) {
1013  SoTransform* scinXF1 = 0;
1014  if(type == -1) {
1015  if(scinInfo->cTransforms.find(module+1)==scinInfo->cTransforms.end())
1016  throw std::runtime_error("Unable to find global transform for the scintillator");
1017  scinXF1 = VP1LinAlgUtils::toSoTransform(scinInfo->cTransforms[module+1]);
1018  }
1019  else if( type == 1) {
1020  if(scinInfo->aTransforms.find(module+1)==scinInfo->aTransforms.end())
1021  throw std::runtime_error("Unable to find global transform for the scintillator");
1022  scinXF1 = VP1LinAlgUtils::toSoTransform(scinInfo->aTransforms[module+1]);
1023  }
1024  SoGenericBox* scinTrd1 = new SoGenericBox();
1025  scinTrd1->setParametersForTrd(scinInfo->dx1 + MBTS_EPS,
1026  scinInfo->dx2 + MBTS_EPS,
1027  scinInfo->dy1 - MBTS_EPS,
1028  scinInfo->dy2 - MBTS_EPS,
1029  scinInfo->dz - MBTS_EPS);
1030  scinTrd1->drawEdgeLines = outline;
1031  // Now add the object to the scene
1032  SoSeparator* scinSep1 = new SoSeparator();
1033  scinSep1->addChild(scinXF1);
1034  scinSep1->addChild(scinTrd1);
1035  m_separator->addChild(scinSep1);
1036 
1037  // Keep the pointer to the 3D object in the map
1038  (*node2mbts)[scinTrd1] = this;
1039  }
1040  // ________________________________________________________________________________________
1041  // RUN2: if channel=1 draw two scintillators instead of one
1042 
1043  return true;
1044 }
1045 
1046 std::vector<std::string> VP1Mbts::ToString()
1047 {
1048  std::vector<std::string> result;
1049 
1050  // Decode ID
1051  Identifier id = m_cell->ID();
1052 
1053  int type = m_idhelper->type(id); // -1 neg, 1 pos
1054  int module = m_idhelper->module(id); // 0-7 scintillator copy number
1055  int channel = m_idhelper->channel(id); // 0 scin1, 1 scin2
1056 
1057 
1058  std::ostringstream msg, msg1, msg2, msg3;
1059  msg << " MBTS. Side = " << type << ". Scintillator Type = " << channel
1060  << ", Num = " << module;
1061  msg1 << " Energy = " << m_cell->energy();
1062  msg2 << " Time = " << m_cell->time();
1063 
1064  std::string stars("***");
1065  result.push_back(stars);
1066 
1067  result.push_back(msg.str());
1068  result.push_back(msg1.str());
1069  result.push_back(msg2.str());
1070 
1071  result.push_back(stars);
1072  return result;
1073 }
CaloDetDescrElement::deta
float deta() const
cell deta
Definition: Calorimeter/CaloDetDescr/CaloDetDescr/CaloDetDescrElement.h:356
VP1CC_TileBarEc::ToString
std::vector< std::string > ToString(const CaloCell_ID *calo_id, const std::string &extrainfos="")
Definition: VP1CaloCells.cxx:538
VP1CaloCell::getID
Identifier getID()
Definition: VP1CaloCells.cxx:53
TileCell
Definition: TileCell.h:57
AllowedVariables::e
e
Definition: AsgElectronSelectorTool.cxx:37
CaloDetDescrElement::onl2
IdentifierHash onl2() const
cell online identifier 2
Definition: Calorimeter/CaloDetDescr/CaloDetDescr/CaloDetDescrElement.h:408
VP1CC_TileCrack::m_helper
VP1ExtraSepLayerHelper * m_helper
Definition: VP1CaloCells.h:377
VP1CC_TileBarEc::m_helperUp
VP1ExtraSepLayerHelper * m_helperUp
Definition: VP1CaloCells.h:341
VP1CC_TileBarEc::GetFragChannel
int GetFragChannel(const TileHWID *tile_hw_id, bool up, int &frag, int &channel)
Definition: VP1CaloCells.cxx:574
VP1Mbts::ToString
std::vector< std::string > ToString()
Definition: VP1CaloCells.cxx:1046
VP1CC_GlobalCuts::allowedEta
VP1Interval allowedEta
Definition: VP1CaloCells.h:57
VP1CC_LAr::VP1CC_LAr
VP1CC_LAr(const CaloCell *caloCell)
Definition: VP1CaloCells.cxx:112
VP1CaloCell::build3DObjects
virtual void build3DObjects(VP1CC_SoNode2CCMap *node2cc, bool useEt, const QPair< bool, double > &scale, bool outline, const VP1CC_GlobalCuts &)=0
egammaParameters::depth
@ depth
pointing depth of the shower as calculated in egammaqgcld
Definition: egammaParamDefs.h:276
CaloCell::phi
virtual double phi() const override final
get phi (through CaloDetDescrElement)
Definition: CaloCell.h:359
VP1ExtraSepLayerHelper::removeNode
void removeNode(SoNode *)
Definition: VP1ExtraSepLayerHelper.cxx:95
VP1CC_LArFCAL::ToString
std::vector< std::string > ToString(const CaloCell_ID *calo_id, const std::string &extrainfos="")
Definition: VP1CaloCells.cxx:384
get_generator_info.result
result
Definition: get_generator_info.py:21
VP1CC_TileBarEc::m_hitDown
SoGenericBox * m_hitDown
Definition: VP1CaloCells.h:340
ReadCellNoiseFromCool.cell
cell
Definition: ReadCellNoiseFromCool.py:53
CaloCell_Base_ID::tower
int tower(const Identifier id) const
Tile field values (NOT_VALID == invalid request)
plotting.yearwise_efficiency.channel
channel
Definition: yearwise_efficiency.py:24
phi
Scalar phi() const
phi method
Definition: AmgMatrixBasePlugin.h:67
TrigCompositeUtils::passed
bool passed(DecisionID id, const DecisionIDContainer &idSet)
checks if required decision ID is in the set of IDs in the container
Definition: TrigCompositeUtilsRoot.cxx:117
VP1CC_LAr
Definition: VP1CaloCells.h:212
VP1CC_SepTileNegativeUp
@ VP1CC_SepTileNegativeUp
Definition: VP1CaloCells.h:102
TileHWID::get_id
virtual int get_id(const IdentifierHash &hash_id, HWIdentifier &id, const IdContext *context=0) const
create compact HW ID from hash id (return == 0 for OK)
Definition: TileHWID.cxx:491
CaloDetDescrElement::y
float y() const
cell y
Definition: Calorimeter/CaloDetDescr/CaloDetDescr/CaloDetDescrElement.h:365
VP1CC_LAr::m_hit
SoGenericBox * m_hit
Definition: VP1CaloCells.h:220
VP1CC_LAr::remove3DObjects
virtual void remove3DObjects(VP1CC_SoNode2CCMap *node2cc)
Definition: VP1CaloCells.cxx:127
VP1CC_TileCrack::GetFragChannel
int GetFragChannel(const TileHWID *tile_hw_id, bool up, int &frag, int &channel)
Definition: VP1CaloCells.cxx:844
VP1CC_SepTilePositiveNeg
@ VP1CC_SepTilePositiveNeg
Definition: VP1CaloCells.h:101
VP1CC_SepTilePositiveUp
@ VP1CC_SepTilePositiveUp
Definition: VP1CaloCells.h:99
VP1CC_MbtsScinInfo::dx2
double dx2
Definition: VP1CaloCells.h:396
VP1CC_TileBarEc::m_helperDown
VP1ExtraSepLayerHelper * m_helperDown
Definition: VP1CaloCells.h:342
VP1CC_SepLArFCALPos
@ VP1CC_SepLArFCALPos
Definition: VP1CaloCells.h:94
VP1ExtraSepLayerHelper.h
eta
Scalar eta() const
pseudorapidity method
Definition: AmgMatrixBasePlugin.h:83
CaloCell_Base_ID::is_em_endcap
bool is_em_endcap(const Identifier id) const
test if the id belongs to the EM Endcap
min
constexpr double min()
Definition: ap_fixedTest.cxx:26
TileCell::ene1
float ene1(void) const
get energy of first PMT
Definition: TileCell.h:193
VP1CC_TileBarEc::id2name
std::string id2name(Identifier &id)
Definition: VP1CaloCells.cxx:686
CaloDetDescrElement
This class groups all DetDescr information related to a CaloCell. Provides a generic interface for al...
Definition: Calorimeter/CaloDetDescr/CaloDetDescr/CaloDetDescrElement.h:66
TileHWID::channel_context
IdContext channel_context(void) const
idContext for channels
Definition: TileHWID.cxx:478
SoGenericBox::setParametersForEndCapEtaPhiCell
void setParametersForEndCapEtaPhiCell(double etaMin, double etaMax, double phiMin, double phiMax, double cellDepth, double cellDistance, double etasqueezefact=1.0, double phisqueezefact=1.0)
Definition: SoGenericBox.cxx:266
VP1CC_TileCrack::VP1CC_TileCrack
VP1CC_TileCrack(const CaloCell *caloCell, const TileID *tile_id, const VP1CC_SeparatorMap *separators)
Definition: VP1CaloCells.cxx:754
Tile_Base_ID::side
int side(const Identifier &id) const
Definition: Tile_Base_ID.cxx:153
CaloDetDescrElement::dr
float dr() const
cell dr
Definition: Calorimeter/CaloDetDescr/CaloDetDescr/CaloDetDescrElement.h:360
SoGenericBox::setParametersForBarrelEtaPhiCell
void setParametersForBarrelEtaPhiCell(double etaMin, double etaMax, double phiMin, double phiMax, double cellDepth, double cellDistance, double etasqueezefact=1.0, double phisqueezefact=1.0)
Definition: SoGenericBox.cxx:256
skel.it
it
Definition: skel.GENtoEVGEN.py:396
VP1QtUtils.h
Tile_Base_ID::sample
int sample(const Identifier &id) const
Definition: Tile_Base_ID.cxx:171
M_PI
#define M_PI
Definition: ActiveFraction.h:11
VP1CC_GlobalCuts::allowedPhi
QList< VP1Interval > allowedPhi
Definition: VP1CaloCells.h:58
VP1CaloCell::isInsideClipVolume
virtual bool isInsideClipVolume(const VP1CC_GlobalCuts &globalCuts)
Definition: VP1CaloCells.cxx:90
VP1CC_Tile::~VP1CC_Tile
virtual ~VP1CC_Tile()
Definition: VP1CaloCells.cxx:461
TileHWID::frag
int frag(const HWIdentifier &id) const
extract frag field from HW identifier
Definition: TileHWID.h:181
TileInfo.h
VP1CC_SepLArEMBPos
@ VP1CC_SepLArEMBPos
Definition: VP1CaloCells.h:91
VP1CC_GlobalCuts
Definition: VP1CaloCells.h:47
Tile_Base_ID::tower
int tower(const Identifier &id) const
Definition: Tile_Base_ID.cxx:165
CaloCell::provenance
uint16_t provenance() const
get provenance (data member)
Definition: CaloCell.h:338
CaloCell_Base_ID::module
int module(const Identifier id) const
Tile field values (NOT_VALID == invalid request)
TileTBID::type
int type(const Identifier &id) const
extract type field from TileTB identifier
Definition: Calorimeter/CaloIdentifier/CaloIdentifier/TileTBID.h:146
CaloCell::time
float time() const
get time (data member)
Definition: CaloCell.h:352
VP1CC_SepTileNegativeDown
@ VP1CC_SepTileNegativeDown
Definition: VP1CaloCells.h:103
HWIdentifier
Definition: HWIdentifier.h:13
yodamerge_tmp.scale
scale
Definition: yodamerge_tmp.py:138
x
#define x
CaloCell_Base_ID::is_hec
bool is_hec(const Identifier id) const
test if the id belongs to the HEC
TileTBID::module
int module(const Identifier &id) const
extract module field from TileTB identifier
Definition: Calorimeter/CaloIdentifier/CaloIdentifier/TileTBID.h:150
VP1CaloCell::updateScene
void updateScene(VP1CC_SoNode2CCMap *node2cc, bool useEt, const QPair< bool, double > &scale, bool outline, const VP1CC_GlobalCuts &globalCuts)
Definition: VP1CaloCells.cxx:99
TileHWID::channel
int channel(const HWIdentifier &id) const
extract channel field from HW identifier
Definition: TileHWID.h:189
VP1CC_MbtsScinInfo
Definition: VP1CaloCells.h:394
CaloCell::energy
double energy() const
get energy (data member)
Definition: CaloCell.h:311
VP1CaloCells.h
VP1CC_GlobalCuts::sideA
bool sideA
Definition: VP1CaloCells.h:55
VP1Mbts::m_separator
SoSeparator * m_separator
Definition: VP1CaloCells.h:436
VP1CC_MbtsScinInfo::dx1
double dx1
Definition: VP1CaloCells.h:395
CaloDetDescrElement::dz
float dz() const
cell dz
Definition: Calorimeter/CaloDetDescr/CaloDetDescr/CaloDetDescrElement.h:379
VP1CC_TileCrack::~VP1CC_TileCrack
virtual ~VP1CC_TileCrack()
Definition: VP1CaloCells.cxx:782
VP1CC_LAr::m_helper
VP1ExtraSepLayerHelper * m_helper
Definition: VP1CaloCells.h:221
VP1LinAlgUtils.h
CaloDetDescrElement::onl1
IdentifierHash onl1() const
cell online identifier 1
Definition: Calorimeter/CaloDetDescr/CaloDetDescr/CaloDetDescrElement.h:404
MBTS_EPS
#define MBTS_EPS
Definition: VP1CaloCells.cxx:32
VP1CC_TileBarEc::build3DObjects
virtual void build3DObjects(VP1CC_SoNode2CCMap *node2cc, bool useEt, const QPair< bool, double > &scale, bool outline, const VP1CC_GlobalCuts &)
Definition: VP1CaloCells.cxx:598
python.PyAthena.module
module
Definition: PyAthena.py:131
TileHWID
Helper class for TileCal online (hardware) identifiers.
Definition: TileHWID.h:49
TileTBID.h
VP1CaloCell::remove3DObjects
virtual void remove3DObjects(VP1CC_SoNode2CCMap *node2cc)=0
TileHWID.h
VP1CaloCell
Definition: VP1CaloCells.h:160
ParticleGun_FastCalo_ChargeFlip_Config.energy
energy
Definition: ParticleGun_FastCalo_ChargeFlip_Config.py:78
Tile_Base_ID::module
int module(const Identifier &id) const
Definition: Tile_Base_ID.cxx:159
FullCPAlgorithmsTest_eljob.sample
sample
Definition: FullCPAlgorithmsTest_eljob.py:113
TileCablingService.h
VP1CC_LArFCAL::VP1CC_LArFCAL
VP1CC_LArFCAL(const CaloCell *caloCell, const VP1CC_SeparatorMap *separators)
Definition: VP1CaloCells.cxx:355
lumiFormat.i
int i
Definition: lumiFormat.py:85
z
#define z
VP1CC_SepTileNegativePos
@ VP1CC_SepTileNegativePos
Definition: VP1CaloCells.h:104
TileID
Helper class for TileCal offline identifiers.
Definition: TileID.h:68
VP1CaloCell::VP1CaloCell
VP1CaloCell(const CaloCell *caloCell)
Definition: VP1CaloCells.cxx:35
VP1CaloCell::~VP1CaloCell
virtual ~VP1CaloCell()
Definition: VP1CaloCells.cxx:44
TileDigitsContainer.h
VP1CC_TileBarEc::m_hitUp
SoGenericBox * m_hitUp
Definition: VP1CaloCells.h:339
CaloCell::caloDDE
const CaloDetDescrElement * caloDDE() const
get pointer to CaloDetDescrElement (data member)
Definition: CaloCell.h:305
ICaloBadChanTool.h
TileCell.h
CalibCoolCompareRT.up
up
Definition: CalibCoolCompareRT.py:109
VP1CC_LAr::~VP1CC_LAr
virtual ~VP1CC_LAr()
Definition: VP1CaloCells.cxx:123
VP1CC_MbtsScinInfo::dz
double dz
Definition: VP1CaloCells.h:399
VP1CaloCell::energyToTransverse
double energyToTransverse(const double &) const
Definition: VP1CaloCells.cxx:58
VP1CC_LArFCAL::~VP1CC_LArFCAL
virtual ~VP1CC_LArFCAL()
Definition: VP1CaloCells.cxx:380
VP1CC_LArEMECHEC::ToString
std::vector< std::string > ToString(const CaloCell_ID *calo_id, const std::string &extrainfos="")
Definition: VP1CaloCells.cxx:283
CaloCell_ID
Helper class for offline cell identifiers.
Definition: CaloCell_ID.h:34
VP1CC_TileCrack::remove3DObjects
virtual void remove3DObjects(VP1CC_SoNode2CCMap *node2cc)
Definition: VP1CaloCells.cxx:921
VP1CC_TileBarEc::~VP1CC_TileBarEc
virtual ~VP1CC_TileBarEc()
Definition: VP1CaloCells.cxx:534
VP1CC_SepLArFCALNeg
@ VP1CC_SepLArFCALNeg
Definition: VP1CaloCells.h:98
VP1Mbts::m_run2Geo
bool m_run2Geo
Definition: VP1CaloCells.h:437
SoGenericBox::setParametersForBox
void setParametersForBox(float dx, float dy, float dz, float xcenter=0.0, float ycenter=0.0, float zcenter=0.0)
Definition: SoGenericBox.cxx:179
VP1CC_MbtsScinInfoMap
std::map< int, VP1CC_MbtsScinInfo *, std::less< int > > VP1CC_MbtsScinInfoMap
Definition: VP1CaloCells.h:407
VP1CC_GlobalCuts::clipRadius
double clipRadius
Definition: VP1CaloCells.h:59
TileTBID::channel
int channel(const Identifier &id) const
extract channel field from TileTB identifier
Definition: Calorimeter/CaloIdentifier/CaloIdentifier/TileTBID.h:154
CaloCell::quality
uint16_t quality() const
get quality (data member)
Definition: CaloCell.h:332
VP1Mbts::VP1Mbts
VP1Mbts(const TileCell *cell, const TileTBID *idhelper, SoSeparator *separator, bool run2Geo)
Definition: VP1CaloCells.cxx:936
VP1CC_TileBarEc::isInsideClipVolume
bool isInsideClipVolume(const VP1CC_GlobalCuts &globalCuts)
Definition: VP1CaloCells.cxx:656
VP1CC_LArEMB::ToString
std::vector< std::string > ToString(const CaloCell_ID *calo_id, const std::string &extrainfos="")
Definition: VP1CaloCells.cxx:207
VP1CC_SeparatorMap
std::map< VP1CC_SeparatorTypes, VP1ExtraSepLayerHelper *, std::less< VP1CC_SeparatorTypes > > VP1CC_SeparatorMap
Definition: VP1CaloCells.h:109
VP1CC_MbtsScinInfo::cTransforms
VP1CC_MbtsXfMap cTransforms
Definition: VP1CaloCells.h:401
VP1Mbts::m_idhelper
const TileTBID * m_idhelper
Definition: VP1CaloCells.h:435
name
std::string name
Definition: Control/AthContainers/Root/debug.cxx:228
VP1CaloCell::cellDepth
double cellDepth(const QPair< bool, double > &scale, const double &energy)
Definition: VP1CaloCells.h:189
VP1Interval::contains
bool contains(const double &x) const
VP1CC_LArEMECHEC::~VP1CC_LArEMECHEC
virtual ~VP1CC_LArEMECHEC()
Definition: VP1CaloCells.cxx:279
VP1CaloCell::cutPassed
bool cutPassed(const VP1CC_GlobalCuts &globalCuts)
Definition: VP1CaloCells.cxx:63
CaloCell::gain
CaloGain::CaloGain gain() const
get gain (data member )
Definition: CaloCell.h:345
CaloCell::ID
Identifier ID() const
get ID (from cached data member) non-virtual and inline for fast access
Definition: CaloCell.h:279
LArDigitContainer.h
VP1ExtraSepLayerHelper::addNode
void addNode(SoNode *)
Definition: VP1ExtraSepLayerHelper.cxx:54
CaloCellContainer.h
VP1CC_SepTilePositiveDown
@ VP1CC_SepTilePositiveDown
Definition: VP1CaloCells.h:100
ParticleGun_SamplingFraction.radius
radius
Definition: ParticleGun_SamplingFraction.py:96
VP1CC_MbtsScinInfo::aTransforms
VP1CC_MbtsXfMap aTransforms
Definition: VP1CaloCells.h:400
VP1CC_SepLArHECNeg
@ VP1CC_SepLArHECNeg
Definition: VP1CaloCells.h:97
VP1CC_SepLArEMECNeg
@ VP1CC_SepLArEMECNeg
Definition: VP1CaloCells.h:96
VP1CC_LArEMB::build3DObjects
virtual void build3DObjects(VP1CC_SoNode2CCMap *node2cc, bool useEt, const QPair< bool, double > &scale, bool outline, const VP1CC_GlobalCuts &)
Definition: VP1CaloCells.cxx:166
CaloDetDescrElement::x
float x() const
cell x
Definition: Calorimeter/CaloDetDescr/CaloDetDescr/CaloDetDescrElement.h:363
VP1CaloCell::m_caloCell
const CaloCell * m_caloCell
Definition: VP1CaloCells.h:204
SoGenericBox::drawEdgeLines
SoSFBool drawEdgeLines
Definition: SoGenericBox.h:33
VP1Mbts::~VP1Mbts
~VP1Mbts()
Definition: VP1CaloCells.cxx:947
PlotCalibFromCool.modnum
modnum
Definition: PlotCalibFromCool.py:238
makeTRTBarrelCans.dy
tuple dy
Definition: makeTRTBarrelCans.py:21
CaloDetDescrElement::dphi
float dphi() const
cell dphi
Definition: Calorimeter/CaloDetDescr/CaloDetDescr/CaloDetDescrElement.h:358
Identifier::getString
std::string getString() const
Provide a string form of the identifier - hexadecimal.
Definition: Identifier.cxx:25
TileCell::ene2
float ene2(void) const
get energy of second PMT
Definition: TileCell.h:195
VP1CaloCell::getCaloCell
const CaloCell * getCaloCell()
Definition: VP1CaloCells.cxx:48
VP1Interval
Definition: VP1Interval.h:23
VP1CC_TileCrack::ToString
std::vector< std::string > ToString(const CaloCell_ID *calo_id, const std::string &extrainfos="")
Definition: VP1CaloCells.cxx:786
VP1CC_TileBarEc::remove3DObjects
virtual void remove3DObjects(VP1CC_SoNode2CCMap *node2cc)
Definition: VP1CaloCells.cxx:670
CaloCell_Base_ID::side
int side(const Identifier id) const
Tile field values (NOT_VALID == invalid request)
y
#define y
CaloCell
Data object for each calorimeter readout cell.
Definition: CaloCell.h:57
WriteCellNoiseToCool.cellName
cellName
Definition: WriteCellNoiseToCool.py:368
VP1CC_GlobalCuts::sideC
bool sideC
Definition: VP1CaloCells.h:56
CaloDetDescrElement::dx
float dx() const
cell dx
Definition: Calorimeter/CaloDetDescr/CaloDetDescr/CaloDetDescrElement.h:375
VP1CC_LArEMECHEC::VP1CC_LArEMECHEC
VP1CC_LArEMECHEC(const CaloCell *caloCell, const CaloCell_ID *calo_id, const VP1CC_SeparatorMap *separators)
Definition: VP1CaloCells.cxx:238
VP1CC_Tile
Definition: VP1CaloCells.h:294
CaloDetDescrElement::z
float z() const
cell z
Definition: Calorimeter/CaloDetDescr/CaloDetDescr/CaloDetDescrElement.h:367
python.CaloScaleNoiseConfig.type
type
Definition: CaloScaleNoiseConfig.py:78
makeTRTBarrelCans.dx
tuple dx
Definition: makeTRTBarrelCans.py:20
SoGenericBox
Definition: SoGenericBox.h:26
VP1CC_MbtsScinInfo::dy2
double dy2
Definition: VP1CaloCells.h:398
VP1CC_LArFCAL::build3DObjects
virtual void build3DObjects(VP1CC_SoNode2CCMap *node2cc, bool useEt, const QPair< bool, double > &scale, bool outline, const VP1CC_GlobalCuts &)
Definition: VP1CaloCells.cxx:414
VP1CC_SepLArEMBNeg
@ VP1CC_SepLArEMBNeg
Definition: VP1CaloCells.h:95
VP1CC_Tile::m_tileID
const TileID * m_tileID
Definition: VP1CaloCells.h:307
VP1CC_SepLArEMECPos
@ VP1CC_SepLArEMECPos
Definition: VP1CaloCells.h:92
VP1CC_LArEMB::VP1CC_LArEMB
VP1CC_LArEMB(const CaloCell *caloCell, const VP1CC_SeparatorMap *separators)
Definition: VP1CaloCells.cxx:137
VP1CC_TileCrack::build3DObjects
virtual void build3DObjects(VP1CC_SoNode2CCMap *node2cc, bool useEt, const QPair< bool, double > &scale, bool outline, const VP1CC_GlobalCuts &)
Definition: VP1CaloCells.cxx:863
VP1Mbts::UpdateScene
bool UpdateScene(VP1CC_MbtsScinInfoMap *drawinfo, VP1CC_SoNode2MbtsMap *node2mbts, double energy, bool outline, double clipRadius)
Definition: VP1CaloCells.cxx:951
ITkPixelChargeCalibration.separators
separators
Definition: ITkPixelChargeCalibration.py:99
CaloDetDescrElement::eta
float eta() const
cell eta
Definition: Calorimeter/CaloDetDescr/CaloDetDescr/CaloDetDescrElement.h:344
TileTBID
Helper class for TileCal offline identifiers of ancillary testbeam detectors and MBTS.
Definition: Calorimeter/CaloIdentifier/CaloIdentifier/TileTBID.h:65
CaloDetDescrElement::phi
float phi() const
cell phi
Definition: Calorimeter/CaloDetDescr/CaloDetDescr/CaloDetDescrElement.h:346
VP1CC_SoNode2MbtsMap
std::map< SoNode *, VP1Mbts *, std::less< SoNode * > > VP1CC_SoNode2MbtsMap
Definition: VP1CaloCells.h:409
VP1CC_TileBarEc::VP1CC_TileBarEc
VP1CC_TileBarEc(const CaloCell *caloCell, const TileID *tile_id, const VP1CC_SeparatorMap *separators)
Definition: VP1CaloCells.cxx:466
VP1CC_SepLArHECPos
@ VP1CC_SepLArHECPos
Definition: VP1CaloCells.h:93
Tile_Base_ID::section
int section(const Identifier &id) const
Definition: Tile_Base_ID.cxx:147
CaloDetDescrElement::r
float r() const
cell r
Definition: Calorimeter/CaloDetDescr/CaloDetDescr/CaloDetDescrElement.h:348
VP1CC_LArEMB::~VP1CC_LArEMB
virtual ~VP1CC_LArEMB()
Definition: VP1CaloCells.cxx:162
VP1CC_MbtsScinInfo::dy1
double dy1
Definition: VP1CaloCells.h:397
VP1CC_LArEMECHEC::build3DObjects
virtual void build3DObjects(VP1CC_SoNode2CCMap *node2cc, bool useEt, const QPair< bool, double > &scale, bool outline, const VP1CC_GlobalCuts &)
Definition: VP1CaloCells.cxx:318
Tile_Base_ID::is_tile_barrel
bool is_tile_barrel(const Identifier &id) const
Test of an Identifier to see if it belongs to a particular part of the calorimeter.
Definition: Tile_Base_ID.cxx:205
VP1CC_TileCrack::isInsideClipVolume
bool isInsideClipVolume(const VP1CC_GlobalCuts &globalCuts)
Definition: VP1CaloCells.cxx:908
VP1Mbts::m_cell
const TileCell * m_cell
Definition: VP1CaloCells.h:434
CaloDetDescrElement::dy
float dy() const
cell dy
Definition: Calorimeter/CaloDetDescr/CaloDetDescr/CaloDetDescrElement.h:377
IdContext
This class saves the "context" of an expanded identifier (ExpandedIdentifier) for compact or hash ver...
Definition: IdContext.h:26
VP1LinAlgUtils::toSoTransform
static SoTransform * toSoTransform(const HepGeom::Transform3D &, SoTransform *t=0)
Definition: VP1LinAlgUtils.cxx:40
python.AutoConfigFlags.msg
msg
Definition: AutoConfigFlags.py:7
VP1CC_Tile::VP1CC_Tile
VP1CC_Tile(const CaloCell *caloCell, const TileID *tile_id)
Definition: VP1CaloCells.cxx:454
SoGenericBox.h
VP1CC_SeparatorTypes
VP1CC_SeparatorTypes
Definition: VP1CaloCells.h:90
VP1CC_TileCrack::m_hit
SoGenericBox * m_hit
Definition: VP1CaloCells.h:376
CaloCell::sinTh
virtual double sinTh() const override final
get sin(theta) (through CaloDetDescrElement)
Definition: CaloCell.h:373
CaloCell::eta
virtual double eta() const override final
get eta (through CaloDetDescrElement)
Definition: CaloCell.h:366
VP1CC_SoNode2CCMap
std::map< SoNode *, VP1CaloCell *, std::less< SoNode * > > VP1CC_SoNode2CCMap
Definition: VP1CaloCells.h:156
SoGenericBox::setParametersForTrd
void setParametersForTrd(float dx1, float dx2, float dy1, float dy2, float dz)
Definition: SoGenericBox.cxx:276
Identifier
Definition: IdentifierFieldParser.cxx:14