ATLAS Offline Software
Public Member Functions | Static Public Member Functions | Protected Member Functions | Private Types | Private Member Functions | Static Private Member Functions | Private Attributes | List of all members
LArPhysWaveTool Class Reference

#include <LArPhysWaveTool.h>

Inheritance diagram for LArPhysWaveTool:
Collaboration diagram for LArPhysWaveTool:

Public Member Functions

 LArPhysWaveTool (const std::string &type, const std::string &name, const IInterface *parent)
 
virtual ~LArPhysWaveTool ()
 
virtual StatusCode initialize ()
 
virtual StatusCode finalize ()
 
StatusCode makeLArPhysWave (const LArWFParams &, const LArCaliWave &, int region, int layer, LArPhysWave &predLArPhysWave, float &MphysMcali) const
 
ServiceHandle< StoreGateSvc > & evtStore ()
 The standard StoreGateSvc (event store) Returns (kind of) a pointer to the StoreGateSvc. More...
 
const ServiceHandle< StoreGateSvc > & evtStore () const
 The standard StoreGateSvc (event store) Returns (kind of) a pointer to the StoreGateSvc. More...
 
const ServiceHandle< StoreGateSvc > & detStore () const
 The standard StoreGateSvc/DetectorStore Returns (kind of) a pointer to the StoreGateSvc. More...
 
virtual StatusCode sysInitialize () override
 Perform system initialization for an algorithm. More...
 
virtual StatusCode sysStart () override
 Handle START transition. More...
 
virtual std::vector< Gaudi::DataHandle * > inputHandles () const override
 Return this algorithm's input handles. More...
 
virtual std::vector< Gaudi::DataHandle * > outputHandles () const override
 Return this algorithm's output handles. More...
 
Gaudi::Details::PropertyBase & declareProperty (Gaudi::Property< T > &t)
 
Gaudi::Details::PropertyBase * declareProperty (const std::string &name, SG::VarHandleKey &hndl, const std::string &doc, const SG::VarHandleKeyType &)
 Declare a new Gaudi property. More...
 
Gaudi::Details::PropertyBase * declareProperty (const std::string &name, SG::VarHandleBase &hndl, const std::string &doc, const SG::VarHandleType &)
 Declare a new Gaudi property. More...
 
Gaudi::Details::PropertyBase * declareProperty (const std::string &name, SG::VarHandleKeyArray &hndArr, const std::string &doc, const SG::VarHandleKeyArrayType &)
 
Gaudi::Details::PropertyBase * declareProperty (const std::string &name, T &property, const std::string &doc, const SG::NotHandleType &)
 Declare a new Gaudi property. More...
 
Gaudi::Details::PropertyBase * declareProperty (const std::string &name, T &property, const std::string &doc="none")
 Declare a new Gaudi property. More...
 
void updateVHKA (Gaudi::Details::PropertyBase &)
 
MsgStream & msg () const
 
MsgStream & msg (const MSG::Level lvl) const
 
bool msgLvl (const MSG::Level lvl) const
 

Static Public Member Functions

static const InterfaceID & interfaceID ()
 

Protected Member Functions

void renounceArray (SG::VarHandleKeyArray &handlesArray)
 remove all handles from I/O resolution More...
 
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. More...
 

Private Types

typedef ServiceHandle< StoreGateSvcStoreGateSvc_t
 

Private Member Functions

LArWave exp2Tri (const LArWave &, const unsigned N, const double dt, const LArWFParams &params) const
 
LArWave physPred (LArCaliWave &)
 
LArWave injResp (const LArWave &w, unsigned N, double dt, const LArWFParams &params) const
 
LArWave stepResp (const LArCaliWave &gCali, const LArWFParams &params) const
 
LArWave step2Tri (const LArWave &w, unsigned N, double dt, const LArWFParams &params) const
 
Gaudi::Details::PropertyBase & declareGaudiProperty (Gaudi::Property< T > &hndl, const SG::VarHandleKeyType &)
 specialization for handling Gaudi::Property<SG::VarHandleKey> More...
 
Gaudi::Details::PropertyBase & declareGaudiProperty (Gaudi::Property< T > &hndl, const SG::VarHandleKeyArrayType &)
 specialization for handling Gaudi::Property<SG::VarHandleKeyArray> More...
 
Gaudi::Details::PropertyBase & declareGaudiProperty (Gaudi::Property< T > &hndl, const SG::VarHandleType &)
 specialization for handling Gaudi::Property<SG::VarHandleBase> More...
 
Gaudi::Details::PropertyBase & declareGaudiProperty (Gaudi::Property< T > &t, const SG::NotHandleType &)
 specialization for handling everything that's not a Gaudi::Property<SG::VarHandleKey> or a <SG::VarHandleKeyArray> More...
 

Static Private Member Functions

static double caliPhysCorr (double t, const LArWFParams &params)
 
