ATLAS Offline Software
Loading...
Searching...
No Matches
TileAANtuple Class Reference

class to produce TileCal commissioning ntuples More...

#include <TileAANtuple.h>

Inheritance diagram for TileAANtuple:

Classes

struct  Arrays

Public Member Functions

 TileAANtuple (const std::string &name, ISvcLocator *pSvcLocator)
virtual ~TileAANtuple ()
StatusCode ntuple_initialize (const EventContext &ctx, const TileDQstatus &DQstatus)
StatusCode ntuple_clear ()
StatusCode initialize ()
 Alg standard interface function.
StatusCode execute (const EventContext &ctx)
 Execute method.
StatusCode finalize ()
virtual StatusCode sysInitialize () override
 Override sysInitialize.
virtual bool isClonable () const override
 Specify if the algorithm is clonable.
virtual StatusCode sysExecute (const EventContext &ctx) override
 Execute an algorithm.
virtual const DataObjIDColl & extraOutputDeps () const override
 Return the list of extra output dependencies.
virtual bool filterPassed (const EventContext &ctx) const
 Get filter decision:
virtual void setFilterPassed (bool state, const EventContext &ctx) const
 Set filter decision:
ServiceHandle< StoreGateSvc > & evtStore ()
 The standard StoreGateSvc (event store) Returns (kind of) a pointer to the StoreGateSvc.
const ServiceHandle< StoreGateSvc > & detStore () const
 The standard StoreGateSvc/DetectorStore Returns (kind of) a pointer to the StoreGateSvc.
virtual StatusCode sysStart () override
 Handle START transition.
virtual std::vector< Gaudi::DataHandle * > inputHandles () const override
 Return this algorithm's input handles.
virtual std::vector< Gaudi::DataHandle * > outputHandles () const override
 Return this algorithm's output handles.
Gaudi::Details::PropertyBase & declareProperty (Gaudi::Property< T, V, H > &t)
void updateVHKA (Gaudi::Details::PropertyBase &)
MsgStream & msg () const
bool msgLvl (const MSG::Level lvl) const

Protected Member Functions

virtual bool isReEntrant () const override final
 Legacy algorithms are not thread-safe.
void renounceArray (SG::VarHandleKeyArray &handlesArray)
 remove all handles from I/O resolution
std::enable_if_t< std::is_void_v< std::result_of_t< decltype(&T::renounce)(T)> > &&!std::is_base_of_v< SG::VarHandleKeyArray, T > &&std::is_base_of_v< Gaudi::DataHandle, T >, void > renounce (T &h)
void extraDeps_update_handler (Gaudi::Details::PropertyBase &ExtraDeps)
 Add StoreName to extra input/output deps as needed.

Private Types

typedef ServiceHandle< StoreGateSvc > StoreGateSvc_t

Private Member Functions

StatusCode storeRawChannels (const EventContext &ctx, const SG::ReadHandleKey< TileRawChannelContainer > &containerKey, float ene[N_ROS2][N_MODULES][N_CHANS], float time[N_ROS2][N_MODULES][N_CHANS], float chi2[N_ROS2][N_MODULES][N_CHANS], float ped[N_ROS2][N_MODULES][N_CHANS], bool fillAll)
 / Fill ntuple with data from TRC.
StatusCode storeMFRawChannels (const EventContext &ctx, const SG::ReadHandleKey< TileRawChannelContainer > &containerKey, float *ene, float *time, float chi2[N_ROS2][N_MODULES][N_CHANS], float ped[N_ROS2][N_MODULES][N_CHANS], bool fillAll)
StatusCode storeDigits (const EventContext &ctx, const SG::ReadHandleKey< TileDigitsContainer > &containerKey, short *sample, short gain[N_ROS2][N_MODULES][N_CHANS], bool fillAll)
 / Fill Ntuple with info from TileDigits / Return true if the collection is empty
StatusCode storeTMDBDecision (const EventContext &ctx)
StatusCode storeTMDBDigits (const EventContext &ctx)
StatusCode storeTMDBRawChannel (const EventContext &ctxx)
StatusCode storeBeamElements (const TileDQstatus &DQstatus)
StatusCode storeLaser (const EventContext &ctx)
StatusCode storeDCS (const EventContext &ctx)
StatusCode initNTuple (const EventContext &ctx)
void fillCellMap (TTree *ntuplePtr, const EventContext &ctx)
 ///////////////////////////////////////////////////////////////////////////
void TRIGGER_addBranch (void)
 //////////////////////////////////////////////////////////////////////////// /Add TRIGGER variables to the Tree
void LASER_addBranch (void)
 //////////////////////////////////////////////////////////////////////////// /Add Tree LASER variables Tree
void CISPAR_addBranch (void)
 //////////////////////////////////////////////////////////////////////////// /Add Tree CISPAR variables Tree
void DIGI_addBranch (void)
 //////////////////////////////////////////////////////////////////////////// /Add Tree DIGI variables Tree
void DCS_addBranch (void)
void TMDB_addBranch (void)
void TRIGGER_clearBranch (void)
 //////////////////////////////////////////////////////////////////////////// Clear Tree TRIGGER variables
void LASER_clearBranch (void)
 //////////////////////////////////////////////////////////////////////////// Clear Tree LASER variables
void CISPAR_clearBranch (void)
 //////////////////////////////////////////////////////////////////////////// Clear Tree CISPAR variables
void DIGI_clearBranch (void)
 //////////////////////////////////////////////////////////////////////////// /Clear Tree DIGI variables ////////////////////////////////////////////////////////////////////////////
void TMDB_clearBranch (void)
int digiChannel2PMT (int fragType, int chan)
short CheckDMUFormat (uint32_t header)
 bit_31 of the DMU header must be 1 and bit_17 of the DMU header must be 0
short CheckDMUParity (uint32_t header)
 Parity of the DMU header should be odd.
Gaudi::Details::PropertyBase & declareGaudiProperty (Gaudi::Property< T, V, H > &hndl, const SG::VarHandleKeyType &)
 specialization for handling Gaudi::Property<SG::VarHandleKey>

Private Attributes

int m_evtNr {-1}
 event counter
int m_evTime {0}
 event time
int m_run {0}
 run number
int m_evt {0}
 event number in a run
int m_lumiBlock {0}
 lumiblock number in a run
int m_HHMMSS {0}
 event time in HH:MM:SS
char m_dateTime [32] {}
 event date and time
int m_trigType {0}
 trigger type (1=Phys, 2=Laser, 4=Ped, 8=CIS)
uint32_t m_dspFlags {0}
 DSP flags from BS.
int m_l1ID [N_RODS] {}
 Level1 ID from ROD header.
int m_l1Type [N_RODS] {}
 Level1 Type from ROD header.
int m_evBCID [N_RODS] {}
 Event BCID from ROD header.
int m_evType [N_RODS] {}
 Event Type from ROD header.
uint32_t m_cispar [N_CISPAR] {}
int m_las_version {0}
int m_las_BCID {0}
int m_las_Filt {0}
float m_las_ReqAmp {0}
float m_las_MeasAmp {0}
float m_las_Temperature {0}
std::unique_ptr< Arrays > m_arrays
bool m_qdctimeout {false}
bool m_tdctimeout {false}
int m_daqtype {0}
int m_nBadDr {0}
int m_nBadHV {0}
int m_nBadDCS {0}
int m_nBadDB {0}
int m_nBadTotal {0}
Gaudi::Property< int > m_nSamples {this, "NSamples", 7, "Number of samples"}
 number of samples
Gaudi::Property< bool > m_reduced {this, "Reduced", false, "Reduced ntuple content"}
Gaudi::Property< int > m_compressSettings {this, "CompressionSettings", -1, "ROOT compression settings for output file (negative: do not change)"}
SG::ReadHandleKey< TileDigitsContainer > m_digitsContainerKey {this, "TileDigitsContainer", "TileDigitsCnt", "Input Tile digits container key"}
SG::ReadHandleKey< TileDigitsContainer > m_fltDigitsContainerKey {this, "TileDigitsContainerFlt", "", "Input Tile filtered digits container key"}
SG::ReadHandleKey< TileBeamElemContainer > m_beamElemContainerKey {this, "TileBeamElemContainer", "TileBeamElemCnt", "Input Tile beam elements container key"}
SG::ReadHandleKey< TileRawChannelContainer > m_rawChannelContainerKey {this, "TileRawChannelContainer", "TileRawChannelCnt", "Input Tile raw channel container key"}
SG::ReadHandleKey< TileRawChannelContainer > m_fitRawChannelContainerKey {this, "TileRawChannelContainerFit", "", "Input Tile raw channel container key (Fit method)"}
SG::ReadHandleKey< TileRawChannelContainer > m_fitcRawChannelContainerKey {this, "TileRawChannelContainerFitCool", "", "Input Tile raw channel container key (Fit method with COOL pulse shape)"}
SG::ReadHandleKey< TileRawChannelContainer > m_optRawChannelContainerKey {this, "TileRawChannelContainerOpt", "", "Input Tile raw channel container key (Opt filter)"}
SG::ReadHandleKey< TileRawChannelContainer > m_qieRawChannelContainerKey {this, "TileRawChannelContainerQIE", "", "Input Tile raw channel container key (processed QIE data)"}
SG::ReadHandleKey< TileRawChannelContainer > m_dspRawChannelContainerKey {this, "TileRawChannelContainerDsp", "", "Input Tile raw channel container key (DSP)"}
SG::ReadHandleKey< TileRawChannelContainer > m_mfRawChannelContainerKey {this, "TileRawChannelContainerMF", "", "Input Tile raw channel container key (MF method)"}
SG::ReadHandleKey< TileRawChannelContainer > m_of1RawChannelContainerKey {this, "TileRawChannelContainerOF1", "", "Input Tile raw channel container key (OF1 method)"}
SG::ReadHandleKey< TileRawChannelContainer > m_wienerRawChannelContainerKey {this, "TileRawChannelContainerWiener", "", "Input Tile raw channel container key (Wiener filter)"}
SG::ReadHandleKey< TileLaserObject > m_laserObjectKey {this, "TileLaserObject", "", "Input Tile laser object key"}
SG::ReadHandleKey< TileRawChannelContainer > m_tileMuRcvRawChannelContainerKey {this, "TileMuRcvRawChannelContainer", "MuRcvRawChCnt", "Input TMDB raw channel container key"}
SG::ReadHandleKey< TileDigitsContainer > m_tileMuRcvDigitsContainerKey {this, "TileMuRcvDigitsContainer", "MuRcvDigitsCnt", "Input TMDB digits container key"}
SG::ReadHandleKey< TileMuonReceiverContainer > m_tileMuRcvContainerKey {this, "TileMuRcvContainer", "TileMuRcvCnt", "Input TMDB container key"}
SG::ReadHandleKey< TileL2Container > m_l2CntKey {this, "TileL2Cnt", "TileL2Cnt", "Input Tile L2 container key"}
Gaudi::Property< bool > m_calibrateEnergy {this, "CalibrateEnergy", true, "Convert energy to new units or use amplitude from RawChannel directly"}
 convert energy to new units or use amplitude from RawChannel directly
Gaudi::Property< bool > m_useDspUnits {this, "UseDspUnits", false, "Convert energy to units used in DSP"}
 true if energy should be converted to units used in DSP
Gaudi::Property< bool > m_bsInput {this, "BSInput", true, "Bytestream file is used as input"}
 true if bytestream file is used
Gaudi::Property< bool > m_pmtOrder {this, "PMTOrder", false, "Change channel ordering to PMT ordering in ntuple"}
 change channel ordering to pmt ordering in ntuple
Gaudi::Property< int > m_finalUnit {this, "OfflineUnits", TileRawChannelUnit::MegaElectronVolts, "Calibrate everything to this level"}
 calibrate everything to this level
Gaudi::Property< bool > m_calibMode {this, "CalibMode", false, "If data should be put in calib mode"}
 If data should be put in calib mode.
Gaudi::Property< bool > m_compareMode {this, "CompareMode", false, "If two sets of data should be compared (e.g. frag4 and frag5)"}
 If two sets of data should be compared (e.g.
Gaudi::Property< bool > m_checkDCS {this, "CheckDCS", false, "If false, do not use TileDCS at all"}
 if false, do not use TileDCS at all
Gaudi::Property< int > m_DCSBranches {this, "DCSBranches", 111111111, "Mask like 110101 - which DCS branches to fill"}
 mask like 110101 - which DCS branches to fill
TileRawChannelUnit::UNIT m_rchUnit {TileRawChannelUnit::MegaElectronVolts}
 Unit for TileRawChannels (ADC, pCb, MeV).
TileRawChannelUnit::UNIT m_dspUnit {TileRawChannelUnit::ADCcounts}
 Unit for TileRawChannels in DSP.
Gaudi::Property< std::string > m_streamName {this, "StreamName", "AANT", "Name of output stream for ntuple"}
Gaudi::Property< std::string > m_ntupleID {this, "NTupleID", "h2000", "ID of ntuple"}
Gaudi::Property< int64_t > m_treeSize {this, "TreeSize", 16000000000LL, "Max size of ROOT tree"}
TTree * m_ntuplePtr {nullptr}
TTree * m_DCSntuplePtr {nullptr}
ServiceHandle< ITHistSvc > m_thistSvc
ServiceHandle< IFileMgr > m_fileMgr
const TileID * m_tileID {nullptr}
const TileHWID * m_tileHWID {nullptr}
const TileCablingService * m_cabling {nullptr}
 cabling tool
const TileDetDescrManager * m_tileMgr {nullptr}
 Pointer to TileDetDescrManager.
ToolHandle< ITileBadChanTool > m_tileBadChanTool {"TileBadChanTool"}
 Tile Bad Channel tool.
ToolHandle< TileCondToolEmscale > m_tileToolEmscale
 main Tile Calibration tool
ToolHandle< ITileDCSTool > m_tileDCS {this, "TileDCSTool", "TileDCSTool", "Tile DCS tool"}
ToolHandle< TileL2Builder > m_l2Builder
float m_sumEt_xx [N_DRAWERS] {}
 Sum Et recalculated offline using DSP raw channels.
float m_sumEz_xx [N_DRAWERS] {}
 Sum Ez recalculated offline using DSP raw channels.
float m_sumE_xx [N_DRAWERS] {}
 Sum E recalculated offline using DSP raw channels.
float m_sumEt_yy [N_DRAWERS] {}
 Sum Et calcualted inside DSP.
float m_sumEz_yy [N_DRAWERS] {}
 Sum Ez calcualted inside DSP.
float m_sumE_yy [N_DRAWERS] {}
 Sum E calcualted inside DSP.
float m_sumEt_zz [N_DRAWERS] {}
 Sum Et recalculated offline using offline OF.
float m_sumEz_zz [N_DRAWERS] {}
 Sum Ez recalculated offline using offline OF.
float m_sumE_zz [N_DRAWERS] {}
 Sum E recalculated offline using offline OF.
bool m_bad [N_ROS][N_MODULES][N_CHANS] {}
Gaudi::Property< int > m_skipEvents {this, "SkipEvents", 0, "Number of events to skip before filling ntuple"}
std::vector< uint32_t > m_ROBID
ServiceHandle< TileCablingSvc > m_cablingSvc
 Name of Tile cabling service.
ServiceHandle< IROBDataProviderSvc > m_robSvc
SG::ReadHandleKey< TileDQstatus > m_DQstatusKey
SG::ReadCondHandleKey< TileHid2RESrcID > m_hid2RESrcIDKey
DataObjIDColl m_extendedExtraObjects
 Extra output dependency collection, extended by AthAlgorithmDHUpdate to add symlinks.
StoreGateSvc_t m_evtStore
 Pointer to StoreGate (event store by default).
StoreGateSvc_t m_detStore
 Pointer to StoreGate (detector store by default).
std::vector< SG::VarHandleKeyArray * > m_vhka
bool m_varHandleArraysDeclared

Detailed Description

class to produce TileCal commissioning ntuples

Definition at line 97 of file TileAANtuple.h.

Member Typedef Documentation

◆ StoreGateSvc_t

typedef ServiceHandle<StoreGateSvc> AthCommonDataStore< AthCommonMsg< Gaudi::Algorithm > >::StoreGateSvc_t
privateinherited

Definition at line 376 of file AthCommonDataStore.h.

Constructor & Destructor Documentation

◆ TileAANtuple()

TileAANtuple::TileAANtuple ( const std::string & name,
ISvcLocator * pSvcLocator )

Definition at line 106 of file TileAANtuple.cxx.

107: AthAlgorithm(name, pSvcLocator)
108, m_arrays (std::make_unique<Arrays>())
109, m_thistSvc("THistSvc", name)
110{
111}
AthAlgorithm(const std::string &name, ISvcLocator *pSvcLocator)
Constructor.
std::unique_ptr< Arrays > m_arrays
ServiceHandle< ITHistSvc > m_thistSvc

◆ ~TileAANtuple()

TileAANtuple::~TileAANtuple ( )
virtual

Definition at line 113 of file TileAANtuple.cxx.

113 {
114}

Member Function Documentation

◆ CheckDMUFormat()

short TileAANtuple::CheckDMUFormat ( uint32_t header)
inlineprivate

bit_31 of the DMU header must be 1 and bit_17 of the DMU header must be 0

Definition at line 168 of file TileAANtuple.h.

168 {
169 if (((header >> 31 & 0x1) == 1) && ((header >> 17 & 0x1) == 0))
170 return 0; // no error
171 else
172 return 1; //error
173 }

◆ CheckDMUParity()

short TileAANtuple::CheckDMUParity ( uint32_t header)
inlineprivate

Parity of the DMU header should be odd.

Definition at line 178 of file TileAANtuple.h.

178 {
179 uint32_t parity(0);
180 for (int i = 0; i < 32; ++i)
181 parity += header >> i & 0x1;
182
183 if ((parity % 2) == 1)
184 return 0; //no error
185 else
186 return 1; //error
187 }
setEventNumber uint32_t

◆ CISPAR_addBranch()

void TileAANtuple::CISPAR_addBranch ( void )
private

//////////////////////////////////////////////////////////////////////////// /Add Tree CISPAR variables Tree

////////////////////////////////////////////////////////////////////////////

Definition at line 1592 of file TileAANtuple.cxx.

1592 {
1593 if (!m_beamElemContainerKey.key().empty()) {
1594 m_ntuplePtr->Branch("cispar",m_cispar,"cispar[110]/i");
1595 }
1596}
SG::ReadHandleKey< TileBeamElemContainer > m_beamElemContainerKey
uint32_t m_cispar[N_CISPAR]
TTree * m_ntuplePtr

◆ CISPAR_clearBranch()

void TileAANtuple::CISPAR_clearBranch ( void )
private

//////////////////////////////////////////////////////////////////////////// Clear Tree CISPAR variables

////////////////////////////////////////////////////////////////////////////

Definition at line 1605 of file TileAANtuple.cxx.

1605 {
1606 if (!m_beamElemContainerKey.key().empty()) {
1607 CLEAR(m_cispar);
1608 }
1609}
#define CLEAR(array)

◆ DCS_addBranch()

void TileAANtuple::DCS_addBranch ( void )
private

Definition at line 2127 of file TileAANtuple.cxx.

2127 {
2128 bool br[9];
2129 int mask = m_DCSBranches;
2130
2131 for (int i = 0; i < 9; ++i) {
2132 br[i] = (mask % 10);
2133 mask /= 10;
2134 }
2135
2136 if (br[0]) {
2137 m_DCSntuplePtr->Branch("EvTime", &m_evTime, "EvTime/I");
2138 m_DCSntuplePtr->Branch("Run", &m_run, "Run/I");
2139 m_DCSntuplePtr->Branch("LumiBlock",&m_lumiBlock,"LumiBlock/I");
2140 m_DCSntuplePtr->Branch("HHMMSS", &m_HHMMSS, "HHMMSS/I");
2141 m_DCSntuplePtr->Branch("Evt", &m_evt, "Evt/I");
2142 m_DCSntuplePtr->Branch("EvtNr", &m_evtNr, "EvtNr/I");
2143 }
2144
2145 if (br[1]) m_DCSntuplePtr->Branch("TEMP", m_arrays->m_TEMP, "TEMP[4][64][7]/F");
2146 if (br[2]) m_DCSntuplePtr->Branch("HV", m_arrays->m_HV, "HV[4][64][48]/F");
2147 if (br[3]) m_DCSntuplePtr->Branch("HVSET", m_arrays->m_HVSET, "HVSET[4][64][48]/F");
2148 if (br[4]) m_DCSntuplePtr->Branch("DRSTATES",m_arrays->m_DRSTATES,"DRSTATES[4][64]/I");
2149 if (br[5]) m_DCSntuplePtr->Branch("HVSTATUS",m_arrays->m_HVSTATUS,"HVSTATUS[4][64][48]/S");
2150 if (br[6]) m_DCSntuplePtr->Branch("DRSTATUS",m_arrays->m_DRSTATUS,"DRSTATUS[4][64]/S");
2151 if (br[7]) m_DCSntuplePtr->Branch("CHSTATUS",m_arrays->m_CHSTATUS,"CHSTATUS[4][64][48]/S");
2152 if (br[8]) {
2153 m_DCSntuplePtr->Branch("nBadDr", &m_nBadDr, "nBadDr/I");
2154 m_DCSntuplePtr->Branch("nBadHV", &m_nBadHV, "nBadHV/I");
2155 m_DCSntuplePtr->Branch("nBadDCS", &m_nBadDCS, "nBadDCS/I");
2156 m_DCSntuplePtr->Branch("nBadDB", &m_nBadDB, "nBadDB/I");
2157 m_DCSntuplePtr->Branch("nBadTotal", &m_nBadTotal, "nBadTotal/I");
2158 }
2159}
int m_run
run number
TTree * m_DCSntuplePtr
int m_evt
event number in a run
int m_evtNr
event counter
Gaudi::Property< int > m_DCSBranches
mask like 110101 - which DCS branches to fill
int m_evTime
event time
int m_lumiBlock
lumiblock number in a run
int m_HHMMSS
event time in HH:MM:SS

◆ declareGaudiProperty()

Gaudi::Details::PropertyBase & AthCommonDataStore< AthCommonMsg< Gaudi::Algorithm > >::declareGaudiProperty ( Gaudi::Property< T, V, H > & hndl,
const SG::VarHandleKeyType &  )
inlineprivateinherited

specialization for handling Gaudi::Property<SG::VarHandleKey>

Definition at line 156 of file AthCommonDataStore.h.

158 {
160 hndl.value(),
161 hndl.documentation());
162
163 }
Gaudi::Details::PropertyBase & declareProperty(Gaudi::Property< T, V, H > &t)

◆ declareProperty()

Gaudi::Details::PropertyBase & AthCommonDataStore< AthCommonMsg< Gaudi::Algorithm > >::declareProperty ( Gaudi::Property< T, V, H > & t)
inlineinherited

Definition at line 145 of file AthCommonDataStore.h.

145 {
146 typedef typename SG::HandleClassifier<T>::type htype;
148 }
Gaudi::Details::PropertyBase & declareGaudiProperty(Gaudi::Property< T, V, H > &hndl, const SG::VarHandleKeyType &)
specialization for handling Gaudi::Property<SG::VarHandleKey>

◆ detStore()

const ServiceHandle< StoreGateSvc > & AthCommonDataStore< AthCommonMsg< Gaudi::Algorithm > >::detStore ( ) const
inlineinherited

The standard StoreGateSvc/DetectorStore Returns (kind of) a pointer to the StoreGateSvc.

Definition at line 95 of file AthCommonDataStore.h.

◆ DIGI_addBranch()

void TileAANtuple::DIGI_addBranch ( void )
private

//////////////////////////////////////////////////////////////////////////// /Add Tree DIGI variables Tree

////////////////////////////////////////////////////////////////////////////

Definition at line 1763 of file TileAANtuple.cxx.

