ATLAS Offline Software
Loading...
Searching...
No Matches
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
9
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
18class TH2;
19class TH2D;
20class TProfile2D;
21
22namespace LArSamples {
23
24 class Geo {
25
26 public:
27
28 static const char* 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
Scalar eta() const
pseudorapidity method
Scalar phi() const
phi method
static const std::vector< std::string > bins
static short firstEta(CaloId calo, short layer, short region=0)
Definition Geometry.cxx:146
static short nFEBs(PartitionId part)
Definition Geometry.h:35
static bool setBinLabels(TH2 *hist, PartitionId part)
Definition Geometry.cxx:34
static short firstLayer(CaloId calo)
Definition Geometry.cxx:104
static double phiCenter(CaloId calo, short layer, short region, short iPhi)
Definition Geometry.cxx:569
static short nEta(CaloId calo, short layer, short region, short iPhi=1)
Definition Geometry.cxx:169
static double phiMin(CaloId calo, short layer, short region=-1)
Definition Geometry.cxx:450
static double etaCenter(CaloId calo, short layer, short region, short iEta)
Definition Geometry.cxx:563
static double etaHigh(CaloId calo, short layer, short region, short iEta)
Definition Geometry.cxx:575
static TH2D * etaPhiHist(CaloId calo, short layer, const TString &name, const TString &title)
Definition Geometry.cxx:549
static double phiSize(CaloId calo, short layer, short region, short iPhi=-1)
Definition Geometry.cxx:344
static short nLayers(CaloId calo)
Definition Geometry.cxx:114
static int nChannels(CaloId calo, short layer, short region)
Definition Geometry.cxx:587
static short nRegions(CaloId calo, short layer)
Definition Geometry.cxx:124
static TProfile2D * partitionProfileHist(PartitionId part, const TString &name, const TString &title)
Definition Geometry.cxx:26
static short nSlots(PartitionId part)
Definition Geometry.cxx:59
static double etaSize(CaloId calo, short layer, short region, short iEta=-1)
Definition Geometry.cxx:264
static double etaMax(CaloId calo, short layer, short region=-1)
Definition Geometry.cxx:397
static TArrayD mirror(const TArrayD &bins)
Definition Geometry.cxx:710
static short nPartitionChannels(PartitionId part)
Definition Geometry.cxx:98
static TArrayD etaBins(CaloId calo, short layer)
Definition Geometry.cxx:482
static const char * feedThroughName(PartitionId part, short feedThrough)
Definition Geometry.cxx:622
static short etaIndex(CaloId calo, short layer, short region, short iEta)
Definition Geometry.cxx:465
static TArrayD remove(const TArrayD &bins, int index)
Definition Geometry.cxx:719
static double etaMin(CaloId calo, short layer, short region=-1)
Definition Geometry.cxx:355
static short nFeedThroughs(PartitionId part)
Definition Geometry.cxx:49
static short nFEBs()
Definition Geometry.cxx:69
static TH2D * partitionHist(PartitionId part, const TString &name, const TString &title)
Definition Geometry.cxx:18
static short nPhi(CaloId calo, short layer, short region=0)
Definition Geometry.cxx:228
static double phiHigh(CaloId calo, short layer, short region, short iPhi)
Definition Geometry.cxx:581
static short nPhiRings()
Definition Geometry.cxx:84
Definition index.py:1
Definition merge.py:1