static LArWave caliPhysCorr (const unsigned N, const double dt, const LArWFParams &params)
 
static double stepPhysCorr (double t, const double dT)
 
static LArWave stepPhysCorr (unsigned N, double dt, const double dT)
 
static LArWave stepCorr (unsigned N, double dt, const LArWFParams &params)
 
static double stepCorr (double t, const LArWFParams &params)
 
static LArWave injCorr (unsigned N, double dt, const LArWFParams &params)
 
static double injCorr (double t, const LArWFParams &params)
 

Private Attributes

bool m_injPointCorr
 
bool m_normalizeCali
 
bool m_timeOriginShift
 
bool m_subtractBaseline
 
std::vector< bool > m_injPointCorrLayer
 
std::vector< bool > m_injPointUseTauR
 
StoreGateSvc_t m_evtStore
 Pointer to StoreGate (event store by default) More...
 
StoreGateSvc_t m_detStore
 Pointer to StoreGate (detector store by default) More...
 
std::vector< SG::VarHandleKeyArray * > m_vhka
 
bool m_varHandleArraysDeclared
 

Detailed Description

Definition at line 20 of file LArPhysWaveTool.h.

Member Typedef Documentation

◆ StoreGateSvc_t

typedef ServiceHandle<StoreGateSvc> AthCommonDataStore< AthCommonMsg< AlgTool > >::StoreGateSvc_t
privateinherited

Definition at line 388 of file AthCommonDataStore.h.

Constructor & Destructor Documentation

◆ LArPhysWaveTool()

LArPhysWaveTool::LArPhysWaveTool ( const std::string &  type,
const std::string &  name,
const IInterface *  parent 
)

Definition at line 7 of file LArPhysWaveTool.cxx.

11 {
12  // Declare additional interface
13  declareInterface<LArPhysWaveTool>(this);
14 
15  // Prepare defaults property values
16  bool injPcorr[4] = { false , true , true , false } ;
17  m_injPointCorrLayer.clear();
18  for ( unsigned i=0;i<4;i++ ) m_injPointCorrLayer.push_back(injPcorr[i]) ;
19 
20  bool injPtaur[4] = { false , false , true , false } ;
21  m_injPointUseTauR.clear();
22  for ( unsigned i=0;i<4;i++ ) m_injPointUseTauR.push_back(injPtaur[i]) ;
23 
24  // Declare properties
25  declareProperty("InjPointCorr", m_injPointCorr=false);
26  declareProperty("InjPointCorrLayer",m_injPointCorrLayer);
27  declareProperty("InjPointUseTauR", m_injPointUseTauR);
28  declareProperty("NormalizeCali", m_normalizeCali=true);
29  declareProperty("TimeOriginShift", m_timeOriginShift=false);
30  declareProperty("SubtractBaseline", m_subtractBaseline=true);
31 }

◆ ~LArPhysWaveTool()

LArPhysWaveTool::~LArPhysWaveTool ( )
virtualdefault

Member Function Documentation

◆ caliPhysCorr() [1/2]

LArWave LArPhysWaveTool::caliPhysCorr ( const unsigned  N,
const double  dt,
const LArWFParams params 
)
staticprivate

Definition at line 124 of file LArPhysWaveTool.cxx.

124  {
125  LArWave w(N,dt);
126  for ( unsigned i=0 ; i<N ; i++ ) {
127  w.setSample(i,caliPhysCorr(i*dt,params)) ;
128  }
129  return w ;
130 }

◆ caliPhysCorr() [2/2]

double LArPhysWaveTool::caliPhysCorr ( double  t,
const LArWFParams params 
)
staticprivate

Definition at line 135 of file LArPhysWaveTool.cxx.

135  {
136  const double fstep = params.fstep() ;
137  const double Tc = params.tcal() ;
138  const double Td = params.tdrift() ;
139  if ( t<Td ) {
140  if ( fstep==0. ) return ((1.-Tc/Td)-t/Td)/Tc ;
141  return (1.-fstep)/Tc * exp (-fstep*t/Tc)
142  +1./(fstep*Td) * ((1.-fstep)*exp(-fstep*t/Tc)-1.);
143  }
144  else {
145  if ( fstep==0. ) return ((1.-Tc/Td)-t/Td)/Tc
146  + ((t-Td)/Td+Tc/Td)/Tc ;
147  return (1.-fstep)/Tc * exp (-fstep*t/Tc)
148  +1./(fstep*Td) * ( (1.-fstep)*exp(-fstep*t/Tc) - 1. )
149  -1./(fstep*Td) * ( (1.-fstep)*exp(-fstep*(t-Td)/Tc) - 1. ) ;
150  }
151 }

◆ declareGaudiProperty() [1/4]

Gaudi::Details::PropertyBase& AthCommonDataStore< AthCommonMsg< AlgTool > >::declareGaudiProperty ( Gaudi::Property< T > &  hndl,
const SG::VarHandleKeyArrayType  
)
inlineprivateinherited

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

