ATLAS Offline Software
Geometry.h
Go to the documentation of this file.
1 /*
2  Copyright (C) 2002-2017 CERN for the benefit of the ATLAS collaboration
3 */
4 
10 #ifndef LArGeo_H
11 #define LArGeo_H
12 
13 #include "TString.h"
14 #include "TArrayD.h"
15 #include "LArCafJobs/CaloId.h"
16 #include <vector>
17 
18 class TH2;
19 class TH2D;
20 class TProfile2D;
21 
22 namespace LArSamples {
23 
24  class Geo {
25 
26  public:
27 
28  static TString feedThroughName(PartitionId part, short feedThrough);
29  static TH2D* partitionHist(PartitionId part, const TString& name, const TString& title);
30  static TProfile2D* partitionProfileHist(PartitionId part, const TString& name, const TString& title);
31  static bool setBinLabels(TH2* hist, PartitionId part);
32  static short nFeedThroughs(PartitionId part);
33  static short nSlots(PartitionId part);
34  static short nPartitionChannels(PartitionId part);
35  static short nFEBs(PartitionId part) { return nFeedThroughs(part)*nSlots(part); }
36  static short nFEBs();
37  static short nPhiRings();
38 
39  static short firstLayer(CaloId calo);
40  static short nLayers(CaloId calo);
41  static short nRegions(CaloId calo, short layer);
42  static short firstEta(CaloId calo, short layer, short region = 0);
43  static short nEta(CaloId calo, short layer, short region, short iPhi = 1); // max is 31, which is reached for iPhi=1 but not 0
44  static short nEta(CaloId calo, short layer);
45  static short nPhi(CaloId calo, short layer, short region = 0);
46 
47  static double etaSize(CaloId calo, short layer, short region, short iEta = -1); // default (-1) is the "nominal" size
48  static double phiSize(CaloId calo, short layer, short region, short iPhi = -1); // default (-1) is the "nominal" size
49  static double etaMin(CaloId calo, short layer, short region = -1);
50  static double etaMax(CaloId calo, short layer, short region = -1);
51  static double phiMin(CaloId calo, short layer, short region = -1);
52  static double eta(CaloId calo, short layer, short region, short iEta);
53  static double phi(CaloId calo, short layer, short region, short iPhi);
54 
55  static double etaCenter(CaloId calo, short layer, short region, short iEta);
56  static double phiCenter(CaloId calo, short layer, short region, short iPhi);
57  static double etaHigh(CaloId calo, short layer, short region, short iEta);
58  static double phiHigh(CaloId calo, short layer, short region, short iPhi);
59 
60  static short etaIndex(CaloId calo, short layer, short region, short iEta);
61  static TArrayD etaBins(CaloId calo, short layer);
62  static TH2D* etaPhiHist(CaloId calo, short layer, const TString& name, const TString& title);
63 
64  static int nChannels(CaloId calo, short layer, short region);
65  static int nChannels(CaloId calo, short layer);
66  static int nChannels(CaloId calo);
67 
68  static TArrayD merge(const std::vector<TArrayD*>& arrays);
69  static TArrayD mirror(const TArrayD& bins);
70  static TArrayD remove(const TArrayD& bins, int index);
71  };
72 }
73 
74 #endif
LArG4FSStartPointFilter.part
part
Definition: LArG4FSStartPointFilter.py:21
LArSamples::Geo::phiSize
static double phiSize(CaloId calo, short layer, short region, short iPhi=-1)
Definition: Geometry.cxx:344
CaloId.h
LArSamples::Geo::etaPhiHist
static TH2D * etaPhiHist(CaloId calo, short layer, const TString &name, const TString &title)
Definition: Geometry.cxx:549
LArSamples::Geo::nFEBs
static short nFEBs()
Definition: Geometry.cxx:69
python.App.bins
bins
Definition: App.py:410
LArSamples::Geo::merge
static TArrayD merge(const std::vector< TArrayD * > &arrays)
Definition: Geometry.cxx:701
index
Definition: index.py:1
LArSamples::Geo::setBinLabels
static bool setBinLabels(TH2 *hist, PartitionId part)
Definition: Geometry.cxx:34
plotmaker.hist
hist
Definition: plotmaker.py:148
LArSamples::Geo::nRegions
static short nRegions(CaloId calo, short layer)
Definition: Geometry.cxx:124
TProfile2D
Definition: rootspy.cxx:531
LArSamples::Geo::phiCenter
static double phiCenter(CaloId calo, short layer, short region, short iPhi)
Definition: Geometry.cxx:569
LArSamples
Definition: AbsShape.h:24
LArSamples::Geo::phiHigh
static double phiHigh(CaloId calo, short layer, short region, short iPhi)
Definition: Geometry.cxx:581
LArSamples::Geo::phi
static double phi(CaloId calo, short layer, short region, short iPhi)
Definition: Geometry.cxx:457
LArSamples::Geo::nSlots
static short nSlots(PartitionId part)
Definition: Geometry.cxx:59
LArSamples::Geo::etaMin
static double etaMin(CaloId calo, short layer, short region=-1)
Definition: Geometry.cxx:355
LArSamples::Geo::etaSize
static double etaSize(CaloId calo, short layer, short region, short iEta=-1)
Definition: Geometry.cxx:264
LArSamples::Geo::etaIndex
static short etaIndex(CaloId calo, short layer, short region, short iEta)
Definition: Geometry.cxx:465
LArSamples::Geo::nPhi
static short nPhi(CaloId calo, short layer, short region=0)
Definition: Geometry.cxx:228
LArSamples::Geo::nPartitionChannels
static short nPartitionChannels(PartitionId part)
Definition: Geometry.cxx:98
TRT::Hit::layer
@ layer
Definition: HitInfo.h:79
covarianceTool.title
title
Definition: covarianceTool.py:542
LArSamples::PartitionId
PartitionId
Definition: CaloId.h:29
TH2D
Definition: rootspy.cxx:430
TH2
Definition: rootspy.cxx:373
LArSamples::Geo::nLayers
static short nLayers(CaloId calo)
Definition: Geometry.cxx:114
LArSamples::Geo::partitionHist
static TH2D * partitionHist(PartitionId part, const TString &name, const TString &title)
Definition: Geometry.cxx:18
LArSamples::Geo::partitionProfileHist
static TProfile2D * partitionProfileHist(PartitionId part, const TString &name, const TString &title)
Definition: Geometry.cxx:26
LArSamples::Geo::eta
static double eta(CaloId calo, short layer, short region, short iEta)
Definition: Geometry.cxx:442
LArSamples::Geo::phiMin
static double phiMin(CaloId calo, short layer, short region=-1)
Definition: Geometry.cxx:450
LArSamples::Geo::firstLayer
static short firstLayer(CaloId calo)
Definition: Geometry.cxx:104
LArSamples::Geo::etaCenter
static double etaCenter(CaloId calo, short layer, short region, short iEta)
Definition: Geometry.cxx:563
name
std::string name
Definition: Control/AthContainers/Root/debug.cxx:195
LArSamples::Geo::etaMax
static double etaMax(CaloId calo, short layer, short region=-1)
Definition: Geometry.cxx:397
LArSamples::Geo::mirror
static TArrayD mirror(const TArrayD &bins)
Definition: Geometry.cxx:721
LArSamples::CaloId
CaloId
Definition: CaloId.h:21
Trk::iPhi
@ iPhi
Definition: ParamDefs.h:53
LArSamples::Geo::nFEBs
static short nFEBs(PartitionId part)
Definition: Geometry.h:35
LArSamples::Geo::nFeedThroughs
static short nFeedThroughs(PartitionId part)
Definition: Geometry.cxx:49
LArSamples::Geo::etaHigh
static double etaHigh(CaloId calo, short layer, short region, short iEta)
Definition: Geometry.cxx:575
LArSamples::Geo::nEta
static short nEta(CaloId calo, short layer, short region, short iPhi=1)
Definition: Geometry.cxx:169
LArSamples::Geo::remove
static TArrayD remove(const TArrayD &bins, int index)
Definition: Geometry.cxx:730
LArSamples::Geo::nChannels
static int nChannels(CaloId calo, short layer, short region)
Definition: Geometry.cxx:587
LArSamples::Geo::etaBins
static TArrayD etaBins(CaloId calo, short layer)
Definition: Geometry.cxx:482
LArSamples::Geo
Definition: Geometry.h:24
xAOD::iEta
setScale setgFexType iEta
Definition: gFexJetRoI_v1.cxx:74
LArSamples::Geo::nPhiRings
static short nPhiRings()
Definition: Geometry.cxx:84
LArSamples::Geo::firstEta
static short firstEta(CaloId calo, short layer, short region=0)
Definition: Geometry.cxx:146
LArSamples::Geo::feedThroughName
static TString feedThroughName(PartitionId part, short feedThrough)
Definition: Geometry.cxx:622