1764{
1765 std::string suf[3] = {"_lo","_hi",""};
1766 if (m_compareMode) {
1767 suf[0] = "_xx";
1768 suf[1] = "_yy";
1769 suf[2] = "_zz";
1770 m_ntuplePtr->Branch(NAME2("sumEt",suf[0]), m_sumEt_xx, NAME3("sumEt", suf[0],"[4][64]/F")); // float
1771 m_ntuplePtr->Branch(NAME2("sumEz",suf[0]), m_sumEz_xx, NAME3("sumEz", suf[0],"[4][64]/F")); // float
1772 m_ntuplePtr->Branch(NAME2("sumE", suf[0]), m_sumE_xx, NAME3("sumE", suf[0],"[4][64]/F")); // float
1773 m_ntuplePtr->Branch(NAME2("sumEt",suf[1]), m_sumEt_yy, NAME3("sumEt", suf[1],"[4][64]/F")); // float
1774 m_ntuplePtr->Branch(NAME2("sumEz",suf[1]), m_sumEz_yy, NAME3("sumEz", suf[1],"[4][64]/F")); // float
1775 m_ntuplePtr->Branch(NAME2("sumE", suf[1]), m_sumE_yy, NAME3("sumE", suf[1],"[4][64]/F")); // float
1776 m_ntuplePtr->Branch(NAME2("sumEt",suf[2]), m_sumEt_zz, NAME3("sumEt", suf[2],"[4][64]/F")); // float
1777 m_ntuplePtr->Branch(NAME2("sumEz",suf[2]), m_sumEz_zz, NAME3("sumEz", suf[2],"[4][64]/F")); // float
1778 m_ntuplePtr->Branch(NAME2("sumE", suf[2]), m_sumE_zz, NAME3("sumE", suf[2],"[4][64]/F")); // float
1779 }
1780
1781 int sample_size = N_ROS*N_MODULES*N_CHANS*m_nSamples;
1782
1783 int imin = 2, imax = 3, ir = 0, is = 0;
1784
1785 if (m_calibMode) {
1786 imin = 0;
1787 imax = 2;
1788 }
1789
1790 if (!m_mfRawChannelContainerKey.empty()) {
1791 int size = sample_size * (imax-imin);
1792 m_arrays->m_eMF = (float *) malloc(size*sizeof(float));
1793 m_arrays->m_tMF = (float *) malloc(size*sizeof(float));
1794 }
1795
1796 for (int i = imin; i < imax; ++i) {
1797
1798 std::string f_suf(suf[i]);
1799
1800 if (m_fltDigitsContainerKey.empty() && m_digitsContainerKey.empty()
1801 && (!m_rawChannelContainerKey.empty()
1802 || !m_fitRawChannelContainerKey.empty()
1804 || !m_optRawChannelContainerKey.empty()
1805 || !m_qieRawChannelContainerKey.empty()
1806 || !m_dspRawChannelContainerKey.empty()
1807 || !m_mfRawChannelContainerKey.empty()
1808 || !m_of1RawChannelContainerKey.empty()
1810 || !m_bsInput) ) {
1811
1812 m_ntuplePtr->Branch(NAME2("gain",f_suf), m_arrays->m_gain[ir], NAME3("gain", f_suf,"[4][64][48]/S")); // short
1813
1814 } else {
1815
1816 std::string samples = "[4][64][48][" + std::to_string(m_nSamples.value()) + "]/S";
1817
1818 if (!m_fltDigitsContainerKey.empty()) {
1819 if (!m_digitsContainerKey.empty()) { // should use different names for two containers
1820
1821 m_ntuplePtr->Branch(NAME2("sampleFlt",f_suf), &(m_arrays->m_sample[is]), NAME3("sampleFlt", f_suf, samples)); // short
1822 m_ntuplePtr->Branch(NAME2("gainFlt",f_suf), m_arrays->m_gainFlt[ir], NAME3("gainFlt", f_suf,"[4][64][48]/S")); // short
1823 } else {
1824 m_ntuplePtr->Branch(NAME2("sample",f_suf), &(m_arrays->m_sampleFlt[is]), NAME3("sampleFlt", f_suf, samples)); // short
1825 if (!m_rawChannelContainerKey.empty()
1826 || !m_fitRawChannelContainerKey.empty()
1828 || !m_optRawChannelContainerKey.empty()
1829 || !m_qieRawChannelContainerKey.empty()
1830 || !m_of1RawChannelContainerKey.empty()
1831 || !m_dspRawChannelContainerKey.empty()
1833 || m_bsInput) {
1834
1835 m_ntuplePtr->Branch(NAME2("gain",f_suf), m_arrays->m_gain[ir], NAME3("gain", f_suf,"[4][64][48]/S")); // short
1836 } else {
1837 m_ntuplePtr->Branch(NAME2("gain",f_suf), m_arrays->m_gainFlt[ir], NAME3("gainFlt", f_suf,"[4][64][48]/S")); // short
1838 }
1839 }
1840 }
1841
1842 if (!m_digitsContainerKey.empty()) {
1843 m_ntuplePtr->Branch(NAME2("sample",f_suf), &(m_arrays->m_sample[is]), NAME3("sample", f_suf, samples)); // short
1844 m_ntuplePtr->Branch(NAME2("gain",f_suf), m_arrays->m_gain[ir], NAME3("gain", f_suf,"[4][64][48]/S")); // short
1845
1846 if (m_bsInput) {
1847 m_ntuplePtr->Branch(NAME2("DMUheader",f_suf), m_arrays->m_DMUheader[ir], NAME3("DMUheader", f_suf,"[4][64][16]/i")); // uint32
1848 m_ntuplePtr->Branch(NAME2("DMUBCID",f_suf), m_arrays->m_DMUbcid[ir], NAME3("DMUBCID", f_suf,"[4][64][16]/S")); // short
1849 m_ntuplePtr->Branch(NAME2("DMUmemoryErr",f_suf), m_arrays->m_DMUmemoryErr[ir], NAME3("DMUmemoryErr", f_suf,"[4][64][16]/S")); // short
1850 m_ntuplePtr->Branch(NAME2("DMUSstrobeErr",f_suf), m_arrays->m_DMUSstrobeErr[ir], NAME3("DMUSstrobeErr", f_suf,"[4][64][16]/S")); // short
1851 m_ntuplePtr->Branch(NAME2("DMUDstrobeErr",f_suf), m_arrays->m_DMUDstrobeErr[ir], NAME3("DMUDstrobeErr", f_suf,"[4][64][16]/S")); // short
1852 m_ntuplePtr->Branch(NAME2("DMUheadformatErr",f_suf),m_arrays->m_DMUformatErr[ir], NAME3("DMUheadformatErr", f_suf,"[4][64][16]/S")); // short
1853 m_ntuplePtr->Branch(NAME2("DMUheadparityErr",f_suf),m_arrays->m_DMUparityErr[ir], NAME3("DMUheadparityErr", f_suf,"[4][64][16]/S")); // short
1854
1855 m_ntuplePtr->Branch(NAME2("feCRC",f_suf), m_arrays->m_feCRC[ir], NAME3("feCRC", f_suf,"[4][64][16]/S")); // short
1856 m_ntuplePtr->Branch(NAME2("rodCRC",f_suf), m_arrays->m_rodCRC[ir], NAME3("rodCRC", f_suf,"[4][64][16]/S")); // short
1857
1858 if (i == imin) { // common for low and high gain
1859 m_ntuplePtr->Branch("rodBCID", m_arrays->m_rodBCID, "rodBCID[4][64]/S"); // short
1860 m_ntuplePtr->Branch("fragSize", m_arrays->m_fragSize,"fragSize[4][64]/S"); // short
1861 m_ntuplePtr->Branch("DMUmask", m_arrays->m_dmuMask, "DMUmask[4][64][2]/s"); // unsigned short
1862 m_ntuplePtr->Branch("slinkCRC", m_arrays->m_slinkCRC,"slinkCRC[4][64][2]/s"); // unsigned short
1863 }
1864 }
1865 }
1866 }
1867
1868 if (!m_rawChannelContainerKey.empty()) {
1869 m_ntuplePtr->Branch(NAME2("ene",f_suf), m_arrays->m_ene[ir], NAME3("ene",f_suf,"[4][64][48]/F")); // float
1870 m_ntuplePtr->Branch(NAME2("time",f_suf), m_arrays->m_time[ir], NAME3("time",f_suf,"[4][64][48]/F")); // float
1871 m_ntuplePtr->Branch(NAME2("ped",f_suf), m_arrays->m_ped[ir], NAME3("ped",f_suf,"[4][64][48]/F")); // float
1872 m_ntuplePtr->Branch(NAME2("chi2",f_suf), m_arrays->m_chi2[ir], NAME3("chi2",f_suf,"[4][64][48]/F")); // float
1873 }
1874
1875 if (!m_fitRawChannelContainerKey.empty()) {
1876 m_ntuplePtr->Branch(NAME2("eFit",f_suf), m_arrays->m_eFit[ir], NAME3("eFit",f_suf,"[4][64][48]/F")); // float
1877 m_ntuplePtr->Branch(NAME2("tFit",f_suf), m_arrays->m_tFit[ir], NAME3("tFit",f_suf,"[4][64][48]/F")); // float
1878 m_ntuplePtr->Branch(NAME2("pedFit",f_suf), m_arrays->m_pedFit[ir], NAME3("pedFit",f_suf,"[4][64][48]/F")); // float
1879 m_ntuplePtr->Branch(NAME2("chi2Fit",f_suf), m_arrays->m_chi2Fit[ir], NAME3("chi2Fit",f_suf,"[4][64][48]/F")); // float
1880 }
1881
1882 if (!m_fitcRawChannelContainerKey.empty()) {
1883 m_ntuplePtr->Branch(NAME2("eFitc",f_suf), m_arrays->m_eFitc[ir], NAME3("eFitc",f_suf,"[4][64][48]/F")); // float
1884 m_ntuplePtr->Branch(NAME2("tFitc",f_suf), m_arrays->m_tFitc[ir], NAME3("tFitc",f_suf,"[4][64][48]/F")); // float
1885 m_ntuplePtr->Branch(NAME2("pedFitc",f_suf), m_arrays->m_pedFitc[ir], NAME3("pedFitc",f_suf,"[4][64][48]/F")); // float
1886 m_ntuplePtr->Branch(NAME2("chi2Fitc",f_suf),m_arrays->m_chi2Fitc[ir],NAME3("chi2Fitc",f_suf,"[4][64][48]/F")); // float
1887 }
1888
1889 if (!m_optRawChannelContainerKey.empty()) {
1890 m_ntuplePtr->Branch(NAME2("eOpt",f_suf), m_arrays->m_eOpt[ir], NAME3("eOpt",f_suf,"[4][64][48]/F")); // float
1891 m_ntuplePtr->Branch(NAME2("tOpt",f_suf), m_arrays->m_tOpt[ir], NAME3("tOpt",f_suf,"[4][64][48]/F")); // float
1892 m_ntuplePtr->Branch(NAME2("pedOpt",f_suf), m_arrays->m_pedOpt[ir], NAME3("pedOpt",f_suf,"[4][64][48]/F")); // float
1893 m_ntuplePtr->Branch(NAME2("chi2Opt",f_suf), m_arrays->m_chi2Opt[ir], NAME3("chi2Opt",f_suf,"[4][64][48]/F")); // float
1894 }
1895
1896 if (!m_qieRawChannelContainerKey.empty()) {
1897 m_ntuplePtr->Branch(NAME2("eQIE",f_suf), m_arrays->m_eQIE[ir], NAME3("eQIE",f_suf,"[4][64][48]/F")); // float
1898 m_ntuplePtr->Branch(NAME2("tQIE",f_suf), m_arrays->m_tQIE[ir], NAME3("tQIE",f_suf,"[4][64][48]/F")); // float
1899 m_ntuplePtr->Branch(NAME2("pedQIE",f_suf), m_arrays->m_pedQIE[ir], NAME3("pedQIE",f_suf,"[4][64][48]/F")); // float
1900 m_ntuplePtr->Branch(NAME2("chi2QIE",f_suf), m_arrays->m_chi2QIE[ir], NAME3("chi2QIE",f_suf,"[4][64][48]/F")); // float
1901 }
1902
1903 if (!m_of1RawChannelContainerKey.empty()) {
1904 m_ntuplePtr->Branch(NAME2("eOF1",f_suf), m_arrays->m_eOF1[ir], NAME3("eOF1",f_suf,"[4][64][48]/F")); // float
1905 m_ntuplePtr->Branch(NAME2("tOF1",f_suf), m_arrays->m_tOF1[ir], NAME3("tOF1",f_suf,"[4][64][48]/F")); // float
1906 m_ntuplePtr->Branch(NAME2("pedOF1",f_suf), m_arrays->m_pedOF1[ir], NAME3("pedOF1",f_suf,"[4][64][48]/F")); // float
1907 m_ntuplePtr->Branch(NAME2("chi2OF1",f_suf), m_arrays->m_chi2OF1[ir], NAME3("chi2OF1",f_suf,"[4][64][48]/F")); // float
1908 }
1909
1910 if (!m_dspRawChannelContainerKey.empty() && !m_reduced) {
1911 m_ntuplePtr->Branch(NAME2("eDsp",f_suf), m_arrays->m_eDsp[ir], NAME3("eDsp",f_suf,"[4][64][48]/F")); // float
1912 m_ntuplePtr->Branch(NAME2("tDsp",f_suf), m_arrays->m_tDsp[ir], NAME3("tDsp",f_suf,"[4][64][48]/F")); // float
1913 m_ntuplePtr->Branch(NAME2("pedDsp",f_suf), m_arrays->m_pedDsp[ir], NAME3("pedDsp",f_suf,"[4][64][48]/F")); // float
1914 m_ntuplePtr->Branch(NAME2("chi2Dsp",f_suf), m_arrays->m_chi2Dsp[ir], NAME3("chi2Dsp",f_suf,"[4][64][48]/F")); // float
1915 }
1916
1917 if (!m_wienerRawChannelContainerKey.empty()) {
1918 m_ntuplePtr->Branch(NAME2("eWiener",f_suf), m_arrays->m_eWiener[ir], NAME3("eWiener",f_suf,"[4][64][48]/F")); // float
1919 m_ntuplePtr->Branch(NAME2("tWiener",f_suf), m_arrays->m_tWiener[ir], NAME3("tWiener",f_suf,"[4][64][48]/F")); // float
1920 m_ntuplePtr->Branch(NAME2("pedWiener",f_suf), m_arrays->m_pedWiener[ir], NAME3("pedWiener",f_suf,"[4][64][48]/F")); // float
1921 m_ntuplePtr->Branch(NAME2("chi2Wiener",f_suf), m_arrays->m_chi2Wiener[ir], NAME3("chi2Wiener",f_suf,"[4][64][48]/F")); // float
1922 }
1923
1924 if (!m_mfRawChannelContainerKey.empty()) {
1925 std::string f_samples = "[4][64][48][" + std::to_string(m_nSamples.value()) + "]/F";
1926 m_ntuplePtr->Branch(NAME2("eMF",f_suf), &(m_arrays->m_eMF[is]), NAME3("eMF",f_suf,f_samples)); // float
1927 m_ntuplePtr->Branch(NAME2("tMF",f_suf), &(m_arrays->m_tMF[is]), NAME3("tMF",f_suf,f_samples)); // float
1928 m_ntuplePtr->Branch(NAME2("chi2MF",f_suf), m_arrays->m_chi2MF[ir], NAME3("chi2MF",f_suf,"[4][64][48]/F")); // float
1929 m_ntuplePtr->Branch(NAME2("pedMF",f_suf), m_arrays->m_pedMF[ir], NAME3("pedMF",f_suf,"[4][64][48]/F")); // float
1930 }
1931
1932 if (m_bsInput) {
1933 if (i == imin) { // common for low and high gain
1934 m_ntuplePtr->Branch("ROD_GlobalCRC", m_arrays->m_ROD_GlobalCRC, "ROD_GlobalCRC[4][64]/S"); // short
1935 m_ntuplePtr->Branch("ROD_BCID", m_arrays->m_ROD_BCID, "ROD_BCID[4][64]/S"); // short
1936 m_ntuplePtr->Branch("ROD_DMUBCIDErr", m_arrays->m_ROD_DMUBCIDErr, "ROD_DMUBCIDErr[4][64][16]/S"); // short
1937 m_ntuplePtr->Branch("ROD_DMUmemoryErr", m_arrays->m_ROD_DMUmemoryErr, "ROD_DMUmemoryErr[4][64][16]/S"); // short
1938 m_ntuplePtr->Branch("ROD_DMUSstrobeErr", m_arrays->m_ROD_DMUSstrobeErr, "ROD_DMUSstrobeErr[4][64][16]/S"); // short
1939 m_ntuplePtr->Branch("ROD_DMUDstrobeErr", m_arrays->m_ROD_DMUDstrobeErr, "ROD_DMUDstrobeErr[4][64][16]/S"); // short
1940 m_ntuplePtr->Branch("ROD_DMUheadformatErr",m_arrays->m_ROD_DMUHeadformatErr, "ROD_DMUheadformatErr[4][64][16]/S"); // short
1941 m_ntuplePtr->Branch("ROD_DMUheadparityErr",m_arrays->m_ROD_DMUHeadparityErr, "ROD_DMUheadparityErr[4][64][16]/S"); // short
1942 m_ntuplePtr->Branch("ROD_DMUdataformatErr",m_arrays->m_ROD_DMUDataformatErr, "ROD_DMUdataformatErr[4][64][16]/S"); // short
1943 m_ntuplePtr->Branch("ROD_DMUdataparityErr",m_arrays->m_ROD_DMUDataparityErr, "ROD_DMUdataparityErr[4][64][16]/S"); // short
1944
1945 m_ntuplePtr->Branch("ROD_feCRC", m_arrays->m_ROD_DMUfeCRC, "ROD_feCRC[4][64][16]/S"); // short
1946 m_ntuplePtr->Branch("ROD_rodCRC", m_arrays->m_ROD_DMUrodCRC, "ROD_rodCRC[4][64][16]/S"); // short
1947 m_ntuplePtr->Branch("ROD_DMUmask", m_arrays->m_ROD_DMUMask, "ROD_DMUmask[4][64][2]/s"); // unsigned short
1948 }
1949 }
1950 ir += N_ROS;
1951 is += sample_size;
1952 }
1953}
size_t size() const
Number of registered mappings.
#define NAME3(s1, s2, s3)
#define NAME2(s1, s2)
#define N_ROS
Filename : TileAANtuple.h Author : Alexander Solodkov (based on TileTBAANtuple) Created : April,...
#define N_MODULES
#define N_CHANS
int imax(int i, int j)
Gaudi::Property< int > m_nSamples
number of samples
float m_sumEt_yy[N_DRAWERS]
Sum Et calcualted inside DSP.
Gaudi::Property< bool > m_calibMode
If data should be put in calib mode.
float m_sumEt_zz[N_DRAWERS]
Sum Et recalculated offline using offline OF.
Gaudi::Property< bool > m_reduced
float m_sumE_xx[N_DRAWERS]
Sum E recalculated offline using DSP raw channels.
float m_sumEz_xx[N_DRAWERS]
Sum Ez recalculated offline using DSP raw channels.
float m_sumEz_yy[N_DRAWERS]
Sum Ez calcualted inside DSP.
Gaudi::Property< bool > m_compareMode
If two sets of data should be compared (e.g.
SG::ReadHandleKey< TileRawChannelContainer > m_of1RawChannelContainerKey
float m_sumEt_xx[N_DRAWERS]
Sum Et recalculated offline using DSP raw channels.
SG::ReadHandleKey< TileRawChannelContainer > m_dspRawChannelContainerKey
SG::ReadHandleKey< TileDigitsContainer > m_fltDigitsContainerKey
SG::ReadHandleKey< TileRawChannelContainer > m_wienerRawChannelContainerKey
Gaudi::Property< bool > m_bsInput
true if bytestream file is used
SG::ReadHandleKey< TileRawChannelContainer > m_qieRawChannelContainerKey
float m_sumEz_zz[N_DRAWERS]
Sum Ez recalculated offline using offline OF.
SG::ReadHandleKey< TileDigitsContainer > m_digitsContainerKey
SG::ReadHandleKey< TileRawChannelContainer > m_fitcRawChannelContainerKey
float m_sumE_zz[N_DRAWERS]
Sum E recalculated offline using offline OF.
SG::ReadHandleKey< TileRawChannelContainer > m_rawChannelContainerKey
float m_sumE_yy[N_DRAWERS]
Sum E calcualted inside DSP.
SG::ReadHandleKey< TileRawChannelContainer > m_fitRawChannelContainerKey
SG::ReadHandleKey< TileRawChannelContainer > m_mfRawChannelContainerKey
SG::ReadHandleKey< TileRawChannelContainer > m_optRawChannelContainerKey
int ir
counter of the current depth
Definition fastadd.cxx:49

◆ DIGI_clearBranch()

void TileAANtuple::DIGI_clearBranch ( void )
private

//////////////////////////////////////////////////////////////////////////// /Clear Tree DIGI variables ////////////////////////////////////////////////////////////////////////////

Definition at line 1960 of file TileAANtuple.cxx.

1960 {
1961 unsigned int size = (m_calibMode) ? 1 : 2;
1962
1963 if (m_compareMode) {
1973 }
1974
1975 CLEAR3(m_arrays->m_gain, size);
1976
1977 if (!m_fltDigitsContainerKey.empty()) {
1978 CLEAR5(m_arrays->m_sampleFlt, size);
1979 CLEAR3(m_arrays->m_gainFlt, size);
1980 }
1981
1982 if (!m_digitsContainerKey.empty()) {
1983
1984 CLEAR5(m_arrays->m_sample,size);
1985
1986 if (m_bsInput) {
1987 CLEAR2(m_arrays->m_DMUheader, size);
1988 CLEAR3(m_arrays->m_DMUbcid, size);
1989 CLEAR3(m_arrays->m_DMUformatErr, size);
1990 CLEAR3(m_arrays->m_DMUparityErr, size);
1991 CLEAR3(m_arrays->m_DMUmemoryErr, size);
1992 CLEAR3(m_arrays->m_DMUSstrobeErr, size);
1993 CLEAR3(m_arrays->m_DMUDstrobeErr, size);
1994
1995 CLEAR3(m_arrays->m_feCRC, size);
1996 CLEAR3(m_arrays->m_rodCRC, size);
1997
1998 CLEAR1(m_arrays->m_rodBCID);
1999 CLEAR1(m_arrays->m_fragSize);
2000 CLEAR(m_arrays->m_dmuMask);
2001 CLEAR(m_arrays->m_slinkCRC);
2002 }
2003
2004 }
2005
2006 if (!m_rawChannelContainerKey.empty()) {
2007 CLEAR2(m_arrays->m_ene, size);
2008 CLEAR2(m_arrays->m_time, size);
2009 CLEAR2(m_arrays->m_ped, size);
2010 CLEAR2(m_arrays->m_chi2, size);
2011 }
2012
2013 if (!m_fitRawChannelContainerKey.empty()) {
2014 CLEAR2(m_arrays->m_eFit, size);
2015 CLEAR2(m_arrays->m_tFit, size);
2016 CLEAR2(m_arrays->m_pedFit, size);
2017 CLEAR2(m_arrays->m_chi2Fit, size);
2018 }
2019
2020 if (!m_fitcRawChannelContainerKey.empty()) {
2021 CLEAR2(m_arrays->m_eFitc, size);
2022 CLEAR2(m_arrays->m_tFitc, size);
2023 CLEAR2(m_arrays->m_pedFitc, size);
2024 CLEAR2(m_arrays->m_chi2Fitc, size);
2025 }
2026
2027 if (!m_optRawChannelContainerKey.empty()) {
2028 CLEAR2(m_arrays->m_eOpt, size);
2029 CLEAR2(m_arrays->m_tOpt, size);
2030 CLEAR2(m_arrays->m_pedOpt, size);
2031 CLEAR2(m_arrays->m_chi2Opt, size);
2032 }
2033
2034
2035 if (!m_qieRawChannelContainerKey.empty()) {
2036 CLEAR2(m_arrays->m_eQIE, size);
2037 CLEAR2(m_arrays->m_tQIE, size);
2038 CLEAR2(m_arrays->m_pedQIE, size);
2039 CLEAR2(m_arrays->m_chi2QIE, size);
2040 }
2041
2042 if (!m_of1RawChannelContainerKey.empty()) {
2043 CLEAR2(m_arrays->m_eOF1, size);
2044 CLEAR2(m_arrays->m_tOF1, size);
2045 CLEAR2(m_arrays->m_pedOF1, size);
2046 CLEAR2(m_arrays->m_chi2OF1, size);
2047 }
2048
2049 if (!m_dspRawChannelContainerKey.empty()) {
2050 CLEAR2(m_arrays->m_eDsp, size);
2051 CLEAR2(m_arrays->m_tDsp, size);
2052 CLEAR2(m_arrays->m_pedDsp, size);
2053 CLEAR2(m_arrays->m_chi2Dsp, size);
2054 }
2055
2056 if (!m_mfRawChannelContainerKey.empty()) {
2057 CLEAR4(m_arrays->m_eMF, size);
2058 CLEAR4(m_arrays->m_tMF, size);
2059 CLEAR2(m_arrays->m_chi2MF, size);
2060 CLEAR2(m_arrays->m_pedMF, size);
2061 }
2062
2063 if (!m_wienerRawChannelContainerKey.empty()) {
2064 CLEAR2(m_arrays->m_eWiener, size);
2065 CLEAR2(m_arrays->m_tWiener, size);
2066 CLEAR2(m_arrays->m_pedWiener, size);
2067 CLEAR2(m_arrays->m_chi2Wiener, size);
2068 }
2069
2070 if (m_bsInput) {
2071 CLEAR1(m_arrays->m_ROD_GlobalCRC);
2072 CLEAR1(m_arrays->m_ROD_BCID);
2073 CLEAR1(m_arrays->m_ROD_DMUBCIDErr);
2074 CLEAR1(m_arrays->m_ROD_DMUmemoryErr);
2075 CLEAR1(m_arrays->m_ROD_DMUSstrobeErr);
2076 CLEAR1(m_arrays->m_ROD_DMUDstrobeErr);
2077 CLEAR1(m_arrays->m_ROD_DMUHeadformatErr);
2078 CLEAR1(m_arrays->m_ROD_DMUHeadparityErr);
2079 CLEAR1(m_arrays->m_ROD_DMUDataformatErr);
2080 CLEAR1(m_arrays->m_ROD_DMUDataparityErr);
2081 CLEAR1(m_arrays->m_ROD_DMUfeCRC);
2082 CLEAR1(m_arrays->m_ROD_DMUrodCRC);
2083 CLEAR(m_arrays->m_ROD_DMUMask);
2084 }
2085
2086}
#define CLEAR5(array, size)
#define CLEAR4(array, size)
#define CLEAR2(array, size)
#define CLEAR1(array)
#define CLEAR3(array, size)

◆ digiChannel2PMT()

int TileAANtuple::digiChannel2PMT ( int fragType,
int chan )
inlineprivate

Definition at line 162 of file TileAANtuple.h.

162 {
163 return (abs(m_cabling->channel2hole(fragType, chan)) - 1);
164 }
const TileCablingService * m_cabling
cabling tool

◆ evtStore()

ServiceHandle< StoreGateSvc > & AthCommonDataStore< AthCommonMsg< Gaudi::Algorithm > >::evtStore ( )
inlineinherited

The standard StoreGateSvc (event store) Returns (kind of) a pointer to the StoreGateSvc.

Definition at line 85 of file AthCommonDataStore.h.

◆ execute()

StatusCode TileAANtuple::execute ( const EventContext & ctx)
virtual

Execute method.

Implements AthAlgorithm.

Definition at line 240 of file TileAANtuple.cxx.

240 {
241 const TileDQstatus* DQstatus = SG::makeHandle (m_DQstatusKey, ctx).get();
242
243 if (m_evtNr < 0) {
244 if (ntuple_initialize(ctx, *DQstatus).isFailure()) {
245 ATH_MSG_ERROR( "ntuple_initialize failed" );
246 }
247 }
248
249 if (m_evtNr%1000 == 0) {
250 ATH_MSG_INFO( m_evtNr << " events processed so far" );
251 }
252
253 if (ntuple_clear().isFailure()) {
254 ATH_MSG_ERROR( "ntuple_clear failed" );
255 }
256
257 bool empty = true;
258
259 // store BeamElements
260 if (!m_beamElemContainerKey.key().empty()) {
261 empty &= storeBeamElements(*DQstatus).isFailure();
262 }
263
264 //store Laser Object
265 if (!m_laserObjectKey.empty()) {
266 empty &= storeLaser(ctx).isFailure();
267 }
268
269 // store TileDigits
270 empty &= storeDigits(ctx, m_fltDigitsContainerKey,m_arrays->m_sampleFlt,m_arrays->m_gainFlt,false).isFailure();
271 empty &= storeDigits(ctx, m_digitsContainerKey, m_arrays->m_sample, m_arrays->m_gain, true ).isFailure();
272
273 // store TileRawChannels
274 // start from DSP channels - so we can find out what is the DSP units
275 empty &= storeRawChannels(ctx, m_dspRawChannelContainerKey, m_arrays->m_eDsp, m_arrays->m_tDsp, m_arrays->m_chi2Dsp, m_arrays->m_pedDsp, true ).isFailure();
276 empty &= storeRawChannels(ctx, m_rawChannelContainerKey, m_arrays->m_ene, m_arrays->m_time, m_arrays->m_chi2, m_arrays->m_ped, false).isFailure();
277 empty &= storeMFRawChannels(ctx, m_mfRawChannelContainerKey, m_arrays->m_eMF, m_arrays->m_tMF, m_arrays->m_chi2MF, m_arrays->m_pedMF, false).isFailure();
278 empty &= storeRawChannels(ctx, m_fitRawChannelContainerKey, m_arrays->m_eFit, m_arrays->m_tFit, m_arrays->m_chi2Fit, m_arrays->m_pedFit, false).isFailure();
279 empty &= storeRawChannels(ctx, m_fitcRawChannelContainerKey, m_arrays->m_eFitc, m_arrays->m_tFitc, m_arrays->m_chi2Fitc, m_arrays->m_pedFitc, false).isFailure();
280 empty &= storeRawChannels(ctx, m_optRawChannelContainerKey, m_arrays->m_eOpt, m_arrays->m_tOpt, m_arrays->m_chi2Opt, m_arrays->m_pedOpt, false).isFailure();
281 empty &= storeRawChannels(ctx, m_qieRawChannelContainerKey, m_arrays->m_eQIE, m_arrays->m_tQIE, m_arrays->m_chi2QIE, m_arrays->m_pedQIE, false).isFailure();
282 empty &= storeRawChannels(ctx, m_of1RawChannelContainerKey, m_arrays->m_eOF1, m_arrays->m_tOF1, m_arrays->m_chi2OF1, m_arrays->m_pedOF1, false).isFailure();
283 empty &= storeRawChannels(ctx, m_wienerRawChannelContainerKey, m_arrays->m_eWiener, m_arrays->m_tWiener, m_arrays->m_chi2Wiener, m_arrays->m_pedWiener, false).isFailure();
284
285 // store TMDB data
286 //
287 empty &= storeTMDBDecision(ctx).isFailure();
288 empty &= storeTMDBDigits(ctx).isFailure();
289 empty &= storeTMDBRawChannel(ctx).isFailure();
290
291 m_evTime = 0;
292
293 if (m_bsInput) {
294 const eformat::FullEventFragment<const uint32_t*>* event = nullptr;
295 const eformat::ROBFragment<const uint32_t*>* robFrag = nullptr;
296 event = m_robSvc->getEvent(ctx);
297 std::vector<const ROBDataProviderSvc::ROBF*> robf;
298 // keep pointer to whole event and to CIS PAR frag internally
299 m_robSvc->getROBData(ctx, m_ROBID, robf);
300 robFrag = (robf.size() > 0 ) ? robf[0] : nullptr;
301 if (event) {
302 m_evTime = event->bc_time_seconds();
303 if ( robFrag ) {
304 // Store ROD header info from collection
305 int rod = N_RODS-1;
306 m_l1ID[rod] = robFrag->rod_lvl1_id();
307 m_l1Type[rod] = robFrag->rod_lvl1_trigger_type();
308 m_evType[rod] = robFrag->rod_detev_type();
309 m_evBCID[rod] = robFrag->rod_bc_id();
310 if (m_trigType == 0) m_trigType = -m_l1Type[rod]; // make negative to distinguish from TileCal internal trig types
311 }
312 }
313 }
314
315 m_lumiBlock = -1; // placeholder
316
317 //Get run and event numbers
318 m_run = ctx.eventID().run_number();
319 m_evt = ctx.eventID().event_number();
320
321 if ( ctx.eventID().lumi_block() ){
322 m_lumiBlock = ctx.eventID().lumi_block();
323 }
324
325 //Get timestamp of the event
326 if (ctx.eventID().time_stamp() > 0) {
327 m_evTime = ctx.eventID().time_stamp();
328 }
329
330 if (m_evTime>0) {
331 using namespace boost::local_time;
332 using namespace boost::posix_time;
333
334 /*
335 // just an example how to read file with time zones
336 tz_database tz_db;
337 try {
338 tz_db.load_from_file("../data/date_time_zonespec.csv");
339 time_zone_ptr gva_tz = tz_db.time_zone_from_region("Europe/Zurich");
340 }catch(data_not_accessible dna) {
341 std::cerr << "Error with time zone data file: " << dna.what() << std::endl;
342 //exit(EXIT_FAILURE);
343 }catch(bad_field_count bfc) {
344 std::cerr << "Error with time zone data file: " << bfc.what() << std::endl;
345 //exit(EXIT_FAILURE);
346 }
347 */
348 //"Europe/Zurich","CET","CET","CEST","CEST","+01:00:00","+01:00:00","-1;0;3","+02:00:00","-1;0;10","+03:00:00"
349 static const time_zone_ptr gva_tz(new posix_time_zone((std::string)"CET+01CEST01:00:00,M3.5.0/02:00:00,M10.5.0/03:00:00"));
350 local_date_time gva_time(from_time_t(m_evTime),gva_tz);
351
352 //std::ostringstream otime;
353 //otime << gva_time; // time in the format YYYY-MMM-DD HH:MM:SS TZ
354 //strncpy(m_dateTime,otime.str().c_str(),31);
355
356 //time_duration hms(gva_time.time_of_day()); - will give time of the day in GMT
357 //m_HHMMSS = hms.hours()*10000+hms.minutes()*100+hms.seconds();
358
359 struct tm gva_tm(to_tm(gva_time));
360 strftime(m_dateTime, 32, "%Y-%b-%d %H:%M:%S %Z", &gva_tm);
361 m_HHMMSS = gva_tm.tm_hour*10000+gva_tm.tm_min*100+gva_tm.tm_sec;
362
363 // the code below is only valid when running at CERN (in Geneva time zone)
364 //struct tm *time = localtime((time_t*)(&m_evTime));
365 //m_HHMMSS = time->tm_hour*10000+time->tm_min*100+time->tm_sec;
366 //strftime(m_dateTime, 32, "%Y-%m-%d %H:%M:%S %Z", time);
367
368 } else {
369 m_HHMMSS = -1;
370 m_dateTime[0] = '\0'; // empty string
371 }
372
373 // store DCS data
374 if (m_checkDCS) {
375 empty &= storeDCS(ctx).isFailure();
376 }
377
378 if (empty) {
379 ATH_MSG_WARNING( "Some problems in execute - ntuple was not filled at all" );
380 }
381
382 // FIRST 4 EVENTS ARE SKIPPED TO RETRIEVE LASER PEDESTALS
384 m_ntuplePtr->Fill();
385 } // IF
386
387 ++m_evtNr;
388
389 // Execution completed.
390
391 ATH_MSG_DEBUG( "execute() completed successfully" );
392 return StatusCode::SUCCESS;
393}
#define ATH_MSG_DEBUG(x,...)
#define ATH_MSG_ERROR(x,...)
#define ATH_MSG_WARNING(x,...)
#define ATH_MSG_INFO(x,...)
#define N_RODS
static const Attributes_t empty
int m_l1ID[N_RODS]
Level1 ID from ROD header.
StatusCode storeTMDBDigits(const EventContext &ctx)
StatusCode storeDCS(const EventContext &ctx)
StatusCode storeRawChannels(const EventContext &ctx, const SG::ReadHandleKey< TileRawChannelContainer > &containerKey, float ene[N_ROS2][N_MODULES][N_CHANS], float time[N_ROS2][N_MODULES][N_CHANS], float chi2[N_ROS2][N_MODULES][N_CHANS], float ped[N_ROS2][N_MODULES][N_CHANS], bool fillAll)
/ Fill ntuple with data from TRC.
StatusCode storeBeamElements(const TileDQstatus &DQstatus)
SG::ReadHandleKey< TileLaserObject > m_laserObjectKey
StatusCode storeTMDBRawChannel(const EventContext &ctxx)
StatusCode storeLaser(const EventContext &ctx)
Gaudi::Property< bool > m_checkDCS
if false, do not use TileDCS at all
StatusCode storeMFRawChannels(const EventContext &ctx, const SG::ReadHandleKey< TileRawChannelContainer > &containerKey, float *ene, float *time, float chi2[N_ROS2][N_MODULES][N_CHANS], float ped[N_ROS2][N_MODULES][N_CHANS], bool fillAll)
SG::ReadHandleKey< TileDQstatus > m_DQstatusKey
std::vector< uint32_t > m_ROBID
ServiceHandle< IROBDataProviderSvc > m_robSvc
StatusCode storeDigits(const EventContext &ctx, const SG::ReadHandleKey< TileDigitsContainer > &containerKey, short *sample, short gain[N_ROS2][N_MODULES][N_CHANS], bool fillAll)
/ Fill Ntuple with info from TileDigits / Return true if the collection is empty
StatusCode storeTMDBDecision(const EventContext &ctx)
Gaudi::Property< int > m_skipEvents
int m_l1Type[N_RODS]
Level1 Type from ROD header.
int m_trigType
trigger type (1=Phys, 2=Laser, 4=Ped, 8=CIS)
int m_evType[N_RODS]
Event Type from ROD header.
int m_evBCID[N_RODS]
Event BCID from ROD header.
char m_dateTime[32]
event date and time
StatusCode ntuple_clear()
StatusCode ntuple_initialize(const EventContext &ctx, const TileDQstatus &DQstatus)
SG::ReadCondHandle< T > makeHandle(const SG::ReadCondHandleKey< T > &key, const EventContext &ctx=Gaudi::Hive::currentContext())

