|
ATLAS Offline Software
|
Go to the documentation of this file.
11 #include "GaudiKernel/ToolHandle.h"
15 #include "CaloDetDescr/CaloDetDescrElement.h"
20 #include "GaudiKernel/INTupleSvc.h"
21 #include "GaudiKernel/NTuple.h"
22 #include "GaudiKernel/IToolSvc.h"
26 using CaliWaveIt = LArCaliWaveContainer::LArCaliWaves::const_iterator;
30 m_CaloDepthTool(nullptr),
61 ATH_MSG_INFO (
"LArTimePhysPrediction in initialize()" );
69 NTupleFilePtr file1(
ntupleSvc(),
"/NTUPLES/FILE1");
72 return StatusCode::FAILURE;
74 NTuplePtr
nt(
ntupleSvc(),
"/NTUPLES/FILE1/MyNtuple");
76 nt=
ntupleSvc()->book(
"/NTUPLES/FILE1/MyNtuple",CLID_ColumnWiseTuple,
"Timing ntuple");
80 return StatusCode::FAILURE;
111 return StatusCode::SUCCESS;
118 const double meter2ns = 3.33564095;
125 double CalibCables=0;
126 double LSignalFCAL=0;
150 IAlgTool* algTool =
nullptr;
151 ATH_CHECK( toolSvc()->retrieveTool(
"CaloDepthTool", algTool,
this) );
188 if ( cell_it == cell_it_e ) {
198 for ( ; cell_it != cell_it_e; ++cell_it) {
201 std::cout <<
"nchannels " << nchannels << std::endl;
206 if ( wave_it == wave_it_e ) {
217 id =
cabling->cnvToIdentifier(chid);
219 ATH_MSG_ERROR (
"LArCabling exception caught for channel " << MSG::hex << chid << MSG::dec );
225 const std::vector<HWIdentifier>& calibLineV = clCont->calibSlotLine(chid);
226 std::vector<HWIdentifier>::const_iterator calibLineIt = calibLineV.begin();
227 CalibLine = onlineHelper->
channel(*calibLineIt) ;
248 pos_neg = onlineHelper->
pos_neg(chid);
249 barrel_ec = onlineHelper->
barrel_ec(chid);
251 slot = onlineHelper->
slot(chid);
261 if(theDDE==
nullptr) {
262 ATH_MSG_INFO (
"CellIndex = " << theHash <<
" has a DDE pointer NULL " );
266 real_eta = theDDE->
eta();
267 real_phi = theDDE->
phi();
288 for ( ; wave_it != wave_it_e; ++wave_it) {
294 dt = wave_it->getDt();
295 tcali =
dt * larWaveHelper.
getMax(*wave_it);
297 const unsigned Nbase=5;
302 double amax = larWaveHelper.
getMaxAmp(*wave_it);
303 unsigned int imax=larWaveHelper.
getMax(*wave_it);
305 for (
unsigned int i=1;
i<
imax ;
i++) {
306 asamp1=wave_it->getSample(
i);
307 asamp2=wave_it->getSample(
i-1);
308 if((asamp1-
base)>amax*0.10 && (asamp2-
base)<amax*0.10)
309 rT0 =
i-1+(0.01*amax-(asamp2-
base))/(asamp1-asamp2);
314 if(emId->
is_lar_em(
id) && barrel_ec==0) TOF = fabs(
radius)*TMath::CosH(real_eta)* meter2ns/1000;
315 else TOF = fabs(
radius)/TMath::TanH(fabs(real_eta))* meter2ns/1000;
320 for(
int ieta=0;ieta<16;ieta++){
375 if(pos_neg==1 && emId->
is_lar_em(
id) && abs(barrel_ec)==0) tphys=tcali-CalibCables+TOF+DeltaTTC+8+0.3*
m_sLTP;
376 else if(pos_neg==0 && emId->
is_lar_em(
id) && abs(barrel_ec)==0) tphys=tcali-CalibCables+TOF+DeltaTTC+0.3*
m_sLTP;
377 else if(pos_neg==1 && emId->
is_lar_em(
id) && abs(barrel_ec)==1) tphys=tcali-CalibCables+TOF+DeltaTTC+8;
380 else tphys=tcali-CalibCables+TOF+DeltaTTC;
384 if(emId->
is_lar_em(
id) && abs(barrel_ec)==0){
385 for(
int ieta=0;ieta<16;ieta++){
489 return StatusCode::SUCCESS ;
def retrieve(aClass, aKey=None)
NTuple::Item< long > m_Channel
NTuple::Item< double > m_t0
NTuple::Item< long > m_FT
ConditionsMap::const_iterator ConstConditionsMapIterator
int phi(const Identifier id) const
return phi according to :
HWIdentifier channelId() const
NTuple::Item< double > m_TOF
IdentifierHash calo_cell_hash(const Identifier cellId) const
create hash id from 'global' cell id
int eta(const Identifier id) const
return eta [0,9] outer part [0,3] inner part
Scalar phi() const
phi method
NTuple::Item< long > m_CalibLine
NTuple::Item< double > m_DeltaTTC
const LArEM_ID * em_idHelper() const
access to EM idHelper
bool is_lar_fcal(Identifier id) const
std::vector< std::vector< double > > m_vLSignal_EMB
Identifier32::value_type Channel
LArTimePhysPrediction(const std::string &name, ISvcLocator *pSvcLocator)
Scalar eta() const
pseudorapidity method
Gaudi::Details::PropertyBase & declareProperty(Gaudi::Property< T > &t)
std::vector< std::vector< double > > m_vDeltaTTC_EC
Declaration of const iterator.
double getBaseline(const LArWave &theWave, unsigned nBase) const
NTuple::Item< long > m_FEBid
This class groups all DetDescr information related to a CaloCell. Provides a generic interface for al...
std::vector< ALFA_RawData_p1 > t0
int slot(const HWIdentifier id) const
Return the slot number of a hardware cell identifier: slot = [1,15] Slot-ID in top part of the crat...
NTuple::Item< double > m_real_phi
Identifier32 get_identifier32() const
Get the 32-bit version Identifier, will be invalid if >32 bits needed.
std::vector< double > m_vLSignal_FCAL
int module(const Identifier id) const
module [1,3]
NTuple::Item< long > m_is_lar_hec
Helper class for LArHEC offline identifiers.
int sampling(const Identifier id) const
return sampling according to :
double getMaxAmp(const LArWave &theWave) const
NTuple::Item< long > m_layer
NTuple::Item< long > m_slot
#define ATH_MSG_VERBOSE(x)
unsigned int getMax(const LArWave &theWave) const
return index of maximum sample
int barrel_ec(const HWIdentifier id) const
Return the position barrel or endcap of a hardware cell identifier: barrel_ec = [0,...
virtual StatusCode initialize() override
value_type get_compact() const
Get the compact id.
NTuple::Item< double > m_tCalibPredicted
Definition of CaloDetDescrManager.
int eta(const Identifier id) const
return eta according to :
std::vector< double > m_vEtaMin_EMB
int eta(const Identifier id) const
eta [0,63] module 1 ; [0,31] module 2 ; [0,15] module 3
const LArHEC_ID * hec_idHelper() const
access to HEC idHelper
Liquid Argon Cumulative Wave Container.
const ServiceHandle< StoreGateSvc > & detStore() const
The standard StoreGateSvc/DetectorStore Returns (kind of) a pointer to the StoreGateSvc.
ServiceHandle< ITHistSvc > m_thistSvc
NTuple::Item< double > m_tPhysPredicted
std::vector< std::vector< double > > m_vDeltaTTC_ECA_SPEC
NTuple::Item< long > m_pos_neg
Definition of CaloDetDescriptor.
int phi(const Identifier id) const
phi [0,15]
NTuple::Item< long > m_eta
int channel(const HWIdentifier id) const
Return the channel number of a hardware cell identifier channel = [0,127] in all FEB.
NTuple::Item< double > m_CalibCables
SG::ReadCondHandleKey< LArCalibLineMapping > m_calibMapKey
ConstConditionsMapIterator end(unsigned int gain) const
end of all channels for this gain
NTuple::Item< long > m_phi
This class implements the ILArPhysCaliTdiff interface ` *.
::StatusCode StatusCode
StatusCode definition for legacy code.
int pos_neg(const HWIdentifier id) const
Return the side of a hardware cell identifier pos_neg = [0,1] positive-side or negative-side Barrel...
bool is_lar_hec(Identifier id) const
Helper class for offline cell identifiers.
LArCaliWaveContainer::LArCaliWaves::const_iterator CaliWaveIt
HWIdentifier feb_Id(int barrel_ec, int pos_neg, int feedthrough, int slot) const
Create feb_Id from fields.
CaloDepthTool * m_CaloDepthTool
NTuple::Item< long > m_is_lar_fcal
std::vector< std::vector< double > > m_vLCalib_EMB
StatusCode initialize(bool used=true)
NTuple::Item< double > m_SignalCables
SG::ReadCondHandleKey< LArOnOffIdMapping > m_cablingKey
virtual StatusCode stop() override
std::vector< std::vector< double > > m_vDeltaTTC_ECC_SPEC
int feedthrough(const HWIdentifier id) const
Return the feedthrough of a hardware cell identifier : feedthrough = [0,31] Barrel - A/C side or H/...
This class provides the client interface for accessing the detector description information common to...
NTuple::Item< double > m_real_eta
CaloCell_ID::CaloSample getSampling() const
cell sampling
virtual StatusCode initialize()
Initialization done after creation or read back - derived classes may augment the functionality.
NTuple::Item< long > m_barrel_ec
SG::ReadCondHandleKey< CaloDetDescrManager > m_caloMgrKey
int sampling(const Identifier id) const
return sampling [0,3] (only 0 for supercells)
ConstConditionsMapIterator begin(unsigned int gain) const
get iterator for all channels for a gain
float eta() const
cell eta
Helper class for LArEM offline identifiers.
std::vector< std::vector< double > > m_vDeltaTTC_EMB
float phi() const
cell phi
NTuple::Item< double > m_tcali
NTuple::Item< long > m_is_lar_em
This is a "hash" representation of an Identifier. This encodes a 32 bit index which can be used to lo...
std::vector< double > m_vEtaMax_EMB
Helper class for LArFCAL offline identifiers.
bool is_lar_em(Identifier id) const
Exception class for LAr Identifiers.
NTuple::Item< long > m_Chid
std::string m_groupingType
const LArFCAL_ID * fcal_idHelper() const
access to FCAL idHelper
int phi(const Identifier id) const
return phi[0,63] outer part [0,31] inner part