Definition at line 170 of file AthCommonDataStore.h.

172  {
173  return *AthCommonDataStore<PBASE>::declareProperty(hndl.name(),
174  hndl.value(),
175  hndl.documentation());
176 
177  }

◆ declareGaudiProperty() [2/4]

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

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

Definition at line 156 of file AthCommonDataStore.h.

158  {
159  return *AthCommonDataStore<PBASE>::declareProperty(hndl.name(),
160  hndl.value(),
161  hndl.documentation());
162 
163  }

◆ declareGaudiProperty() [3/4]

Gaudi::Details::PropertyBase& AthCommonDataStore< AthCommonMsg< AlgTool > >::declareGaudiProperty ( Gaudi::Property< T > &  hndl,
const SG::VarHandleType  
)
inlineprivateinherited

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

Definition at line 184 of file AthCommonDataStore.h.

186  {
187  return *AthCommonDataStore<PBASE>::declareProperty(hndl.name(),
188  hndl.value(),
189  hndl.documentation());
190  }

◆ declareGaudiProperty() [4/4]

Gaudi::Details::PropertyBase& AthCommonDataStore< AthCommonMsg< AlgTool > >::declareGaudiProperty ( Gaudi::Property< T > &  t,
const SG::NotHandleType  
)
inlineprivateinherited

specialization for handling everything that's not a Gaudi::Property<SG::VarHandleKey> or a <SG::VarHandleKeyArray>

Definition at line 199 of file AthCommonDataStore.h.

200  {
201  return PBASE::declareProperty(t);
202  }

◆ declareProperty() [1/6]

Gaudi::Details::PropertyBase* AthCommonDataStore< AthCommonMsg< AlgTool > >::declareProperty ( const std::string &  name,
SG::VarHandleBase hndl,
const std::string &  doc,
const SG::VarHandleType  
)
inlineinherited

Declare a new Gaudi property.

Parameters
nameName of the property.
hndlObject holding the property value.
docDocumentation string for the property.

This is the version for types that derive from SG::VarHandleBase. The property value object is put on the input and output lists as appropriate; then we forward to the base class.

Definition at line 245 of file AthCommonDataStore.h.

249  {
250  this->declare(hndl.vhKey());
251  hndl.vhKey().setOwner(this);
252 
253  return PBASE::declareProperty(name,hndl,doc);
254  }

◆ declareProperty() [2/6]

Gaudi::Details::PropertyBase* AthCommonDataStore< AthCommonMsg< AlgTool > >::declareProperty ( const std::string &  name,
SG::VarHandleKey hndl,
const std::string &  doc,
const SG::VarHandleKeyType  
)
inlineinherited

Declare a new Gaudi property.

Parameters
nameName of the property.
hndlObject holding the property value.
docDocumentation string for the property.

This is the version for types that derive from SG::VarHandleKey. The property value object is put on the input and output lists as appropriate; then we forward to the base class.

Definition at line 221 of file AthCommonDataStore.h.

225  {
226  this->declare(hndl);
227  hndl.setOwner(this);
228 
229  return PBASE::declareProperty(name,hndl,doc);
230  }

◆ declareProperty() [3/6]

Gaudi::Details::PropertyBase* AthCommonDataStore< AthCommonMsg< AlgTool > >::declareProperty ( const std::string &  name,
SG::VarHandleKeyArray hndArr,
const std::string &  doc,
const SG::VarHandleKeyArrayType  
)
inlineinherited

Definition at line 259 of file AthCommonDataStore.h.

263  {
264 
265  // std::ostringstream ost;
266  // ost << Algorithm::name() << " VHKA declareProp: " << name
267  // << " size: " << hndArr.keys().size()
268  // << " mode: " << hndArr.mode()
269  // << " vhka size: " << m_vhka.size()
270  // << "\n";
271  // debug() << ost.str() << endmsg;
272 
273  hndArr.setOwner(this);
274  m_vhka.push_back(&hndArr);
275 
276  Gaudi::Details::PropertyBase* p = PBASE::declareProperty(name, hndArr, doc);
277  if (p != 0) {
278  p->declareUpdateHandler(&AthCommonDataStore<PBASE>::updateVHKA, this);
279  } else {
280  ATH_MSG_ERROR("unable to call declareProperty on VarHandleKeyArray "
281  << name);
282  }
283 
284  return p;
285 
286  }

◆ declareProperty() [4/6]

Gaudi::Details::PropertyBase* AthCommonDataStore< AthCommonMsg< AlgTool > >::declareProperty ( const std::string &  name,
T &  property,
const std::string &  doc,
const SG::NotHandleType  
)
inlineinherited

Declare a new Gaudi property.

Parameters
nameName of the property.
propertyObject holding the property value.
docDocumentation string for the property.