◆ extraDeps_update_handler()

void AthCommonDataStore< AthCommonMsg< Gaudi::Algorithm > >::extraDeps_update_handler ( Gaudi::Details::PropertyBase & ExtraDeps)
protectedinherited

Add StoreName to extra input/output deps as needed.

use the logic of the VarHandleKey to parse the DataObjID keys supplied via the ExtraInputs and ExtraOuputs Properties to add the StoreName if it's not explicitly given

◆ extraOutputDeps()

const DataObjIDColl & AthCommonAlgorithm< Gaudi::Algorithm >::extraOutputDeps ( ) const
overridevirtualinherited

Return the list of extra output dependencies.

This list is extended to include symlinks implied by inheritance relations.

Definition at line 89 of file AthCommonAlgorithm.cxx.

54{
55 // If we didn't find any symlinks to add, just return the collection
56 // from the base class. Otherwise, return the extended collection.
57 if (!m_extendedExtraObjects.empty()) {
59 }
61}
Common base class for algorithms.

◆ fillCellMap()

void TileAANtuple::fillCellMap ( TTree * ntuplePtr,
const EventContext & ctx )
private

///////////////////////////////////////////////////////////////////////////

/ Variables Legenda / / - C : a character string terminated by the 0 character / - B : an 8 bit signed integer / - b : an 8 bit unsigned integer 2^8=256 / - S : a 16 bit signed integer (i.e. a "short") / - s : a 16 bit unsigned integer 2^16=65536 / - I : a 32 bit signed integer (i.e an "int") / - i : a 32 bit unsigned integer 2^32=4294967296 / - F : a 32 bit floating point (i.e. a "float") / - D : a 64 bit floating point (i.e. a "double") / - L : a 64 bit signed integer / - l : a 64 bit unsigned integer / - O : a boolean //////////////////////////////////////////////////////////////////////////// /Create eta-phi map for all channels

////////////////////////////////////////////////////////////////////////////

< Pointer to MbtsDetDescrManager

Definition at line 1441 of file TileAANtuple.cxx.

1441 {
1442
1443 //coverity[STACK_USE]
1444 float eta[4][64][48];
1445 float phi[4][64][48];
1446 short tower[4][64][48];
1447 short sample[4][64][48];
1448 short ind[4][64][48];
1449 short pmt[4][64][48];
1450 short bad[4][64][48][2];
1451
1452 CLEAR(eta);
1453 CLEAR(phi);
1454 CLEAR1(tower);
1455 CLEAR1(sample);
1456 CLEAR1(ind);
1457 CLEAR(pmt);
1458 CLEAR1(bad);
1459
1460 ntuplePtr->Branch("eta", eta, "eta[4][64][48]/F");
1461 ntuplePtr->Branch("phi", phi, "phi[4][64][48]/F");
1462 ntuplePtr->Branch("tower", tower, "tower[4][64][48]/S");
1463 ntuplePtr->Branch("sample", sample, "sample[4][64][48]/S");
1464 ntuplePtr->Branch("ind", ind, "ind[4][64][48]/S");
1465 ntuplePtr->Branch("pmt", pmt, "pmt[4][64][48]/S");
1466 ntuplePtr->Branch("bad", bad, "bad[4][64][48][2]/S");
1467
1470
1471 for (; itr != end; ++itr) {
1472 const CaloDetDescrElement * caloDDE = (*itr);
1473 Identifier cell_id = caloDDE->identify();
1474 IdentifierHash hash[2] = { caloDDE->onl1(), caloDDE->onl2() };
1475 for (int i = 0; i < 2; ++i) {
1476 if (hash[i] != TileHWID::NOT_VALID_HASH) {
1477 HWIdentifier adc_id = m_tileHWID->adc_id(hash[i], 0);
1478 int ROS = m_tileHWID->ros(adc_id);
1479 int drawer = m_tileHWID->drawer(adc_id);
1480 int chan = m_tileHWID->channel(adc_id);
1481 int index, pm;
1482 m_cabling->h2s_cell_id_index(adc_id, index, pm); // index=-2 for MBTS or -1 for all disconnected channels
1483 if (index > -1) index = i; // just put back 0 or 1 for all connected channels
1484 pm = m_cabling->channel2hole(ROS, chan); // convert channel to PMT number, ignoring difference between drawers
1485 if ((ROS == 3 && drawer == 14) || (ROS == 4 && drawer == 17)) {
1486 if (pm < 0) pm = -pm; // crack scin in EBA15 EBC18 in non-standard place - recover positive pmt number
1487 if (chan == 2 || chan == 3) pm = -pm; // no D4 in special EBA15 EBC18 - put negative sign
1488 }
1489 if (m_pmtOrder) chan = digiChannel2PMT(ROS,chan); // convert channel to PMT-1
1490 int rosI = ROS-1; // make ros index from 0 to 3
1491 eta[rosI][drawer][chan] = caloDDE->eta();
1492 phi[rosI][drawer][chan] = caloDDE->phi();
1493 tower[rosI][drawer][chan] = m_tileID->tower(cell_id);
1494 sample[rosI][drawer][chan] = m_tileID->sample(cell_id);
1495 ind[rosI][drawer][chan] = index;
1496 pmt[rosI][drawer][chan] = pm;
1497 }
1498 }
1499 }
1500
1501 const MbtsDetDescrManager* mbtsMgr = nullptr;
1502 //coverity[STACK_USE]
1503 if ( detStore()->retrieve(mbtsMgr).isFailure() ) {
1504 ATH_MSG_WARNING( "Unable to retrieve MbtsDetDescrManager from DetectorStore" );
1505 mbtsMgr = nullptr;
1506 }
1507 for (int ROS = 1; ROS < 5; ++ROS) {
1508 int rosI = ROS - 1;
1509 for (int drawer = 0; drawer < 64; ++drawer) {
1510 for (int chan = 0; chan < 48; ++chan) {
1511 for (int adc = 0; adc < 2; ++adc) {
1512 HWIdentifier adc_id = m_tileHWID->adc_id(ROS, drawer, chan, adc);
1513 bad[rosI][drawer][chan][adc] = (short) m_tileBadChanTool->encodeStatus(m_tileBadChanTool->getAdcStatus(adc_id, ctx));
1514 int index, pm;
1515 Identifier cell_id = m_cabling->h2s_cell_id_index(adc_id, index, pm);
1516 if (index == -2) { // MBTS
1517 ind[rosI][drawer][chan] = index;
1518 pmt[rosI][drawer][chan] = 1; // we know that all MBTS are in PMT 1
1519 if (mbtsMgr) {
1520 const CaloDetDescrElement * caloDDE = mbtsMgr->get_element(cell_id);
1521 if (caloDDE) {
1522 if (caloDDE->z() > 0.0)
1523 eta[rosI][drawer][chan] = fabs(caloDDE->eta());
1524 else
1525 eta[rosI][drawer][chan] = -fabs(caloDDE->eta());
1526 phi[rosI][drawer][chan] = caloDDE->phi();
1527 }
1528 }
1529 }
1530 }
1531 }
1532 }
1533 }
1534
1535 ntuplePtr->Fill();
1536}
Scalar eta() const
pseudorapidity method
Scalar phi() const
phi method
const ServiceHandle< StoreGateSvc > & detStore() const
Identifier identify() const override final
cell identifier
IdentifierHash onl2() const
cell online identifier 2
IdentifierHash onl1() const
cell online identifier 1
CaloDetDescrElement * get_element(const Identifier &elementId) const
Gaudi::Property< bool > m_pmtOrder
change channel ordering to pmt ordering in ntuple
const TileID * m_tileID
int digiChannel2PMT(int fragType, int chan)
ToolHandle< ITileBadChanTool > m_tileBadChanTool
Tile Bad Channel tool.
const TileDetDescrManager * m_tileMgr
Pointer to TileDetDescrManager.
const TileHWID * m_tileHWID
calo_element_vec::const_iterator calo_element_const_iterator
@ NOT_VALID_HASH
Definition TileHWID.h:314
str index
Definition DeMoScan.py:362

◆ filterPassed()

virtual bool AthCommonAlgorithm< Gaudi::Algorithm >::filterPassed ( const EventContext & ctx) const
inlinevirtualinherited

Get filter decision:

Definition at line 93 of file AthCommonAlgorithm.h.

93 {
94 return execState( ctx ).filterPassed();
95 }
virtual bool filterPassed(const EventContext &ctx) const
Get filter decision:

◆ finalize()

StatusCode TileAANtuple::finalize ( )

Definition at line 1331 of file TileAANtuple.cxx.

1331 {
1332
1333 if (m_arrays->m_sample) free(m_arrays->m_sample);
1334 if (m_arrays->m_sampleFlt) free(m_arrays->m_sampleFlt);
1335 if (m_arrays->m_sampleTMDB) free(m_arrays->m_sampleTMDB);
1336 if (m_arrays->m_eMF) free(m_arrays->m_eMF);
1337 if (m_arrays->m_tMF) free(m_arrays->m_tMF);
1338
1339 ATH_MSG_INFO( "finalize() successfully" );
1340 return StatusCode::SUCCESS;
1341}
void free(pointer p)
Free an element.

◆ initialize()

StatusCode TileAANtuple::initialize ( )

Alg standard interface function.

