ATLAS Offline Software
LArPulseShape.h
Go to the documentation of this file.
1 /*
2  Copyright (C) 2002-2022 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  const char * m_id_char = nullptr;
70  int m_isample = 0;
71  int m_mindist = 0;
72  int m_closestBC = 0;
73 
74  PublicToolHandle<Trig::TrigDecisionTool>m_trigDec{this, "TrigDecisionTool", "", "Handle to the TrigDecisionTool"};
75 
76  SG::ReadCondHandleKey<LuminosityCondData> m_lumiDataKey{this,"LumiKey", "LuminosityCondData","SG Key of LuminosityCondData object"};
77  SG::ReadCondHandleKey<LArOnOffIdMapping> m_cablingKey{this,"CablingKey","LArOnOffIdMap","SG Key of LArOnOffIdMapping object"};
78  SG::ReadCondHandleKey<LArBadChannelCont> m_BCKey{this, "BadChanKey", "LArBadChannel", "SG bad channels key"};
79 
80  const ILArPedestal* m_larPedestal = nullptr;
81 
82  std::map<std::string, TProfile*> m_effhistos;
83  std::map<int, TProfile*> m_cellHistos;
85  std::map<std::string, TH1*> m_histos;
86  TH1D* m_BCID = nullptr;
87  TH1D* m_diffBCID = nullptr;
88  TH1D* m_actualInt = nullptr;
89  void addHistogram( TH1* h ) {
90  std::string name = h->GetName();
91  m_histos.insert( std::map<std::string, TH1*>::value_type( name, h) );
92  }
93  void addHistogram( TProfile* h ) {
94  std::string name = h->GetName();
95  m_effhistos.insert( std::map<std::string, TProfile*>::value_type( name, h) );
96  }
97 
98  protected:
99  bool m_addBC = false, m_addFEBTemp = false;
100  enum {NOT_VALID = -999};
101 
102  std::string m_ntpath, m_ntTitle;
103 
104  //Ntuple pointer
106 
107  //Ntuple variables:
109  NTuple::Item<long> m_pos_neg, m_barrel_ec, m_FT, m_slot, m_channel;
110  NTuple::Item<long> m_calibLine,m_badChanWord;
111  NTuple::Item<long> m_isConnected;
112  NTuple::Item<long> m_chanHash, m_febHash, m_oflHash;
113 
114  NTuple::Item<float> m_FEBTemp1, m_FEBTemp2;
115 
116 
117  const LArEM_Base_ID* m_emId = nullptr;
118  const LArHEC_Base_ID* m_hecId = nullptr;
119  const LArFCAL_Base_ID* m_fcalId = nullptr;
120  const LArOnlineID_Base* m_onlineId = nullptr;
121  const CaloCell_ID* m_caloId = nullptr;
122 
123  bool m_isSC = false;
124  bool m_isFlat = false;
125 
126  bool m_addHash = false;
127 
128 };
129 #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:112
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:112
LArPulseShape::m_emId
const LArEM_Base_ID * m_emId
Definition: LArPulseShape.h:117
LArPulseShape::m_hecId
const LArHEC_Base_ID * m_hecId
Definition: LArPulseShape.h:118
LArPulseShape::m_isConnected
NTuple::Item< long > m_isConnected
Definition: LArPulseShape.h:111
Trig
The common trigger namespace for trigger analysis tools.
Definition: CaloTowerVecMon.h:44
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:124
LArPulseShape::m_fcalId
const LArFCAL_Base_ID * m_fcalId
Definition: LArPulseShape.h:119
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:112
LArPulseShape::m_FT
NTuple::Item< long > m_FT
Definition: LArPulseShape.h:109
TH1D
Definition: rootspy.cxx:342
LArPulseShape::m_onlChanId
NTuple::Item< long > m_onlChanId
Definition: LArPulseShape.h:108
LArPulseShape::m_TProfpulse_diff
TProfile * m_TProfpulse_diff
Definition: LArPulseShape.h:84
LArPulseShape::m_lumiDataKey
SG::ReadCondHandleKey< LuminosityCondData > m_lumiDataKey
Definition: LArPulseShape.h:76
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:108
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
HWIdentifier
Definition: HWIdentifier.h:13
LArPulseShape::m_closestBC
int m_closestBC
Definition: LArPulseShape.h:72
LArPulseShape::m_actualInt
TH1D * m_actualInt
Definition: LArPulseShape.h:88
LArPulseShape::m_channel
NTuple::Item< long > m_channel
Definition: LArPulseShape.h:109
LArPulseShape::m_diffBCID
TH1D * m_diffBCID
Definition: LArPulseShape.h:87
LArPulseShape::execute
virtual StatusCode execute() override
Definition: LArPulseShape.cxx:383
LArPulseShape::m_pos_neg
NTuple::Item< long > m_pos_neg
Definition: LArPulseShape.h:109
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:99
LArPulseShape::addHistogram
void addHistogram(TProfile *h)
Definition: LArPulseShape.h:93
LArPulseShape::m_oflChanId
NTuple::Item< long > m_oflChanId
Definition: LArPulseShape.h:108
AthAlgorithm.h
LArBadChannelCont.h
LArPulseShape::addHistogram
void addHistogram(TH1 *h)
Definition: LArPulseShape.h:89
StoreGateSvc
The Athena Transient Store API.
Definition: StoreGateSvc.h:128
LArPulseShape::m_badChanWord
NTuple::Item< long > m_badChanWord
Definition: LArPulseShape.h:110
LArPulseShape::m_FEBTemp1
NTuple::Item< float > m_FEBTemp1
Definition: LArPulseShape.h:114
LArPulseShape::m_useHgIntercept
NTuple::Item< short > m_useHgIntercept
Definition: LArPulseShape.h:64
LArOnOffIdMapping.h
LArPulseShape::m_mindist
int m_mindist
Definition: LArPulseShape.h:71
LArPulseShape::m_ntTitle
std::string m_ntTitle
Definition: LArPulseShape.h:102
LArPulseShape
Definition: LArPulseShape.h:38
LArPulseShape::m_onlineId
const LArOnlineID_Base * m_onlineId
Definition: LArPulseShape.h:120
LArPulseShape::m_nt
NTuple::Tuple * m_nt
Definition: LArPulseShape.h:105
LArPulseShape::TCellbegin
std::map< int, TProfile * >::const_iterator TCellbegin() const
Definition: LArPulseShape.h:52
LArPulseShape::m_isSC
bool m_isSC
Definition: LArPulseShape.h:123
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:108
LArPulseShape::initialize
virtual StatusCode initialize() override
Definition: LArPulseShape.cxx:29
LArPulseShape::NOT_VALID
@ NOT_VALID
Definition: LArPulseShape.h:100
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:109
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:102
AthAlgorithm
Definition: AthAlgorithm.h:47
LuminosityCondData.h
Hold luminosity data produced by LuminosityCondAlg.
ReadCondHandleKey.h
LArPulseShape::m_BCID
TH1D * m_BCID
Definition: LArPulseShape.h:86
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:195
LArPulseShape::m_FEBTemp2
NTuple::Item< float > m_FEBTemp2
Definition: LArPulseShape.h:114
TProfile
Definition: rootspy.cxx:515
LArPulseShape::m_histos
std::map< std::string, TH1 * > m_histos
Definition: LArPulseShape.h:85
LArDigitContainer.h
LArPulseShape::m_larPedestal
const ILArPedestal * m_larPedestal
Definition: LArPulseShape.h:80
LArPulseShape::m_trigDec
PublicToolHandle< Trig::TrigDecisionTool > m_trigDec
Definition: LArPulseShape.h:74
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:99
LArPulseShape::m_caloId
const CaloCell_ID * m_caloId
Definition: LArPulseShape.h:121
h
LArPulseShape::m_calibLine
NTuple::Item< long > m_calibLine
Definition: LArPulseShape.h:110
RatesAnalysisFullMenu.TrigDecisionTool
TrigDecisionTool
Definition: RatesAnalysisFullMenu.py:110
LArPulseShape::m_layer
NTuple::Item< long > m_layer
Definition: LArPulseShape.h:108
LArPulseShape::m_addHash
bool m_addHash
Definition: LArPulseShape.h:126
ILArPedestal.h
LArPulseShape::m_isample
int m_isample
Definition: LArPulseShape.h:70
TH1
Definition: rootspy.cxx:268
LArPulseShape::m_cellHistos
std::map< int, TProfile * > m_cellHistos
Definition: LArPulseShape.h:83
LArPulseShape::m_BCKey
SG::ReadCondHandleKey< LArBadChannelCont > m_BCKey
Definition: LArPulseShape.h:78
LArPulseShape::m_id_char
const char * m_id_char
Definition: LArPulseShape.h:69
LArPulseShape::m_effhistos
std::map< std::string, TProfile * > m_effhistos
Definition: LArPulseShape.h:82
LArPulseShape::m_cablingKey
SG::ReadCondHandleKey< LArOnOffIdMapping > m_cablingKey
Definition: LArPulseShape.h:77
LArPulseShape::m_OffId_conv
int m_OffId_conv
Definition: LArPulseShape.h:68
LArPulseShape::m_eta
NTuple::Item< long > m_eta
Definition: LArPulseShape.h:108
LArPulseShape::m_phi
NTuple::Item< long > m_phi
Definition: LArPulseShape.h:108
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:109
ILArFEBTempTool.h
Tuple
PerfMon::Tuple Tuple
Definition: PerfMonSvc.cxx:91