ATLAS Offline Software
Loading...
Searching...
No Matches
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
26class HWIdentifier;
28class StoreGateSvc;
29class LArEM_Base_ID;
30class LArHEC_Base_ID;
31class LArFCAL_Base_ID;
32class CaloCell_ID;
33
34namespace Trig{
35 class TrigDecisionTool;
36}
37
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;
83 TProfile* m_TProfpulse_diff = nullptr;
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
Hold luminosity data produced by LuminosityCondAlg.
AthAlgorithm(const std::string &name, ISvcLocator *pSvcLocator)
Constructor with parameters:
Header file for AthHistogramAlgorithm.
Helper class for offline cell identifiers.
Definition CaloCell_ID.h:34
This class factors out code common between LArEM_ID and LArEM_SuperCell_ID.
This class factors out code common between LArEM_ID and LArEM_SuperCell_ID.
Helper for the Liquid Argon Calorimeter cell identifiers.
const LArOnlineID_Base * m_onlineId
std::string m_ntpath
NTuple::Item< short > m_peakSample
PublicToolHandle< Trig::TrigDecisionTool > m_trigDec
NTuple::Item< long > m_oflHash
std::string m_folder
NTuple::Item< long > m_channel
NTuple::Item< long > m_FT
virtual StatusCode initialize() override
NTuple::Item< long > m_febHash
void addHistogram(TH1 *h)
const LArFCAL_Base_ID * m_fcalId
NTuple::Item< long > m_barrel_ec
NTuple::Item< float > m_FEBTemp1
NTuple::Item< float > m_FEBTemp2
NTuple::Item< long > m_region
std::map< int, TProfile * > m_cellHistos
const CaloCell_ID * m_caloId
std::map< int, TProfile * >::const_iterator TCellbegin() const
NTuple::Item< short > m_useMgIntercept
virtual StatusCode stop() override
NTuple::Item< short > m_useLgIntercept
SG::ReadCondHandleKey< LuminosityCondData > m_lumiDataKey
NTuple::Item< long > m_pos_neg
TProfile * m_TProfpulse_diff
std::map< std::string, TProfile * >::const_iterator TEffend() const
const LArEM_Base_ID * m_emId
const LArHEC_Base_ID * m_hecId
NTuple::Item< long > m_calibLine
const ILArPedestal * m_larPedestal
NTuple::Item< long > m_onlChanId
NTuple::Item< long > m_layer
std::map< std::string, TProfile * >::const_iterator TEffbegin() const
NTuple::Item< long > m_oflChanId
NTuple::Item< long > m_slot
std::map< std::string, TH1 * >::const_iterator THbegin() const
NTuple::Item< long > m_badChanWord
SG::ReadCondHandleKey< LArOnOffIdMapping > m_cablingKey
std::map< int, TProfile * >::const_iterator TCellend() const
NTuple::Item< long > m_chanHash
std::string m_ntname
NTuple::Item< long > m_isConnected
virtual StatusCode execute() override
std::map< std::string, TH1 * >::const_iterator THend() const
NTuple::Item< long > m_phi
NTuple::Item< long > m_eta
std::map< std::string, TProfile * > m_effhistos
NTuple::Tuple * m_nt
const CaloCell_ID * m_calo_id
NTuple::Item< long > m_detector
void addHistogram(TProfile *h)
std::string m_ntTitle
SG::ReadCondHandleKey< LArBadChannelCont > m_BCKey
LArPulseShape(const std::string &name, ISvcLocator *pSvcLocator)
std::map< std::string, TH1 * > m_histos
NTuple::Item< short > m_useHgIntercept
The Athena Transient Store API.
The common trigger namespace for trigger analysis tools.