Loading [MathJax]/extensions/tex2jax.js
ATLAS Offline Software
All Classes Namespaces Files Functions Variables Typedefs Enumerations Enumerator Properties Friends Macros Modules Pages
TreeShapeErrorGetter.h
Go to the documentation of this file.
1 /*
2  Copyright (C) 2002-2024 CERN for the benefit of the ATLAS collaboration
3 */
4 
10 #ifndef LArSamples_TreeShapeErrorGetter_H
11 #define LArSamples_TreeShapeErrorGetter_H
12 
14 
15 
16 #include <vector>
18 
19 class TH2D;
20 class TFile;
21 class TTree;
22 class TString;
23 
24 namespace LArSamples {
25 
26  class ShapeErrorData;
27  class ResidualCalculator;
28  class Interface;
29 
31 
32  public:
33 
34  TreeShapeErrorGetter(const TString& fileName, bool recreate = false);
35  virtual ~TreeShapeErrorGetter();
36 
37  ShapeErrorData* shapeErrorData(unsigned int hash, CaloGain::CaloGain gain, const Residual* toExclude = 0) const;
38  ShapeErrorData* phiSymShapeErrorData(short ring, CaloGain::CaloGain gain, const Residual* toExclude = 0) const;
39 
40  int addCell(const ResidualCalculator& calc, CaloGain::CaloGain gain);
41  int addRing(const ResidualCalculator& calc, CaloGain::CaloGain gain);
42 
43  void dump(CaloGain::CaloGain gain) const;
44  TH2D* correlate(const TreeShapeErrorGetter& other, CaloGain::CaloGain gain, unsigned short sample, bool xip,
45  unsigned int nBins, double xMin, double xMax) const;
46 
47  bool compare(const TreeShapeErrorGetter& other, const TString& fileName, const Interface* tmpl = 0) const;
48 
49  const ResidualCalculator* cellCalc() const { return m_cellCalc; }
50  const ResidualCalculator* ringCalc() const { return m_ringCalc; }
51 
52  TTree* cellTree(CaloGain::CaloGain gain) const;
53  TTree* ringTree(CaloGain::CaloGain gain) const;
54 
55  static bool merge(const TString& listFile, const TString& outputFile);
56  static bool merge(const std::vector<const TreeShapeErrorGetter*>& getters, const TString& outputFile);
57 
58  TFile* file() const { return m_file; }
59 
60  private:
61 
62  TFile* m_file;
63  std::vector<TTree*> m_cellTrees;
64  std::vector<TTree*> m_ringTrees;
65  mutable ResidualCalculator* m_cellCalc, *m_ringCalc;
66  };
67 }
68 #endif
LArSamples::TreeShapeErrorGetter::m_ringTrees
std::vector< TTree * > m_ringTrees
Definition: TreeShapeErrorGetter.h:64
Amg::compare
std::pair< int, int > compare(const AmgSymMatrix(N) &m1, const AmgSymMatrix(N) &m2, double precision=1e-9, bool relative=false)
compare two matrices, returns the indices of the first element that fails the condition,...
Definition: EventPrimitivesHelpers.h:109
AbsShapeErrorGetter.h
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
CaloCondBlobAlgs_fillNoiseFromASCII.gain
gain
Definition: CaloCondBlobAlgs_fillNoiseFromASCII.py:110
Interface
LArSamples::TreeShapeErrorGetter::m_file
TFile * m_file
Definition: TreeShapeErrorGetter.h:62
LArSamples
Definition: AbsShape.h:24
LArSamples::ResidualCalculator
Definition: LArCalorimeter/LArSamplesMon/LArSamplesMon/Residual.h:101
LArSamples::AbsShapeErrorGetter
Definition: AbsShapeErrorGetter.h:23
run_Egamma1_LArStrip_Fex.dump
dump
Definition: run_Egamma1_LArStrip_Fex.py:88
m_file
std::unique_ptr< TFile > m_file
description: this is a custom writer for the old-school drivers that don't use an actual writer
Definition: OutputStreamData.cxx:52
LArSamples::TreeShapeErrorGetter::cellCalc
const ResidualCalculator * cellCalc() const
Definition: TreeShapeErrorGetter.h:49
compareGeometries.outputFile
string outputFile
Definition: compareGeometries.py:25
FortranAlgorithmOptions.fileName
fileName
Definition: FortranAlgorithmOptions.py:13
FullCPAlgorithmsTest_eljob.sample
sample
Definition: FullCPAlgorithmsTest_eljob.py:116
ShapeErrorData
Liquid Argon class for standalone storage of cell shape information.
LArSamples::TreeShapeErrorGetter::m_ringCalc
ResidualCalculator * m_ringCalc
Definition: TreeShapeErrorGetter.h:65
LArSamples::Residual
storage of a pulse shape residual set
Definition: LArCalorimeter/LArSamplesMon/LArSamplesMon/Residual.h:29
dumpTgcDigiJitter.nBins
list nBins
Definition: dumpTgcDigiJitter.py:29
LArSamples::TreeShapeErrorGetter::file
TFile * file() const
Definition: TreeShapeErrorGetter.h:58
LArSamples::TreeShapeErrorGetter
Definition: TreeShapeErrorGetter.h:30
LArSamples::TreeShapeErrorGetter::m_cellTrees
std::vector< TTree * > m_cellTrees
Definition: TreeShapeErrorGetter.h:63
CaloGain::CaloGain
CaloGain
Definition: CaloGain.h:11
InDetDD::other
@ other
Definition: InDetDD_Defs.h:16
CaloCondBlobAlgs_fillNoiseFromASCII.hash
dictionary hash
Definition: CaloCondBlobAlgs_fillNoiseFromASCII.py:109
python.utility.LHE.merge
def merge(input_file_pattern, output_file)
Merge many input LHE files into a single output file.
Definition: LHE.py:29
LArSamples::Interface
Definition: Interface.h:36
LArSamples::ShapeErrorData
Definition: ShapeErrorData.h:19
checker_macros.h
Define macros for attributes used to control the static checker.
beamspotnt.calc
calc
Definition: bin/beamspotnt.py:1252
LArSamples::TreeShapeErrorGetter::ringCalc
const ResidualCalculator * ringCalc() const
Definition: TreeShapeErrorGetter.h:50