This is the generic version, for types that do not derive from SG::VarHandleKey. It just forwards to the base class version of declareProperty.

Definition at line 333 of file AthCommonDataStore.h.

337  {
338  return PBASE::declareProperty(name, property, doc);
339  }

◆ declareProperty() [5/6]

Gaudi::Details::PropertyBase* AthCommonDataStore< AthCommonMsg< AlgTool > >::declareProperty ( const std::string &  name,
T &  property,
const std::string &  doc = "none" 
)
inlineinherited

Declare a new Gaudi property.

Parameters
nameName of the property.
propertyObject holding the property value.
docDocumentation string for the property.

This dispatches to either the generic declareProperty or the one for VarHandle/Key/KeyArray.

Definition at line 352 of file AthCommonDataStore.h.

355  {
356  typedef typename SG::HandleClassifier<T>::type htype;
357  return declareProperty (name, property, doc, htype());
358  }

◆ declareProperty() [6/6]

Gaudi::Details::PropertyBase& AthCommonDataStore< AthCommonMsg< AlgTool > >::declareProperty ( Gaudi::Property< T > &  t)
inlineinherited

Definition at line 145 of file AthCommonDataStore.h.

145  {
146  typedef typename SG::HandleClassifier<T>::type htype;
148  }

◆ detStore()

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

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

Definition at line 95 of file AthCommonDataStore.h.

95 { return m_detStore; }

◆ evtStore() [1/2]

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

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

Definition at line 85 of file AthCommonDataStore.h.

85 { return m_evtStore; }

◆ evtStore() [2/2]

const ServiceHandle<StoreGateSvc>& AthCommonDataStore< AthCommonMsg< AlgTool > >::evtStore ( ) const
inlineinherited

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

Definition at line 90 of file AthCommonDataStore.h.

90 { return m_evtStore; }

◆ exp2Tri()

LArWave LArPhysWaveTool::exp2Tri ( const LArWave w,
const unsigned  N,
const double  dt,
const LArWFParams params 
) const
private

Definition at line 119 of file LArPhysWaveTool.cxx.

119  {
120  return w + ( w % caliPhysCorr(N,dt,params) ) ;
121 }

◆ extraDeps_update_handler()

void AthCommonDataStore< AthCommonMsg< AlgTool > >::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

◆ finalize()

virtual StatusCode LArPhysWaveTool::finalize ( )
inlinevirtual

Definition at line 33 of file LArPhysWaveTool.h.

33 {return StatusCode::SUCCESS;}

◆ initialize()

virtual StatusCode LArPhysWaveTool::initialize ( )
inlinevirtual

Definition at line 32 of file LArPhysWaveTool.h.

32 {return StatusCode::SUCCESS;}

◆ injCorr() [1/2]

double LArPhysWaveTool::injCorr ( double  t,
const LArWFParams params 
)
staticprivate

Definition at line 219 of file LArPhysWaveTool.cxx.

219  {
220  const double tau0 = 1./params.omega0();
221  const double taur = params.taur();
222  const double Delta = std::pow(taur,2) - std::pow(2*tau0,2) ;
223  if ( Delta > 0 ) {
224  double sqrtDelta = std::sqrt(Delta) ;
225  double taup = 0.5*( taur + sqrtDelta ) ;
226  double taum = 0.5*( taur - sqrtDelta ) ;
227  return ( exp(-t/taup) - exp(-t/taum) ) / ( taup - taum ) ;
228  } else if ( Delta < 0 ) {
229  double T = std::sqrt(-Delta) ;
230  double A = 2 * taur / ( std::pow(taur,2) - Delta ) ;
231  double B = 2 * T / ( std::pow(taur,2) - Delta ) ;
232  return 2 * exp(-A*t) * sin(B*t) / T ;
233  } else {
234  double tau = 0.5 * taur ;
235  return exp(-t/tau) * t / std::pow(tau,2) ;
236  }
237 #if 0
238  double taur2 = taur*taur, tau02 = tau0*tau0 ;
239  double taua = sqrt( 4.*tau02 - taur2 );
240  return (2./taua)*exp(-t*taur/(2.*tau02))*sin(t*taua/(2.*tau02));
241 #endif
242 }

◆ injCorr() [2/2]

LArWave LArPhysWaveTool::injCorr ( unsigned  N,
double  dt,
const LArWFParams params 
)
staticprivate

Definition at line 211 of file LArPhysWaveTool.cxx.

211  {
212  LArWave w(N,dt) ;
213  for ( unsigned i=0 ; i<N ; i++ ) w.setSample(i,injCorr(i*dt,params)) ;
214  return w ;
215 }

◆ injResp()

LArWave LArPhysWaveTool::injResp ( const LArWave w,
unsigned  N,
double  dt,
const LArWFParams params 
) const
private

Definition at line 172 of file LArPhysWaveTool.cxx.

172  {
173  return w % injCorr(N,dt,params);
174 }

