ATLAS Offline Software
Public Member Functions | Protected Attributes | List of all members
VP1CaloCell Class Referenceabstract

#include <VP1CaloCells.h>

Inheritance diagram for VP1CaloCell:
Collaboration diagram for VP1CaloCell:

Public Member Functions

 VP1CaloCell (const CaloCell *caloCell)
 
virtual ~VP1CaloCell ()
 
double energyToTransverse (const double &) const
 
bool cutPassed (const VP1CC_GlobalCuts &globalCuts)
 
const CaloCellgetCaloCell ()
 
Identifier getID ()
 
void updateScene (VP1CC_SoNode2CCMap *node2cc, bool useEt, const QPair< bool, double > &scale, bool outline, const VP1CC_GlobalCuts &globalCuts)
 
virtual void build3DObjects (VP1CC_SoNode2CCMap *node2cc, bool useEt, const QPair< bool, double > &scale, bool outline, const VP1CC_GlobalCuts &)=0
 
double cellDepth (const QPair< bool, double > &scale, const double &energy)
 
virtual bool isInsideClipVolume (const VP1CC_GlobalCuts &globalCuts)
 
virtual void remove3DObjects (VP1CC_SoNode2CCMap *node2cc)=0
 
virtual std::vector< std::string > ToString (const CaloCell_ID *calo_id, const std::string &extrainfos="")=0
 

Protected Attributes

const CaloCellm_caloCell
 

Detailed Description

Definition at line 159 of file VP1CaloCells.h.

Constructor & Destructor Documentation

◆ VP1CaloCell()

VP1CaloCell::VP1CaloCell ( const CaloCell caloCell)

Definition at line 35 of file VP1CaloCells.cxx.

35  :
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 }

◆ ~VP1CaloCell()

VP1CaloCell::~VP1CaloCell ( )
virtual

Definition at line 44 of file VP1CaloCells.cxx.

45 {
46 }

Member Function Documentation

◆ build3DObjects()

virtual void VP1CaloCell::build3DObjects ( VP1CC_SoNode2CCMap node2cc,
bool  useEt,
const QPair< bool, double > &  scale,
bool  outline,
const VP1CC_GlobalCuts  
)
pure virtual

◆ cellDepth()

double VP1CaloCell::cellDepth ( const QPair< bool, double > &  scale,
const double &  energy 
)
inline

Definition at line 189 of file VP1CaloCells.h.

190  { return std::max(1.0*Gaudi::Units::mm,scale.second*(scale.first?log(1+fabs(energy)):fabs(energy))); }

◆ cutPassed()

bool VP1CaloCell::cutPassed ( const VP1CC_GlobalCuts globalCuts)

Definition at line 63 of file VP1CaloCells.cxx.

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 }

◆ energyToTransverse()

double VP1CaloCell::energyToTransverse ( const double &  e) const

Definition at line 58 of file VP1CaloCells.cxx.

59 {
60  return m_caloCell->sinTh()*e;
61 }

◆ getCaloCell()

const CaloCell * VP1CaloCell::getCaloCell ( )

Definition at line 48 of file VP1CaloCells.cxx.

49 {
50  return m_caloCell;
51 }

◆ getID()

Identifier VP1CaloCell::getID ( )

Definition at line 53 of file VP1CaloCells.cxx.

54 {
55  return m_caloCell->ID();
56 }

◆ isInsideClipVolume()

bool VP1CaloCell::isInsideClipVolume ( const VP1CC_GlobalCuts globalCuts)
virtual

Reimplemented in VP1CC_TileCrack, and VP1CC_TileBarEc.

Definition at line 90 of file VP1CaloCells.cxx.

90  {
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 }

◆ remove3DObjects()

virtual void VP1CaloCell::remove3DObjects ( VP1CC_SoNode2CCMap node2cc)
pure virtual

Implemented in VP1CC_TileCrack, VP1CC_TileBarEc, and VP1CC_LAr.