Definition at line 117 of file TileAANtuple.cxx.

117 {
118 ATH_MSG_INFO( "Initialization started");
119
120 //=== get TileCablingSvc
121 ATH_CHECK( m_cablingSvc.retrieve() );
122
123 // find TileCablingService
125
126 // retrieve TileDetDescr Manager det store
127 ATH_CHECK( detStore()->retrieve(m_tileMgr) );
128
129 // retrieve TileID helper from det store
130 ATH_CHECK( detStore()->retrieve(m_tileID) );
131 ATH_CHECK( detStore()->retrieve(m_tileHWID) );
132
133 //=== get TileDCSTool
134 if (m_checkDCS) {
135 ATH_CHECK( m_tileDCS.retrieve() );
136 } else {
137 m_tileDCS.disable();
138 }
139
140 //=== get TileBadChanTool
141 ATH_CHECK( m_tileBadChanTool.retrieve() );
142
143 //=== get TileCondToolEmscale
144 ATH_CHECK( m_tileToolEmscale.retrieve() );
145
146 //=== get TileL2Builder
147 if (m_compareMode) {
148 ATH_CHECK( m_l2Builder.retrieve() );
149 }
150
151 ATH_CHECK( m_DQstatusKey.initialize() );
152
153 int sample_size = N_ROS2*N_MODULES*N_CHANS*m_nSamples;
154 int sample_TMDB_size = N_ROS*N_MODULES*N_TMDBCHANS*m_nSamples;
155 m_arrays->m_sample = (short *) malloc(sample_size*sizeof(short));
156 m_arrays->m_sampleFlt = (short *) malloc(sample_size*sizeof(short));
157 m_arrays->m_sampleTMDB = (unsigned char *) malloc(sample_TMDB_size*sizeof(unsigned char));
158
175 ATH_CHECK( m_l2CntKey.initialize(m_compareMode) );
176 ATH_CHECK( m_hid2RESrcIDKey.initialize(m_bsInput) );
177
178 ATH_MSG_INFO( "initialization completed" ) ;
179 return StatusCode::SUCCESS;
180}
#define ATH_CHECK
Evaluate an expression and check for errors.
#define N_ROS2
#define N_TMDBCHANS
ServiceHandle< TileCablingSvc > m_cablingSvc
Name of Tile cabling service.
ToolHandle< ITileDCSTool > m_tileDCS
SG::ReadHandleKey< TileDigitsContainer > m_tileMuRcvDigitsContainerKey
SG::ReadHandleKey< TileL2Container > m_l2CntKey
ToolHandle< TileCondToolEmscale > m_tileToolEmscale
main Tile Calibration tool
ToolHandle< TileL2Builder > m_l2Builder
SG::ReadCondHandleKey< TileHid2RESrcID > m_hid2RESrcIDKey
SG::ReadHandleKey< TileMuonReceiverContainer > m_tileMuRcvContainerKey
SG::ReadHandleKey< TileRawChannelContainer > m_tileMuRcvRawChannelContainerKey
static const TileCablingService * getInstance()
get pointer to service instance

◆ initNTuple()

StatusCode TileAANtuple::initNTuple ( const EventContext & ctx)
private

Definition at line 1356 of file TileAANtuple.cxx.

1356 {
1357 //Aux Ntuple creation
1358
1359 if (m_compressSettings >= 0) {
1360 std::vector<std::string> files;
1361 m_fileMgr->getFiles(Io::ROOT, ( Io::WRITE | Io::CREATE ), files);
1362 for (std::string& file : files) {
1363 TFile* outFile = (TFile*) m_fileMgr->fptr(file);
1364 if (outFile) {
1365 ATH_MSG_INFO("Changing compressing settings to " << m_compressSettings.value() << " for file: " << file);
1366 outFile->SetCompressionSettings(m_compressSettings.value());
1367 }
1368 }
1369 }
1370
1371 if (m_ntupleID.value().size() > 0) {
1372
1373 std::string ntupleID = m_ntupleID.value() + "_map";
1374
1375 TTree* ntuplePtr = new TTree(ntupleID.c_str(), "TileCal-CellMap");
1376 if(m_thistSvc->regTree("/" + m_streamName.value() + "/" + ntupleID, ntuplePtr).isFailure()) {
1377 ATH_MSG_ERROR( "Problem registering TileRec CellMap Tree" );
1378 }
1379
1380 fillCellMap(ntuplePtr, ctx);
1381
1382 //Ntuple creation
1383 m_ntuplePtr = new TTree(m_ntupleID.value().c_str(), "TileCal-Ntuple");
1384 m_ntuplePtr->SetMaxTreeSize(m_treeSize);
1385 if (m_thistSvc->regTree("/" + m_streamName.value() + "/" + m_ntupleID.value(), m_ntuplePtr).isFailure()) {
1386 ATH_MSG_ERROR( "Problem registering TileRec Tree");
1387 }
1388
1391 if (!m_laserObjectKey.empty()) {
1392 const TileLaserObject* laserObj =
1393 SG::makeHandle(m_laserObjectKey, ctx).get();
1394 m_las_version = laserObj->getVersion();
1396 }
1399 }
1400
1401 //DCS Ntuple creation
1402 if (m_checkDCS) {
1403 std::string ntupleDCS = "Tile_DCS";
1404 m_DCSntuplePtr = new TTree(ntupleDCS.c_str(), "TileCal-DCS data");
1405 if (m_thistSvc->regTree("/" + m_streamName.value() + "/" + ntupleDCS, m_DCSntuplePtr).isFailure()) {
1406 ATH_MSG_ERROR( "Problem registering TileRec DCS Tree");
1407 }
1408 DCS_addBranch();
1409 }
1410
1411 return StatusCode::SUCCESS;
1412}
Gaudi::Property< int > m_compressSettings
void TRIGGER_addBranch(void)
//////////////////////////////////////////////////////////////////////////// /Add TRIGGER variables t...
void DIGI_addBranch(void)
//////////////////////////////////////////////////////////////////////////// /Add Tree DIGI variables...
Gaudi::Property< int64_t > m_treeSize
Gaudi::Property< std::string > m_streamName
void DCS_addBranch(void)
void CISPAR_addBranch(void)
//////////////////////////////////////////////////////////////////////////// /Add Tree CISPAR variabl...
ServiceHandle< IFileMgr > m_fileMgr
void TMDB_addBranch(void)
void fillCellMap(TTree *ntuplePtr, const EventContext &ctx)
///////////////////////////////////////////////////////////////////////////
Gaudi::Property< std::string > m_ntupleID
void LASER_addBranch(void)
//////////////////////////////////////////////////////////////////////////// /Add Tree LASER variable...
int getVersion() const
std::vector< std::string > files
file names and file pointers
Definition hcg.cxx:52
outFile
Comment Out Those You do not wish to run.
TFile * file

◆ inputHandles()

virtual std::vector< Gaudi::DataHandle * > AthCommonDataStore< AthCommonMsg< Gaudi::Algorithm > >::inputHandles ( ) const
overridevirtualinherited

Return this algorithm's input handles.

We override this to include handle instances from key arrays if they have not yet been declared. See comments on updateVHKA.

◆ isClonable()

virtual bool AthCommonAlgorithm< Gaudi::Algorithm >::isClonable ( ) const
inlineoverridevirtualinherited

Specify if the algorithm is clonable.

Only relevant for non-reentrant algorithms. Actual number of clones needs to be set via the "Cardinality" property.

Reimplemented in AFP_DigiTop, AlgB, AlgT, BCM_Digitization, CscDigitBuilder, CscDigitToCscRDO, G4AtlasAlg, G4RunAlg, HGTD_Digitization, HiveAlgBase, InDet::GNNSeedingTrackMaker, InDet::SCT_Clusterization, InDet::SiSPGNNTrackMaker, InDet::SiSPSeededTrackFinder, InDet::SiTrackerSpacePointFinder, ISF::SimKernelMT, ITk::StripDigitization, ITkPixelCablingAlg, ITkStripCablingAlg, LArHitEMapMaker, LArTTL1Maker, LUCID_DigiTop, LVL1::L1TopoSimulation, MergeCalibHits, MergeGenericMuonSimHitColl, MergeHijingPars, MergeMcEventCollection, MergeTrackRecordCollection, MergeTruthJets, MergeTruthParticles, MuonDigitizer, PileUpMTAlg, PixelDigitization, RoIBResultToxAOD, SCT_ByteStreamErrorsTestAlg, SCT_CablingCondAlgFromCoraCool, SCT_CablingCondAlgFromText, SCT_ConditionsParameterTestAlg, SCT_ConditionsSummaryTestAlg, SCT_ConfigurationConditionsTestAlg, SCT_Digitization, SCT_FlaggedConditionTestAlg, SCT_LinkMaskingTestAlg, SCT_MajorityConditionsTestAlg, SCT_ModuleVetoTestAlg, SCT_MonitorConditionsTestAlg, SCT_PrepDataToxAOD, SCT_RawDataToxAOD, SCT_ReadCalibChipDataTestAlg, SCT_ReadCalibDataTestAlg, SCT_RODVetoTestAlg, SCT_SensorsTestAlg, SCT_SiliconConditionsTestAlg, SCT_StripVetoTestAlg, SCT_TdaqEnabledTestAlg, SCT_TestCablingAlg, SCTEventFlagWriter, SCTRawDataProvider, SCTSiLorentzAngleTestAlg, SCTSiPropertiesTestAlg, SGInputLoader, Simulation::BeamEffectsAlg, TileHitVecToCnt, TileMuonFitter, TilePulseForTileMuonReceiver, TileRawChannelMaker, TRTDigitization, and ZDC_DigiTop.

Definition at line 68 of file AthCommonAlgorithm.h.

68 {
69 return true;
70 }

◆ isReEntrant()

virtual bool AthAlgorithm::isReEntrant ( ) const
inlinefinaloverrideprotectedvirtualinherited

Legacy algorithms are not thread-safe.

Definition at line 47 of file AthAlgorithm.h.

47{ return false; }

◆ LASER_addBranch()

void TileAANtuple::LASER_addBranch ( void )
private

//////////////////////////////////////////////////////////////////////////// /Add Tree LASER variables Tree

////////////////////////////////////////////////////////////////////////////

Definition at line 1618 of file TileAANtuple.cxx.

1618 {
1619
1620 if (!m_laserObjectKey.empty()) {
1621
1622 const char* gainnames[2] = {"LG","HG"};
1623 const char* channames[16] = {"Diode0","Diode1","Diode2","Diode3","Diode4","Diode5","Diode6","Diode7",
1624 "Diode8","Diode9","ExtCIS0","IntCIS","DiodePhocal","ExtCIS1","PMT1","PMT2"};
1625
1626 m_ntuplePtr->Branch("LASER_BCID", &m_las_BCID, "LASER_BCID/I");
1627
1628 m_ntuplePtr->Branch("LASER_FILTER", &m_las_Filt, "LASER_FILTER/I");
1629 m_ntuplePtr->Branch("LASER_REQAMP", &m_las_ReqAmp, "LASER_REQAMP/F");
1630 m_ntuplePtr->Branch("LASER_MEASAMP", &m_las_MeasAmp, "LASER_MEASAMP/F");
1631
1632 if(m_las_version==2) {
1633
1634 ATH_MSG_DEBUG("LASERII BRANCHING..");
1635
1636 m_ntuplePtr->Branch(Form("LASER_QDCTIMEOUT"),&(m_qdctimeout),Form("LASER_QDCTIMEOUT/O"));
1637 m_ntuplePtr->Branch(Form("LASER_TDCTIMEOUT"),&(m_tdctimeout),Form("LASER_TDCTIMEOUT/O"));
1638 m_ntuplePtr->Branch(Form("LASER_DAQTYPE"),&(m_daqtype),Form("LASER_DAQTYPE/I"));
1639 for(int chan=0;chan<32;++chan){
1640 int ch=chan>>1;
1641 int gn=chan&1;
1642 m_ntuplePtr->Branch(Form("LASER_%s_%s_ADC",gainnames[gn],channames[ch]),&(m_arrays->m_chan[chan]),Form("LASER_%s_%s_ADC/I",gainnames[gn],channames[ch]));
1643 m_ntuplePtr->Branch(Form("LASER_%s_%s_Ped",gainnames[gn],channames[ch]),&(m_arrays->m_chan_Ped[chan]),Form("LASER_%s_%s_Ped/F",gainnames[gn],channames[ch]));
1644 m_ntuplePtr->Branch(Form("LASER_%s_%s_Led",gainnames[gn],channames[ch]),&(m_arrays->m_chan_Led[chan]),Form("LASER_%s_%s_Led/F",gainnames[gn],channames[ch]));
1645 m_ntuplePtr->Branch(Form("LASER_%s_%s_Ped1",gainnames[gn],channames[ch]),&(m_arrays->m_chan_Lin[chan]),Form("LASER_%s_%s_Ped1/F",gainnames[gn],channames[ch]));
1646 m_ntuplePtr->Branch(Form("LASER_%s_%s_Alpha",gainnames[gn],channames[ch]),&(m_arrays->m_chan_Alpha[chan]),Form("LASER_%s_%s_Alpha/F",gainnames[gn],channames[ch]));
1647 m_ntuplePtr->Branch(Form("LASER_%s_%s_Sigma_Ped",gainnames[gn],channames[ch]),&(m_arrays->m_chan_SPed[chan]),Form("LASER_%s_%s_Sigma_Ped/F",gainnames[gn],channames[ch]));
1648 m_ntuplePtr->Branch(Form("LASER_%s_%s_Sigma_Led",gainnames[gn],channames[ch]),&(m_arrays->m_chan_SLed[chan]),Form("LASER_%s_%s_Sigma_Led/F",gainnames[gn],channames[ch]));
1649 m_ntuplePtr->Branch(Form("LASER_%s_%s_Sigma_Ped1",gainnames[gn],channames[ch]),&(m_arrays->m_chan_SLin[chan]),Form("LASER_%s_%s_Sigma_Ped1/F",gainnames[gn],channames[ch]));
1650 m_ntuplePtr->Branch(Form("LASER_%s_%s_Sigma_Alpha",gainnames[gn],channames[ch]),&(m_arrays->m_chan_SAlpha[chan]),Form("LASER_%s_%s_Sigma_Alpha/F",gainnames[gn],channames[ch]));
1651 } // FOR
1652
1653 } else {
1654
1655 ATH_MSG_DEBUG("LASERI BRANCHING..");
1656
1657 m_ntuplePtr->Branch("LASER_Diode_1_ADC", &(m_arrays->m_las_D_ADC[0][0]), "LASER_Diode_1_ADC/I");
1658 m_ntuplePtr->Branch("LASER_Diode_2_ADC", &(m_arrays->m_las_D_ADC[0][1]), "LASER_Diode_2_ADC/I");
1659 m_ntuplePtr->Branch("LASER_Diode_3_ADC", &(m_arrays->m_las_D_ADC[0][2]), "LASER_Diode_3_ADC/I");
1660 m_ntuplePtr->Branch("LASER_Diode_4_ADC", &(m_arrays->m_las_D_ADC[0][3]), "LASER_Diode_4_ADC/I");
1661
1662 m_ntuplePtr->Branch("LASER_Diode_1_Ped", &(m_arrays->m_las_D_Ped[0][0]), "LASER_Diode_1_Ped/F");
1663 m_ntuplePtr->Branch("LASER_Diode_2_Ped", &(m_arrays->m_las_D_Ped[0][1]), "LASER_Diode_2_Ped/F");
1664 m_ntuplePtr->Branch("LASER_Diode_3_Ped", &(m_arrays->m_las_D_Ped[0][2]), "LASER_Diode_3_Ped/F");
1665 m_ntuplePtr->Branch("LASER_Diode_4_Ped", &(m_arrays->m_las_D_Ped[0][3]), "LASER_Diode_4_Ped/F");
1666
1667 m_ntuplePtr->Branch("LASER_Diode_1_Ped_RMS", &(m_arrays->m_las_D_Ped_RMS[0][0]), "LASER_Diode_1_Ped_RMS/F");
1668 m_ntuplePtr->Branch("LASER_Diode_2_Ped_RMS", &(m_arrays->m_las_D_Ped_RMS[0][1]), "LASER_Diode_2_Ped_RMS/F");
1669 m_ntuplePtr->Branch("LASER_Diode_3_Ped_RMS", &(m_arrays->m_las_D_Ped_RMS[0][2]), "LASER_Diode_3_Ped_RMS/F");
1670 m_ntuplePtr->Branch("LASER_Diode_4_Ped_RMS", &(m_arrays->m_las_D_Ped_RMS[0][3]), "LASER_Diode_4_Ped_RMS/F");
1671
1672 m_ntuplePtr->Branch("LASER_Diode_1_Alpha", &(m_arrays->m_las_D_Alpha[0][0]), "LASER_Diode_1_Alpha/F");
1673 m_ntuplePtr->Branch("LASER_Diode_2_Alpha", &(m_arrays->m_las_D_Alpha[0][1]), "LASER_Diode_2_Alpha/F");
1674 m_ntuplePtr->Branch("LASER_Diode_3_Alpha", &(m_arrays->m_las_D_Alpha[0][2]), "LASER_Diode_3_Alpha/F");
1675 m_ntuplePtr->Branch("LASER_Diode_4_Alpha", &(m_arrays->m_las_D_Alpha[0][3]), "LASER_Diode_4_Alpha/F");
1676
1677 m_ntuplePtr->Branch("LASER_Diode_1_Alpha_RMS", &(m_arrays->m_las_D_Alpha_RMS[0][0]), "LASER_Diode_1_Alpha_RMS/F");
1678 m_ntuplePtr->Branch("LASER_Diode_2_Alpha_RMS", &(m_arrays->m_las_D_Alpha_RMS[0][1]), "LASER_Diode_2_Alpha_RMS/F");
1679 m_ntuplePtr->Branch("LASER_Diode_3_Alpha_RMS", &(m_arrays->m_las_D_Alpha_RMS[0][2]), "LASER_Diode_3_Alpha_RMS/F");
1680 m_ntuplePtr->Branch("LASER_Diode_4_Alpha_RMS", &(m_arrays->m_las_D_Alpha_RMS[0][3]), "LASER_Diode_4_Alpha_RMS/F");
1681
1682 m_ntuplePtr->Branch("LASER_Diode_1_AlphaPed", &(m_arrays->m_las_D_AlphaPed[0][0]), "LASER_Diode_1_AlphaPed/F");
1683 m_ntuplePtr->Branch("LASER_Diode_2_AlphaPed", &(m_arrays->m_las_D_AlphaPed[0][1]), "LASER_Diode_2_AlphaPed/F");
1684 m_ntuplePtr->Branch("LASER_Diode_3_AlphaPed", &(m_arrays->m_las_D_AlphaPed[0][2]), "LASER_Diode_3_AlphaPed/F");
1685 m_ntuplePtr->Branch("LASER_Diode_4_AlphaPed", &(m_arrays->m_las_D_AlphaPed[0][3]), "LASER_Diode_4_AlphaPed/F");
1686
1687 m_ntuplePtr->Branch("LASER_Diode_1_AlphaPed_RMS", &(m_arrays->m_las_D_AlphaPed_RMS[0][0]), "LASER_Diode_1_AlphaPed_RMS/F");
1688 m_ntuplePtr->Branch("LASER_Diode_2_AlphaPed_RMS", &(m_arrays->m_las_D_AlphaPed_RMS[0][1]), "LASER_Diode_2_AlphaPed_RMS/F");
1689 m_ntuplePtr->Branch("LASER_Diode_3_AlphaPed_RMS", &(m_arrays->m_las_D_AlphaPed_RMS[0][2]), "LASER_Diode_3_AlphaPed_RMS/F");
1690 m_ntuplePtr->Branch("LASER_Diode_4_AlphaPed_RMS", &(m_arrays->m_las_D_AlphaPed_RMS[0][3]), "LASER_Diode_4_AlphaPed_RMS/F");
1691
1692 m_ntuplePtr->Branch("LASER_PMT_1_ADC", &(m_arrays->m_las_PMT_ADC[0][0]), "LASER_PMT_1_ADC/I");
1693 m_ntuplePtr->Branch("LASER_PMT_2_ADC", &(m_arrays->m_las_PMT_ADC[0][1]), "LASER_PMT_2_ADC/I");
1694
1695 m_ntuplePtr->Branch("LASER_PMT_1_TDC", &(m_arrays->m_las_PMT_TDC[0][0]), "LASER_PMT_1_TDC/I");
1696 m_ntuplePtr->Branch("LASER_PMT_2_TDC", &(m_arrays->m_las_PMT_TDC[0][1]), "LASER_PMT_2_TDC/I");
1697
1698 m_ntuplePtr->Branch("LASER_PMT_1_Ped", &(m_arrays->m_las_PMT_Ped[0][0]), "LASER_PMT_1_Ped/F");
1699 m_ntuplePtr->Branch("LASER_PMT_2_Ped", &(m_arrays->m_las_PMT_Ped[0][1]), "LASER_PMT_2_Ped/F");
1700
1701 m_ntuplePtr->Branch("LASER_PMT_1_Ped_RMS", &(m_arrays->m_las_PMT_Ped_RMS[0][0]), "LASER_PMT_1_Ped_RMS/F");
1702 m_ntuplePtr->Branch("LASER_PMT_2_Ped_RMS", &(m_arrays->m_las_PMT_Ped_RMS[0][1]), "LASER_PMT_2_Ped_RMS/F");
1703
1704 }
1705
1706 m_ntuplePtr->Branch("LASER_HEAD_Temp", &m_las_Temperature, "LASER_HEAD_Temp/F");
1707 }
1708}
float m_las_MeasAmp
float m_las_Temperature

◆ LASER_clearBranch()

void TileAANtuple::LASER_clearBranch ( void )
private

//////////////////////////////////////////////////////////////////////////// Clear Tree LASER variables

////////////////////////////////////////////////////////////////////////////

Definition at line 1717 of file TileAANtuple.cxx.

1717 {
1718
1719 if (!m_laserObjectKey.empty()) {
1720
1721 m_las_BCID = 0;
1722
1723 m_las_Filt = 0;
1724 m_las_ReqAmp = 0.0;
1725 m_las_MeasAmp = 0.0;
1726 m_las_Temperature = 0.0;
1727
1728 // LASERII
1729 // memset(m_arrays->m_chan, 0, sizeof(m_arrays->m_chan));
1730 // memset(m_arrays->m_chan_Ped, 0, sizeof(m_arrays->m_chan_Ped));
1731 // memset(m_arrays->m_chan_Led, 0, sizeof(m_arrays->m_chan_Led));
1732 // memset(m_arrays->m_chan_Lin, 0, sizeof(m_arrays->m_chan_Lin));
1733 // memset(m_arrays->m_chan_Alpha, 0, sizeof(m_arrays->m_chan_Alpha));
1734 // memset(m_arrays->m_chan_SPed, 0, sizeof(m_arrays->m_chan_SPed));
1735 // memset(m_arrays->m_chan_SLed, 0, sizeof(m_arrays->m_chan_SLed));
1736 // memset(m_arrays->m_chan_SLin, 0, sizeof(m_arrays->m_chan_SLin));
1737 // memset(m_arrays->m_chan_SAlpha, 0, sizeof(m_arrays->m_chan_SAlpha));
1738
1739 // LASERI
1740 memset(m_arrays->m_las_D_ADC, 0, sizeof(m_arrays->m_las_D_ADC));
1741 memset(m_arrays->m_las_D_Ped, 0, sizeof(m_arrays->m_las_D_Ped));
1742 memset(m_arrays->m_las_D_Ped_RMS, 0, sizeof(m_arrays->m_las_D_Ped_RMS));
1743 memset(m_arrays->m_las_D_Alpha, 0, sizeof(m_arrays->m_las_D_Alpha));
1744 memset(m_arrays->m_las_D_Alpha_RMS, 0, sizeof(m_arrays->m_las_D_Alpha_RMS));
1745 memset(m_arrays->m_las_D_AlphaPed, 0, sizeof(m_arrays->m_las_D_AlphaPed));
1746 memset(m_arrays->m_las_D_AlphaPed_RMS, 0, sizeof(m_arrays->m_las_D_AlphaPed_RMS));
1747
1748 memset(m_arrays->m_las_PMT_ADC, 0, sizeof(m_arrays->m_las_PMT_ADC));
1749 memset(m_arrays->m_las_PMT_TDC, 0, sizeof(m_arrays->m_las_PMT_TDC));
1750 memset(m_arrays->m_las_PMT_Ped, 0, sizeof(m_arrays->m_las_PMT_Ped));
1751 memset(m_arrays->m_las_PMT_Ped_RMS, 0, sizeof(m_arrays->m_las_PMT_Ped_RMS));
1752
1753 }
1754}