◆ inputHandles()

virtual std::vector<Gaudi::DataHandle*> AthCommonDataStore< AthCommonMsg< AlgTool > >::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.

◆ interfaceID()

static const InterfaceID& LArPhysWaveTool::interfaceID ( )
inlinestatic

Definition at line 25 of file LArPhysWaveTool.h.

25 { return IID_LArPhysWaveTool; }

◆ makeLArPhysWave()

StatusCode LArPhysWaveTool::makeLArPhysWave ( const LArWFParams larWFParam,
const LArCaliWave larCaliWave,
int  region,
int  layer,
LArPhysWave predLArPhysWave,
float &  MphysMcali 
) const

Definition at line 37 of file LArPhysWaveTool.cxx.

41  {
42 
43 
44  // calib. signal at Mother Board :
45  LArWave gCaliMB(larCaliWave);
46  LArWave gPhys;
47  LArWaveHelper wHelper;
48 
49  // shift gCaliMB to start point and remove baseline
50 
51  unsigned tstart = wHelper.getStart(gCaliMB) ;
52  double baseline = wHelper.getBaseline(gCaliMB,tstart) ;
53  if ( m_subtractBaseline ) gCaliMB = gCaliMB + (-baseline) ;
54  if ( m_timeOriginShift ) gCaliMB = wHelper.translate(gCaliMB,-tstart,baseline) ;
55 
56  // normalization of calibration pulse
57 
58  if ( m_normalizeCali ) {
59  double peak = gCaliMB.getSample( wHelper.getMax(gCaliMB) ) ;
60  ATH_MSG_VERBOSE ( "*** Normalisation \t|-> YES (CaliWave peak = " << peak << ")" );
61  if ( peak <=0 ) {
62  ATH_MSG_WARNING ( "Peak value <=0 , cannot normalize!" );
63  } else {
64  gCaliMB = gCaliMB * (1./peak) ;
65  }
66  } else {
67  ATH_MSG_VERBOSE ( "*** Normalisation \t|-> NO" );
68  }
69 
70  // ionisation waveform prediction
71 
72  ATH_MSG_VERBOSE ( "*** Physics waveform\t|-> m_Tdrift = " << larWFParam.tdrift() << " ns " );
73  ATH_MSG_VERBOSE ( "*** Physics waveform\t|-> m_Fstep = " << larWFParam.fstep() << " ns " );
74  ATH_MSG_VERBOSE ( "*** Physics waveform\t|-> m_Tcal = " << larWFParam.tcal() << " ns " );
75  ATH_MSG_VERBOSE ( "*** Physics waveform\t|-> m_Omega0 = " << larWFParam.omega0() << " GHz" );
76  ATH_MSG_VERBOSE ( "*** Physics waveform\t|-> m_Taur = " << larWFParam.taur() << " ns " );
77 
78  bool doInjPointCorr = ( ( ( layer>=0 && layer<4 && m_injPointCorrLayer[layer] ) || m_injPointCorr )
79  && larWFParam.omega0() != 0. ) ;
80 
81  const unsigned N = gCaliMB.getSize();
82  const double dt = gCaliMB.getDt() ;
83 
84 
85  if ( ! doInjPointCorr ) {
86  // perform only exp->triangle correction
87  ATH_MSG_VERBOSE ( "*** Inj. Point Corr \t|-> NO" );
88  gPhys = exp2Tri ( gCaliMB,N,dt, larWFParam) ;
89  } else {
90  // perform exp->triangle and then injection point correction
91  ATH_MSG_VERBOSE ( "*** Inj. Point Corr \t|-> YES" );
92  if ( !m_injPointUseTauR[layer] ) {
93  //Copy LArWFParams and set Taur to 0
94  LArWFParams paramsNoTaur=larWFParam;
95  paramsNoTaur.setTaur(0);
96  ATH_MSG_VERBOSE ( "*** Inj. Point TauR \t|-> NO" );
97  gPhys = injResp ( exp2Tri ( gCaliMB,N,dt,paramsNoTaur),N,dt,paramsNoTaur);
98  }
99  else {
100  gPhys = injResp ( exp2Tri ( gCaliMB,N,dt,larWFParam),N,dt,larWFParam);
101  }
102  }
103 
104  // compute Mphys/Mcal
105  if ( m_normalizeCali ) {
106  // caliwave is normalized to 1 => Mcali = 1
107  MphysMcali = gPhys.getSample( wHelper.getMax(gPhys) ) ;
108  } else {
109  MphysMcali = gPhys.getSample( wHelper.getMax(gPhys) ) /
110  gCaliMB.getSample( wHelper.getMax(gCaliMB) ) ;
111  }
112  ATH_MSG_VERBOSE ( "*** Physics waveform\t|-> m_MphysMcali = " << MphysMcali );
113 
114  predLArPhysWave = LArPhysWave( gPhys.getWave(), larCaliWave.getDt() );
115 
116  return StatusCode::SUCCESS;
117 }

