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