◆ ToString()

virtual std::vector<std::string> VP1CaloCell::ToString ( const CaloCell_ID calo_id,
const std::string &  extrainfos = "" 
)
pure virtual

◆ updateScene()

void VP1CaloCell::updateScene ( VP1CC_SoNode2CCMap node2cc,
bool  useEt,
const QPair< bool, double > &  scale,
bool  outline,
const VP1CC_GlobalCuts globalCuts 
)

Definition at line 99 of file VP1CaloCells.cxx.

104 {
105  if(cutPassed(globalCuts))
106  build3DObjects(node2cc,useEt,scale,outline, globalCuts);
107  else
108  remove3DObjects(node2cc);
109 }

Member Data Documentation

◆ m_caloCell

const CaloCell* VP1CaloCell::m_caloCell
protected

Definition at line 204 of file VP1CaloCells.h.


The documentation for this class was generated from the following files:
VP1CC_GlobalCuts::allowedEta
VP1Interval allowedEta
Definition: VP1CaloCells.h:57
VP1CaloCell::build3DObjects
virtual void build3DObjects(VP1CC_SoNode2CCMap *node2cc, bool useEt, const QPair< bool, double > &scale, bool outline, const VP1CC_GlobalCuts &)=0
CaloCell::phi
virtual double phi() const override final
get phi (through CaloDetDescrElement)
Definition: CaloCell.h:359
max
#define max(a, b)
Definition: cfImp.cxx:41
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
CaloDetDescrElement
This class groups all DetDescr information related to a CaloCell. Provides a generic interface for al...
Definition: Calorimeter/CaloDetDescr/CaloDetDescr/CaloDetDescrElement.h:66
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
yodamerge_tmp.scale
scale
Definition: yodamerge_tmp.py:138
VP1CC_GlobalCuts::sideA
bool sideA
Definition: VP1CaloCells.h:55
VP1CaloCell::remove3DObjects
virtual void remove3DObjects(VP1CC_SoNode2CCMap *node2cc)=0
ParticleGun_FastCalo_ChargeFlip_Config.energy
energy
Definition: ParticleGun_FastCalo_ChargeFlip_Config.py:78
lumiFormat.i
int i
Definition: lumiFormat.py:92
z
#define z
CaloCell::caloDDE
const CaloDetDescrElement * caloDDE() const
get pointer to CaloDetDescrElement (data member)
Definition: CaloCell.h:305
VP1CC_GlobalCuts::clipRadius
double clipRadius
Definition: VP1CaloCells.h:59
VP1Interval::contains
bool contains(const double &x) const
VP1CaloCell::cutPassed
bool cutPassed(const VP1CC_GlobalCuts &globalCuts)
Definition: VP1CaloCells.cxx:63
CaloCell::ID
Identifier ID() const
get ID (from cached data member) non-virtual and inline for fast access
Definition: CaloCell.h:279
ParticleGun_SamplingFraction.radius
radius
Definition: ParticleGun_SamplingFraction.py:96
VP1CaloCell::m_caloCell
const CaloCell * m_caloCell
Definition: VP1CaloCells.h:204
python.SystemOfUnits.mm
int mm
Definition: SystemOfUnits.py:83
VP1Interval
Definition: VP1Interval.h:23
DiTauMassTools::MaxHistStrategyV2::e
e
Definition: PhysicsAnalysis/TauID/DiTauMassTools/DiTauMassTools/HelperFunctions.h:26
VP1CC_GlobalCuts::sideC
bool sideC
Definition: VP1CaloCells.h:56
CaloDetDescrElement::z
float z() const
cell z
Definition: Calorimeter/CaloDetDescr/CaloDetDescr/CaloDetDescrElement.h:367
python.CaloCondTools.log
log
Definition: CaloCondTools.py:20
CaloDetDescrElement::r
float r() const
cell r
Definition: Calorimeter/CaloDetDescr/CaloDetDescr/CaloDetDescrElement.h:348
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