◆ msg() [1/2]

MsgStream& AthCommonMsg< AlgTool >::msg ( ) const
inlineinherited

Definition at line 24 of file AthCommonMsg.h.

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

◆ msg() [2/2]

MsgStream& AthCommonMsg< AlgTool >::msg ( const MSG::Level  lvl) const
inlineinherited

Definition at line 27 of file AthCommonMsg.h.

27  {
28  return this->msgStream(lvl);
29  }

◆ msgLvl()

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

Definition at line 30 of file AthCommonMsg.h.

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

◆ outputHandles()

virtual std::vector<Gaudi::DataHandle*> AthCommonDataStore< AthCommonMsg< AlgTool > >::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.

◆ physPred()

LArWave LArPhysWaveTool::physPred ( LArCaliWave )
private

◆ 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< AlgTool > >::renounce ( T &  h)
inlineprotectedinherited

Definition at line 380 of file AthCommonDataStore.h.

381  {
382  h.renounce();
383  PBASE::renounce (h);
384  }

◆ renounceArray()

void AthCommonDataStore< AthCommonMsg< AlgTool > >::renounceArray ( SG::VarHandleKeyArray handlesArray)
inlineprotectedinherited

remove all handles from I/O resolution

Definition at line 364 of file AthCommonDataStore.h.

364  {
365  handlesArray.renounce();
366  }

◆ step2Tri()

LArWave LArPhysWaveTool::step2Tri ( const LArWave w,
unsigned  N,
double  dt,
const LArWFParams params 
) const
private

Definition at line 182 of file LArPhysWaveTool.cxx.

182  {
183  return w + w % stepPhysCorr(N,dt,params.tdrift()) ;
184 }

◆ stepCorr() [1/2]

double LArPhysWaveTool::stepCorr ( double  t,
const LArWFParams params 
)
staticprivate

Definition at line 204 of file LArPhysWaveTool.cxx.

204  {
205  const double fstep = params.fstep();
206  const double Tc = params.tcal();
207  return (1.-fstep)/Tc * exp( -fstep*t/Tc );
208 }

◆ stepCorr() [2/2]

LArWave LArPhysWaveTool::stepCorr ( unsigned  N,
double  dt,
const LArWFParams params 
)
staticprivate

Definition at line 199 of file LArPhysWaveTool.cxx.

199  {
200  LArWave w(N,dt) ;
201  for ( unsigned i=0 ; i<N ; i++ ) w.setSample(i,stepCorr(i*dt,params)) ;
202  return w ;
203 }

◆ stepPhysCorr() [1/2]

double LArPhysWaveTool::stepPhysCorr ( double  t,
const double  dT 
)
staticprivate

Definition at line 188 of file LArPhysWaveTool.cxx.

188  {
189  if ( t<0. || t>=Td ) return 0. ;
190  else return -1./Td ;
191 }

◆ stepPhysCorr() [2/2]

LArWave LArPhysWaveTool::stepPhysCorr ( unsigned  N,
double  dt,
const double  dT 
)
staticprivate

Definition at line 192 of file LArPhysWaveTool.cxx.

192  {
193  LArWave w(N,dt) ;
194  for ( unsigned i=0 ; i<N ; i++ ) w.setSample(i,stepPhysCorr(i*dt,Td)) ;
195  return w ;
196 }

◆ stepResp()

LArWave LArPhysWaveTool::stepResp ( const LArCaliWave gCali,
const LArWFParams params 
) const
private

Definition at line 176 of file LArPhysWaveTool.cxx.

176  {
177  const unsigned N=gCali.getSize();
178  const double dt=gCali.getDt();
179 
180  return gCali + gCali % stepCorr(N,dt,params) ;
181 }

◆ sysInitialize()

virtual StatusCode AthCommonDataStore< AthCommonMsg< AlgTool > >::sysInitialize ( )
overridevirtualinherited

Perform system initialization for an algorithm.

We override this to declare all the elements of handle key arrays at the end of initialization. See comments on updateVHKA.

Reimplemented in DerivationFramework::CfAthAlgTool, AthCheckedComponent< AthAlgTool >, AthCheckedComponent<::AthAlgTool >, and asg::AsgMetadataTool.

◆ sysStart()

virtual StatusCode AthCommonDataStore< AthCommonMsg< AlgTool > >::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.

◆ updateVHKA()

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

Definition at line 308 of file AthCommonDataStore.h.

308  {
309  // debug() << "updateVHKA for property " << p.name() << " " << p.toString()
310  // << " size: " << m_vhka.size() << endmsg;
311  for (auto &a : m_vhka) {
312  std::vector<SG::VarHandleKey*> keys = a->keys();
313  for (auto k : keys) {
314  k->setOwner(this);
315  }
316  }
317  }

Member Data Documentation

◆ m_detStore

