Loading [MathJax]/jax/input/TeX/config.js
ATLAS Offline Software
All Classes Namespaces Files Functions Variables Typedefs Enumerations Enumerator Properties Friends Macros Modules Pages
LArPulseShape.h
Go to the documentation of this file.
1 /*
2  Copyright (C) 2002-2025 CERN for the benefit of the ATLAS collaboration
3 */
4 
5 #ifndef LARPULSESHAPE_H
6 #define LARPULSESHAPE_H
7 
9 #include "GaudiKernel/NTuple.h"
10 
13 
15 #include <iostream>
16 #include "TProfile.h"
17 #include "TH1.h"
18 
25 
26 class HWIdentifier;
27 class LArOnlineID_Base;
28 class StoreGateSvc;
29 class LArEM_Base_ID;
30 class LArHEC_Base_ID;
31 class LArFCAL_Base_ID;
32 class CaloCell_ID;
33 
34 namespace Trig{
35  class TrigDecisionTool;
36 }
37 
38 class LArPulseShape : public AthAlgorithm {
39 
40  public:
41  LArPulseShape(const std::string & name, ISvcLocator * pSvcLocator);
43 
44  //Standard algo methods
45  virtual StatusCode initialize() override;
46  virtual StatusCode execute() override;
47  //Finalize needs to be implemented by the deriving class
48  virtual StatusCode stop() override;
49 
50  std::map<std::string, TProfile*>::const_iterator TEffbegin() const { return m_effhistos.begin(); }
51  std::map<std::string, TProfile*>::const_iterator TEffend() const { return m_effhistos.end(); }
52  std::map<int, TProfile*>::const_iterator TCellbegin() const { return m_cellHistos.begin(); }
53  std::map<int, TProfile*>::const_iterator TCellend() const { return m_cellHistos.end(); }
54 
55  std::map<std::string, TH1*>::const_iterator THbegin() const { return m_histos.begin(); }
56  std::map<std::string, TH1*>::const_iterator THend() const { return m_histos.end(); }
57 
58  private:
60  std::string m_ntname;
61  std::string m_folder;
63  NTuple::Item<short> m_peakSample;
64  NTuple::Item<short> m_useHgIntercept;
65  NTuple::Item<short> m_useMgIntercept;
66  NTuple::Item<short> m_useLgIntercept;
67  int m_OffId = 0;
68  int m_OffId_conv = 0;
69  int m_isample = 0;
70  int m_mindist = 0;
71  int m_closestBC = 0;
72 
73  PublicToolHandle<Trig::TrigDecisionTool>m_trigDec{this, "TrigDecisionTool", "", "Handle to the TrigDecisionTool"};
74 
75  SG::ReadCondHandleKey<LuminosityCondData> m_lumiDataKey{this,"LumiKey", "LuminosityCondData","SG Key of LuminosityCondData object"};
76  SG::ReadCondHandleKey<LArOnOffIdMapping> m_cablingKey{this,"CablingKey","LArOnOffIdMap","SG Key of LArOnOffIdMapping object"};
77  SG::ReadCondHandleKey<LArBadChannelCont> m_BCKey{this, "BadChanKey", "LArBadChannel", "SG bad channels key"};
78 
79  const ILArPedestal* m_larPedestal = nullptr;
80 
81  std::map<std::string, TProfile*> m_effhistos;
82  std::map<int, TProfile*> m_cellHistos;
84  std::map<std::string, TH1*> m_histos;
85  TH1D* m_BCID = nullptr;
86  TH1D* m_diffBCID = nullptr;
87  TH1D* m_actualInt = nullptr;
88  void addHistogram( TH1* h ) {
89  std::string name = h->GetName();
90  m_histos.insert( std::map<std::string, TH1*>::value_type( name, h) );
91  }
92  void addHistogram( TProfile* h ) {
93  std::string name = h->GetName();
94  m_effhistos.insert( std::map<std::string, TProfile*>::value_type( name, h) );
95  }
96 
97  protected:
98  bool m_addBC = false, m_addFEBTemp = false;
99  enum {NOT_VALID = -999};
100 
101  std::string m_ntpath, m_ntTitle;
102 
103  //Ntuple pointer
104  NTuple::Tuple* m_nt;
105 
106  //Ntuple variables:
108  NTuple::Item<long> m_pos_neg, m_barrel_ec, m_FT, m_slot, m_channel;
109  NTuple::Item<long> m_calibLine,m_badChanWord;
110  NTuple::Item<long> m_isConnected;
111  NTuple::Item<long> m_chanHash, m_febHash, m_oflHash;
112 
113  NTuple::Item<float> m_FEBTemp1, m_FEBTemp2;
114 
115 
116  const LArEM_Base_ID* m_emId = nullptr;
117  const LArHEC_Base_ID* m_hecId = nullptr;
118  const LArFCAL_Base_ID* m_fcalId = nullptr;
119  const LArOnlineID_Base* m_onlineId = nullptr;
120  const CaloCell_ID* m_caloId = nullptr;
121 
122  bool m_isSC = false;
123  bool m_isFlat = false;
124 
125  bool m_addHash = false;
126 
127 };
128 #endif
LArPulseShape::TEffend
std::map< std::string, TProfile * >::const_iterator TEffend() const
Definition: LArPulseShape.h:51
LArPulseShape::m_initialized
bool m_initialized
Definition: LArPulseShape.h:59
LArFCAL_Base_ID
Definition: LArFCAL_Base_ID.h:19
LArPulseShape::m_chanHash
NTuple::Item< long > m_chanHash
Definition: LArPulseShape.h:111
LArPulseShape::m_useMgIntercept
NTuple::Item< short > m_useMgIntercept
Definition: LArPulseShape.h:65
LArCond2NtupleBase.h
LArPulseShape::m_oflHash
NTuple::Item< long > m_oflHash
Definition: LArPulseShape.h:111
LArPulseShape::m_emId
const LArEM_Base_ID * m_emId
Definition: LArPulseShape.h:116
LArPulseShape::m_hecId
const LArHEC_Base_ID * m_hecId
Definition: LArPulseShape.h:117
LArPulseShape::m_isConnected
NTuple::Item< long > m_isConnected
Definition: LArPulseShape.h:110
Trig
The common trigger namespace for trigger analysis tools.
Definition: LArCellMonAlg.h:33
LArHEC_Base_ID
This class factors out code common between LArEM_ID and LArEM_SuperCell_ID.
Definition: LArHEC_Base_ID.h:44
LArEM_Base_ID
This class factors out code common between LArEM_ID and LArEM_SuperCell_ID.
Definition: LArEM_Base_ID.h:38
LArPulseShape::m_isFlat
bool m_isFlat
Definition: LArPulseShape.h:123
LArPulseShape::m_fcalId
const LArFCAL_Base_ID * m_fcalId
Definition: LArPulseShape.h:118
ILArPedestal
Definition: ILArPedestal.h:12
LArPulseShape::m_useLgIntercept
NTuple::Item< short > m_useLgIntercept
Definition: LArPulseShape.h:66
LArPulseShape::m_febHash
NTuple::Item< long > m_febHash
Definition: LArPulseShape.h:111
LArPulseShape::m_FT
NTuple::Item< long > m_FT
Definition: LArPulseShape.h:108
LArPulseShape::m_onlChanId
NTuple::Item< long > m_onlChanId
Definition: LArPulseShape.h:107
LArPulseShape::m_TProfpulse_diff
TProfile * m_TProfpulse_diff
Definition: LArPulseShape.h:83
LArPulseShape::m_lumiDataKey
SG::ReadCondHandleKey< LuminosityCondData > m_lumiDataKey
Definition: LArPulseShape.h:75
LArPulseShape::TEffbegin
std::map< std::string, TProfile * >::const_iterator TEffbegin() const
Definition: LArPulseShape.h:50
LArPulseShape::m_region
NTuple::Item< long > m_region
Definition: LArPulseShape.h:107
LArPulseShape::THbegin
std::map< std::string, TH1 * >::const_iterator THbegin() const
Definition: LArPulseShape.h:55
LArPulseShape::stop
virtual StatusCode stop() override
Definition: LArPulseShape.cxx:463
LArPulseShape::NOT_VALID
@ NOT_VALID
Definition: LArPulseShape.h:99
HWIdentifier
Definition: HWIdentifier.h:13
LArPulseShape::m_closestBC
int m_closestBC
Definition: LArPulseShape.h:71
LArPulseShape::m_actualInt
TH1D * m_actualInt
Definition: LArPulseShape.h:87
LArPulseShape::m_channel
NTuple::Item< long > m_channel
Definition: LArPulseShape.h:108
LArPulseShape::m_diffBCID
TH1D * m_diffBCID
Definition: LArPulseShape.h:86
LArPulseShape::execute
virtual StatusCode execute() override
Definition: LArPulseShape.cxx:383
LArPulseShape::m_pos_neg
NTuple::Item< long > m_pos_neg
Definition: LArPulseShape.h:108
CaloCell_ID.h
LArPulseShape::m_calo_id
const CaloCell_ID * m_calo_id
Definition: LArPulseShape.h:62
LArPulseShape::m_addFEBTemp
bool m_addFEBTemp
Definition: LArPulseShape.h:98
LArPulseShape::addHistogram
void addHistogram(TProfile *h)
Definition: LArPulseShape.h:92
LArPulseShape::m_oflChanId
NTuple::Item< long > m_oflChanId
Definition: LArPulseShape.h:107
AthAlgorithm.h
LArBadChannelCont.h
LArPulseShape::addHistogram
void addHistogram(TH1 *h)
Definition: LArPulseShape.h:88
StoreGateSvc
The Athena Transient Store API.
Definition: StoreGateSvc.h:124
LArPulseShape::m_badChanWord
NTuple::Item< long > m_badChanWord
Definition: LArPulseShape.h:109
LArPulseShape::m_FEBTemp1
NTuple::Item< float > m_FEBTemp1
Definition: LArPulseShape.h:113
LArPulseShape::m_useHgIntercept
NTuple::Item< short > m_useHgIntercept
Definition: LArPulseShape.h:64
LArOnOffIdMapping.h
LArPulseShape::m_mindist
int m_mindist
Definition: LArPulseShape.h:70
LArPulseShape::m_ntTitle
std::string m_ntTitle
Definition: LArPulseShape.h:101
LArPulseShape
Definition: LArPulseShape.h:38
LArPulseShape::m_onlineId
const LArOnlineID_Base * m_onlineId
Definition: LArPulseShape.h:119
LArPulseShape::m_nt
NTuple::Tuple * m_nt
Definition: LArPulseShape.h:104
LArPulseShape::TCellbegin
std::map< int, TProfile * >::const_iterator TCellbegin() const
Definition: LArPulseShape.h:52
python.TrigEgammaMonitorHelper.TProfile
def TProfile(*args, **kwargs)
Definition: TrigEgammaMonitorHelper.py:81
LArPulseShape::m_isSC
bool m_isSC
Definition: LArPulseShape.h:122
LArPulseShape::~LArPulseShape
~LArPulseShape()
EL::StatusCode
::StatusCode StatusCode
StatusCode definition for legacy code.
Definition: PhysicsAnalysis/D3PDTools/EventLoop/EventLoop/StatusCode.h:22
LArPulseShape::m_detector
NTuple::Item< long > m_detector
Definition: LArPulseShape.h:107
LArPulseShape::initialize
virtual StatusCode initialize() override
Definition: LArPulseShape.cxx:29
LArPulseShape::THend
std::map< std::string, TH1 * >::const_iterator THend() const
Definition: LArPulseShape.h:56
LArPulseShape::m_slot
NTuple::Item< long > m_slot
Definition: LArPulseShape.h:108
LArPulseShape::m_OffId
int m_OffId
Definition: LArPulseShape.h:67
CaloCell_ID
Helper class for offline cell identifiers.
Definition: CaloCell_ID.h:34
LArPulseShape::m_ntpath
std::string m_ntpath
Definition: LArPulseShape.h:101
AthAlgorithm
Definition: AthAlgorithm.h:47
LuminosityCondData.h
Hold luminosity data produced by LuminosityCondAlg.
ReadCondHandleKey.h
LArPulseShape::m_BCID
TH1D * m_BCID
Definition: LArPulseShape.h:85
LArOnlineID_Base
Helper for the Liquid Argon Calorimeter cell identifiers.
Definition: LArOnlineID_Base.h:105
name
std::string name
Definition: Control/AthContainers/Root/debug.cxx:240
LArPulseShape::m_FEBTemp2
NTuple::Item< float > m_FEBTemp2
Definition: LArPulseShape.h:113
LArPulseShape::m_histos
std::map< std::string, TH1 * > m_histos
Definition: LArPulseShape.h:84
LArDigitContainer.h
LArPulseShape::m_larPedestal
const ILArPedestal * m_larPedestal
Definition: LArPulseShape.h:79
LArPulseShape::m_trigDec
PublicToolHandle< Trig::TrigDecisionTool > m_trigDec
Definition: LArPulseShape.h:73
SG::ReadCondHandleKey< LuminosityCondData >
LArPulseShape::m_folder
std::string m_folder
Definition: LArPulseShape.h:61
LArPulseShape::m_ntname
std::string m_ntname
Definition: LArPulseShape.h:60
LArPulseShape::m_addBC
bool m_addBC
Definition: LArPulseShape.h:98
LArPulseShape::m_caloId
const CaloCell_ID * m_caloId
Definition: LArPulseShape.h:120
h
LArPulseShape::m_calibLine
NTuple::Item< long > m_calibLine
Definition: LArPulseShape.h:109
LArPulseShape::m_layer
NTuple::Item< long > m_layer
Definition: LArPulseShape.h:107
LArPulseShape::m_addHash
bool m_addHash
Definition: LArPulseShape.h:125
ILArPedestal.h
LArPulseShape::m_isample
int m_isample
Definition: LArPulseShape.h:69
LArPulseShape::m_cellHistos
std::map< int, TProfile * > m_cellHistos
Definition: LArPulseShape.h:82
LArPulseShape::m_BCKey
SG::ReadCondHandleKey< LArBadChannelCont > m_BCKey
Definition: LArPulseShape.h:77
LArPulseShape::m_effhistos
std::map< std::string, TProfile * > m_effhistos
Definition: LArPulseShape.h:81
LArPulseShape::m_cablingKey
SG::ReadCondHandleKey< LArOnOffIdMapping > m_cablingKey
Definition: LArPulseShape.h:76
LArPulseShape::m_OffId_conv
int m_OffId_conv
Definition: LArPulseShape.h:68
LArSCvsRawChannelConfig.TrigDecisionTool
TrigDecisionTool
Definition: LArSCvsRawChannelConfig.py:83
LArPulseShape::m_eta
NTuple::Item< long > m_eta
Definition: LArPulseShape.h:107
LArPulseShape::m_phi
NTuple::Item< long > m_phi
Definition: LArPulseShape.h:107
LArPulseShape::m_peakSample
NTuple::Item< short > m_peakSample
Definition: LArPulseShape.h:63
LArPulseShape::LArPulseShape
LArPulseShape(const std::string &name, ISvcLocator *pSvcLocator)
Definition: LArPulseShape.cxx:19
LArPulseShape::TCellend
std::map< int, TProfile * >::const_iterator TCellend() const
Definition: LArPulseShape.h:53
LArPulseShape::m_barrel_ec
NTuple::Item< long > m_barrel_ec
Definition: LArPulseShape.h:108
ILArFEBTempTool.h