◆ msg()

MsgStream & AthCommonMsg< Gaudi::Algorithm >::msg ( ) const
inlineinherited

Definition at line 24 of file AthCommonMsg.h.

24 {
25 return this->msgStream();
26 }

◆ msgLvl()

bool AthCommonMsg< Gaudi::Algorithm >::msgLvl ( const MSG::Level lvl) const
inlineinherited

Definition at line 30 of file AthCommonMsg.h.

30 {
31 return this->msgLevel(lvl);
32 }

◆ ntuple_clear()

StatusCode TileAANtuple::ntuple_clear ( )

Definition at line 1344 of file TileAANtuple.cxx.

1344 {
1345
1351
1352 return StatusCode::SUCCESS;
1353}
void LASER_clearBranch(void)
//////////////////////////////////////////////////////////////////////////// Clear Tree LASER variabl...
void TMDB_clearBranch(void)
void CISPAR_clearBranch(void)
//////////////////////////////////////////////////////////////////////////// Clear Tree CISPAR variab...
void DIGI_clearBranch(void)
//////////////////////////////////////////////////////////////////////////// /Clear Tree DIGI variabl...
void TRIGGER_clearBranch(void)
//////////////////////////////////////////////////////////////////////////// Clear Tree TRIGGER varia...

◆ ntuple_initialize()

StatusCode TileAANtuple::ntuple_initialize ( const EventContext & ctx,
const TileDQstatus & DQstatus )

Definition at line 183 of file TileAANtuple.cxx.

185{
186 if (m_bsInput) {
187 ATH_CHECK( m_robSvc.retrieve() );
188 SG::ReadCondHandle<TileHid2RESrcID> hid2re(m_hid2RESrcIDKey, ctx);
189 ATH_CHECK(hid2re.isValid());
190 m_ROBID.push_back( hid2re->getRobFromFragID(DIGI_PAR_FRAG) );
191 m_ROBID.push_back( hid2re->getRobFromFragID(LASER_OBJ_FRAG) );
192 }
193
194 uint32_t calib = DQstatus.calibMode();
195 bool calibMode = (calib == 1);
196 if ( calibMode != m_calibMode && calib!=0xFFFFFFFF ) {
197 ATH_MSG_INFO( "Calib mode from data is " << calibMode );
198 ATH_MSG_INFO( " Overwriting calib mode " );
199 m_calibMode = calibMode;
200 }
201
204
205 m_finalUnit = -1;
207 m_useDspUnits = true;
208 ATH_MSG_INFO( "Final offline units are not set, will use DSP units" );
209 }
210 }
211
213 ATH_MSG_INFO( "calibrateEnergy is disabled, don't want to use DSP units" );
214 m_useDspUnits = false;
215 }
216
217 ATH_MSG_INFO( "calibMode " << m_calibMode.value() );
218 ATH_MSG_INFO( "calibrateEnergy " << m_calibrateEnergy.value() );
219 ATH_MSG_INFO( "offlineUnits " << m_finalUnit.value() );
220 ATH_MSG_INFO( "useDspUnits " << m_useDspUnits.value() );
221
222 // set event number to 0 before first event
223 m_evtNr = 0;
224
225 ATH_CHECK( m_thistSvc.retrieve() );
226
227 if (m_compressSettings >= 0) {
228 ATH_CHECK( m_fileMgr.retrieve() );
229 }
230
231 if(initNTuple(ctx).isFailure()) {
232 ATH_MSG_ERROR( " Error during ntuple initialization" );
233 }
234
235 ATH_MSG_INFO( "ntuple initialization completed" );
236 return StatusCode::SUCCESS;
237}
#define LASER_OBJ_FRAG
Definition TileTBFrag.h:49
#define DIGI_PAR_FRAG
Definition TileTBFrag.h:41
StatusCode initNTuple(const EventContext &ctx)
Gaudi::Property< int > m_finalUnit
calibrate everything to this level
Gaudi::Property< bool > m_calibrateEnergy
convert energy to new units or use amplitude from RawChannel directly
Gaudi::Property< bool > m_useDspUnits
true if energy should be converted to units used in DSP
uint32_t calibMode() const
Calibration mode.

◆ outputHandles()

virtual std::vector< Gaudi::DataHandle * > AthCommonDataStore< AthCommonMsg< Gaudi::Algorithm > >::outputHandles ( ) const
overridevirtualinherited

Return this algorithm's output handles.

We override this to include handle instances from key arrays if they have not yet been declared. See comments on updateVHKA.

◆ renounce()

std::enable_if_t< std::is_void_v< std::result_of_t< decltype(&T::renounce)(T)> > &&!std::is_base_of_v< SG::VarHandleKeyArray, T > &&std::is_base_of_v< Gaudi::DataHandle, T >, void > AthCommonDataStore< AthCommonMsg< Gaudi::Algorithm > >::renounce ( T & h)
inlineprotectedinherited

Definition at line 368 of file AthCommonDataStore.h.

369 {
370 h.renounce();
372 }
std::enable_if_t< std::is_void_v< std::result_of_t< decltype(&T::renounce)(T)> > &&!std::is_base_of_v< SG::VarHandleKeyArray, T > &&std::is_base_of_v< Gaudi::DataHandle, T >, void > renounce(T &h)

◆ renounceArray()

void AthCommonDataStore< AthCommonMsg< Gaudi::Algorithm > >::renounceArray ( SG::VarHandleKeyArray & handlesArray)
inlineprotectedinherited

remove all handles from I/O resolution

Definition at line 352 of file AthCommonDataStore.h.

352 {
354 }

◆ setFilterPassed()

virtual void AthCommonAlgorithm< Gaudi::Algorithm >::setFilterPassed ( bool state,
const EventContext & ctx ) const
inlinevirtualinherited

Set filter decision:

Definition at line 99 of file AthCommonAlgorithm.h.

99 {
101 }
virtual void setFilterPassed(bool state, const EventContext &ctx) const
Set filter decision:

◆ storeBeamElements()

StatusCode TileAANtuple::storeBeamElements ( const TileDQstatus & DQstatus)
private

Definition at line 508 of file TileAANtuple.cxx.

508 {
509
510 const uint32_t* cispar = DQstatus.cispar();
511
512 uint32_t oldval = 0;
513 int last = 0;
514 for(int i = 0; i< N_CISPAR; ++i) {
515 m_cispar[i] = cispar[i];
516 if (msgLvl(MSG::VERBOSE)) {
517 if (oldval != cispar[i]) {
518 if (last < i-1) {
519 ATH_MSG_VERBOSE( "cispar[" << last << ".." << i-1 << "] = "
520 << oldval );
521 } else if (last == i-1) {
522 ATH_MSG_VERBOSE( "cispar[" << last << "] = " << oldval );
523 }
524 last = i;
525 oldval = cispar[i];
526 }
527 }
528 }
529
530 if (msgLvl(MSG::VERBOSE)) {
531 if (last < N_CISPAR-1) {
532 ATH_MSG_VERBOSE( "cispar[" << last << ".." << N_CISPAR-1 << "] = "
533 << oldval );
534 } else {
535 ATH_MSG_VERBOSE( "cispar[" << last << "] = "<< oldval );
536 }
537 }
538
539 m_trigType = cispar[12];
540
541 return StatusCode::SUCCESS;
542}
#define ATH_MSG_VERBOSE(x,...)
#define N_CISPAR
bool msgLvl(const MSG::Level lvl) const
const uint32_t * cispar() const
CIS parameters.

◆ storeDCS()

StatusCode TileAANtuple::storeDCS ( const EventContext & ctx)
private

Definition at line 2161 of file TileAANtuple.cxx.

2161 {
2162
2163 ATH_MSG_DEBUG( "Filling DCS ntuple:"
2164 <<" evtCnt=" << m_evtNr
2165 << " evt=" << m_evt
2166 << " lumi=" << m_lumiBlock << " " << m_dateTime );
2167
2168 CLEAR(m_arrays->m_TEMP);
2169 CLEAR(m_arrays->m_HV);
2170 CLEAR(m_arrays->m_HVSET);
2171 CLEAR(m_arrays->m_DRSTATES);
2172 CLEAR(m_arrays->m_HVSTATUS);
2173 CLEAR(m_arrays->m_DRSTATUS);
2174 CLEAR(m_arrays->m_CHSTATUS);
2175
2176 m_nBadDr = 0;
2177 m_nBadHV = 0;
2178 m_nBadDCS = 0;
2179 m_nBadDB = 0;
2180 m_nBadTotal = 0;
2181 for (int ROS = 1; ROS < 5; ++ROS) {
2182 int rosI = ROS - 1;
2183
2184 for (int drawer = 0; drawer < 64; ++drawer) {
2185 m_arrays->m_DRSTATES[rosI][drawer] = m_tileDCS->getDrawerStates(ROS, drawer);
2186 m_arrays->m_DRSTATUS[rosI][drawer] = m_tileDCS->getDCSStatus(ROS, drawer);
2187 bool drbad = m_tileDCS->isStatusBad(ROS, drawer);
2188
2189 if (drbad) {
2190 ++m_nBadDr;
2191 }
2192
2193 if (msgLvl(MSG::VERBOSE) || m_arrays->m_DRSTATUS[rosI][drawer] != TileDCSState::OK_DRAWER) {
2194 ATH_MSG_VERBOSE( "Module=" << TileCalibUtils::getDrawerString(ROS, drawer)
2195 << " DRSTATES=" << m_arrays->m_DRSTATES[rosI][drawer]
2196 << " DRSTATUS=" << m_arrays->m_DRSTATUS[rosI][drawer]
2197 << " => " << ((drbad) ? "bad" : "good") );
2198 }
2199
2200 unsigned int drawerIdx = TileCalibUtils::getDrawerIdx(ROS,drawer);
2201 for (int channel=0; channel<48; ++channel){
2202 TileBchStatus chStat = m_tileBadChanTool->getChannelStatus(drawerIdx,channel,ctx);
2203 m_arrays->m_HV[rosI][drawer][channel] = m_tileDCS->getChannelHV(ROS, drawer, channel);
2204 m_arrays->m_HVSET[rosI][drawer][channel] = m_tileDCS->getChannelHVSet(ROS, drawer, channel);
2205 m_arrays->m_HVSTATUS[rosI][drawer][channel] = m_tileDCS->getDCSHVStatus(ROS, drawer, channel);
2206 m_arrays->m_CHSTATUS[rosI][drawer][channel] = m_tileDCS->getDCSStatus(ROS, drawer, channel)
2207 + 100 * m_tileBadChanTool->encodeStatus(chStat);
2208 bool chbad = m_tileDCS->isStatusBad(ROS, drawer, channel);
2209
2210 if (chbad || chStat.isBad()) {
2211 ++m_nBadTotal;
2212 if (chbad) ++m_nBadDCS;
2213 if (chStat.isBad()) ++m_nBadDB;
2214 }
2215
2216 if (m_tileDCS->isStatusHVBad(ROS, drawer, channel)) {
2217 ++m_nBadHV;
2218 }
2219
2220 if (msgLvl(MSG::VERBOSE) || (chbad && !drbad)) {
2221 int pmt=abs(m_cabling->channel2hole(ROS,channel));
2222 ATH_MSG_VERBOSE( "Module=" << TileCalibUtils::getDrawerString(ROS, drawer)
2223 << " channel=" << channel << " pmt=" << pmt
2224 << " HV=" << m_arrays->m_HV[rosI][drawer][channel]
2225 << " HVSET=" << m_arrays->m_HVSET[rosI][drawer][channel]
2226 << " HVSTATUS=" << m_arrays->m_HVSTATUS[rosI][drawer][channel]
2227 << " CHSTATUS=" << m_arrays->m_CHSTATUS[rosI][drawer][channel]
2228 << " => " << ((chbad) ? "bad" : "good") );
2229 }
2230 }
2231
2232 for (int ind=0; ind<7; ++ind){
2233 m_arrays->m_TEMP[rosI][drawer][ind] = m_tileDCS->getChannelHV(ROS, drawer, ind+48);
2234 ATH_MSG_VERBOSE( "Module=" << TileCalibUtils::getDrawerString(ROS, drawer)
2235 << " TEMP" << ind+1 << "=" << m_arrays->m_TEMP[rosI][drawer][ind] );
2236
2237 }
2238 }
2239 }
2240
2241 ATH_MSG_DEBUG( "BAD status in DCS: nBadDr=" << m_nBadDr
2242 << " nBadHV=" << m_nBadHV
2243 << " nBadDCS=" << m_nBadDCS
2244 << " nBadDB=" << m_nBadDB
2245 << " nBadTotal=" << m_nBadTotal );
2246
2247 m_DCSntuplePtr->Fill();
2248
2249
2250 return StatusCode::SUCCESS;
2251}
bool isBad() const
static std::string getDrawerString(unsigned int ros, unsigned int drawer)
Return the drawer name, e.g.
static unsigned int getDrawerIdx(unsigned int ros, unsigned int drawer)
Returns a drawer hash.

◆ storeDigits()

StatusCode TileAANtuple::storeDigits ( const EventContext & ctx,
const SG::ReadHandleKey< TileDigitsContainer > & containerKey,
short * sample,
short gain[N_ROS2][N_MODULES][N_CHANS],
bool fillAll )
private

/ Fill Ntuple with info from TileDigits / Return true if the collection is empty

Store ROD header info from collection should be just one per ROD, i.e. either 64(in RUN1) or 128(starting from RUN2) different values

Full DMU header, stored for debugging

BCID in DMU header

bit_31==1 and bit_17==0

parity must be an odd number

memory parity error bit_25

single strobe error bit_24 (it is recovered)

double strobe error bit_23 (cannot be recovered)

Full DMU header, stored for debugging

BCID in DMU header

bit_31==1 and bit_17==0

parity must be an odd number

memory parity error bit_25

single strobe error bit_24 (it is recovered)

double strobe error bit_23 (cannot be recovered)

Definition at line 951 of file TileAANtuple.cxx.

956{
957 if (containerKey.empty()) // empty name, nothing to do
958 return StatusCode::FAILURE;
959
960 // Read Digits from TES
961 const TileDigitsContainer* digitsCnt =
962 SG::makeHandle (containerKey, ctx).get();
963
964 bool emptyColl = true;
965
966 // Get iterator for all TDColl in TDCont
967 TileDigitsContainer::const_iterator itColl = (*digitsCnt).begin();
968 TileDigitsContainer::const_iterator itCollEnd = (*digitsCnt).end();
969
970 // Go through all TileDigitsCollections
971 for(; itColl != itCollEnd; ++itColl) {
972 int fragId = (*itColl)->identify();
973 int drawer = fragId & 0x3F;
974 int ROS = (fragId>>8);
975 int rosI = ROS-1;
976 int rosL = rosI;
977 int rosH = rosI + N_ROS;
978
979 if (msgLvl(MSG::VERBOSE)) {
980 ATH_MSG_VERBOSE( "Event# " << m_evtNr
981 << " Frag id 0x" << MSG::hex << fragId << MSG::dec
982 << " ROS " << ROS
983 << " drawer " << drawer );
984
985 if (fillAll) {
986 ATH_MSG_VERBOSE( " Size=" << (*itColl)->getFragSize()
987 << " BCID=" << (*itColl)->getFragBCID() << MSG::hex
988 << " CRC=0x" << ((*itColl)->getFragCRC()&0xffff)
989 << " DMUMask=0x" << ((*itColl)->getFragDMUMask()&0xffff) << MSG::dec );
990
991 ATH_MSG_VERBOSE( " Lvl1ID=" << (*itColl)->getLvl1Id()
992 << " Lvl1Type=" << (*itColl)->getLvl1Type()
993 << " EvBCID=" << (*itColl)->getRODBCID()
994 << " EvType=" << (*itColl)->getDetEvType() );
995
996 ATH_MSG_VERBOSE(" Header=" << (*itColl)->getFragChipHeaderWords() );
997 }
998 }
999
1002 int rod = (rosL*N_MODULES + drawer);
1003 if (N_RODS<128) {
1004 rod >>= 2;
1005 } else if (N_RODS<256) {
1006 rod = (((rod>>2)<<1) | (rod&1));
1007 }
1008
1009 m_l1ID[rod] = (*itColl)->getLvl1Id();
1010 m_l1Type[rod] = (*itColl)->getLvl1Type();
1011 m_evType[rod] = (*itColl)->getDetEvType();
1012 m_evBCID[rod] = (*itColl)->getRODBCID();
1013 if (m_trigType == 0) m_trigType = -m_l1Type[rod]; // make negative to distinguish from TileCal internal trig types
1014
1015 TileDigitsCollection::const_iterator it = (*itColl)->begin();
1016 TileDigitsCollection::const_iterator itEnd = (*itColl)->end();
1017
1018 // non empty collection
1019 if(it != itEnd) {
1020 emptyColl = false;
1021
1022 if (fillAll) {
1023
1024 // store evtnr, bcid,crc, size
1025 // Same for lo and hi, because they come from the same fragment
1026
1027 m_arrays->m_rodBCID[rosL][drawer] = (*itColl)->getRODBCID();
1028 m_arrays->m_fragSize[rosL][drawer]=(*itColl)->getFragSize();
1029
1030 m_arrays->m_slinkCRC[rosL][drawer][0] = ((*itColl)->getFragCRC()>>16) & 0xffff;
1031 m_arrays->m_dmuMask[rosL][drawer][0] = ((*itColl)->getFragDMUMask()>>16) & 0xffff;
1032 m_arrays->m_slinkCRC[rosL][drawer][1] = (*itColl)->getFragCRC() & 0xffff;
1033 m_arrays->m_dmuMask[rosL][drawer][1] = (*itColl)->getFragDMUMask() & 0xffff;
1034
1035 uint32_t CRCmask = (*itColl)->getFragDMUMask(); //mask of FE+ROD DMU crc check (16bit+16bit) 0xffffffff == All ok
1036 uint32_t fe_crc = CRCmask & 0xFFFF;
1037 uint32_t rod_crc = CRCmask >> 16;
1038
1039 const std::vector<uint32_t> & headerVec = (*itColl)->getFragChipHeaderWords();
1040 unsigned int headsize = std::min(16U, static_cast<unsigned int>(headerVec.size()));
1041
1042 for (unsigned int ih = 0; ih < headsize; ++ih) {
1043
1044 m_arrays->m_DMUheader[rosL][drawer][ih] = headerVec[ih];
1045 m_arrays->m_DMUbcid[rosL][drawer][ih] = (headerVec[ih] & 0xFFF);
1046 m_arrays->m_DMUformatErr[rosL][drawer][ih] = CheckDMUFormat(headerVec[ih]);
1047 m_arrays->m_DMUparityErr[rosL][drawer][ih] = CheckDMUParity(headerVec[ih]);
1048 m_arrays->m_DMUmemoryErr[rosL][drawer][ih] = (headerVec[ih] >> 25 & 0x1);
1049 m_arrays->m_DMUSstrobeErr[rosL][drawer][ih] = (headerVec[ih] >> 24 & 0x1);
1050 m_arrays->m_DMUDstrobeErr[rosL][drawer][ih] = (headerVec[ih] >> 23 & 0x1);
1051
1052 m_arrays->m_feCRC[rosL][drawer][ih] = (fe_crc >> ih & 0x1);
1053 m_arrays->m_rodCRC[rosL][drawer][ih] = (rod_crc >> ih & 0x1);
1054 }
1055
1056 if (m_calibMode) {
1057 const std::vector<uint32_t> & headerVecHi = (*itColl)->getFragChipHeaderWordsHigh();
1058 unsigned int headsizehi = std::min(16U, static_cast<unsigned int>(headerVecHi.size()));
1059
1060 for (unsigned int ih = 0; ih < headsizehi; ++ih) {
1061
1062 m_arrays->m_DMUheader[rosH][drawer][ih] = headerVecHi[ih];
1063 m_arrays->m_DMUbcid[rosH][drawer][ih] = (headerVecHi[ih] & 0xFFF);
1064 m_arrays->m_DMUformatErr[rosH][drawer][ih] = CheckDMUFormat(headerVecHi[ih]);
1065 m_arrays->m_DMUparityErr[rosH][drawer][ih] = CheckDMUParity(headerVecHi[ih]);
1066 m_arrays->m_DMUmemoryErr[rosH][drawer][ih] = (headerVecHi[ih] >> 25 & 0x1);
1067 m_arrays->m_DMUSstrobeErr[rosH][drawer][ih] = (headerVecHi[ih] >> 24 & 0x1);
1068 m_arrays->m_DMUDstrobeErr[rosH][drawer][ih] = (headerVecHi[ih] >> 23 & 0x1);
1069
1070 m_arrays->m_feCRC[rosH][drawer][ih] = -1 ; //Variables must be filled anyway, empty variables are not allowed
1071 m_arrays->m_rodCRC[rosH][drawer][ih] = -1; //Variables must be filled anyway, empty variables are not allowed
1072 }
1073 }
1074 }
1075
1076
1077 int cmpCounter = 0;
1078 // go through all TileDigits in collection
1079 for (; it != itEnd; ++it) {
1080 const TileDigits* digit = (*it);
1081
1082 HWIdentifier hwid = digit->adc_HWID();
1083
1084 // determine channel
1085 int channel = m_tileHWID->channel(hwid);
1086 // convert channel number to PMT number if needed
1087 if (m_pmtOrder) channel = digiChannel2PMT(ROS,channel);
1088
1089 // determine gain and set ros index accordingly
1090 int gain = m_tileHWID->adc(hwid);
1091 if (m_calibMode) {
1092 if (m_compareMode) {
1093 ++cmpCounter;
1094 if (cmpCounter > 48) rosI = rosH;
1095 else rosI = rosL;
1096 } else {
1097 if (gain == 1) rosI = rosH;
1098 else rosI = rosL;
1099 }
1100 }
1101
1102 a_gain[rosI][drawer][channel] = gain;
1103
1104 // get digits
1105 const std::vector<float> & sampleVec = digit->samples();
1106 int siz = sampleVec.size();
1107 if (msgLvl(MSG::VERBOSE)) {
1108 int index,pmt;
1109 digit->cell_ID_index(index,pmt);
1110 msg(MSG::VERBOSE) << "TD ch " << channel
1111 << " gain "<< gain
1112 << " type " << std::min(index,0) << " {";
1113 for(int i=0;i<siz;i++) {
1114 msg(MSG::VERBOSE) <<(int)sampleVec[i] << " ";
1115 }
1116 }
1117 // changed N_SAMPLES to number of samples from tile configurator
1118 if (siz > m_nSamples) {
1119 siz = m_nSamples;
1120 if (msgLvl(MSG::VERBOSE))
1121 ATH_MSG_VERBOSE( "} ONLY " << siz << " digits saved to ntuple" );
1122 } else {
1123 if (msgLvl(MSG::VERBOSE))
1124 ATH_MSG_VERBOSE( "}" );
1125 }
1126 for (int n = 0; n < siz; ++n) {
1127 a_sample[sample_ind(rosI,drawer,channel,n)] = (short) sampleVec[n];
1128 }
1129 }
1130 }
1131 }
1132
1133 if (emptyColl) return StatusCode::FAILURE;
1134 else return StatusCode::SUCCESS;
1135}
#define sample_ind(r, m, c, i)
Athena::TPCnvVers::Old Athena::TPCnvVers::Old Athena::TPCnvVers::Current TileDigitsContainer
DataModel_detail::const_iterator< DataVector > const_iterator
Standard const_iterator.
Definition DataVector.h:861
bool empty() const
Test if the key is blank.
short CheckDMUFormat(uint32_t header)
bit_31 of the DMU header must be 1 and bit_17 of the DMU header must be 0
short CheckDMUParity(uint32_t header)
Parity of the DMU header should be odd.