StoreGateSvc_t AthCommonDataStore< AthCommonMsg< AlgTool > >::m_detStore
privateinherited

Pointer to StoreGate (detector store by default)

Definition at line 393 of file AthCommonDataStore.h.

◆ m_evtStore

StoreGateSvc_t AthCommonDataStore< AthCommonMsg< AlgTool > >::m_evtStore
privateinherited

Pointer to StoreGate (event store by default)

Definition at line 390 of file AthCommonDataStore.h.

◆ m_injPointCorr

bool LArPhysWaveTool::m_injPointCorr
private

Definition at line 43 of file LArPhysWaveTool.h.

◆ m_injPointCorrLayer

std::vector<bool> LArPhysWaveTool::m_injPointCorrLayer
private

Definition at line 45 of file LArPhysWaveTool.h.

◆ m_injPointUseTauR

std::vector<bool> LArPhysWaveTool::m_injPointUseTauR
private

Definition at line 45 of file LArPhysWaveTool.h.

◆ m_normalizeCali

bool LArPhysWaveTool::m_normalizeCali
private

Definition at line 43 of file LArPhysWaveTool.h.

◆ m_subtractBaseline

bool LArPhysWaveTool::m_subtractBaseline
private

Definition at line 44 of file LArPhysWaveTool.h.

◆ m_timeOriginShift

bool LArPhysWaveTool::m_timeOriginShift
private

Definition at line 44 of file LArPhysWaveTool.h.

◆ m_varHandleArraysDeclared

bool AthCommonDataStore< AthCommonMsg< AlgTool > >::m_varHandleArraysDeclared
privateinherited

Definition at line 399 of file AthCommonDataStore.h.

◆ m_vhka

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

Definition at line 398 of file AthCommonDataStore.h.


