ATLAS Offline Software
Loading...
Searching...
No Matches
LArIdTranslatorHelper.h
Go to the documentation of this file.
1/*
2 Copyright (C) 2002-2026 CERN for the benefit of the ATLAS collaboration
3*/
4
8
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
20class TString;
21class TCanvas;
22class TH1;
23class TH2;
24class TTree;
25class TFile;
26class TH2I;
27
28
30{
31 public:
32
33 LArIdTranslatorHelper(const TString& inputfile);
35 LArIdTranslatorHelper& operator = (const LArIdTranslatorHelper&) = delete;
37
38 // variables
40 Float_t eta,phi,x,y,z;
41 ULong64_t onlid,offlid,ttid;
42 std::vector<int>* hvid;
43 Long_t entry;
45
46 // functions
47 int GetPartitionLayerIndex(const int partition, const int layer) const;
48 bool FindChannel(const int index, float eta, float phi);
49 bool LoadIdTranslator(const TString& file);
50
51 bool IsInitialized(){ return m_kInitialized; }
52 std::unique_ptr<TCanvas> CaloPartitionLayerDisplay(TH2** h,const Char_t* title="",bool kLogz=true);
53 std::unique_ptr<TH2> GetCaloPartitionLayerMap(const int index,bool kProfile=false);
54 const Char_t* GetPartitonLayerName(const int index);
55 void MakeTranslatorMapping(const char* inputtreefile,const char* inputhistfile,const int run);
56 bool IsHVLine(const int hvline) const;
57
58 Int_t GetNpl(){ return m_nPartitionLayers; }
59
60 TTree* Tree() { return m_tree; }
61
62 private:
63
65 TTree* m_tree;
66 std::unique_ptr<TFile> m_file;
68
70 Char_t m_namebuf[128]{};
71
72 Int_t m_nPartitionLayers; // number of partition layers (nominally 30, from CaloCell monitoring)
73 std::vector<std::string> m_PartitionLayers;
74 Int_t m_nHistCategories; // categories used for mapping performances
75 std::vector<std::string> m_HistCategories;
76 std::vector<std::vector<TH2I*> > m_HistCellmaps; // mapping histograms loaded from input rootfile
77};
78
79#endif
80
Define macros for attributes used to control the static checker.
#define ATLAS_NOT_THREAD_SAFE
getNoisyStrip() Find noisy strips from hitmaps and write out into xml/db formats
Header file for AthHistogramAlgorithm.
LArIdTranslatorHelper(const TString &inputfile)
LArIdTranslatorHelper(const LArIdTranslatorHelper &)=delete
std::vector< std::string > m_HistCategories
bool LoadIdTranslator(const TString &file)
int GetPartitionLayerIndex(const int partition, const int layer) const
std::vector< int > * hvid
std::vector< std::string > m_PartitionLayers
std::unique_ptr< TFile > m_file
std::vector< std::vector< TH2I * > > m_HistCellmaps
bool FindChannel(const int index, float eta, float phi)
Definition index.py:1
TFile * file
int run(int argc, char *argv[])