◆ storeLaser()

StatusCode TileAANtuple::storeLaser ( const EventContext & ctx)
private

Definition at line 399 of file TileAANtuple.cxx.

399 {
400
401 ATH_MSG_DEBUG("TileAANtuple::storeLaser()");
402 const char* gainnames[2] = {"LG","HG"};
403
404 const TileLaserObject* laserObj = SG::makeHandle(m_laserObjectKey, ctx).get();
405
406 m_las_BCID = laserObj->getBCID();
407
408 m_las_Filt = laserObj->getFiltNumber();
409 m_las_ReqAmp = laserObj->getDiodeCurrOrd();
410 m_las_MeasAmp = laserObj->getDiodeCurrMeas();
412 ATH_MSG_VERBOSE( "Laser BCID " << m_las_BCID
413 << " Filt " << m_las_Filt
414 << " ReqAmp " << m_las_ReqAmp
415 << " MeasAmp " << m_las_MeasAmp
416 << " Temp " << m_las_Temperature );
417
418 ATH_MSG_DEBUG("LASER"<<(laserObj->isLASERII()?"II":"I")<<" VERSION IS " << laserObj->getVersion());
419
420 if(laserObj->isLASERII()){
421 m_qdctimeout = laserObj->getQDCTimeout();
422 m_tdctimeout = laserObj->getTDCTimeout();
423 m_daqtype = laserObj->getDaqType();
424 if (msgLvl(MSG::DEBUG)) {
425 msg(MSG::DEBUG) << "DAQ Type " << m_daqtype << endmsg;
426 msg(MSG::DEBUG) << "QDC TimeOut " << m_qdctimeout << endmsg;
427 msg(MSG::DEBUG) << "TDC TimeOut " << m_tdctimeout << endmsg;
428 }
429
430 // RETRIEVE SIGNAL IN ADC COUNTS
431 for(int chan=0;chan<28;++chan){
432 int ch=chan>>1;
433 int gn=chan&1;
434 // MONITORING DIODES
435 m_arrays->m_chan[chan] = laserObj->getDiodeADC(ch,gn);
436 ATH_MSG_DEBUG("LASERII CHANNEL " << ch << " ("<<gainnames[gn]<<") " << m_arrays->m_chan[chan]);
437 } // FOR
438
439 for(int chan=28;chan<32;++chan){
440 int ch=(chan-28)>>1;
441 int gn=chan&1;
442 // MONITORING PMTS
443 m_arrays->m_chan[chan] = laserObj->getPMADC(ch,gn);
444 ATH_MSG_DEBUG("LASERII PMT " << ch << " ("<<gainnames[gn]<<") " << m_arrays->m_chan[chan]);
445 } // FOR
446
447 // RETRIEVE PEDESTALS IF NOT ALREADY SET
448 for(int chan=0;chan<32;++chan){
449 int ch=chan>>1;
450 int gn=chan&1;
451 if(laserObj->isSet(ch, gn, 0) && laserObj->getMean (ch,gn,0)>0) m_arrays->m_chan_Ped[chan] = laserObj->getMean (ch,gn,0);
452 if(laserObj->isSet(ch, gn, 2) && laserObj->getMean (ch,gn,2)>0) m_arrays->m_chan_Led[chan] = laserObj->getMean (ch,gn,2);
453 if(laserObj->isSet(ch, gn, 3) && laserObj->getMean (ch,gn,3)>0) m_arrays->m_chan_Alpha[chan] = laserObj->getMean (ch,gn,3);
454 if(laserObj->isSet(ch, gn, 1) && laserObj->getMean (ch,gn,1)>0) m_arrays->m_chan_Lin[chan] = laserObj->getMean (ch,gn,1);
455 if(laserObj->isSet(ch, gn, 0) && laserObj->getSigma(ch,gn,0)>0) m_arrays->m_chan_SPed[chan] = laserObj->getSigma(ch,gn,0);
456 if(laserObj->isSet(ch, gn, 2) && laserObj->getSigma(ch,gn,2)>0) m_arrays->m_chan_SLed[chan] = laserObj->getSigma(ch,gn,2);
457 if(laserObj->isSet(ch, gn, 3) && laserObj->getSigma(ch,gn,3)>0) m_arrays->m_chan_SAlpha[chan] = laserObj->getSigma(ch,gn,3);
458 if(laserObj->isSet(ch, gn, 1) && laserObj->getSigma(ch,gn,1)>0) m_arrays->m_chan_SLin[chan] = laserObj->getSigma(ch,gn,1);
459
460 // DEBUG OUTPUT
461 if (msgLvl(MSG::DEBUG)) {
462 msg(MSG::DEBUG) << gainnames[gn] << " CHAN " << ch << " SIG= " << m_arrays->m_chan[chan] << endmsg;
463 msg(MSG::DEBUG) << gainnames[gn] << " CHAN " << ch << " PED= " << m_arrays->m_chan_Ped[chan] << "+/-" << m_arrays->m_chan_SPed[chan] << " ( " << laserObj->isSet(ch, gn, 0) << " ) " << endmsg;
464 msg(MSG::DEBUG) << gainnames[gn] << " CHAN " << ch << " PED= " << m_arrays->m_chan_Lin[chan] << "+/-" << m_arrays->m_chan_SLin[chan] << " ( " << laserObj->isSet(ch, gn, 1) << " ) " << endmsg;
465 msg(MSG::DEBUG) << gainnames[gn] << " CHAN " << ch << " LED= " << m_arrays->m_chan_Led[chan] << "+/-" << m_arrays->m_chan_SLed[chan] << " ( " << laserObj->isSet(ch, gn, 2) << " ) " << endmsg;
466 msg(MSG::DEBUG) << gainnames[gn] << " CHAN " << ch << " ALP= " << m_arrays->m_chan_Alpha[chan] << "+/-" << m_arrays->m_chan_SAlpha[chan] << " ( " << laserObj->isSet(ch, gn, 3) << " ) " << endmsg;
467 } // IF
468 } // FOR
469 } // IF
470 else{
471 for (unsigned int gn=0; gn<TileLaserObject::nbGains; ++gn) {
472 for (unsigned int i=0; i<TileLaserObject::nbPmts; ++i) {
473 m_arrays->m_las_PMT_ADC[gn][i] = laserObj->getPMADC(i,gn);
474 m_arrays->m_las_PMT_TDC[gn][i] = laserObj->getTDC(i,gn);
475 m_arrays->m_las_PMT_Ped[gn][i] = laserObj->getPMPedestal(i,gn);
476 m_arrays->m_las_PMT_Ped_RMS[gn][i] = laserObj->getPMSigmaPedestal(i,gn);
477 ATH_MSG_VERBOSE( "LasPMT" << i << " g " << gn
478 << " adc " << m_arrays->m_las_PMT_ADC[gn][i]
479 << " ped " << m_arrays->m_las_PMT_Ped[gn][i]
480 << " rms " << m_arrays->m_las_PMT_Ped_RMS[gn][i]
481 << " tdc " << m_arrays->m_las_PMT_TDC[gn][i] );
482 } // FOR
483
484 for (unsigned int i=0; i<14; ++i) {
485 m_arrays->m_las_D_ADC[gn][i] = laserObj->getDiodeADC(i,gn);
486 m_arrays->m_las_D_Ped[gn][i] = laserObj->getDiodePedestal(i,gn);
487 m_arrays->m_las_D_Ped_RMS[gn][i] = laserObj->getDiodeSigmaPedestal(i,gn);
488 m_arrays->m_las_D_Alpha[gn][i] = laserObj->getAlpha(i,gn);
489 m_arrays->m_las_D_Alpha_RMS[gn][i] = laserObj->getSigmaAlpha(i,gn);
490 m_arrays->m_las_D_AlphaPed[gn][i] = laserObj->getPedestalAlpha(i,gn);
491 m_arrays->m_las_D_AlphaPed_RMS[gn][i] = laserObj->getSigmaPedAlpha(i,gn);
492
493 ATH_MSG_VERBOSE( "LasD" << i << " g " << gn
494 << " adc " << m_arrays->m_las_D_ADC[gn][i]
495 << " ped " << m_arrays->m_las_D_Ped[gn][i]
496 << " rms " << m_arrays->m_las_D_Ped_RMS[gn][i]
497 << " alp " << m_arrays->m_las_D_Alpha[gn][i]
498 << " rms " << m_arrays->m_las_D_Alpha_RMS[gn][i]
499 << " ape " << m_arrays->m_las_D_AlphaPed[gn][i]
500 << " rms " << m_arrays->m_las_D_AlphaPed_RMS[gn][i] );
501 } // FOR
502 } // FOR
503 } // ELSE
504
505 return StatusCode::SUCCESS;
506}
#define endmsg
int getFiltNumber() const
double getSigmaPedAlpha(const unsigned int i, const unsigned int gain=0) const
double getSigmaAlpha(const unsigned int i, const unsigned int gain=0) const
double getPedestalAlpha(const unsigned int i, const unsigned int gain=0) const
double getMean(int chan, int gain, int type) const
double getPumpDiodeTemp() const
int getPMADC(const unsigned int j, const unsigned int gain=0) const
int getDaqType() const
double getPMSigmaPedestal(const unsigned int j, const unsigned int gain=0) const
double getAlpha(const unsigned int i, const unsigned int gain=0) const
double getDiodeCurrOrd() const
int getDiodeADC(const unsigned int i, const unsigned int gain=0) const
bool getQDCTimeout() const
bool isLASERII() const
double getDiodeSigmaPedestal(const unsigned int i, const unsigned int gain=0) const
int getBCID() const
double getDiodePedestal(const unsigned int i, const unsigned int gain=0) const
bool isSet(int chan, int gain, int type) const
int getTDC(const unsigned int j, const unsigned int gain=0) const
double getDiodeCurrMeas() const
bool getTDCTimeout() const
double getSigma(int chan, int gain, int type) const
double getPMPedestal(const unsigned int j, const unsigned int gain=0) const

◆ storeMFRawChannels()

StatusCode TileAANtuple::storeMFRawChannels ( const EventContext & ctx,
const SG::ReadHandleKey< TileRawChannelContainer > & containerKey,
float * ene,
float * time,
float chi2[N_ROS2][N_MODULES][N_CHANS],
float ped[N_ROS2][N_MODULES][N_CHANS],
bool fillAll )
private

final calibration

Definition at line 747 of file TileAANtuple.cxx.

