ATLAS Offline Software
LArIdTranslatorHelper.h
Go to the documentation of this file.
1 /*
2  Copyright (C) 2002-2024 CERN for the benefit of the ATLAS collaboration
3 */
4 
9 #ifndef LArSamples_LArIdTranslatorHelper_H
10 #define LArSamples_LArIdTranslatorHelper_H
11 
12 
13 #include <vector>
14 #include <cstdlib>
15 #include <string>
16 #include <memory>
17 #include "RtypesCore.h" //ROOT data types, Int_t etc
19 
20 class TString;
21 class TCanvas;
22 class TH1;
23 class TH2;
24 class TTree;
25 class TFile;
26 class TH2I;
27 
28 
30 {
31  public:
32 
33  LArIdTranslatorHelper(const TString& inputfile);
35 
36  // variables
37  Int_t bec,side,ft,sl,ch,sa,part;
38  Float_t eta,phi,x,y,z;
39  ULong64_t onlid,offlid,ttid;
40  std::vector<int>* hvid;
41  Long_t entry;
42  Int_t binetadqm,binphidqm1,binphidqm2;
43 
44  // functions
45  int GetPartitionLayerIndex(const int partition, const int layer) const;
46  bool FindChannel(const int index, float eta, float phi);
47  bool LoadIdTranslator(const TString& file);
48 
49  bool IsInitialized(){ return m_kInitialized; }
50  TCanvas* CaloPartitionLayerDisplay(TH1** h,const Char_t* title="",bool kLogz=true);
51  TH2* GetCaloPartitionLayerMap(const int index,bool kProfile=false);
52  const Char_t* GetPartitonLayerName(const int index);
53  void MakeTranslatorMapping(const char* inputtreefile,const char* inputhistfile,const int run);
54  bool IsHVLine(const int hvline) const;
55 
56  Int_t GetNpl(){ return m_nPartitionLayers; }
57 
58  TTree* Tree() { return m_tree; }
59 
60  private:
61 
63  TTree* m_tree;
64  TFile* m_file;
65  Int_t m_ntotal,m_extrabins;
66 
67  Int_t m_canvas_counts,m_clonemap_counts;
68  Char_t m_namebuf[128]{};
69 
70  Int_t m_nPartitionLayers; // number of partition layers (nominally 30, from CaloCell monitoring)
71  std::vector<std::string> m_PartitionLayers;
72  Int_t m_nHistCategories; // categories used for mapping performances
73  std::vector<std::string> m_HistCategories;
74  std::vector<std::vector<std::unique_ptr<TH2I> > > m_HistCellmaps; // mapping histograms loaded from input rootfile
75 };
76 
77 #endif
78 
LArG4FSStartPointFilter.part
part
Definition: LArG4FSStartPointFilter.py:21
LArIdTranslatorHelper::binphidqm2
Int_t binphidqm2
Definition: LArIdTranslatorHelper.h:42
sendEI_SPB.ch
ch
Definition: sendEI_SPB.py:35
PlotCalibFromCool.ft
ft
Definition: PlotCalibFromCool.py:329
phi
Scalar phi() const
phi method
Definition: AmgMatrixBasePlugin.h:67
LArIdTranslatorHelper::m_clonemap_counts
Int_t m_clonemap_counts
Definition: LArIdTranslatorHelper.h:67
ParticleGun_SamplingFraction.bec
int bec
Definition: ParticleGun_SamplingFraction.py:89
ATLAS_NOT_THREAD_SAFE
#define ATLAS_NOT_THREAD_SAFE
getNoisyStrip() Find noisy strips from hitmaps and write out into xml/db formats
Definition: checker_macros.h:212
eta
Scalar eta() const
pseudorapidity method
Definition: AmgMatrixBasePlugin.h:83
index
Definition: index.py:1
LArIdTranslatorHelper::m_HistCellmaps
std::vector< std::vector< std::unique_ptr< TH2I > > > m_HistCellmaps
Definition: LArIdTranslatorHelper.h:74
LArIdTranslatorHelper::m_tree
TTree * m_tree
Definition: LArIdTranslatorHelper.h:63
LArIdTranslatorHelper::hvid
std::vector< int > * hvid
Definition: LArIdTranslatorHelper.h:40
LArIdTranslatorHelper::m_kInitialized
bool m_kInitialized
Definition: LArIdTranslatorHelper.h:62
x
#define x
TRT::Hit::side
@ side
Definition: HitInfo.h:83
dumpHVPathFromNtuple.hvline
hvline
Definition: dumpHVPathFromNtuple.py:72
LArIdTranslatorHelper
Definition: LArIdTranslatorHelper.h:30
TRT::Hit::layer
@ layer
Definition: HitInfo.h:79
LArIdTranslatorHelper::m_nHistCategories
Int_t m_nHistCategories
Definition: LArIdTranslatorHelper.h:72
covarianceTool.title
title
Definition: covarianceTool.py:542
file
TFile * file
Definition: tile_monitor.h:29
LArIdTranslatorHelper::m_PartitionLayers
std::vector< std::string > m_PartitionLayers
Definition: LArIdTranslatorHelper.h:71
run
Definition: run.py:1
LArIdTranslatorHelper::entry
Long_t entry
Definition: LArIdTranslatorHelper.h:41
LArIdTranslatorHelper::m_file
TFile * m_file
Definition: LArIdTranslatorHelper.h:64
LArIdTranslatorHelper::m_nPartitionLayers
Int_t m_nPartitionLayers
Definition: LArIdTranslatorHelper.h:70
LArIdTranslatorHelper::z
Float_t z
Definition: LArIdTranslatorHelper.h:38
LArIdTranslatorHelper::GetNpl
Int_t GetNpl()
Definition: LArIdTranslatorHelper.h:56
LArIdTranslatorHelper::IsInitialized
bool IsInitialized()
Definition: LArIdTranslatorHelper.h:49
LArIdTranslatorHelper::Tree
TTree * Tree()
Definition: LArIdTranslatorHelper.h:58
LArIdTranslatorHelper::m_ntotal
Int_t m_ntotal
Definition: LArIdTranslatorHelper.h:65
LArIdTranslatorHelper::ttid
ULong64_t ttid
Definition: LArIdTranslatorHelper.h:39
y
#define y
h
FullCPAlgorithmsTest_CA.inputfile
dictionary inputfile
Definition: FullCPAlgorithmsTest_CA.py:62
StateLessPT_NewConfig.partition
partition
Definition: StateLessPT_NewConfig.py:49
LArIdTranslatorHelper::sl
Int_t sl
Definition: LArIdTranslatorHelper.h:37
LArIdTranslatorHelper::m_HistCategories
std::vector< std::string > m_HistCategories
Definition: LArIdTranslatorHelper.h:73
checker_macros.h
Define macros for attributes used to control the static checker.