ATLAS Offline Software
Loading...
Searching...
No Matches
CaloDetDescriptor.h
Go to the documentation of this file.
1/*
2 Copyright (C) 2002-2023 CERN for the benefit of the ATLAS collaboration
3*/
4
12
13#ifndef CALODETDESCR_CALODETDESCRIPTOR_H
14#define CALODETDESCR_CALODETDESCRIPTOR_H
15
19
20class Identifier;
21class AtlasDetectorID;
22
58{
59 public:
68 const AtlasDetectorID* helper,
69 const CaloCell_Base_ID* calo_helper,
70 CaloCell_ID::CaloSample sample=CaloCell_ID::Unknown,
72
76
79 virtual void print() const;
80
83 void dump(std::ostream& os) const;
84
89
93 void set_depth_in(std::vector<double>& calo_depth);
94
98 void set_depth_out(std::vector<double>& calo_depth);
99
102 bool is_lar_em() const;
105 bool is_lar_em_barrel() const;
108 bool is_lar_em_endcap() const;
111 bool is_lar_em_endcap_inner() const;
114 bool is_lar_em_endcap_outer() const;
117 bool is_lar_hec() const;
120 bool is_lar_fcal() const;
123 bool is_tile() const;
124
130
137
140
143 Identifier identify() const override final;
146 IdentifierHash identifyHash() const override final;
153
157
160 int layer() const;
161
165
166
169 int calo_sign() const;
170
173 double calo_z_min() const;
176 double calo_z_max() const;
179 double calo_eta_min() const;
182 double calo_eta_max() const;
185 double calo_phi_min() const;
188 double calo_phi_max() const;
191 double calo_r_min() const;
194 double calo_r_max() const;
195
198 int n_calo_depth() const;
202 void get_depth_in(std::vector<double>& calo_depth) const;
206 void get_depth_out(std::vector<double>& calo_depth) const;
207
210 double deta() const;
213 double dphi() const;
216 int n_eta() const;
219 int n_phi() const;
220
221 // ------- Return parameters needed for Trk::Surface --------
222
226 bool get_cylinder_surface (Amg::Transform3D& htrans,
227 double& radius,
228 double& hphi,
229 double& hlength,
230 double& depth) const;
231
234 bool get_disk_surface (Amg::Transform3D& htrans,
235 double& z,
236 double& rmin,
237 double& rmax,
238 double& hphisec,
239 double& depth) const;
240
247 bool is_in (double eta_min,
248 double eta_max,
249 double phi_min,
250 double phi_max) const;
251
254 int eta_channel(double eta) const;
257 int phi_channel(double phi) const;
258
261 int eta_channel_raw(double eta) const;
264 int phi_channel_raw(double phi) const;
265
266
269 double reg_min() const;
272 double reg_max() const;
275 double lar_eta_min() const;
278 double lar_phi_min() const;
279
282 void setCaloEtaMin(double eta_min);
285 void setCaloEtaMax(double eta_max);
288 void setCaloPhiMin(double phi_min);
291 void setCaloPhiMax(double phi_max);
294 void setCaloZMin(double z_min);
297 void setCaloZMax(double z_max);
300 void setCaloRMin(double r_min);
303 void setCaloRMax(double r_max);
304
307 void setLArRegMin(double reg_min);
310 void setLArRegMax(double reg_max);
313 void setLArPhiMin(double phi_min);
316 void setLArEtaMin(double eta_min);
317
320 void set_eta_phi_granularity(int neta,
321 double deta,
322 int nphi,
323 double dphi);
324
328
332
333 private:
343
368
375
379
383
387
400
401 protected:
402 // values to be defined in the derived classes
403
404 // 'ideal' geometry
429
439
443
459};
460
461inline bool CaloDetDescriptor::is_lar_em() const
462{
463 return m_is_lar_em;
464}
465
467{
468 return m_is_lar_em_barrel;
469}
470
472{
473 return m_is_lar_em_endcap;
474}
475
480
485
487{
488 return m_is_lar_hec;
489}
490
492{
493 return m_is_lar_fcal;
494}
495
496inline bool CaloDetDescriptor::is_tile() const
497{
498 return m_is_tile;
499}
500
502{
503 return m_id;
504}
505
507{
508 int num;
509 return m_calo_helper->subcalo_region_hash(m_id, num);
510}
511
513{
514 return m_calo_helper->calo_region_hash(m_id);
515}
516
518{
519 int num;
520 return m_calo_helper->subcalo_region_hash(m_id, num);
521}
522
524{
525 return m_calo_helper;
526}
527
528inline int CaloDetDescriptor::layer() const
529{
530 return m_layer;
531}
532
537
542
544{
545 return m_calo_sign;
546}
547
548inline double CaloDetDescriptor::calo_z_min() const
549{
550 return m_calo_z_min;
551}
552
553inline double CaloDetDescriptor::calo_z_max() const
554{
555 return m_calo_z_max;
556}
557
559{
560 return m_calo_eta_min;
561}
562
564{
565 return m_calo_eta_max;
566}
567
569{
570 return m_calo_phi_min;
571}
572
574{
575 return m_calo_phi_max;
576}
577
578inline double CaloDetDescriptor::calo_r_min() const
579{
580 return m_calo_r_min;
581}
582
583inline double CaloDetDescriptor::calo_r_max() const
584{
585 return m_calo_r_max;
586}
587
588inline double CaloDetDescriptor::deta() const
589{
590 return m_lar_deta;
591}
592
593inline double CaloDetDescriptor::dphi() const
594{
595 return m_lar_dphi;
596}
597
598inline int CaloDetDescriptor::n_eta() const
599{
600 return m_lar_n_eta;
601}
602
603inline int CaloDetDescriptor::n_phi() const
604{
605 return m_lar_n_phi;
606}
607
608inline double CaloDetDescriptor::reg_min() const
609{
610 return m_lar_reg_min;
611}
612
613inline double CaloDetDescriptor::reg_max() const
614{
615 return m_lar_reg_max;
616}
617
619{
620 return m_lar_eta_min;
621}
622
624{
625 return m_lar_phi_min;
626}
627
628inline void CaloDetDescriptor::setCaloEtaMin(double eta_min)
629{
630 m_calo_eta_min = eta_min;
631}
632
633inline void CaloDetDescriptor::setCaloEtaMax(double eta_max)
634{
635 m_calo_eta_max = eta_max;
636}
637
638inline void CaloDetDescriptor::setCaloPhiMin(double phi_min)
639{
640 m_calo_phi_min = phi_min;
641}
642
643inline void CaloDetDescriptor::setCaloPhiMax(double phi_max)
644{
645 m_calo_phi_max = phi_max;
646}
647
648inline void CaloDetDescriptor::setCaloZMin(double z_min)
649{
650 m_calo_z_min = z_min;
651}
652
653inline void CaloDetDescriptor::setCaloZMax(double z_max)
654{
655 m_calo_z_max = z_max;
656}
657
658inline void CaloDetDescriptor::setCaloRMin(double r_min)
659{
660 m_calo_r_min = r_min;
661}
662
663inline void CaloDetDescriptor::setCaloRMax(double r_max)
664{
665 m_calo_r_max = r_max;
666}
667
672
677
678inline void CaloDetDescriptor::setLArPhiMin(double phi_min)
679{
680 m_lar_phi_min = phi_min;
681}
682
683inline void CaloDetDescriptor::setLArEtaMin(double eta_min)
684{
685 m_lar_eta_min = eta_min;
686}
687
688inline
690{
691 return m_transform;
692}
693
694
695inline
700
701
702#endif
Scalar eta() const
pseudorapidity method
Scalar phi() const
phi method
CaloCell_ID::CaloSample CaloSample
Eigen::Affine3d Transform3D
#define protected
#define z
This class provides an interface to generate or decode an identifier for the upper levels of the dete...
Helper base class for offline cell identifiers.
SUBCALO
enumeration of sub calorimeters
Helper class for offline cell identifiers.
Definition CaloCell_ID.h:34
CaloCell_Base_ID::SUBCALO SUBCALO
Definition CaloCell_ID.h:50
CaloSampling::CaloSample CaloSample
Definition CaloCell_ID.h:53
CaloDetDescriptor(const Identifier &id, const AtlasDetectorID *helper, const CaloCell_Base_ID *calo_helper, CaloCell_ID::CaloSample sample=CaloCell_ID::Unknown, int layer=CaloCell_ID::NOT_VALID)
Constructor.
double m_calo_eta_max
maximal Eta (to be defined in the derived classes)
double calo_phi_max() const
'ideal' geometry: phi maximal
bool is_lar_em_barrel() const
descriptor belongs to EM barrel
double m_lar_eta_min
minimal Eta for LAr region
bool m_is_lar_em_endcap_outer
descriptor belongs to the outer wheel of EM end cap
double deta() const
delta eta
bool is_lar_fcal() const
descriptor belongs to FCAL
void set_depth_out(std::vector< double > &calo_depth)
set vector of out depths
void setLArRegMin(double reg_min)
Set LAr Region Eta Min.
double m_calo_r_max
maximal R (to be defined in the derived classes)
int n_phi() const
phi granularity
IdentifierHash caloCellMin() const
minimal hash identifier for calo cells in the region
std::vector< double > m_calo_depth_in
in depths
void setLArPhiMin(double phi_min)
Set LAr Region Phi Min.
double calo_eta_min() const
'ideal' geometry: eta minimal
int m_lar_n_eta
eta granularity (LAr)
int layer() const
get layer
double m_calo_phi_min
minimal Phi (to be defined in the derived classes)
const CaloCell_Base_ID * m_calo_helper
Calo Cell ID helper.
int n_calo_depth() const
number of calo depths
bool is_lar_em_endcap_inner() const
descriptor belongs to the inner wheel of EM end cap
double dphi() const
delta phi
void setCaloRMin(double r_min)
Set R Min.
void set_eta_phi_granularity(int neta, double deta, int nphi, double dphi)
Set Phi granularity.
double calo_z_min() const
'ideal' geometry: z minimal
bool is_in(double eta_min, double eta_max, double phi_min, double phi_max) const
check overlap with a given zone in eta and phi (for LAr only)
double m_calo_phi_max
maximal Phi (to be defined in the derived classes)
double calo_z_max() const
'ideal' geometry: z maximal
double m_lar_phi_min
minimal Phi for LAr region
bool is_lar_em_endcap_outer() const
descriptor belongs to the outer wheel of EM end cap
void setLArRegMax(double reg_max)
Set LAr Region Eta Max.
double calo_r_min() const
'ideal' geometry: r minimal
void set_transform(const Amg::Transform3D &transform)
Set the transformation matrix.
double reg_max() const
eta min and max once misaligned
double m_lar_reg_max
maximal Abs Eta for LAr region
std::vector< double > m_calo_depth_out
out depths
IdentifierHash subcalo_hash() const
get subcalo hash
IdentifierHash m_calocell_min
minimal hash id of region cells
int eta_channel(double eta) const
channel number for a given eta/phi (if outside returns -1).
double m_calo_eta_min
minimal Eta (to be defined in the derived classes)
double lar_phi_min() const
minimal Phi for LAr region
void setCaloZMax(double z_max)
Set Z Max.
virtual ~CaloDetDescriptor()
virtual detructor
double calo_r_max() const
'ideal' geometry: r maximal
double m_calo_z_max
maximal Z (to be defined in the derived classes)
bool get_disk_surface(Amg::Transform3D &htrans, double &z, double &rmin, double &rmax, double &hphisec, double &depth) const
(for Trk::Surface)
bool is_tile() const
descriptor belongs to Tile
CaloCell_ID::CaloSample m_calo_sampl
Calo Sample.
void set_n_calo_depth(int n_calo_depth)
set number of calo depths
bool get_cylinder_surface(Amg::Transform3D &htrans, double &radius, double &hphi, double &hlength, double &depth) const
this will be the closest radius of this region
CaloCell_ID::SUBCALO m_calo_num
Subcalo.
void setCaloZMin(double z_min)
Set Z Min.
double calo_eta_max() const
'ideal' geometry: eta maximal
double reg_min() const
eta min and max once misaligned
void setCaloPhiMin(double phi_min)
Set Phi Min.
int phi_channel(double phi) const
channel number for a given eta/phi (if outside returns -1) Should not be used for FCAL
void setCaloPhiMax(double phi_max)
Set Phi Max.
int m_n_calo_depth
number of depths
void setCaloRMax(double r_max)
Set R Max.
void get_depth_in(std::vector< double > &calo_depth) const
get vector of in depths
CaloCell_ID::CaloSample getSampling() const
get sampling returns the cached CaloSample, if the descriptor contains more than one sampling,...
bool is_lar_em_endcap() const
descriptor belongs to EM end cap
bool m_is_lar_hec
descriptor belongs to HEC
double m_lar_dphi
delta phi (LAr)
bool m_is_tile
descriptor belongs to Tile
bool m_is_lar_em_barrel
descriptor belongs to EM barrel
double calo_phi_min() const
'ideal' geometry: phi minimal
bool m_is_lar_em_endcap
descriptor belongs to EM end cap
Identifier m_id
Region identifier.
bool m_is_lar_em
descriptor belongs to EM calorimeter
IdentifierHash identifyHash() const override final
get hash identifier for the region
int calo_sign() const
'ideal' geometry: calo sign
Identifier identify() const override final
get region identifier
double m_lar_deta
delta eta (LAr)
double m_calo_z_min
minimal Z (to be defined in the derived classes)
bool m_is_lar_em_endcap_inner
descriptor belongs to the inner wheel of EM end cap
const CaloCell_Base_ID * get_calo_helper() const
get Calo Cell ID helper
Amg::Transform3D m_transform
misalignment transformation
const Amg::Transform3D & transform() const
Get the current transformation matrix.
IdentifierHash calo_hash() const
get calo hash
double lar_eta_min() const
minimal Eta for LAr region
void set_depth_in(std::vector< double > &calo_depth)
set vector of in depths
void setCaloEtaMin(double eta_min)
Set Eta Min.
void setLArEtaMin(double eta_min)
Set LAr Region Phi Max.
virtual void print() const
print the contents
int phi_channel_raw(double phi) const
channel number for a given eta/phi raw (if outside returns -1) Should not be used for FCAL
bool is_lar_hec() const
descriptor belongs to HEC
int eta_channel_raw(double eta) const
channel number for a given eta/phi raw (if outside returns -1).
const AtlasDetectorID * m_helper
Atlas Detector ID helper.
int m_etachan_min
minimal Eta channel number
int m_lar_n_phi
phi granularity (LAr)
void setCaloEtaMax(double eta_max)
Set Eta Max.
int n_eta() const
eta granularity
CaloCell_ID::SUBCALO getSubCalo() const
get subcalo
bool is_lar_em() const
descriptor belongs to EM calorimeter
double m_lar_reg_min
minimal Abs Eta for LAr region
bool m_is_lar_fcal
descriptor belongs to FCAL
void get_depth_out(std::vector< double > &calo_depth) const
get vector of out depths
double m_calo_r_min
minimal R (to be defined in the derived classes)
This class provides an abstract interface to an Identifiable object.
This is a "hash" representation of an Identifier.
std::string depth
tag string for intendation
Definition fastadd.cxx:46
Definition of ATLAS Math & Geometry primitives (Amg)
Eigen::Affine3d Transform3D
-event-from-file
STL namespace.
#define private