754{
755 if (containerKey.empty()) {// empty name, nothing to do
756 return StatusCode::FAILURE;
757 }
758
759 // get named container
760 const TileRawChannelContainer* rcCnt = \
761 SG::makeHandle (containerKey, ctx).get();
762
763 TileRawChannelUnit::UNIT rChUnit = rcCnt->get_unit();
764 ATH_MSG_VERBOSE( "RawChannel unit is " << rChUnit );
765
766 bool dspCont = ( rChUnit >= TileRawChannelUnit::OnlineADCcounts );
767 if (dspCont) { // this is container with DSP results
768 m_dspUnit = rChUnit;
769 m_dspFlags = rcCnt->get_bsflags() >> 16;
770 ATH_MSG_VERBOSE( "DSP flag is 0x" << MSG::hex << m_dspFlags << MSG::dec
771 << " DSP unit is " << m_dspUnit);
772
774 && rChUnit != TileRawChannelUnit::ADCcounts) {
775 ATH_MSG_ERROR( "RawChannel units are not ADC counts, can't apply DSP-like calibration" );
776 return StatusCode::FAILURE;
777 }
778
779 if (m_calibrateEnergy) {
780 if (m_useDspUnits) { // calibrate a-la online
782 } else { // convert to final units
784 }
785 } else {
786 m_rchUnit = rChUnit;
787 }
788 ATH_MSG_VERBOSE( "Final RawChannel unit is " << m_rchUnit );
789
790 std::vector<float> sumE(3);
791 float E[48];
792 int gain[48];
793 if (m_compareMode && dspCont) memset(m_bad, 0, sizeof(m_bad));
794
795 // Get iterator for all TRCColl in TRCCont
796 TileRawChannelContainer::const_iterator itColl = (*rcCnt).begin();
797 TileRawChannelContainer::const_iterator itCollEnd = (*rcCnt).end();
798
800
801 // Go through all TileRawChannelCollections
802 for (; itColl != itCollEnd; ++itColl) {
803 int fragId = (*itColl)->identify();
804 int drawerIdx = TileCalibUtils::getDrawerIdxFromFragId(fragId);
805 int drawer = fragId & 0x3F;
806 int ROS = (fragId >> 8);
807 int rosI = ROS - 1;
808 int rosL = rosI;
809 int rosH = rosI + N_ROS;
810
811 ATH_MSG_VERBOSE( "TRC ("<< containerKey.key()
812 <<") Event# "<< m_evtNr
813 << " Frag id 0x" << MSG::hex << fragId << MSG::dec
814 << " ROS " << ROS
815 << " drawer " << drawer );
816
817 // go through all TileRawChannels in collection
818 it = (*itColl)->begin();
819 itEnd = (*itColl)->end();
820
821 int cmpCounter = 0;
822 if (m_compareMode) {
823 memset(E, 0, sizeof(E));
824 memset(gain, 0, sizeof(gain));
825 }
826 for(; it != itEnd; ++it) {
827 const TileRawChannel* rch = (*it);
828
829 HWIdentifier hwid=rch->adc_HWID();
830
831 // determine channel
832 int channel = m_tileHWID->channel(hwid);
833 // convert channel number to PMT number if needed
834 if (m_pmtOrder) channel = digiChannel2PMT(ROS,channel);
835
836 // determine gain and set ros index accordingly
837 int adc = m_tileHWID->adc(hwid);
838 if (m_calibMode) {
839 if (m_compareMode) {
840 ++cmpCounter;
841 if(cmpCounter>48) rosI = rosH;
842 else rosI = rosL;
843 } else {
844 if(adc == 1) rosI = rosH;
845 else rosI = rosL;
846 }
847 }
848
850 float energy = 0.;
851 for (int i = 0; i < 7; ++i) {
852 energy = rch->amplitude(i);
853 if (m_rchUnit != rChUnit) {
855 energy = m_tileToolEmscale->channelCalib(drawerIdx, channel, adc, energy, rChUnit, m_rchUnit);
856 else
857 energy = m_tileToolEmscale->channelCalibOnl(drawerIdx, channel, adc, energy, m_rchUnit);
858 }
859
860 ene[sample_ind(rosI,drawer,channel,i)] = energy;
861 time[sample_ind(rosI,drawer,channel,i)] = rch->time(i);
862 }
863 chi2[rosI][drawer][channel] = rch->quality();
864 ped[rosI][drawer][channel] = rch->pedestal();
865
866 if (m_arrays->m_gain[rosI][drawer][channel] < 0)
867 m_arrays->m_gain[rosI][drawer][channel] = adc;
868
869 if (m_compareMode) { // filling array for SumEt calculations
870 E[channel] = ene[sample_ind(rosI,drawer,channel,0)];
871 gain[channel] = adc;
872 if (dspCont) { // use bad flag from DSP container only
873 m_bad[rosL][drawer][channel] = (rch->quality() > 15.99);
874 //} else {
875 //m_bad[rosL][drawer][channel] = m_tileBadChanTool->getAdcStatus(drawerIdx, channel, adc).isBad();
876 }
877 }
878
879 if (msgLvl(MSG::VERBOSE)) {
880 int index,pmt;
881 rch->cell_ID_index(index,pmt);
882 ATH_MSG_VERBOSE( "TRC ch " << channel
883 << " gain " << adc
884 << " type " << std::min(index,0)
885 << " ene=" << ene[sample_ind(rosI,drawer,channel,0)]
886 << " time=" << rch->time()
887 << " chi2=" << rch->quality()
888 << " ped=" << rch->pedestal() );
889 }
890 }
891
892 if (fillAll) {
893
894 m_arrays->m_ROD_GlobalCRC[rosL][drawer] = (*itColl)->getFragGlobalCRC() & 1;
895 m_arrays->m_ROD_BCID[rosL][drawer] = (*itColl)->getFragDSPBCID();
896 m_arrays->m_ROD_DMUMask[rosL][drawer][0] = (*itColl)->getFragRODChipMask();
897 m_arrays->m_ROD_DMUMask[rosL][drawer][1] = (*itColl)->getFragFEChipMask();
898
899 for(unsigned int dmu=0;dmu<N_DMUS;dmu++) {
900
901 m_arrays->m_ROD_DMUBCIDErr[rosL][drawer][dmu] = ((*itColl)->getFragBCID() >> dmu) & 1;
902 m_arrays->m_ROD_DMUmemoryErr[rosL][drawer][dmu] = ((*itColl)->getFragMemoryPar() >> dmu) & 1;
903 m_arrays->m_ROD_DMUSstrobeErr[rosL][drawer][dmu] = ((*itColl)->getFragSstrobe() >> dmu) & 1;
904 m_arrays->m_ROD_DMUDstrobeErr[rosL][drawer][dmu] = ((*itColl)->getFragDstrobe() >> dmu) & 1;
905 m_arrays->m_ROD_DMUHeadformatErr[rosL][drawer][dmu] = ((*itColl)->getFragHeaderBit() >> dmu) & 1;
906 m_arrays->m_ROD_DMUHeadparityErr[rosL][drawer][dmu] = ((*itColl)->getFragHeaderPar() >> dmu) & 1;
907 m_arrays->m_ROD_DMUDataformatErr[rosL][drawer][dmu] = ((*itColl)->getFragSampleBit() >> dmu) & 1;
908 m_arrays->m_ROD_DMUDataparityErr[rosL][drawer][dmu] = ((*itColl)->getFragSamplePar() >> dmu) & 1;
909 m_arrays->m_ROD_DMUfeCRC[rosL][drawer][dmu] = ((*itColl)->getFragFEChipMask() >> dmu) & 1;
910 m_arrays->m_ROD_DMUrodCRC[rosL][drawer][dmu] = ((*itColl)->getFragRODChipMask() >> dmu) & 1;
911 }
912 }
913
914 if (m_compareMode) {
915 m_l2Builder->SumE(ROS, drawer, m_rchUnit, E, gain, m_bad[rosL][drawer], sumE);
916 if (dspCont) {
917 m_sumEt_xx[m_l2Builder->idToIndex(fragId)] = sumE[0];
918 m_sumEz_xx[m_l2Builder->idToIndex(fragId)] = sumE[1];
919 m_sumE_xx[m_l2Builder->idToIndex(fragId)] = sumE[2];
920 }
921 else {
922 m_sumEt_zz[m_l2Builder->idToIndex(fragId)] = sumE[0];
923 m_sumEz_zz[m_l2Builder->idToIndex(fragId)] = sumE[1];
924 m_sumE_zz[m_l2Builder->idToIndex(fragId)] = sumE[2];
925 }
926 }
927 }
928
929 if (m_compareMode && dspCont) {
930
931 const TileL2Container* l2Cnt = SG::makeHandle(m_l2CntKey, ctx).get();
932
935 int i=0;
936 for(; it != end; ++it) {
937 m_sumEt_yy[i++] = (*it)->sumEt();
938 m_sumEz_yy[i++] = (*it)->sumEz();
939 m_sumE_yy[i++] = (*it)->sumE();
940 }
941 }
942
943 return StatusCode::SUCCESS;
944}
#define N_DMUS
TileContainer< TileL2 > TileL2Container
Athena::TPCnvVers::Old Athena::TPCnvVers::Old Athena::TPCnvVers::Current Athena::TPCnvVers::Old Athena::TPCnvVers::Current TileRawChannelContainer
const TELEMENT * get(size_type n) const
const_iterator end() const noexcept
const_iterator begin() const noexcept
const std::string & key() const
Return the StoreGate ID for the referenced object.
TileRawChannelUnit::UNIT m_rchUnit
Unit for TileRawChannels (ADC, pCb, MeV).
bool m_bad[N_ROS][N_MODULES][N_CHANS]
TileRawChannelUnit::UNIT m_dspUnit
Unit for TileRawChannels in DSP.
uint32_t m_dspFlags
DSP flags from BS.
static unsigned int getDrawerIdxFromFragId(unsigned int fragId)
Returns a drawer hash from fragId This function assumes drawer context (i.e.
float pedestal(void) const
float time(int ind=0) const
float quality(int ind=0) const
float amplitude(int ind=0) const
TileRawChannelUnit::UNIT get_unit() const
uint32_t get_bsflags() const
Identifier cell_ID_index(int &index, int &pmt) const
HWIdentifier adc_HWID(void) const
Definition TileRawData.h:53
double chi2(TH1 *h0, TH1 *h1)
time(flags, cells_name, *args, **kw)

◆ storeRawChannels()

StatusCode TileAANtuple::storeRawChannels ( const EventContext & ctx,
const SG::ReadHandleKey< TileRawChannelContainer > & containerKey,
float ene[N_ROS2][N_MODULES][N_CHANS],
float time[N_ROS2][N_MODULES][N_CHANS],
float chi2[N_ROS2][N_MODULES][N_CHANS],
float ped[N_ROS2][N_MODULES][N_CHANS],
bool fillAll )
private

/ Fill ntuple with data from TRC.

final calibration

Definition at line 549 of file TileAANtuple.cxx.

556{
557 if (containerKey.empty()) {// empty name, nothing to do
558 return StatusCode::FAILURE;
559 }
560
561 // get named container
562 const TileRawChannelContainer* rcCnt =
563 SG::makeHandle (containerKey, ctx).get();
564 ATH_MSG_VERBOSE( "Container ID " << containerKey.key() );
565
566 TileRawChannelUnit::UNIT rChUnit = rcCnt->get_unit();
567 ATH_MSG_VERBOSE( "RawChannel unit is " << rChUnit );
568
569 bool dspCont = ( rChUnit >= TileRawChannelUnit::OnlineADCcounts );
570 if (dspCont) { // this is container with DSP results
571 m_dspUnit = rChUnit;
572 m_dspFlags = rcCnt->get_bsflags() >> 16;
573 ATH_MSG_VERBOSE( "DSP flag is 0x" << MSG::hex << m_dspFlags << MSG::dec
574 << " DSP unit is " << m_dspUnit);
575
577 && rChUnit != TileRawChannelUnit::ADCcounts) {
578 ATH_MSG_ERROR( "RawChannel units are not ADC counts, can't apply DSP-like calibration" );
579 return StatusCode::FAILURE;
580 }
581
582 if (m_calibrateEnergy) {
583 if (m_useDspUnits) { // calibrate a-la online
585 } else { // convert to final units
587 }
588 } else {
589 m_rchUnit = rChUnit;
590 }
591 ATH_MSG_VERBOSE( "Final RawChannel unit is " << m_rchUnit );
592
593 std::vector<float> sumE(3);
594 float E[48];
595 int gain[48];
596 if (m_compareMode && dspCont) memset(m_bad,0,sizeof(m_bad));
597
598 // Get iterator for all TRCColl in TRCCont
599 TileRawChannelContainer::const_iterator itColl = (*rcCnt).begin();
600 TileRawChannelContainer::const_iterator itCollEnd = (*rcCnt).end();
601
603
604 // Go through all TileRawChannelCollections
605 for(; itColl != itCollEnd; ++itColl) {
606 int fragId = (*itColl)->identify();
607 int drawerIdx = TileCalibUtils::getDrawerIdxFromFragId(fragId);
608 int drawer = fragId & 0x3F;
609 int ROS = (fragId>>8);
610 int rosI = ROS-1;
611 int rosL = rosI;
612 int rosH = rosI + N_ROS;
613
614 ATH_MSG_VERBOSE( "TRC ("<< containerKey.key()
615 <<") Event# "<< m_evtNr
616 << " Frag id 0x" << MSG::hex << fragId << MSG::dec
617 << " ROS " << ROS
618 << " drawer " << drawer );
619
620 // go through all TileRawChannels in collection
621 it = (*itColl)->begin();
622 itEnd = (*itColl)->end();
623
624 int cmpCounter = 0;
625 if (m_compareMode) {
626 memset(E, 0, sizeof(E));
627 memset(gain, 0, sizeof(gain));
628 }
629
630 for(; it != itEnd; ++it) {
631 const TileRawChannel* rch = (*it);
632
633 HWIdentifier hwid = rch->adc_HWID();
634
635 // determine channel
636 int channel = m_tileHWID->channel(hwid);
637 // convert channel number to PMT number if needed
638 if (m_pmtOrder) channel = digiChannel2PMT(ROS,channel);
639
640 // determine gain and set ros index accordingly
641 int adc = m_tileHWID->adc(hwid);
642 if (m_calibMode) {
643 if (m_compareMode) {
644 ++cmpCounter;
645 if(cmpCounter>48) rosI = rosH;
646 else rosI = rosL;
647 } else {
648 if(adc == 1) rosI = rosH;
649 else rosI = rosL;
650 }
651 }
652
654 float energy = rch->amplitude();
655 if (m_rchUnit != rChUnit) {
657 energy = m_tileToolEmscale->channelCalib(drawerIdx, channel, adc, energy, rChUnit, m_rchUnit);
658 else
659 energy = m_tileToolEmscale->channelCalibOnl(drawerIdx, channel, adc, energy, m_rchUnit);
660 }
661
662 ene[rosI][drawer][channel] = energy;
663 time[rosI][drawer][channel] = rch->time();
664 chi2[rosI][drawer][channel] = rch->quality();
665 ped[rosI][drawer][channel] = rch->pedestal();
666 if (m_arrays->m_gain[rosI][drawer][channel] < 0)
667 m_arrays->m_gain[rosI][drawer][channel] = adc;
668
669 if (m_compareMode) { // filling array for SumEt calculations
670 E[channel] = energy;
671 gain[channel] = adc;
672 if (dspCont) { // use bad flag from DSP container only
673 m_bad[rosL][drawer][channel] = (rch->quality()>15.99);
674 //} else {
675 //m_bad[rosL][drawer][channel] = m_tileBadChanTool->getAdcStatus(drawerIdx, channel, adc).isBad();
676 }
677 }
678
679 if (msgLvl(MSG::VERBOSE)) {
680 int index,pmt;
681 rch->cell_ID_index(index,pmt);
682 ATH_MSG_VERBOSE( "TRC ch " << channel
683 << " gain " << adc
684 << " type " << std::min(index,0)
685 << " ene=" << energy
686 << " time=" << rch->time()
687 << " chi2=" << rch->quality()
688 << " ped=" << rch->pedestal() );
689 }
690 }
691
692 if (fillAll) {
693
694 m_arrays->m_ROD_GlobalCRC[rosL][drawer] = (*itColl)->getFragGlobalCRC() & 1;
695 m_arrays->m_ROD_BCID[rosL][drawer] = (*itColl)->getFragDSPBCID();
696 m_arrays->m_ROD_DMUMask[rosL][drawer][0] = (*itColl)->getFragRODChipMask();
697 m_arrays->m_ROD_DMUMask[rosL][drawer][1] = (*itColl)->getFragFEChipMask();
698
699 for(unsigned int dmu=0;dmu<N_DMUS;dmu++) {
700
701 m_arrays->m_ROD_DMUBCIDErr[rosL][drawer][dmu] = ((*itColl)->getFragBCID() >> dmu) & 1;
702 m_arrays->m_ROD_DMUmemoryErr[rosL][drawer][dmu] = ((*itColl)->getFragMemoryPar() >> dmu) & 1;
703 m_arrays->m_ROD_DMUSstrobeErr[rosL][drawer][dmu] = ((*itColl)->getFragSstrobe() >> dmu) & 1;
704 m_arrays->m_ROD_DMUDstrobeErr[rosL][drawer][dmu] = ((*itColl)->getFragDstrobe() >> dmu) & 1;
705 m_arrays->m_ROD_DMUHeadformatErr[rosL][drawer][dmu] = ((*itColl)->getFragHeaderBit() >> dmu) & 1;
706 m_arrays->m_ROD_DMUHeadparityErr[rosL][drawer][dmu] = ((*itColl)->getFragHeaderPar() >> dmu) & 1;
707 m_arrays->m_ROD_DMUDataformatErr[rosL][drawer][dmu] = ((*itColl)->getFragSampleBit() >> dmu) & 1;
708 m_arrays->m_ROD_DMUDataparityErr[rosL][drawer][dmu] = ((*itColl)->getFragSamplePar() >> dmu) & 1;
709 m_arrays->m_ROD_DMUfeCRC[rosL][drawer][dmu] = ((*itColl)->getFragFEChipMask() >> dmu) & 1;
710 m_arrays->m_ROD_DMUrodCRC[rosL][drawer][dmu] = ((*itColl)->getFragRODChipMask() >> dmu) & 1;
711 }
712 }
713
714 if (m_compareMode) {
715 m_l2Builder->SumE(ROS,drawer,m_rchUnit,E,gain,m_bad[rosL][drawer],sumE);
716 if (dspCont) {
717 m_sumEt_xx[m_l2Builder->idToIndex(fragId)] = sumE[0];
718 m_sumEz_xx[m_l2Builder->idToIndex(fragId)] = sumE[1];
719 m_sumE_xx[m_l2Builder->idToIndex(fragId)] = sumE[2];
720 }
721 else {
722 m_sumEt_zz[m_l2Builder->idToIndex(fragId)] = sumE[0];
723 m_sumEz_zz[m_l2Builder->idToIndex(fragId)] = sumE[1];
724 m_sumE_zz[m_l2Builder->idToIndex(fragId)] = sumE[2];
725 }
726 }
727 }
728
729 if (m_compareMode && dspCont) {
730
731 const TileL2Container* l2Cnt = SG::makeHandle(m_l2CntKey, ctx).get();
732
735 int i=0;
736 for(; it != end; ++it) {
737 m_sumEt_yy[i++] = (*it)->sumEt();
738 m_sumEz_yy[i++] = (*it)->sumEz();
739 m_sumE_yy[i++] = (*it)->sumE();
740 }
741 }
742
743 return StatusCode::SUCCESS;
744}

◆ storeTMDBDecision()

StatusCode TileAANtuple::storeTMDBDecision ( const EventContext & ctx)
private

Definition at line 1137 of file TileAANtuple.cxx.

1137 {
1138
1139 const char * part[4] = {"LBA","LBC","EBA","EBC"};
1140
1141 // Read Decision from TES
1142 //
1143 if (!m_tileMuRcvContainerKey.empty()){
1144
1145 ATH_MSG_VERBOSE( "reading TMDB decision from " << m_tileMuRcvContainerKey.key() );
1146
1147 const TileMuonReceiverContainer *decisionCnt =
1149
1151 TileMuonReceiverContainer::const_iterator itLast = decisionCnt->end();
1152
1153 // Go through all decisions
1154 //
1155 int bcid[3]={0};
1156
1157 for(; it != itLast; ++it) {
1158
1159 const TileMuonReceiverObj * obj = (*it);
1160
1161 const std::vector<bool> & decision = obj->GetDecision();
1162 int siz = decision.size();
1163
1164 if (siz>0) {
1165
1166 int fragId = (*it)->identify();
1167 int drawer = fragId & 0x3F;
1168 int ros = ((fragId>>8) & 0xF) - 1;
1169 bcid[2] = ((fragId>>24) & 0xF);
1170 bcid[1] = ((fragId>>20) & 0xF);
1171 bcid[0] = ((fragId>>16) & 0XF);
1172
1173 if (siz > N_TMDBDECISIONS) {
1174 ATH_MSG_VERBOSE( "TMDB ONLY " << N_TMDBDECISIONS << " decisions saved to ntuple instead of " << siz);
1175 siz = N_TMDBDECISIONS;
1176 }
1177
1178 for (int n = 0; n < siz; ++n) {
1179 m_arrays->m_decisionTMDB[ros][drawer][n] = (unsigned char) decision[n];
1180 }
1181
1182 for (int n = 0; n < 3; ++n) {
1183 m_arrays->m_bcidTMDB[ros][drawer][n] = (unsigned char) bcid[n];
1184 }
1185
1186 if (msgLvl(MSG::VERBOSE)) {
1187 std::stringstream ss;
1188 for (int n = 0; n < siz; ++n) {
1189 ss<<std::setw(5)<<(int)m_arrays->m_decisionTMDB[ros][drawer][n];
1190 }
1191 ATH_MSG_VERBOSE( "TMDB 0x" <<MSG::hex<< fragId <<MSG::dec<<" "<< part[ros]
1192 << std::setfill('0') << std::setw(2)
1193 << drawer+1 << std::setfill(' ')
1194 << " BCID check " << bcid[0] <<"/"<< bcid[1] <<"/"<< bcid[2] << " decision: " << ss.str() );
1195 }
1196 }
1197 }
1198 }
1199
1200 return StatusCode::SUCCESS;
1201}
static Double_t ss
#define N_TMDBDECISIONS
TileContainer< TileMuonReceiverObj > TileMuonReceiverContainer
setEventNumber setTimeStamp bcid

◆ storeTMDBDigits()

StatusCode TileAANtuple::storeTMDBDigits ( const EventContext & ctx)
private

Definition at line 1203 of file TileAANtuple.cxx.

1203 {
1204
1205 const char * part[4] = {"LBA","LBC","EBA","EBC"};
1206
1207 // Read Digits from TES
1208 //
1209 if (!m_tileMuRcvDigitsContainerKey.empty()){
1210
1211 ATH_MSG_VERBOSE( "reading TMDB digits from " << m_tileMuRcvDigitsContainerKey.key() );
1212
1213 const TileDigitsContainer* digitsCnt =
1215
1216 TileDigitsContainer::const_iterator itColl1 = (*digitsCnt).begin();
1217 TileDigitsContainer::const_iterator itCollEnd1 = (*digitsCnt).end();
1218
1219 // Go through all TileDigitsCollections
1220 for(; itColl1 != itCollEnd1; ++itColl1) {
1221
1222 TileDigitsCollection::const_iterator it1 = (*itColl1)->begin();
1223 TileDigitsCollection::const_iterator itEnd1 = (*itColl1)->end();
1224
1225 if (it1!=itEnd1) {
1226
1227 int fragId = (*itColl1)->identify();
1228 int drawer = fragId & 0x3F;
1229 int ros = (fragId>>8) - 1;
1230 int ichannel = 0;
1231
1232 ATH_MSG_VERBOSE( "TMDB 0x" <<MSG::hex<< fragId <<MSG::dec<<" "<< part[ros]
1233 << std::setfill('0') << std::setw(2)
1234 << drawer+1 << std::setfill(' ') );
1235
1236 for (; it1 != itEnd1; ++it1) {
1237
1238 if (ichannel>=N_TMDBCHANS) {
1239 ATH_MSG_WARNING("Too many channels in TMDB Digi container for frag 0x" <<MSG::hex<< fragId <<MSG::dec <<" keeping only first " << N_TMDBCHANS << " channels in ntuple ");
1240 break;
1241 }
1242
1243 const TileDigits* digit = (*it1);
1244
1245 // get digits
1246 const std::vector<float> & sampleVec = digit->samples();
1247 int siz = sampleVec.size();
1248
1249 if (siz > m_nSamples) {
1250 ATH_MSG_VERBOSE( "TMDB ONLY " << m_nSamples.value() << " digits saved to ntuple instead of " << siz);
1251 siz = m_nSamples;
1252 }
1253
1254 for (int n = 0; n < siz; ++n) {
1255 m_arrays->m_sampleTMDB[sample_ind_TMDB(ros,drawer,ichannel,n)] = (unsigned char) sampleVec[n];
1256 }
1257
1258 if (msgLvl(MSG::VERBOSE)) {
1259 std::stringstream ss;
1260 for (int n = 0; n < siz; ++n) {
1261 ss<<std::setw(5)<<(int)m_arrays->m_sampleTMDB[sample_ind_TMDB(ros,drawer,ichannel,n)];
1262 }
1263 ATH_MSG_VERBOSE( "TMDB dig: " <<ros+1<<"/"<<drawer<<"/"<<m_tileHWID->channel(digit->adc_HWID())<<": "<<ss.str() );
1264 }
1265
1266 ++ichannel;
1267 }
1268 }
1269 }
1270 }
1271
1272 return StatusCode::SUCCESS;
1273}
#define sample_ind_TMDB(r, m, c, i)

◆ storeTMDBRawChannel()

StatusCode TileAANtuple::storeTMDBRawChannel ( const EventContext & ctxx)
private

Definition at line 1275 of file TileAANtuple.cxx.

1275 {
1276
1277 const char * part[4] = {"LBA","LBC","EBA","EBC"};
1278
1279 // Read Raw Channels from TDS
1280 //
1282
1283 ATH_MSG_VERBOSE( "reading TMDB energies from " << m_tileMuRcvRawChannelContainerKey.key() );
1284
1285 const TileRawChannelContainer* rcCnt =
1287
1288 TileRawChannelContainer::const_iterator itColl2 = (*rcCnt).begin();
1289 TileRawChannelContainer::const_iterator itCollEnd2 = (*rcCnt).end();
1290
1291 // Go through all TileDigitsCollections
1292 for(; itColl2 != itCollEnd2; ++itColl2) {
1293
1294 TileRawChannelCollection::const_iterator it2 = (*itColl2)->begin();
1295 TileRawChannelCollection::const_iterator itEnd2 = (*itColl2)->end();
1296
1297 if (it2!=itEnd2) {
1298
1299 int fragId = (*itColl2)->identify();
1300 int drawer = fragId & 0x3F;
1301 int ros = (fragId>>8) - 1;
1302 int ichannel = 0;
1303
1304 ATH_MSG_VERBOSE( "TMDB 0x" <<MSG::hex<< fragId <<MSG::dec<<" "<< part[ros]
1305 << std::setfill('0') << std::setw(2)
1306 << drawer+1 << std::setfill(' ') );
1307
1308 for (; it2 != itEnd2; ++it2) {
1309
1310 if (ichannel>=N_TMDBCHANS) {
1311 ATH_MSG_WARNING("Too many channels in TMDB RCh container for frag 0x" <<MSG::hex<< fragId <<MSG::dec <<" keeping only first " << N_TMDBCHANS << " channels in ntuple ");
1312 break;
1313 }
1314
1315 const TileRawChannel* rc = (*it2);
1316
1317 m_arrays->m_eTMDB[ros][drawer][ichannel] = rc -> amplitude();
1318
1319 ATH_MSG_VERBOSE( "TMDB rc: " <<ros+1<<"/"<<drawer<<"/"<<m_tileHWID->channel(rc->adc_HWID())<< ": " << m_arrays->m_eTMDB[ros][drawer][ichannel] );
1320
1321 ++ichannel;
1322 }
1323 }
1324 }
1325 }
1326
1327 return StatusCode::SUCCESS;
1328}
static Double_t rc

◆ sysExecute()

StatusCode AthCommonAlgorithm< Gaudi::Algorithm >::sysExecute ( const EventContext & ctx)
overridevirtualinherited

Execute an algorithm.

We override this in order to work around an issue with the Algorithm base class storing the event context in a member variable that can cause crashes in MT jobs.

Reimplemented in AthAnalysisAlgorithm.

Definition at line 80 of file AthCommonAlgorithm.cxx.

41{
42 return BaseAlg::sysExecute (ctx);
43}

◆ sysInitialize()

StatusCode AthCommonAlgorithm< Gaudi::Algorithm >::sysInitialize ( )
overridevirtualinherited

Override sysInitialize.

Override sysInitialize from the base class.

Loop through all output handles, and if they're WriteCondHandles, automatically register them and this Algorithm with the CondSvc

Scan through all outputHandles, and if they're WriteCondHandles, register them with the CondSvc

Reimplemented from AthCommonDataStore< AthCommonMsg< Gaudi::Algorithm > >.

Reimplemented in AthAnalysisAlgorithm, AthHistogramAlgorithm, HypoBase, InputMakerBase, and PyAthena::Alg.

Definition at line 60 of file AthCommonAlgorithm.cxx.

71 {
73
74 if (sc.isFailure()) {
75 return sc;
76 }
77
78 ServiceHandle<ICondSvc> cs("CondSvc",name());
79 for (auto h : outputHandles()) {
80 if (h->isCondition() && h->mode() == Gaudi::DataHandle::Writer) {
81 // do this inside the loop so we don't create the CondSvc until needed
82 if ( cs.retrieve().isFailure() ) {
83 ATH_MSG_WARNING("no CondSvc found: won't autoreg WriteCondHandles");
85 }
86 if (cs->regHandle(this,*h).isFailure()) {
88 ATH_MSG_ERROR("unable to register WriteCondHandle " << h->fullKey()
89 << " with CondSvc");
90 }
91 }
92 }
93 return sc;
94}
virtual StatusCode sysInitialize() override
virtual std::vector< Gaudi::DataHandle * > outputHandles() const override

◆ sysStart()

virtual StatusCode AthCommonDataStore< AthCommonMsg< Gaudi::Algorithm > >::sysStart ( )
overridevirtualinherited

Handle START transition.

We override this in order to make sure that conditions handle keys can cache a pointer to the conditions container.

◆ TMDB_addBranch()

void TileAANtuple::TMDB_addBranch ( void )
private

Definition at line 2093 of file TileAANtuple.cxx.

2094{
2095
2096 if (!m_tileMuRcvRawChannelContainerKey.empty()) {
2097 m_ntuplePtr->Branch("eTMDB", m_arrays->m_eTMDB, "eTMDB[4][64][8]/F"); // float m_arrays->m_eTMDB[N_ROS][N_MODULES][N_TMDBCHANS]
2098 }
2099
2100 if (!m_tileMuRcvDigitsContainerKey.empty()) {
2101 m_ntuplePtr->Branch("sampleTMDB", &(m_arrays->m_sampleTMDB[0]), NAME3("sampleTMDB[4][64][8][",std::to_string(m_nSamples.value()),"]/b")); // unsigned char m_arrays->m_sampleTMDB[N_ROS][N_MODULES][N_TMDBCHANS][N_SAMPLES]
2102 }
2103
2104 if (!m_tileMuRcvContainerKey.empty()) {
2105 m_ntuplePtr->Branch("decisionTMDB", m_arrays->m_decisionTMDB, "decisionTMDB[4][64][4]/b"); // unsigned char m_arrays->m_decisionTMDB[N_ROS][N_MODULES][N_TMDBDECISIONS]
2106 }
2107
2108 if (!m_tileMuRcvContainerKey.empty()) {
2109 m_ntuplePtr->Branch("bcidTMDB", m_arrays->m_bcidTMDB, "bcidTMDB[4][64][3]/b"); // unsigned char m_arrays->m_bcidTMDB[N_ROS][N_MODULES][N_TMDBBCIDWORDS]
2110 }
2111
2112}

◆ TMDB_clearBranch()

void TileAANtuple::TMDB_clearBranch ( void )
private

Definition at line 2114 of file TileAANtuple.cxx.

2115{
2116 if (!m_tileMuRcvRawChannelContainerKey.empty()) CLEAR(m_arrays->m_eTMDB);
2117 if (!m_tileMuRcvDigitsContainerKey.empty()) CLEAR6(m_arrays->m_sampleTMDB);
2118 if (!m_tileMuRcvContainerKey.empty()) CLEAR(m_arrays->m_decisionTMDB);
2119 if (!m_tileMuRcvContainerKey.empty()) CLEAR(m_arrays->m_bcidTMDB);
2120}
#define CLEAR6(array)

◆ TRIGGER_addBranch()

void TileAANtuple::TRIGGER_addBranch ( void )
private

//////////////////////////////////////////////////////////////////////////// /Add TRIGGER variables to the Tree

////////////////////////////////////////////////////////////////////////////

Definition at line 1545 of file TileAANtuple.cxx.

1545 {
1546 m_ntuplePtr->Branch("EvTime",&m_evTime,"EvTime/I");
1547 m_ntuplePtr->Branch("Run",&m_run,"Run/I");
1548 m_ntuplePtr->Branch("LumiBlock",&m_lumiBlock,"LumiBlock/I");
1549 m_ntuplePtr->Branch("Evt",&m_evt,"Evt/I");
1550 m_ntuplePtr->Branch("EvtNr",&m_evtNr,"EvtNr/I");
1551 m_ntuplePtr->Branch("Trig",&m_trigType,"Trig/I");
1552 m_ntuplePtr->Branch("DSPflags",&m_dspFlags,"DSPflags/i");
1553 m_ntuplePtr->Branch("DSPunits",&m_dspUnit,"DSPunits/S");
1554 m_ntuplePtr->Branch("OFLunits",&m_rchUnit,"OFLunits/S");
1555
1556 if (m_bsInput) {
1557 std::string dim = "[" + std::to_string(N_RODS) + "]/I";
1558 m_ntuplePtr->Branch("L1ID", m_l1ID, NAME2("L1ID", dim));
1559 m_ntuplePtr->Branch("L1Type", m_l1Type, NAME2("L1Type",dim));
1560 m_ntuplePtr->Branch("EvType", m_evType, NAME2("EvType",dim));
1561 m_ntuplePtr->Branch("EvBCID", m_evBCID, NAME2("EvBCID",dim));
1562 }
1563}

◆ TRIGGER_clearBranch()

void TileAANtuple::TRIGGER_clearBranch ( void )
private

//////////////////////////////////////////////////////////////////////////// Clear Tree TRIGGER variables

////////////////////////////////////////////////////////////////////////////

Definition at line 1572 of file TileAANtuple.cxx.

1572 {
1573 m_evTime=0;
1574 m_run=0;
1575 m_evt=0;
1576 m_trigType=0;
1577 m_dspFlags=0;
1578
1579 CLEAR1(m_l1ID);
1583}

◆ updateVHKA()

void AthCommonDataStore< AthCommonMsg< Gaudi::Algorithm > >::updateVHKA ( Gaudi::Details::PropertyBase & )
inlineinherited

Definition at line 298 of file AthCommonDataStore.h.

298 {
299 for (auto &a : m_vhka) {
301 for (auto k : keys) {
302 k->setOwner(this);
303 }
304 }
305 }

Member Data Documentation

◆ m_arrays

std::unique_ptr<Arrays> TileAANtuple::m_arrays
private

Definition at line 339 of file TileAANtuple.h.

◆ m_bad

bool TileAANtuple::m_bad[N_ROS][N_MODULES][N_CHANS] {}
private

Definition at line 428 of file TileAANtuple.h.

428{};

◆ m_beamElemContainerKey

SG::ReadHandleKey<TileBeamElemContainer> TileAANtuple::m_beamElemContainerKey {this, "TileBeamElemContainer", "TileBeamElemCnt", "Input Tile beam elements container key"}
private

Definition at line 357 of file TileAANtuple.h.

357{this, "TileBeamElemContainer", "TileBeamElemCnt", "Input Tile beam elements container key"};

◆ m_bsInput

Gaudi::Property<bool> TileAANtuple::m_bsInput {this, "BSInput", true, "Bytestream file is used as input"}
private

true if bytestream file is used

Definition at line 376 of file TileAANtuple.h.

376{this, "BSInput", true, "Bytestream file is used as input"};

◆ m_cabling

const TileCablingService* TileAANtuple::m_cabling {nullptr}
private

cabling tool

Definition at line 407 of file TileAANtuple.h.

407{nullptr};

◆ m_cablingSvc