The documentation for this class was generated from the following files:
LArWave
Definition: LArWave.h:31
LArWFParams::taur
double taur() const
Definition: LArWFParams.h:271
python.TriggerHandler.tstart
string tstart
Definition: TriggerHandler.py:299
LArPhysWaveTool::caliPhysCorr
static double caliPhysCorr(double t, const LArWFParams &params)
Definition: LArPhysWaveTool.cxx:135
python.PerfMonSerializer.p
def p
Definition: PerfMonSerializer.py:743
LArWave::getSize
size_t getSize() const
number of time samples
Definition: LArWave.h:62
LArWaveHelper::getStart
unsigned getStart(const LArWave &theWave) const
Definition: LArWaveHelper.cxx:409
LArPhysWaveTool::m_timeOriginShift
bool m_timeOriginShift
Definition: LArPhysWaveTool.h:44
AthCommonDataStore< AthCommonMsg< AlgTool > >::declareProperty
Gaudi::Details::PropertyBase & declareProperty(Gaudi::Property< T > &t)
Definition: AthCommonDataStore.h:145
LArWave::getWave
const std::vector< double > & getWave() const
Wave parameters.
Definition: LArWave.h:167
LArWaveHelper::getBaseline
double getBaseline(const LArWave &theWave, unsigned nBase) const
Definition: LArWaveHelper.cxx:347
conifer::pow
constexpr int pow(int x)
Definition: conifer.h:20
LArWave::getDt
const double & getDt() const
delta time
Definition: LArWave.h:50
LArPhysWaveTool::m_injPointCorrLayer
std::vector< bool > m_injPointCorrLayer
Definition: LArPhysWaveTool.h:45
LArWaveHelper::translate
LArWave translate(const LArWave &theWave, int nShift, double baseline=0.) const
Definition: LArWaveHelper.cxx:11
AthCommonDataStore< AthCommonMsg< AlgTool > >::m_evtStore
StoreGateSvc_t m_evtStore
Pointer to StoreGate (event store by default)
Definition: AthCommonDataStore.h:390
AthCommonDataStore< AthCommonMsg< AlgTool > >::m_vhka
std::vector< SG::VarHandleKeyArray * > m_vhka
Definition: AthCommonDataStore.h:398
LArWaveHelper
Definition: LArWaveHelper.h:14
LArPhysWaveTool::m_injPointUseTauR
std::vector< bool > m_injPointUseTauR
Definition: LArPhysWaveTool.h:45
LArPhysWaveTool::stepPhysCorr
static double stepPhysCorr(double t, const double dT)
Definition: LArPhysWaveTool.cxx:188
LArWFParams
Definition: LArWFParams.h:20
JetTiledMap::N
@ N
Definition: TiledEtaPhiMap.h:44
read_hist_ntuple.t
t
Definition: read_hist_ntuple.py:5
ATH_MSG_VERBOSE
#define ATH_MSG_VERBOSE(x)
Definition: AthMsgStreamMacros.h:28
LArWaveHelper::getMax
unsigned int getMax(const LArWave &theWave) const
return index of maximum sample
Definition: LArWaveHelper.cxx:89
drawFromPickle.exp
exp
Definition: drawFromPickle.py:36
LArPhysWave
Definition: LArPhysWave.h:14
SG::VarHandleKeyArray::setOwner
virtual void setOwner(IDataHandleHolder *o)=0
dqt_zlumi_alleff_HIST.A
A
Definition: dqt_zlumi_alleff_HIST.py:110
LArPhysWaveTool::m_normalizeCali
bool m_normalizeCali
Definition: LArPhysWaveTool.h:43
LArPhysWaveTool::stepCorr
static LArWave stepCorr(unsigned N, double dt, const LArWFParams &params)
Definition: LArPhysWaveTool.cxx:199
LArWFParams::tcal
double tcal() const
Definition: LArWFParams.h:267
LArWFParams::fstep
double fstep() const
Definition: LArWFParams.h:268
LArWave::getSample
const double & getSample(const unsigned int i) const
Amplitude per time bin.
Definition: LArWave.h:53
LArPhysWaveTool::m_injPointCorr
bool m_injPointCorr
Definition: LArPhysWaveTool.h:43
AthCommonDataStore
Definition: AthCommonDataStore.h:52
ATH_MSG_ERROR
#define ATH_MSG_ERROR(x)
Definition: AthMsgStreamMacros.h:33
lumiFormat.i
int i
Definition: lumiFormat.py:92
CaloNoise_fillDB.dt
dt
Definition: CaloNoise_fillDB.py:58
LArPhysWaveTool::m_subtractBaseline
bool m_subtractBaseline
Definition: LArPhysWaveTool.h:44
TRT::Hit::layer
@ layer
Definition: HitInfo.h:79
LArPhysWaveTool::injResp
LArWave injResp(const LArWave &w, unsigned N, double dt, const LArWFParams &params) const
Definition: LArPhysWaveTool.cxx:172
LArWFParams::setTaur
void setTaur(double taur)
Definition: LArWFParams.h:230
baseline
@ baseline
Definition: SUSYToolsTester.cxx:94
test_pyathena.parent
parent
Definition: test_pyathena.py:15
AthCommonDataStore< AthCommonMsg< AlgTool > >::m_detStore
StoreGateSvc_t m_detStore
Pointer to StoreGate (detector store by default)
Definition: AthCommonDataStore.h:393
LArWFParams::omega0
double omega0() const
Definition: LArWFParams.h:270
AthAlgTool::AthAlgTool
AthAlgTool()
Default constructor:
SG::VarHandleKeyArray::renounce
virtual void renounce()=0
SG::HandleClassifier::type
std::conditional< std::is_base_of< SG::VarHandleKeyArray, T >::value, VarHandleKeyArrayType, type2 >::type type
Definition: HandleClassifier.h:54
merge_scale_histograms.doc
string doc
Definition: merge_scale_histograms.py:9
name
std::string name
Definition: Control/AthContainers/Root/debug.cxx:192
LArPhysWaveTool::exp2Tri
LArWave exp2Tri(const LArWave &, const unsigned N, const double dt, const LArWFParams &params) const
Definition: LArPhysWaveTool.cxx:119
dqt_zlumi_alleff_HIST.B
B
Definition: dqt_zlumi_alleff_HIST.py:110
LArWFParams::tdrift
double tdrift() const
Definition: LArWFParams.h:269
a
TList * a
Definition: liststreamerinfos.cxx:10
h
ATH_MSG_WARNING
#define ATH_MSG_WARNING(x)
Definition: AthMsgStreamMacros.h:32
python.CaloScaleNoiseConfig.type
type
Definition: CaloScaleNoiseConfig.py:78
SG::VarHandleBase::vhKey
SG::VarHandleKey & vhKey()
Return a non-const reference to the HandleKey.
Definition: StoreGate/src/VarHandleBase.cxx:616
declareProperty
#define declareProperty(n, p, h)
Definition: BaseFakeBkgTool.cxx:15
python.Bindings.keys
keys
Definition: Control/AthenaPython/python/Bindings.py:790
drawFromPickle.sin
sin
Definition: drawFromPickle.py:36
PowhegControl_ttFCNC_NLO.params
params
Definition: PowhegControl_ttFCNC_NLO.py:226
python.IoTestsLib.w
def w
Definition: IoTestsLib.py:200
AthCommonDataStore::declareGaudiProperty
Gaudi::Details::PropertyBase & declareGaudiProperty(Gaudi::Property< T > &hndl, const SG::VarHandleKeyType &)
specialization for handling Gaudi::Property<SG::VarHandleKey>
Definition: AthCommonDataStore.h:156
TSU::T
unsigned long long T
Definition: L1TopoDataTypes.h:35
fitman.k
k
Definition: fitman.py:528
LArPhysWaveTool::injCorr
static LArWave injCorr(unsigned N, double dt, const LArWFParams &params)
Definition: LArPhysWaveTool.cxx:211