ServiceHandle<TileCablingSvc> TileAANtuple::m_cablingSvc
private
Initial value:
{ this,
"TileCablingSvc", "TileCablingSvc", "The Tile cabling service" }

Name of Tile cabling service.

Definition at line 437 of file TileAANtuple.h.

437 { this,
438 "TileCablingSvc", "TileCablingSvc", "The Tile cabling service" };

◆ m_calibMode

Gaudi::Property<bool> TileAANtuple::m_calibMode {this, "CalibMode", false, "If data should be put in calib mode"}
private

If data should be put in calib mode.

Definition at line 379 of file TileAANtuple.h.

379{this, "CalibMode", false, "If data should be put in calib mode"};

◆ m_calibrateEnergy

Gaudi::Property<bool> TileAANtuple::m_calibrateEnergy {this, "CalibrateEnergy", true, "Convert energy to new units or use amplitude from RawChannel directly"}
private

convert energy to new units or use amplitude from RawChannel directly

Definition at line 374 of file TileAANtuple.h.

374{this, "CalibrateEnergy", true, "Convert energy to new units or use amplitude from RawChannel directly"};

◆ m_checkDCS

Gaudi::Property<bool> TileAANtuple::m_checkDCS {this, "CheckDCS", false, "If false, do not use TileDCS at all"}
private

if false, do not use TileDCS at all

Definition at line 381 of file TileAANtuple.h.

381{this, "CheckDCS", false, "If false, do not use TileDCS at all"};

◆ m_cispar

uint32_t TileAANtuple::m_cispar[N_CISPAR] {}
private

Definition at line 207 of file TileAANtuple.h.

207{};

◆ m_compareMode

Gaudi::Property<bool> TileAANtuple::m_compareMode {this, "CompareMode", false, "If two sets of data should be compared (e.g. frag4 and frag5)"}
private

If two sets of data should be compared (e.g.

frag4 and frag5)

Definition at line 380 of file TileAANtuple.h.

380{this, "CompareMode", false, "If two sets of data should be compared (e.g. frag4 and frag5)"};

◆ m_compressSettings

Gaudi::Property<int> TileAANtuple::m_compressSettings {this, "CompressionSettings", -1, "ROOT compression settings for output file (negative: do not change)"}
private

Definition at line 352 of file TileAANtuple.h.

352{this, "CompressionSettings", -1, "ROOT compression settings for output file (negative: do not change)"};

◆ m_daqtype

int TileAANtuple::m_daqtype {0}
private

Definition at line 343 of file TileAANtuple.h.

343{0};

◆ m_dateTime

char TileAANtuple::m_dateTime[32] {}
private

event date and time

Definition at line 197 of file TileAANtuple.h.

197{};

◆ m_DCSBranches

Gaudi::Property<int> TileAANtuple::m_DCSBranches {this, "DCSBranches", 111111111, "Mask like 110101 - which DCS branches to fill"}
private

mask like 110101 - which DCS branches to fill

Definition at line 382 of file TileAANtuple.h.

382{this, "DCSBranches", 111111111, "Mask like 110101 - which DCS branches to fill"};

◆ m_DCSntuplePtr

TTree* TileAANtuple::m_DCSntuplePtr {nullptr}
private

Definition at line 395 of file TileAANtuple.h.

395{nullptr};

◆ m_detStore

StoreGateSvc_t AthCommonDataStore< AthCommonMsg< Gaudi::Algorithm > >::m_detStore
privateinherited

Pointer to StoreGate (detector store by default).

Definition at line 381 of file AthCommonDataStore.h.

◆ m_digitsContainerKey

SG::ReadHandleKey<TileDigitsContainer> TileAANtuple::m_digitsContainerKey {this, "TileDigitsContainer", "TileDigitsCnt", "Input Tile digits container key"}
private

Definition at line 355 of file TileAANtuple.h.

355{this, "TileDigitsContainer", "TileDigitsCnt", "Input Tile digits container key"};

◆ m_DQstatusKey

SG::ReadHandleKey<TileDQstatus> TileAANtuple::m_DQstatusKey
private
Initial value:
{ this,
"TileDQstatus", "TileDQstatus", "TileDQstatus key" }

Definition at line 443 of file TileAANtuple.h.

443 { this,
444 "TileDQstatus", "TileDQstatus", "TileDQstatus key" };

◆ m_dspFlags

uint32_t TileAANtuple::m_dspFlags {0}
private

DSP flags from BS.

Definition at line 199 of file TileAANtuple.h.

199{0};

◆ m_dspRawChannelContainerKey

SG::ReadHandleKey<TileRawChannelContainer> TileAANtuple::m_dspRawChannelContainerKey {this, "TileRawChannelContainerDsp", "", "Input Tile raw channel container key (DSP)"}
private

Definition at line 363 of file TileAANtuple.h.

363{this, "TileRawChannelContainerDsp", "", "Input Tile raw channel container key (DSP)"};

◆ m_dspUnit

TileRawChannelUnit::UNIT TileAANtuple::m_dspUnit {TileRawChannelUnit::ADCcounts}
private

Unit for TileRawChannels in DSP.

Definition at line 386 of file TileAANtuple.h.

◆ m_evBCID

int TileAANtuple::m_evBCID[N_RODS] {}
private

Event BCID from ROD header.

Definition at line 203 of file TileAANtuple.h.

203{};

◆ m_evt

int TileAANtuple::m_evt {0}
private

event number in a run

Definition at line 194 of file TileAANtuple.h.

194{0};

◆ m_evTime

int TileAANtuple::m_evTime {0}
private

event time

Definition at line 192 of file TileAANtuple.h.

192{0};

◆ m_evtNr

int TileAANtuple::m_evtNr {-1}
private

event counter

Definition at line 189 of file TileAANtuple.h.

189{-1};

◆ m_evtStore

StoreGateSvc_t AthCommonDataStore< AthCommonMsg< Gaudi::Algorithm > >::m_evtStore
privateinherited

Pointer to StoreGate (event store by default).

Definition at line 378 of file AthCommonDataStore.h.

◆ m_evType

int TileAANtuple::m_evType[N_RODS] {}
private

Event Type from ROD header.

Definition at line 204 of file TileAANtuple.h.

204{};

◆ m_extendedExtraObjects

DataObjIDColl AthCommonAlgorithm< Gaudi::Algorithm >::m_extendedExtraObjects
privateinherited

Extra output dependency collection, extended by AthAlgorithmDHUpdate to add symlinks.

Empty if no symlinks were found.

Definition at line 108 of file AthCommonAlgorithm.h.

◆ m_fileMgr

ServiceHandle<IFileMgr> TileAANtuple::m_fileMgr
private
Initial value:
{this,
"FileMgr", "FileMgr", "The File manager service" }

Definition at line 399 of file TileAANtuple.h.

399 {this,
400 "FileMgr", "FileMgr", "The File manager service" };

◆ m_finalUnit

Gaudi::Property<int> TileAANtuple::m_finalUnit {this, "OfflineUnits", TileRawChannelUnit::MegaElectronVolts, "Calibrate everything to this level"}
private

calibrate everything to this level

Definition at line 378 of file TileAANtuple.h.

378{this, "OfflineUnits", TileRawChannelUnit::MegaElectronVolts, "Calibrate everything to this level"};

◆ m_fitcRawChannelContainerKey

SG::ReadHandleKey<TileRawChannelContainer> TileAANtuple::m_fitcRawChannelContainerKey {this, "TileRawChannelContainerFitCool", "", "Input Tile raw channel container key (Fit method with COOL pulse shape)"}
private

Definition at line 360 of file TileAANtuple.h.

360{this, "TileRawChannelContainerFitCool", "", "Input Tile raw channel container key (Fit method with COOL pulse shape)"};

◆ m_fitRawChannelContainerKey

SG::ReadHandleKey<TileRawChannelContainer> TileAANtuple::m_fitRawChannelContainerKey {this, "TileRawChannelContainerFit", "", "Input Tile raw channel container key (Fit method)"}
private

Definition at line 359 of file TileAANtuple.h.

359{this, "TileRawChannelContainerFit", "", "Input Tile raw channel container key (Fit method)"};

◆ m_fltDigitsContainerKey

SG::ReadHandleKey<TileDigitsContainer> TileAANtuple::m_fltDigitsContainerKey {this, "TileDigitsContainerFlt", "", "Input Tile filtered digits container key"}
private

Definition at line 356 of file TileAANtuple.h.

356{this, "TileDigitsContainerFlt", "", "Input Tile filtered digits container key"};

◆ m_HHMMSS

int TileAANtuple::m_HHMMSS {0}
private

event time in HH:MM:SS

Definition at line 196 of file TileAANtuple.h.

196{0};

◆ m_hid2RESrcIDKey

SG::ReadCondHandleKey<TileHid2RESrcID> TileAANtuple::m_hid2RESrcIDKey
private
Initial value:
{this,
"TileHid2RESrcID", "TileHid2RESrcID", "TileHid2RESrcID key"}

Definition at line 446 of file TileAANtuple.h.

446 {this,
447 "TileHid2RESrcID", "TileHid2RESrcID", "TileHid2RESrcID key"};

◆ m_l1ID

int TileAANtuple::m_l1ID[N_RODS] {}
private

Level1 ID from ROD header.

Definition at line 201 of file TileAANtuple.h.

201{};

◆ m_l1Type

int TileAANtuple::m_l1Type[N_RODS] {}
private

Level1 Type from ROD header.

Definition at line 202 of file TileAANtuple.h.

202{};

◆ m_l2Builder

ToolHandle<TileL2Builder> TileAANtuple::m_l2Builder
private

Definition at line 418 of file TileAANtuple.h.

◆ m_l2CntKey

SG::ReadHandleKey<TileL2Container> TileAANtuple::m_l2CntKey {this, "TileL2Cnt", "TileL2Cnt", "Input Tile L2 container key"}
private

Definition at line 371 of file TileAANtuple.h.

371{this, "TileL2Cnt", "TileL2Cnt", "Input Tile L2 container key"};

◆ m_las_BCID

int TileAANtuple::m_las_BCID {0}
private

Definition at line 211 of file TileAANtuple.h.

211{0};

◆ m_las_Filt

int TileAANtuple::m_las_Filt {0}
private

Definition at line 213 of file TileAANtuple.h.

213{0};

◆ m_las_MeasAmp

float TileAANtuple::m_las_MeasAmp {0}
private

Definition at line 215 of file TileAANtuple.h.

215{0};

◆ m_las_ReqAmp

float TileAANtuple::m_las_ReqAmp {0}
private

Definition at line 214 of file TileAANtuple.h.

214{0};

◆ m_las_Temperature

float TileAANtuple::m_las_Temperature {0}
private

Definition at line 216 of file TileAANtuple.h.

216{0};

◆ m_las_version

int TileAANtuple::m_las_version {0}
private

Definition at line 210 of file TileAANtuple.h.

210{0};

◆ m_laserObjectKey

SG::ReadHandleKey<TileLaserObject> TileAANtuple::m_laserObjectKey {this, "TileLaserObject", "", "Input Tile laser object key"}
private

Definition at line 367 of file TileAANtuple.h.

367{this, "TileLaserObject", "", "Input Tile laser object key"};

◆ m_lumiBlock

int TileAANtuple::m_lumiBlock {0}
private

lumiblock number in a run

Definition at line 195 of file TileAANtuple.h.

195{0};

◆ m_mfRawChannelContainerKey

SG::ReadHandleKey<TileRawChannelContainer> TileAANtuple::m_mfRawChannelContainerKey {this, "TileRawChannelContainerMF", "", "Input Tile raw channel container key (MF method)"}
private

Definition at line 364 of file TileAANtuple.h.

364{this, "TileRawChannelContainerMF", "", "Input Tile raw channel container key (MF method)"};

◆ m_nBadDB

int TileAANtuple::m_nBadDB {0}
private

Definition at line 347 of file TileAANtuple.h.

347{0};

◆ m_nBadDCS

int TileAANtuple::m_nBadDCS {0}
private

Definition at line 346 of file TileAANtuple.h.

346{0};

◆ m_nBadDr

int TileAANtuple::m_nBadDr {0}
private

Definition at line 344 of file TileAANtuple.h.

344{0};

◆ m_nBadHV

int TileAANtuple::m_nBadHV {0}
private

Definition at line 345 of file TileAANtuple.h.

345{0};

◆ m_nBadTotal

int TileAANtuple::m_nBadTotal {0}
private

Definition at line 348 of file TileAANtuple.h.

348{0};

◆ m_nSamples

Gaudi::Property<int> TileAANtuple::m_nSamples {this, "NSamples", 7, "Number of samples"}
private

number of samples

Definition at line 350 of file TileAANtuple.h.

350{this, "NSamples", 7, "Number of samples"};

◆ m_ntupleID

Gaudi::Property<std::string> TileAANtuple::m_ntupleID {this, "NTupleID", "h2000", "ID of ntuple"}
private

Definition at line 390 of file TileAANtuple.h.

390{this, "NTupleID", "h2000", "ID of ntuple"};

◆ m_ntuplePtr

TTree* TileAANtuple::m_ntuplePtr {nullptr}
private

Definition at line 394 of file TileAANtuple.h.

394{nullptr};

◆ m_of1RawChannelContainerKey

SG::ReadHandleKey<TileRawChannelContainer> TileAANtuple::m_of1RawChannelContainerKey {this, "TileRawChannelContainerOF1", "", "Input Tile raw channel container key (OF1 method)"}
private

Definition at line 365 of file TileAANtuple.h.

365{this, "TileRawChannelContainerOF1", "", "Input Tile raw channel container key (OF1 method)"};

◆ m_optRawChannelContainerKey

SG::ReadHandleKey<TileRawChannelContainer> TileAANtuple::m_optRawChannelContainerKey {this, "TileRawChannelContainerOpt", "", "Input Tile raw channel container key (Opt filter)"}
private

Definition at line 361 of file TileAANtuple.h.

361{this, "TileRawChannelContainerOpt", "", "Input Tile raw channel container key (Opt filter)"};

◆ m_pmtOrder

Gaudi::Property<bool> TileAANtuple::m_pmtOrder {this, "PMTOrder", false, "Change channel ordering to PMT ordering in ntuple"}
private

change channel ordering to pmt ordering in ntuple

Definition at line 377 of file TileAANtuple.h.

377{this, "PMTOrder", false, "Change channel ordering to PMT ordering in ntuple"};

◆ m_qdctimeout

bool TileAANtuple::m_qdctimeout {false}
private

Definition at line 341 of file TileAANtuple.h.

341{false};

◆ m_qieRawChannelContainerKey

SG::ReadHandleKey<TileRawChannelContainer> TileAANtuple::m_qieRawChannelContainerKey {this, "TileRawChannelContainerQIE", "", "Input Tile raw channel container key (processed QIE data)"}
private

Definition at line 362 of file TileAANtuple.h.

362{this, "TileRawChannelContainerQIE", "", "Input Tile raw channel container key (processed QIE data)"};

◆ m_rawChannelContainerKey

SG::ReadHandleKey<TileRawChannelContainer> TileAANtuple::m_rawChannelContainerKey {this, "TileRawChannelContainer", "TileRawChannelCnt", "Input Tile raw channel container key"}
private

Definition at line 358 of file TileAANtuple.h.

358{this, "TileRawChannelContainer", "TileRawChannelCnt", "Input Tile raw channel container key"};

◆ m_rchUnit

Unit for TileRawChannels (ADC, pCb, MeV).

Definition at line 385 of file TileAANtuple.h.

◆ m_reduced

Gaudi::Property<bool> TileAANtuple::m_reduced {this, "Reduced", false, "Reduced ntuple content"}
private

Definition at line 351 of file TileAANtuple.h.

351{this, "Reduced", false, "Reduced ntuple content"};

◆ m_ROBID

std::vector<uint32_t> TileAANtuple::m_ROBID
private

Definition at line 432 of file TileAANtuple.h.

◆ m_robSvc

ServiceHandle<IROBDataProviderSvc> TileAANtuple::m_robSvc
private
Initial value:
{this,
"ROBDataProviderSvc", "ROBDataProviderSvc", "The ROB data provider service" }

Definition at line 440 of file TileAANtuple.h.

440 {this,
441 "ROBDataProviderSvc", "ROBDataProviderSvc", "The ROB data provider service" };

◆ m_run

int TileAANtuple::m_run {0}
private

run number

Definition at line 193 of file TileAANtuple.h.

193{0};

◆ m_skipEvents

Gaudi::Property<int> TileAANtuple::m_skipEvents {this, "SkipEvents", 0, "Number of events to skip before filling ntuple"}
private

Definition at line 430 of file TileAANtuple.h.

430{this, "SkipEvents", 0, "Number of events to skip before filling ntuple"};

◆ m_streamName

Gaudi::Property<std::string> TileAANtuple::m_streamName {this, "StreamName", "AANT", "Name of output stream for ntuple"}
private

Definition at line 389 of file TileAANtuple.h.

389{this, "StreamName", "AANT", "Name of output stream for ntuple"};

◆ m_sumE_xx

float TileAANtuple::m_sumE_xx[N_DRAWERS] {}
private

Sum E recalculated offline using DSP raw channels.

Definition at line 421 of file TileAANtuple.h.

421{};

◆ m_sumE_yy

float TileAANtuple::m_sumE_yy[N_DRAWERS] {}
private

Sum E calcualted inside DSP.

Definition at line 424 of file TileAANtuple.h.

424{};

◆ m_sumE_zz

float TileAANtuple::m_sumE_zz[N_DRAWERS] {}
private

Sum E recalculated offline using offline OF.

Definition at line 427 of file TileAANtuple.h.

427{};

◆ m_sumEt_xx

float TileAANtuple::m_sumEt_xx[N_DRAWERS] {}
private

Sum Et recalculated offline using DSP raw channels.

Definition at line 419 of file TileAANtuple.h.

419{};

◆ m_sumEt_yy

float TileAANtuple::m_sumEt_yy[N_DRAWERS] {}
private

Sum Et calcualted inside DSP.

Definition at line 422 of file TileAANtuple.h.

422{};

◆ m_sumEt_zz

float TileAANtuple::m_sumEt_zz[N_DRAWERS] {}
private

Sum Et recalculated offline using offline OF.

Definition at line 425 of file TileAANtuple.h.

425{};

◆ m_sumEz_xx

float TileAANtuple::m_sumEz_xx[N_DRAWERS] {}
private

Sum Ez recalculated offline using DSP raw channels.

Definition at line 420 of file TileAANtuple.h.

420{};

◆ m_sumEz_yy

float TileAANtuple::m_sumEz_yy[N_DRAWERS] {}
private

Sum Ez calcualted inside DSP.

Definition at line 423 of file TileAANtuple.h.

423{};

◆ m_sumEz_zz

float TileAANtuple::m_sumEz_zz[N_DRAWERS] {}
private

Sum Ez recalculated offline using offline OF.

Definition at line 426 of file TileAANtuple.h.

426{};

◆ m_tdctimeout

bool TileAANtuple::m_tdctimeout {false}
private

Definition at line 342 of file TileAANtuple.h.

342{false};

◆ m_thistSvc

ServiceHandle<ITHistSvc> TileAANtuple::m_thistSvc
private

Definition at line 398 of file TileAANtuple.h.

◆ m_tileBadChanTool

ToolHandle<ITileBadChanTool> TileAANtuple::m_tileBadChanTool {"TileBadChanTool"}
private

Tile Bad Channel tool.

Definition at line 410 of file TileAANtuple.h.

410{"TileBadChanTool"};

◆ m_tileDCS

ToolHandle<ITileDCSTool> TileAANtuple::m_tileDCS {this, "TileDCSTool", "TileDCSTool", "Tile DCS tool"}
private

Definition at line 415 of file TileAANtuple.h.

415{this, "TileDCSTool", "TileDCSTool", "Tile DCS tool"};

◆ m_tileHWID

const TileHWID* TileAANtuple::m_tileHWID {nullptr}
private

Definition at line 404 of file TileAANtuple.h.

404{nullptr};

◆ m_tileID

const TileID* TileAANtuple::m_tileID {nullptr}
private

Definition at line 403 of file TileAANtuple.h.

403{nullptr};

◆ m_tileMgr

const TileDetDescrManager* TileAANtuple::m_tileMgr {nullptr}
private

Pointer to TileDetDescrManager.

Definition at line 408 of file TileAANtuple.h.

408{nullptr};

◆ m_tileMuRcvContainerKey

SG::ReadHandleKey<TileMuonReceiverContainer> TileAANtuple::m_tileMuRcvContainerKey {this, "TileMuRcvContainer", "TileMuRcvCnt", "Input TMDB container key"}
private

Definition at line 370 of file TileAANtuple.h.

370{this, "TileMuRcvContainer", "TileMuRcvCnt", "Input TMDB container key"}; // TMDB

◆ m_tileMuRcvDigitsContainerKey

SG::ReadHandleKey<TileDigitsContainer> TileAANtuple::m_tileMuRcvDigitsContainerKey {this, "TileMuRcvDigitsContainer", "MuRcvDigitsCnt", "Input TMDB digits container key"}
private

Definition at line 369 of file TileAANtuple.h.

369{this, "TileMuRcvDigitsContainer", "MuRcvDigitsCnt", "Input TMDB digits container key"}; // TMDB

◆ m_tileMuRcvRawChannelContainerKey

SG::ReadHandleKey<TileRawChannelContainer> TileAANtuple::m_tileMuRcvRawChannelContainerKey {this, "TileMuRcvRawChannelContainer", "MuRcvRawChCnt", "Input TMDB raw channel container key"}
private

Definition at line 368 of file TileAANtuple.h.

368{this, "TileMuRcvRawChannelContainer", "MuRcvRawChCnt", "Input TMDB raw channel container key"}; // TMDB

◆ m_tileToolEmscale

ToolHandle<TileCondToolEmscale> TileAANtuple::m_tileToolEmscale
private
Initial value:
{this,
"TileCondToolEmscale", "TileCondToolEmscale", "Tile EM scale calibration tool"}

main Tile Calibration tool

Definition at line 412 of file TileAANtuple.h.

412 {this,
413 "TileCondToolEmscale", "TileCondToolEmscale", "Tile EM scale calibration tool"};

◆ m_treeSize

Gaudi::Property<int64_t> TileAANtuple::m_treeSize {this, "TreeSize", 16000000000LL, "Max size of ROOT tree"}
private

Definition at line 391 of file TileAANtuple.h.

391{this, "TreeSize", 16000000000LL, "Max size of ROOT tree"};

◆ m_trigType

int TileAANtuple::m_trigType {0}
private

trigger type (1=Phys, 2=Laser, 4=Ped, 8=CIS)

Definition at line 198 of file TileAANtuple.h.

198{0};

◆ m_useDspUnits

Gaudi::Property<bool> TileAANtuple::m_useDspUnits {this, "UseDspUnits", false, "Convert energy to units used in DSP"}
private

true if energy should be converted to units used in DSP

Definition at line 375 of file TileAANtuple.h.

375{this, "UseDspUnits", false, "Convert energy to units used in DSP"};

◆ m_varHandleArraysDeclared

bool AthCommonDataStore< AthCommonMsg< Gaudi::Algorithm > >::m_varHandleArraysDeclared
privateinherited

Definition at line 387 of file AthCommonDataStore.h.

◆ m_vhka

std::vector<SG::VarHandleKeyArray*> AthCommonDataStore< AthCommonMsg< Gaudi::Algorithm > >::m_vhka
privateinherited

Definition at line 386 of file AthCommonDataStore.h.

◆ m_wienerRawChannelContainerKey

SG::ReadHandleKey<TileRawChannelContainer> TileAANtuple::m_wienerRawChannelContainerKey {this, "TileRawChannelContainerWiener", "", "Input Tile raw channel container key (Wiener filter)"}
private

Definition at line 366 of file TileAANtuple.h.

366{this, "TileRawChannelContainerWiener", "", "Input Tile raw channel container key (Wiener filter)"};

The documentation for this class was generated from the following files: