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

#include <LArWFParamTool.h>

Inheritance diagram for LArWFParamTool:
Collaboration diagram for LArWFParamTool:

Classes

struct  omegaScanParams_t
 
struct  waveRange_t
 
struct  WaveTiming_t
 

Public Types

enum  { FailExtract = -999, DoExtract, DefaultNotSet = 0 }
 
enum  {
  OK = 0, TooShort = 1, NotFilled = 2, LowStat = 3,
  Noisy = 4, Oscillating = 5
}
 

Public Member Functions

 LArWFParamTool (const std::string &type, const std::string &name, const IInterface *parent)
 
virtual ~LArWFParamTool ()
 
virtual StatusCode initialize ()
 
virtual StatusCode finalize ()
 
StatusCode getLArWaveParams (const LArCaliWave &larCaliWave, const HWIdentifier chid, const CaloGain::CaloGain gain, LArWFParams &wfParams, const LArOnOffIdMapping *cabling, std::optional< LArCaliWave > &omegaScan, std::optional< LArCaliWave > &resOscill0, std::optional< LArCaliWave > &resOscill1) 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

WaveTiming_t timeExtr (LArWave &gCali) const
 
double expTail (const LArWave &gCali, const WaveTiming_t &wt) const
 
StatusCode GetFstep (const LArWave &gCali, LArWFParams &wfParams, const WaveTiming_t &wt) const
 
double fstepMin (const LArWave &gCali, double fstep, const double Tc, const unsigned Ttail) const
 
double dFstep (const LArWave &gCali, const double fstep, const double Tc, const unsigned Ttail) const
 
LArWave dstepRespDfstep (const LArWave &gCali, const double &fstep, const double &Tc) const
 
StatusCode RTM_Omega0 (const LArWave &gCali, const HWIdentifier chid, LArWFParams &wfParams, const WaveTiming_t &wt, const LArOnOffIdMapping *cabling, std::optional< LArCaliWave > &omegaScan) const
 
StatusCode RTM_Taur (const LArWave &gCali, LArWFParams &wfParams, const WaveTiming_t &wt) const
 
double logChi2CosRespShaper (const double omega, const LArWave &gCali, const LArWFParams &wf, const waveRange_t &range) const
 
double logChi2InjRespRes (const double taur, const LArWave &gCali, const LArWFParams &wf, const waveRange_t &range) const
 
LArWave cosRespShaper (const LArWave &gCali, const double &fstep, const double &tcal, const double &w, const double &tsh) const
 
double omega0MinNum (double omegaMin, double omegaMax, const double tol, const LArWave &gCali, const LArWFParams &wf, const waveRange_t &) const
 
double taurMinNum (const double taurmin, const double taurmax, const double tol, const LArWave &gCali, const LArWFParams &wf, const waveRange_t &) const
 
double fminbr (double a, double b, const double tol, double(LArWFParamTool::*f)(double, const LArWave &, const LArWFParams &, const waveRange_t &) const, const LArWave &gCali, const LArWFParams &wf, const waveRange_t &range) const
 
unsigned checkStatus (const LArCaliWave &larCaliWave) const
 
omegaScanParams_t OmegaScanHelper (const Identifier id, const WaveTiming_t &wt) 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 LArWave stepResp (const LArWave &gCali, const double fstep, const double Tc)
 
static LArWave stepCorr (const LArWave &gCali, const double &fstep, const double &Tc)
 
static double dstepCorrDfstep (const double t, const double &fstep, const double &Tc)
 
static LArWave dstepCorrDfstep (const LArWave &gCali, const double &fstep, const double &Tcal)
 
static LArWave cosResp (const LArWave &gCali, const double &fstep, const double &tcal, const double &omega)
 
static LArWave injRespRes (const LArWave &w, const double omega0, const double taur)
 
static LArWave injCorr (const unsigned N, const double dt, const double omega0, const double taur)
 
static LArWave cosCorr (const unsigned N, const double dt, const double fstep, const double tcal, const double omega)
 

Private Attributes

const LArEM_Base_IDm_emId = nullptr
 
const LArOnlineID_Basem_onlineHelper = nullptr
 
LArWaveHelper m_wHelper
 
double m_Tshaper
 
std::vector< bool > m_cosRespScan
 
std::vector< double > m_omegamin
 
std::vector< double > m_omegamax
 
std::vector< unsigned > m_npoints
 
std::vector< bool > m_storeResOscill
 
unsigned int m_NBaseline
 
bool m_ShiftToStart
 
bool m_SubtractBaseline
 
bool m_UseOmegaScanHelper
 
bool m_isSC
 
std::vector< int > m_TtailMin
 
std::vector< int > m_TtailMax
 
std::vector< int > m_DeltaTtail
 
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
 

Static Private Attributes

static const double m_DEFAULT = -1
 
static const double m_TINY =2.22045e-16
 
static const double m_SQRT_EPSILON =1.49012e-08
 
static const double m_EPSILON =2.22045e-16
 

Detailed Description

Definition at line 28 of file LArWFParamTool.h.

Member Typedef Documentation

◆ StoreGateSvc_t

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

Definition at line 388 of file AthCommonDataStore.h.

Member Enumeration Documentation

◆ anonymous enum

anonymous enum
Enumerator
FailExtract 
DoExtract 
DefaultNotSet 

Definition at line 33 of file LArWFParamTool.h.

33  {
34  FailExtract = -999 ,
35  DoExtract ,
36  DefaultNotSet = 0
37  } ;

◆ anonymous enum

anonymous enum
Enumerator
OK 
TooShort 
NotFilled 
LowStat 
Noisy 
Oscillating 

Definition at line 68 of file LArWFParamTool.h.

68  { OK = 0 ,
69  TooShort = 1 ,
70  NotFilled = 2 ,
71  LowStat = 3 ,
72  Noisy = 4 ,
73  Oscillating = 5
74  } ;

Constructor & Destructor Documentation

◆ LArWFParamTool()

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

Definition at line 36 of file LArWFParamTool.cxx.

38  m_NBaseline(0),
39  m_ShiftToStart(false),
40  m_SubtractBaseline(false),
42 {
43 
44  // Declare additional interface
45  declareInterface<LArWFParamTool>(this);
46 
47  declareProperty("NBaseline", m_NBaseline);
48  declareProperty("ShiftToStart", m_ShiftToStart);
49  declareProperty("SubtractBaseline", m_SubtractBaseline);
50  declareProperty("isSC", m_isSC = false);
51 
52  m_DeltaTtail.resize(3);
53  int default_deltattail[3] = { 100, 50, 0 } ;
54  for ( unsigned i=0; i<3; ++i )
55  m_DeltaTtail[i] = default_deltattail[i] ;
56  declareProperty("DeltaTtail", m_DeltaTtail);
57 
58  m_TtailMin.resize(4);
59  m_TtailMax.resize(4);
60  int default_ttailmin[4] = { 0, 0, 0, 0 };
61  int default_ttailmax[4] = { 0, 0, 0, 0 };
62  for ( unsigned i=0; i<4; ++i ) {
63  m_TtailMin[i] = default_ttailmin[i];
64  m_TtailMax[i] = default_ttailmax[i];
65  }
66  declareProperty("TtailMin", m_TtailMin);
67  declareProperty("TtailMax", m_TtailMax);
68 
69  // flags to force cos resp scan:
70  m_cosRespScan.resize(4) ;
71  bool defaults[4] = { false , true , false , true } ;
72  for ( unsigned i=0 ; i<4 ; ++i )
74  declareProperty("CosRespScan", m_cosRespScan ) ;
75 
76 
77  // omega0 intervals and granularities:
78  //float default_omegamin[4] = { 0.01 , 0.47 , 0.10 , 0.30 } ;
79  //float default_omegamax[4] = { 1.00 , 0.48 , 0.30 , 0.60 } ;
80  //unsigned default_npoints[4] = { 100 , 50 , 100 , 100 } ;
81  float default_omegamin[4] = { 0.01 , 0.10 , 0.10 , 0.10 };
82  float default_omegamax[4] = { 1.00 , 0.33 , 0.20 , 0.33 };
83  unsigned default_npoints[4] = { 100 , 100 , 100 , 100 };
84  m_omegamin.resize(4) ;
85  m_omegamax.resize(4) ;
86  m_npoints.resize(4) ;
87  for ( unsigned i=0 ; i<4 ; ++i ) {
88  m_omegamin[i] = default_omegamin[i] ;
89  m_omegamax[i] = default_omegamax[i] ;
90  m_npoints[i] = default_npoints[i] ;
91  }
92  declareProperty("Omega0Min", m_omegamin);
93  declareProperty("Omega0Max", m_omegamax);
94  declareProperty("NpointScan", m_npoints );
95  declareProperty("UseOmegaScanHelper", m_UseOmegaScanHelper );
96 
97  // flags to save residual oscillation
98  m_storeResOscill.resize(4,false) ;
99  declareProperty("StoreResOscill", m_storeResOscill) ;
100 
101  declareProperty("TShaper", m_Tshaper=15.) ;
102 }

◆ ~LArWFParamTool()

LArWFParamTool::~LArWFParamTool ( )
virtualdefault

Member Function Documentation

◆ checkStatus()

unsigned LArWFParamTool::checkStatus ( const LArCaliWave larCaliWave) const
private

Definition at line 979 of file LArWFParamTool.cxx.

980 {
981  // this is supposed to be a quick test on cali waves, to flags those
982  // clearly problematic. but cuts must be tuned, so for the time being
983  // don't call this method!
984 
985  //MsgStream log(msgSvc(), name());
986 
987  unsigned length ;
988  if ( (length=larCaliWave.getSize()) < 750 ) {
989  ATH_MSG_WARNING( "Calibration wave is too short!" ) ;
990  return TooShort ;
991  }
992 
993  const unsigned range = 2 ;
994  unsigned nMax = 0 ;
995  double tremble = 0 ;
996  double maxSample = -9.E+10 ;
997  for ( unsigned i=0 ; i<length ; i++ ) {
998  if ( larCaliWave.getError(i) < 0 || larCaliWave.getTrigger(i) < 0 ) {
999  ATH_MSG_WARNING( "Calibration wave probably not completely filled" ) ;
1000  return NotFilled ;
1001  }
1002  if ( larCaliWave.getTrigger(i) < 50 ) {
1003  ATH_MSG_WARNING( "Calibration wave with low statistics" ) ;
1004  return LowStat ;
1005  }
1006  double thisSample = larCaliWave.getTrigger(i) ;
1007  if ( thisSample > maxSample ) maxSample = thisSample ;
1008  if ( i>=range && i<length-range ) {
1009  bool max = true ;
1010  double loc_tremble = 0 ;
1011  for ( unsigned k=i-range ; k<=i+range ; k++ ) {
1012  double delta = thisSample - larCaliWave.getSample(k) ;
1013  loc_tremble += delta*delta;// pow(delta,2) ;
1014  if ( delta < 0 ) max = false ;
1015  }
1016  if ( max ) nMax ++ ;
1017  tremble += loc_tremble / (2*range) ;
1018  }
1019  }
1020  if ( sqrt(tremble/length)/maxSample > 0.1 ) {
1021  ATH_MSG_WARNING( "Calibration wave is noisy " << sqrt(tremble/length)/maxSample ) ;
1022  return Noisy ;
1023  }
1024  if ( nMax > 1 ) {
1025  ATH_MSG_WARNING( "Calibration wave oscillates" ) ;
1026  return Oscillating ;
1027  }
1028 
1029  return OK ;
1030 }

◆ cosCorr()

LArWave LArWFParamTool::cosCorr ( const unsigned  N,
const double  dt,
const double  fstep,
const double  tcal,
const double  omega 
)
staticprivate

Definition at line 737 of file LArWFParamTool.cxx.

737  {
738  LArWave w(N,dt);
739  const double C1=(fstep*fstep-fstep*fstep*fstep)/Tc;
740  const double C2=(fstep+omega*omega*Tc*Tc);
741  const double C3=(fstep-1.)*omega*Tc;
742  const double C4=( fstep*fstep+omega*omega*Tc*Tc );
743  for ( unsigned i=0 ; i<N ; i++ ) {
744  const double t=i*dt;
745  //const double p=((fstep*fstep-fstep*fstep*fstep)/Tc*exp(-fstep*t/Tc) - omega*((fstep+omega*omega*Tc*Tc)*sin(omega*t)+(fstep-1.)*omega*Tc*cos(omega*t)) ) / ( fstep*fstep+omega*omega*Tc*Tc ) ;
746  const double p=(C1*exp(-fstep*t/Tc) - omega*(C2*sin(omega*t) + C3*cos(omega*t))) / C4 ;
747  w.setSample(i,p);
748  }
749  return w ;
750 }

◆ cosResp()

LArWave LArWFParamTool::cosResp ( const LArWave gCali,
const double &  fstep,
const double &  tcal,
const double &  omega 
)
staticprivate

Definition at line 727 of file LArWFParamTool.cxx.

727  {
728 
729  LArWave result=gCali % cosCorr(gCali.getSize(),gCali.getDt(),fstep, tcal, omega);
730  result+=gCali;
731  return result;
732 }

◆ cosRespShaper()

LArWave LArWFParamTool::cosRespShaper ( const LArWave gCali,
const double &  fstep,
const double &  tcal,
const double &  w,
const double &  tsh 
) const
private

Definition at line 720 of file LArWFParamTool.cxx.

720  {
721  return cosResp(gCali,fstep,tcal, w) * ( pow((1.+ w*w*tsh*tsh),1.5)/(w*tsh));
722 }

◆ 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; }

◆ dFstep()

double LArWFParamTool::dFstep ( const LArWave gCali,
const double  fstep,
const double  Tc,
const unsigned  Ttail 
) const
private

Definition at line 376 of file LArWFParamTool.cxx.

376  {
377  LArWave stepResp1 = stepResp(gCali, fstep, Tc) ;
378  LArWave dstepRespDfstep1 = dstepRespDfstep(gCali,fstep,Tc) ;
379  //LArWaveHelper wHelper;
380  double a,b;
381  if ( m_TtailMin[1]!=0 && m_TtailMax[1]!=0 && m_TtailMin[1]<m_TtailMax[1] ) {
382  b = m_wHelper.getSumRegion( stepResp1 * dstepRespDfstep1,m_TtailMin[1],m_TtailMax[1]);
383  a = m_wHelper.getSumSquareRegion( dstepRespDfstep1,m_TtailMin[1],m_TtailMax[1]);
384  } else {
385  b = m_wHelper.getSumTail( stepResp1 * dstepRespDfstep1,Ttail);
386  a = m_wHelper.getSumSquareTail( dstepRespDfstep1,Ttail);
387  }
388  return -b/a ;
389 }

◆ dstepCorrDfstep() [1/2]

double LArWFParamTool::dstepCorrDfstep ( const double  t,
const double &  fstep,
const double &  Tc 
)
staticprivate

Definition at line 414 of file LArWFParamTool.cxx.

414  {
415  return (-1./Tc)*(1.+((1.-fstep)/Tc)*t)*exp(-fstep*t/Tc);
416 }

◆ dstepCorrDfstep() [2/2]

LArWave LArWFParamTool::dstepCorrDfstep ( const LArWave gCali,
const double &  fstep,
const double &  Tcal 
)
staticprivate

Definition at line 418 of file LArWFParamTool.cxx.

418  {
419  const unsigned N = gCali.getSize() ;
420  const double dt = gCali.getDt() ;
421  LArWave w(N,dt);
422  for ( unsigned i=0 ; i<N ; i++ ) w.setSample(i,dstepCorrDfstep(i*dt,fstep,Tcal)) ;
423  return w ;
424 }

◆ dstepRespDfstep()

LArWave LArWFParamTool::dstepRespDfstep ( const LArWave gCali,
const double &  fstep,
const double &  Tc 
) const
private

Definition at line 410 of file LArWFParamTool.cxx.

410  {
411  return gCali % dstepCorrDfstep(gCali,fstep,Tc);
412 }

◆ 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; }

◆ expTail()

double LArWFParamTool::expTail ( const LArWave gCali,
const WaveTiming_t wt 
) const
private

Definition at line 315 of file LArWFParamTool.cxx.

316 {
317  unsigned int t1;
318  unsigned int t2;
319  if ( m_TtailMin[0]!=0 && m_TtailMax[0]!=0 && m_TtailMin[0]<m_TtailMax[0] ) {
320  t1 = m_TtailMin[0];
321  t2 = m_TtailMax[0];
322  } else {
323  const unsigned nAfterMin = 150;
324  const unsigned nBeforeEnd = 125;
325  t1 = wt.Tmin + nAfterMin;
326  t2 = gCali.getSize() - nBeforeEnd ; // last points rejected because sometimes are crazy!
327  }
328  ATH_MSG_VERBOSE( "exp-fitting between " << t1 << " and " << t2 ) ;
329 
330  double A, rho ;
331  std::vector<double> fitPars = m_wHelper.expfit(gCali,t1,t2,rho) ; // fit to B*exp(A*t) function
332  if (fitPars.size() == 2 ) {
333  A = fitPars[1];
334  //B = fitPars[0];
335  } else {
336  return -1;
337  }
338 
339  const double Tcal = -1./A ;
340  if ( Tcal < 0 ) {
341  ATH_MSG_WARNING( "Exponential fit yielded negative Tcal " << Tcal );
342  }
343  ATH_MSG_VERBOSE( "*** Exponential fit\t--> m_Tcal = " << Tcal ) ;
344 
345  return Tcal;
346 }

◆ 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 LArWFParamTool::finalize ( )
inlinevirtual

Definition at line 49 of file LArWFParamTool.h.

49 {return StatusCode::SUCCESS;}

◆ fminbr()

double LArWFParamTool::fminbr ( double  a,
double  b,
const double  tol,
double(LArWFParamTool::*)(double, const LArWave &, const LArWFParams &, const waveRange_t &) const  f,
const LArWave gCali,
const LArWFParams wf,
const waveRange_t range 
) const
private

Definition at line 868 of file LArWFParamTool.cxx.

876 {
877  double x,v,w; /* Abscissae, descr. see above */
878  double fx; /* f(x) */
879  double fv; /* f(v) */
880  double fw; /* f(w) */
881  const double r = (3.-sqrt(5.0))/2; /* Gold section ratio */
882 
883  assert( tol > 0 && b > a );
884 
885  v = a + r*(b-a); fv = (this->*f)(v,gCali,wf,waverange); /* First step - always gold section*/
886  x = v; w = v;
887  fx=fv; fw=fv;
888 
889  for(;;) /* Main iteration loop */
890  {
891  double range = b-a; /* Range over which the minimum */
892  /* is seeked for */
893  double middle_range = (a+b)/2;
894  double tol_act = /* Actual tolerance */
895  m_SQRT_EPSILON*fabs(x) + tol/3;
896  double new_step; /* Step at this iteration */
897 
898  if( fabs(x-middle_range) + range/2 <= 2*tol_act )
899  return x; /* Acceptable approx. is found */
900 
901  /* Obtain the gold section step */
902  new_step = r * ( x<middle_range ? b-x : a-x );
903 
904 
905  /* Decide if the interpolation can be tried */
906  if( fabs(x-w) >= tol_act ) /* If x and w are distinct */
907  { /* interpolatiom may be tried */
908  double p; /* Interpolation step is calcula-*/
909  double q; /* ted as p/q; division operation*/
910  /* is delayed until last moment */
911  double t;
912 
913  t = (x-w) * (fx-fv);
914  q = (x-v) * (fx-fw);
915  p = (x-v)*q - (x-w)*t;
916  q = 2*(q-t);
917 
918  if( q>(double)0 ) /* q was calculated with the op-*/
919  p = -p; /* posite sign; make q positive */
920  else /* and assign possible minus to */
921  q = -q; /* p */
922 
923  if( fabs(p) < fabs(new_step*q) && /* If x+p/q falls in [a,b]*/
924  p > q*(a-x+2*tol_act) && /* not too close to a and */
925  p < q*(b-x-2*tol_act) ) /* b, and isn't too large */
926  new_step = p/q; /* it is accepted */
927  /* If p/q is too large then the */
928  /* gold section procedure can */
929  /* reduce [a,b] range to more */
930  /* extent */
931  }
932 
933  if( fabs(new_step) < tol_act ) { /* Adjust the step to be not less*/
934  if( new_step > (double)0 ) /* than tolerance */
935  new_step = tol_act;
936  else
937  new_step = -tol_act;
938  }
939 
940  /* Obtain the next approximation to min */
941  { /* and reduce the enveloping range */
942  double t = x + new_step; /* Tentative point for the min */
943  double ft = (this->*f)(t,gCali,wf,waverange);
944  if( ft <= fx )
945  { /* t is a better approximation */
946  if( t < x ) /* Reduce the range so that */
947  b = x; /* t would fall within it */
948  else
949  a = x;
950 
951  v = w; w = x; x = t; /* Assign the best approx to x */
952  fv=fw; fw=fx; fx=ft;
953  }
954  else /* x remains the better approx */
955  {
956  if( t < x ) /* Reduce the range enclosing x */
957  a = t;
958  else
959  b = t;
960 
961  if( ft <= fw || w==x )
962  {
963  v = w; w = t;
964  fv=fw; fw=ft;
965  }
966  else if( ft<=fv || v==x || v==w )
967  {
968  v = t;
969  fv=ft;
970  }
971  }
972  } /* ----- end-of-block ----- */
973  } /* ===== End of loop ===== */
974 }

◆ fstepMin()

double LArWFParamTool::fstepMin ( const LArWave gCali,
double  fstep,
const double  Tc,
const unsigned  Ttail 
) const
private

Definition at line 360 of file LArWFParamTool.cxx.

360  {
361  int niter = 0;
362  //double dfstep;
363  while (1) {
364  niter++ ;
365  const double dfstep = dFstep(gCali,fstep,Tc,Ttail) ;
366  fstep += dfstep ;
367  if ( niter > 50 || fstep < 0. ) {
368  fstep = 0.;
369  break;
370  }
371  if ( fabs( dfstep ) <= m_TINY ) break;
372  }
373  return fstep;
374 }

◆ GetFstep()

StatusCode LArWFParamTool::GetFstep ( const LArWave gCali,
LArWFParams wfParams,
const WaveTiming_t wt 
) const
private

Definition at line 348 of file LArWFParamTool.cxx.

349 {
350  // step response
351  const unsigned Ttail = wt.Tmin + m_DeltaTtail[0];
352  //m_Fstep = 0.; // starting point for iterations
353  const double fstep1=0.0;
354  const double Tcal=wfParams.tcal();
355  wfParams.setFstep(fstepMin(gCali,fstep1,Tcal,Ttail) );
356  //ATH_MSG_VERBOSE( "*** Step response\t--> m_Fstep = " << m_Fstep ) ;
357  return StatusCode::SUCCESS ;
358 }

◆ getLArWaveParams()

StatusCode LArWFParamTool::getLArWaveParams ( const LArCaliWave larCaliWave,
const HWIdentifier  chid,
const CaloGain::CaloGain  gain,
LArWFParams wfParams,
const LArOnOffIdMapping cabling,
std::optional< LArCaliWave > &  omegaScan,
std::optional< LArCaliWave > &  resOscill0,
std::optional< LArCaliWave > &  resOscill1 
) const

Definition at line 197 of file LArWFParamTool.cxx.

205 {
206 
207 
208  wfParams.setTshaper(m_Tshaper);
209  LArCaliWave gCali=larCaliWave; //down-cast to LArWave + deep copy (we'll modify the wave)
210 
211  // find m_Tstart, m_Tpeak, m_Tcross, m_Tmin, m_Amplitude
212  WaveTiming_t waveTiming=timeExtr(gCali);
213 
214  // find m_Tcal
215  if ( wfParams.tcal() == DoExtract ) {
216  const double Tcal = expTail(gCali,waveTiming) ;
217  if ( Tcal < 0 ) {
218  ATH_MSG_WARNING( "Could not extract Tcal for " << m_onlineHelper->channel_name(chid)
219  << " gain=" << (int)gain ) ;
220  wfParams.setTcal(FailExtract);
221  return StatusCode::FAILURE;
222  }
223  else {
224  wfParams.setTcal(Tcal);
225  }
226  ATH_MSG_VERBOSE( "set Tcal = " << wfParams.tcal()) ;
227  }
228 
229  // find m_Fstep
230  if ( wfParams.fstep() == DoExtract ) {
231  StatusCode sc = GetFstep(gCali,wfParams,waveTiming);
232  if ( sc.isFailure() ) {
233  ATH_MSG_WARNING( "Could not extract Fstep for " << m_onlineHelper->channel_name(chid)
234  << " gain=" << (int)gain );
235  wfParams.setFstep(FailExtract);
236  return sc ;
237  }
238  } else {
239  ATH_MSG_VERBOSE( "set Fstep = " <<wfParams.fstep() );
240  }
241 
242  // find m_Omega0 using RTM
243  if ( wfParams.omega0() == DoExtract ) {
244  StatusCode sc = RTM_Omega0(gCali,chid,wfParams,waveTiming,cabling,omegaScanWave);
245  if ( sc.isFailure() ) {
246  ATH_MSG_WARNING( "Could not extract Omega0 for " << m_onlineHelper->channel_name(chid)
247  << " gain=" << (int)gain );
248  wfParams.setOmega0(FailExtract) ;
249  return sc ;
250  }
251  } else {
252  ATH_MSG_VERBOSE( "set Omega0 = " << wfParams.omega0());
253  }
254 
255 
256  const Identifier id = cabling->cnvToIdentifier(chid);
257  const unsigned layer=m_emId->sampling(id);
258  if ( m_storeResOscill[ layer ] && resOscill0) {
259  LArWave injres0 = injRespRes(gCali,wfParams.omega0(),0);
260  *resOscill0 = LArCaliWave(injres0.getWave(),gCali.getDt(),gCali.getDAC(), 0x1,LArWave::unknown);
261  }
262 
263  // find m_Taur using RTM
264  if ( wfParams.taur() == DoExtract ) {
265  StatusCode sc = RTM_Taur(gCali, wfParams,waveTiming ) ;
266  if ( sc.isFailure() ) {
267  ATH_MSG_WARNING( "Could not extract Taur for ChID=" << chid.get_compact()
268  << " gain=" << (int)gain ) ;
269  wfParams.setTaur(FailExtract);
270  return sc ;
271  }
272  ATH_MSG_VERBOSE( "set Taur = " << wfParams.taur() );
273  }
274 
275  wfParams.setFlag( 0 ) ; // this should contain the method used to find parameters and the gain
276 
277  if ( m_storeResOscill[ layer ] && resOscill1) {
278  LArWave injres1 = injRespRes(gCali,wfParams.omega0(),wfParams.taur());
279  *resOscill1 = LArCaliWave(injres1.getWave(),gCali.getDt(),gCali.getDAC(), 0x1, LArWave::unknown);
280  }
281 
282  return( StatusCode::SUCCESS );
283 }

◆ initialize()

StatusCode LArWFParamTool::initialize ( )
virtual

Definition at line 112 of file LArWFParamTool.cxx.

113 {
114  std::string layerName[4] = { "PS" , "Strips" , "Middle" , "Back" } ;
115 
116  ATH_MSG_INFO( "TShaper set to " << m_Tshaper << " ns" ) ;
117 
118  ATH_MSG_INFO( "Step response (Fstep) -> Ttail = Tmin + " << m_DeltaTtail[0] << " steps" ) ;
119 
121  ATH_MSG_INFO( "Cosine response (Omega0) -> Ttail = Tmin + " << m_DeltaTtail[1] << " steps" ) ;
122  else
123  ATH_MSG_INFO( "Cosine response (Omega0) -> Will use OmegaScanHelper() to dynamically select settings" );
124 
125  ATH_MSG_INFO( "Residual oscillations (Taur) -> Ttail = Tmin + " << m_DeltaTtail[2] << " steps" ) ;
126 
127  for ( unsigned layer=0 ; layer<4 ; ++layer ) {
128  ATH_MSG_INFO( "options for Layer " << layer << " (" << layerName[layer] << ")" ) ;
129 
130  ATH_MSG_INFO( " perform cos resp scan: " );
132  ATH_MSG_INFO( "YES (" << m_npoints[layer] << " points)" ) ;
134  ATH_MSG_INFO( "NO" ) ;
135  if ( m_UseOmegaScanHelper )
136  ATH_MSG_INFO( "Will use OmegaScanHelper() to dynamically select settings" ) ;
137 
138  if (!m_UseOmegaScanHelper) {
139  ATH_MSG_INFO( " search interval: [ " << m_omegamin[layer] << " ; " << m_omegamax[layer] << " ]" ) ;
140  if ( m_omegamin[layer] >= m_omegamax[layer] ) {
141  ATH_MSG_ERROR( "Omega0Min >= Omega0Max in layer " << layer << " -- exit!" ) ;
142  return StatusCode::FAILURE ;
143  }
144  }
145 
146  ATH_MSG_INFO( " store residual oscillation wave:" );
147  if ( m_storeResOscill[layer] ) {
148  ATH_MSG_INFO( "YES" ) ;
149  } else {
150  ATH_MSG_INFO( "NO" ) ;
151  }
152 
153  }
154 
155 
156  StatusCode sc;
157  if ( m_isSC ) {
158  const LArOnline_SuperCellID* ll;
159  ATH_CHECK(detStore()->retrieve(ll, "LArOnline_SuperCellID"));
161  ATH_MSG_DEBUG("Found the LArOnlineID helper");
162 
163  } else { // m_isSC
164  const LArOnlineID* ll;
165  ATH_CHECK(detStore()->retrieve(ll, "LArOnlineID") );
167  ATH_MSG_DEBUG(" Found the LArOnlineID helper. ");
168 
169  }
170 
171  /*sc = detStore()->retrieve(m_emId, "LArEM_ID");
172  if (sc.isFailure()) {
173  msg(MSG::ERROR) << "Could not get LArOnlineID helper" << endmsg;
174  return sc;
175  }*/
176  const CaloIdManager *caloIdMgr=nullptr;
177  ATH_CHECK( detStore()->retrieve(caloIdMgr));
178  if(!caloIdMgr){
179  ATH_MSG_ERROR( "Could not access CaloIdManager" );
180  return StatusCode::FAILURE;
181  }
182  if ( m_isSC ) {
183  m_emId=caloIdMgr->getEM_SuperCell_ID();
184  } else {
185  m_emId=caloIdMgr->getEM_ID();
186  }
187  if (!m_emId) {
188  ATH_MSG_ERROR( "Could not access lar EM ID helper" );
189  return StatusCode::FAILURE;
190  }
191 
192 
193  return StatusCode::SUCCESS;
194 }

◆ injCorr()

LArWave LArWFParamTool::injCorr ( const unsigned  N,
const double  dt,
const double  omega0,
const double  taur 
)
staticprivate

Definition at line 765 of file LArWFParamTool.cxx.

765  {
766 
767  LArWave w(N,dt);
768 
769  const double tau0 = 1./omega0;
770  const double Delta = taur*taur - 4*tau0*tau0;
771  if ( Delta > 0 ) {
772  const double sqrtDelta = sqrt(Delta) ;
773  const double taup = 0.5*( taur + sqrtDelta ) ;
774  const double taum = 0.5*( taur - sqrtDelta ) ;
775  for ( unsigned i=0 ; i<N ; i++ ) {
776  const double t=i*dt;
777  w.setSample(i, (exp(-t/taup) - exp(-t/taum) ) / (taup - taum));
778  }
779  //return ( exp(-t/taup) - exp(-t/taum) ) / ( taup - taum ) ;
780  } else if ( Delta < 0 ) {
781  const double T = sqrt(-Delta) ;
782  const double A = 2 * taur / ( (taur*taur) - Delta ) ;
783  const double B = 2 * T / ( (taur*taur) - Delta );
784  for ( unsigned i=0 ; i<N ; i++ ) {
785  const double t=i*dt;
786  w.setSample(i, 2 * exp(-A*t) * sin(B*t) / T);
787  }
788  //return 2 * exp(-A*t) * sin(B*t) / T ;
789  } else { //Delta==0
790  const double tau = 0.5 * taur ;
791  // return exp(-t/tau) * t / pow(tau,2) ;
792  for ( unsigned i=0 ; i<N ; i++ ) {
793  const double t=i*dt;
794  w.setSample(i,exp(-t/tau) * t / (tau*tau)) ;
795  }
796  //return exp(-t/tau) * t / (tau*tau) ;
797  } //end else
798  return w;
799 }

◆ injRespRes()

LArWave LArWFParamTool::injRespRes ( const LArWave w,
const double  omega0,
const double  taur 
)
staticprivate

Definition at line 761 of file LArWFParamTool.cxx.

761  {
762  return w - ( w % injCorr(w.getSize(),w.getDt(),omega0,taur) );
763 }

◆ 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& LArWFParamTool::interfaceID ( )
inlinestatic

Definition at line 40 of file LArWFParamTool.h.

40 { return IID_LArWFParamTool; }

◆ logChi2CosRespShaper()

double LArWFParamTool::logChi2CosRespShaper ( const double  omega,
const LArWave gCali,
const LArWFParams wf,
const waveRange_t range 
) const
private

Definition at line 716 of file LArWFParamTool.cxx.

716  {
717  return log(m_wHelper.getSumSquareRegion(cosRespShaper(gCali,wfParams.fstep(),wfParams.tcal(),omega,wfParams.tshaper()),range.min,range.max)) ;
718 }

◆ logChi2InjRespRes()

double LArWFParamTool::logChi2InjRespRes ( const double  taur,
const LArWave gCali,
const LArWFParams wf,
const waveRange_t range 
) const
private

Definition at line 757 of file LArWFParamTool.cxx.

757  {
758  return m_wHelper.getSumSquareRegion(injRespRes(gCali,wf.omega0(),taur), range.min, range.max);
759 }

◆ 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  }

◆ omega0MinNum()

double LArWFParamTool::omega0MinNum ( double  omegaMin,
double  omegaMax,
const double  tol,
const LArWave gCali,
const LArWFParams wf,
const waveRange_t range 
) const
private

Definition at line 801 of file LArWFParamTool.cxx.

801  {
802  return fminbr ( omegaMin, omegaMax, tol, &LArWFParamTool::logChi2CosRespShaper, gCali, wf, range);
803 }

◆ OmegaScanHelper()

LArWFParamTool::omegaScanParams_t LArWFParamTool::OmegaScanHelper ( const Identifier  id,
const WaveTiming_t wt 
) const
private

Definition at line 498 of file LArWFParamTool.cxx.

498  {
499 
500  omegaScanParams_t ret{};
501 
502  // this is a skeleton of the final function: use at your own risk! M.D. & C.G.
503  // EMEC part modified by L. March - 7 April 2011
504 
505  const unsigned layer=m_emId->sampling(id);
506 
507  ret.range.min = m_TtailMin[2];
508  ret.range.max = m_TtailMax[2];
509  ret.cosRespScan = m_cosRespScan[ (unsigned)layer ] ;
510  ret.omegamin = m_omegamin[ (unsigned)layer ] ;
511  ret.omegamax = m_omegamax[ (unsigned)layer ] ;
512  ret.Npoint = m_npoints[ (unsigned)layer ] ;
513  ret.DeltaOmega = 0.02 ;
514  //DeltaOmega = 0.001 ;
515 
516  //if ( m_BarrelEC==0 ) { // Barrel
517  if (m_emId->is_em_barrel(id)) {
518 
519  if ( layer==0 ) { // PS
520  ret.range.min = wt.Tstart;
521  ret.range.max = wt.Tcross;
522  ret.cosRespScan = m_cosRespScan[ (unsigned)layer ];
523  ret.omegamin = 0.240;
524  ret.omegamax = 0.330;
525  ret.Npoint = 900;
526  }
527 
528  if ( layer==1 ) { // Strips
529  ret.range.min = wt.Tstart;
530  ret.range.max = wt.Tcross;
531  ret.cosRespScan = true;
532  // Strips interval 1
533  //ret.omegamin = 0.150;
534  //ret.omegamax = 0.220;
535  //ret.Npoint = 700;
536  // Strips interval 2
537  ret.omegamin = 0.220;
538  ret.omegamax = 0.310;
539  ret.Npoint = 900;
540  // Strips interval 3
541  //omegamin = 0.310;
542  //omegamax = 0.390;
543  //Npoint = 1400;
544  }
545 
546  if ( layer==2 ) { // Middle
547  ret.range.min = wt.Tstart;
548  ret.range.max = wt.Tmin + m_DeltaTtail[1];
549  ret.cosRespScan = false;
550  ret.omegamin = 0.060;
551  ret.omegamax = 0.215;
552  //Npoint = 315;
553  }
554 
555  if ( layer==3 ) { // Back
556  ret.range.min = wt.Tstart;
557  ret.range.max = wt.Tcross;
558  ret.cosRespScan = false;
559  ret.omegamin = 0.100;
560  ret.omegamax = 0.700;
561  ret.Npoint = 120;
562  }
563 
564  }
565  else {
566  //if ( m_BarrelEC==1 ) { // EndCap
567 
568  // use pulse peak to perform cosine response tranformation minimization
569  //ret.range.min = m_Tstart;
570  //ret.range.max = m_Tcross;
571  ret.range.min = 0.;
572  ret.range.max = 0.;
573 
574  ret.DeltaOmega = 0.001 ;
575 
576  //(*m_log) << MSG::WARNING << " m_Tstart= " << m_Tstart << " m_Tcross=" << m_Tcross ) ;
577 
578  const bool IsEMECInnerWheel = m_emId->is_em_endcap_inner(id);//m_onlineHelper->isEMECinHECchannel(m_chID);
579  const int eta=m_emId->eta(id);
580  if ( IsEMECInnerWheel ) { // EMEC Inner Wheel
581 
582  if ( layer==1 ) {
583  //omegamin = 0.10 ;
584  //omegamax = 0.20 ;
585  ret.omegamin = 0.12 ;
586  if(eta>=0 && eta<=3)
587  {
588  ret.omegamin = 0.12 ;
589  //omegamax = 0.165 ;
590  ret.omegamax = 0.16 ;
591  ret.Npoint=100;
592  }
593  if(eta>=4 && eta<=6)
594  {
595  ret.omegamin = 0.14 ;
596  ret.omegamax = 0.18 ;
597  ret.Npoint=100;
598  }
599  } else
600  if ( layer == 2 ) { // don't extract Omega0
601  /*
602  cosRespScan = false;
603  omegamin = 0.;
604  omegamax = 0.;
605  Npoint = 0;
606  DeltaOmega = 0.;
607  */
608  ret.cosRespScan = true;
609  ret.omegamin = 0.12;
610  ret.omegamax = 0.35;
611  ret.Npoint = 100;
612  } else { // don't extract Omega0
613  ret.cosRespScan = false;
614  ret.omegamin = 0.;
615  ret.omegamax = 0.;
616  ret.Npoint = 0;
617  ret.DeltaOmega = 0.;
618  }
619 
620  } else { // EMEC Outer Whell
621 
622  if ( layer==1 ) { // don't extract Omega0
623  ret.cosRespScan = false;
624  ret.omegamin = 0.;
625  ret.omegamax = 0.;
626  ret.Npoint = 0;
627  ret.DeltaOmega = 0.;
628  } else
629  if ( layer == 2 ) {
630  ret.cosRespScan = true;
631  ret.Npoint =100;
632  ret.omegamin=0.1;
633  if(eta==0) {
634  ret.omegamax = 0.140 ;
635  }
636  if(eta==1) {
637  ret.omegamax = 0.135 ;
638  }
639  if(eta==2) {
640  ret.omegamax = 0.15 ;
641  }
642  if(eta==3) {
643  ret.omegamin = 0.10;
644  ret.omegamax = 0.16;
645  }
646  if(eta>=4 && eta<11 ) {
647  ret.omegamin = 0.12 ;
648  ret.omegamax = 0.20 ;
649  }
650  if(eta==11) {
651  ret.omegamin = 0.12 ;
652  ret.omegamax = 0.22 ;
653  }
654  if(eta>=12 && eta<28) {
655  ret.omegamin = 0.12 ;
656  ret.omegamax = 0.24 ;
657  }
658  if(eta>=28 && eta<39) {
659  ret.omegamin = 0.12 ;
660  ret.omegamax = 0.245 ;
661  }
662  if(eta>=39 && eta<43) {
663  //ret.omegamin = 0.12 ;
664  ret.omegamin = 0.24 ;
665  ret.omegamax = 0.32 ;
666  }
667  } else { // don't extract Omega0
668  ret.cosRespScan = false;
669  ret.omegamin = 0.;
670  ret.omegamax = 0.;
671  ret.Npoint = 0;
672  ret.DeltaOmega = 0.;
673  }
674 
675  } // end of EMEC Outer Wheel
676 
677  } // end of EMEC
678 
679  return ret;
680 }

◆ 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.

◆ 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  }

◆ RTM_Omega0()

StatusCode LArWFParamTool::RTM_Omega0 ( const LArWave gCali,
const HWIdentifier  chid,
LArWFParams wfParams,
const WaveTiming_t wt,
const LArOnOffIdMapping cabling,
std::optional< LArCaliWave > &  omegaScan 
) const
private

Definition at line 426 of file LArWFParamTool.cxx.

427 {
428  /* begin of the COSINE RESPONSE analysis */
429 
430  const Identifier id = cabling->cnvToIdentifier(chid);
431  // Define the (raw) minimum research interval (if the Layer card is not set,
432  // uses the wider interval, and default value for the first minimum scan)
433 
434  omegaScanParams_t OSParams{};
435 
436  // defaults (e.g. to be used in case cosRespScan=true)
437  OSParams.cosRespScan = true ;
438  OSParams.omegamin = 0.01 ;
439  OSParams.omegamax = 1. ;
440  OSParams.Npoint = 100 ;
441  OSParams.DeltaOmega = 0.01 ; // GHz
442  OSParams.range.min=m_TtailMin[2];
443  OSParams.range.max=m_TtailMax[2];
444 
445  if ( !m_UseOmegaScanHelper) {
446  const unsigned layer=m_emId->sampling(id);
447  OSParams.cosRespScan = m_cosRespScan[ layer ] ;
448  OSParams.omegamin = m_omegamin[ layer ] ;
449  OSParams.omegamax = m_omegamax[ layer ] ;
450  OSParams.Npoint = m_npoints[ layer ] ;
451  OSParams.DeltaOmega = 0.02 ;
452  //DeltaOmega = 0.001 ;
453  } else {
454  OSParams=OmegaScanHelper(id,wt);
455  }
456 
457  waveRange_t range=OSParams.range;
458 //if (m_TtailMin[2]==0 || m_TtailMax[2]==0 || m_TtailMin[2]>=m_TtailMax[2]) {
459  if (range.min==0 || range.max==0 || range.min>=range.max) {
460  range.min=wt.Tmin + m_DeltaTtail[1];
461  range.max=gCali.getSize();
462  }
463 
464  if ( OSParams.cosRespScan ){
465  // makes a raw scan of the cosresp chi2 logarithm
466  const double dOmega = (OSParams.omegamax-OSParams.omegamin)/OSParams.Npoint;
467  const unsigned vectSize = (unsigned) ceil ( OSParams.omegamax/dOmega );
468  const unsigned indexmin = (unsigned) floor( OSParams.omegamin/dOmega );
469  if (omegaScanWave) omegaScanWave->setSize(vectSize);
470  double chi2min = LAR_MAX_DOUBLE, omega0raw = LAR_MAX_DOUBLE;
471  for (int i=0;i<OSParams.Npoint;i++) {
472  const double omega = OSParams.omegamin+dOmega*i ;
473  const double chi2 = logChi2CosRespShaper(omega, gCali, wfParams, range);
474  if (omegaScanWave) omegaScanWave->setSample(i+indexmin,chi2);
475  if ( chi2 < chi2min ) {
476  chi2min = chi2;
477  omega0raw = omega;
478  }
479  }
480 
481  OSParams.omegamin = omega0raw - OSParams.DeltaOmega ;
482  OSParams.omegamax = omega0raw + OSParams.DeltaOmega ;
483  }
484 
485  if ( OSParams.omegamin == OSParams.omegamax ) { // skip cosine response calculation
486  wfParams.setOmega0(0.); // this will force no injection point correction in LArPhysWavePredictor
487  ATH_MSG_VERBOSE( "*** Cosine response skipped\t--> m_Omega0 = " << wfParams.omega0() ) ;
488  } else { // numerical (Brent) log(chi2) minimization
489  wfParams.setOmega0(omega0MinNum ( OSParams.omegamin, OSParams.omegamax, m_EPSILON, gCali, wfParams, range) );
490  ATH_MSG_VERBOSE( "*** Cosine response\t--> m_Omega0 = " <<wfParams.omega0() ) ;
491  }
492 
493  /* end of the COSINE RESPONSE analysis */
494  return StatusCode::SUCCESS ;
495 }

◆ RTM_Taur()

StatusCode LArWFParamTool::RTM_Taur ( const LArWave gCali,
LArWFParams wfParams,
const WaveTiming_t wt 
) const
private

Definition at line 683 of file LArWFParamTool.cxx.

684 {
685  /* begin of the INJECTION POINT CORRECTION RESIDUAL OSCILLATION analysis */
686 
687  // m_Taur minimum search interval...
688  double taurmin = 0.; // ns
689  //double taurmax = 4.; // ns
690  double taurmax = 100.; // ns
691 
692  if ( wf.omega0()==0) {
693  wf.setTaur(0);
694  ATH_MSG_VERBOSE( "*** Injection point skipped\t--> m_Taur = " << wf.taur() ) ;
695  } else {
696  // numerical (Brent) log(chi2) minimization
697  waveRange_t range{};
698  if ( m_TtailMin[3]!=0 && m_TtailMax[3]!=0 && m_TtailMin[3]<m_TtailMax[3]) {
699  range.min=m_TtailMin[3];
700  range.max=m_TtailMax[3];
701  }
702  else {
703  range.min= wt.Tmin + m_DeltaTtail[2];
704  range.max=gCali.getSize();
705  }
706 
707  wf.setTaur(taurMinNum ( taurmin, taurmax, m_EPSILON, gCali, wf, range));
708  ATH_MSG_VERBOSE( "*** Injection point\t--> m_Taur = " << wf.taur()) ;
709  }
710 
711  /* end of the INJECTION POINT CORRECTION RESIDUAL OSCILLATION analysis */
712 
713  return StatusCode::SUCCESS ;
714 }

◆ stepCorr()

LArWave LArWFParamTool::stepCorr ( const LArWave gCali,
const double &  fstep,
const double &  Tc 
)
staticprivate

Definition at line 398 of file LArWFParamTool.cxx.

398  {
399  const unsigned N = gCali.getSize() ;
400  const double dt = gCali.getDt() ;
401 
402  LArWave w(N,dt);
403  const double A=(1.-fstep)/Tc;
404  for ( unsigned i=0 ; i<N ; i++ ) {
405  w.setSample(i,A*exp(-fstep*i*dt/Tc));
406  }
407  return w ;
408 }

◆ stepResp()

LArWave LArWFParamTool::stepResp ( const LArWave gCali,
const double  fstep,
const double  Tc 
)
staticprivate

Definition at line 391 of file LArWFParamTool.cxx.

391  {
392  //return m_gCali + m_gCali % stepCorr() ;
393  LArWave result = gCali % stepCorr(gCali, fstep, Tc);
394  result+=gCali;
395  return result;
396 }

◆ 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.

◆ taurMinNum()

double LArWFParamTool::taurMinNum ( const double  taurmin,
const double  taurmax,
const double  tol,
const LArWave gCali,
const LArWFParams wf,
const waveRange_t range 
) const
private

Definition at line 810 of file LArWFParamTool.cxx.

810  {
811  return fminbr ( taurmin, taurmax, tol, &LArWFParamTool::logChi2InjRespRes, gCali, wf, range );
812 }

◆ timeExtr()

LArWFParamTool::WaveTiming_t LArWFParamTool::timeExtr ( LArWave gCali) const
private

Definition at line 287 of file LArWFParamTool.cxx.

288 {
289  WaveTiming_t wt{}; //return object
290 
291  wt.Tstart = m_wHelper.getStart(gCali);
292 
293  const unsigned NBaseline= m_NBaseline==0 ? wt.Tstart : m_NBaseline ;
294 
295  const double baseline = m_wHelper.getBaseline(gCali,NBaseline);
296 
297  if ( m_ShiftToStart ) // move the wave to the start
298  gCali = m_wHelper.translate(gCali, -wt.Tstart, baseline);
299 
300  if ( m_SubtractBaseline ) // remove the baseline
301  gCali = gCali + (-baseline);
302 
303  wt.Tpeak = m_wHelper.getMax(gCali);
304 
305  wt.Amplitude = gCali.getSample(wt.Tpeak);
306 
307  wt.Tmin = m_wHelper.getMin(gCali);
308 
309  wt.Tcross = m_wHelper.getZeroCross(gCali);
310 
311  return wt;
312 }

◆ 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_cosRespScan

std::vector<bool> LArWFParamTool::m_cosRespScan
private

Definition at line 101 of file LArWFParamTool.h.

◆ m_DEFAULT

const double LArWFParamTool::m_DEFAULT = -1
staticprivate

Definition at line 78 of file LArWFParamTool.h.

◆ m_DeltaTtail

std::vector<int> LArWFParamTool::m_DeltaTtail
private

Definition at line 115 of file LArWFParamTool.h.

◆ 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_emId

const LArEM_Base_ID* LArWFParamTool::m_emId = nullptr
private

Definition at line 93 of file LArWFParamTool.h.

◆ m_EPSILON

const double LArWFParamTool::m_EPSILON =2.22045e-16
staticprivate

Definition at line 81 of file LArWFParamTool.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_isSC

bool LArWFParamTool::m_isSC
private

Definition at line 112 of file LArWFParamTool.h.

◆ m_NBaseline

unsigned int LArWFParamTool::m_NBaseline
private

Definition at line 108 of file LArWFParamTool.h.

◆ m_npoints

std::vector<unsigned> LArWFParamTool::m_npoints
private

Definition at line 104 of file LArWFParamTool.h.

◆ m_omegamax

std::vector<double> LArWFParamTool::m_omegamax
private

Definition at line 103 of file LArWFParamTool.h.

◆ m_omegamin

std::vector<double> LArWFParamTool::m_omegamin
private

Definition at line 102 of file LArWFParamTool.h.

◆ m_onlineHelper

const LArOnlineID_Base* LArWFParamTool::m_onlineHelper = nullptr
private

Definition at line 94 of file LArWFParamTool.h.

◆ m_ShiftToStart

bool LArWFParamTool::m_ShiftToStart
private

Definition at line 109 of file LArWFParamTool.h.

◆ m_SQRT_EPSILON

const double LArWFParamTool::m_SQRT_EPSILON =1.49012e-08
staticprivate

Definition at line 80 of file LArWFParamTool.h.

◆ m_storeResOscill

std::vector<bool> LArWFParamTool::m_storeResOscill
private

Definition at line 107 of file LArWFParamTool.h.

◆ m_SubtractBaseline

bool LArWFParamTool::m_SubtractBaseline
private

Definition at line 110 of file LArWFParamTool.h.

◆ m_TINY

const double LArWFParamTool::m_TINY =2.22045e-16
staticprivate

Definition at line 79 of file LArWFParamTool.h.

◆ m_Tshaper

double LArWFParamTool::m_Tshaper
private

Definition at line 99 of file LArWFParamTool.h.

◆ m_TtailMax

std::vector<int> LArWFParamTool::m_TtailMax
private

Definition at line 114 of file LArWFParamTool.h.

◆ m_TtailMin

std::vector<int> LArWFParamTool::m_TtailMin
private

Definition at line 113 of file LArWFParamTool.h.

◆ m_UseOmegaScanHelper

bool LArWFParamTool::m_UseOmegaScanHelper
private

Definition at line 111 of file LArWFParamTool.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.

◆ m_wHelper

LArWaveHelper LArWFParamTool::m_wHelper
private

Definition at line 96 of file LArWFParamTool.h.


The documentation for this class was generated from the following files:
LArWave
Definition: LArWave.h:31
python.PyKernel.retrieve
def retrieve(aClass, aKey=None)
Definition: PyKernel.py:110
LArWFParamTool::cosCorr
static LArWave cosCorr(const unsigned N, const double dt, const double fstep, const double tcal, const double omega)
Definition: LArWFParamTool.cxx:737
LArWFParams::taur
double taur() const
Definition: LArWFParams.h:271
beamspotman.r
def r
Definition: beamspotman.py:676
plotBeamSpotCompare.x1
x1
Definition: plotBeamSpotCompare.py:216
LArWFParamTool::timeExtr
WaveTiming_t timeExtr(LArWave &gCali) const
Definition: LArWFParamTool.cxx:287
python.CaloRecoConfig.f
f
Definition: CaloRecoConfig.py:127
LArWFParamTool::m_storeResOscill
std::vector< bool > m_storeResOscill
Definition: LArWFParamTool.h:107
PlotCalibFromCool.ft
ft
Definition: PlotCalibFromCool.py:329
LArWFParamTool::omega0MinNum
double omega0MinNum(double omegaMin, double omegaMax, const double tol, const LArWave &gCali, const LArWFParams &wf, const waveRange_t &) const
Definition: LArWFParamTool.cxx:801
LArWaveHelper::getSumRegion
double getSumRegion(const LArWave &theWave, unsigned iFirst, unsigned iLast) const
Definition: LArWaveHelper.cxx:370
LArWFParamTool::m_omegamin
std::vector< double > m_omegamin
Definition: LArWFParamTool.h:102
get_generator_info.result
result
Definition: get_generator_info.py:21
python.PerfMonSerializer.p
def p
Definition: PerfMonSerializer.py:743
max
#define max(a, b)
Definition: cfImp.cxx:41
LArWave::getSize
size_t getSize() const
number of time samples
Definition: LArWave.h:62
ATH_MSG_INFO
#define ATH_MSG_INFO(x)
Definition: AthMsgStreamMacros.h:31
LArWFParamTool::injCorr
static LArWave injCorr(const unsigned N, const double dt, const double omega0, const double taur)
Definition: LArWFParamTool.cxx:765
LArWFParamTool::OK
@ OK
Definition: LArWFParamTool.h:68
LArWaveHelper::getStart
unsigned getStart(const LArWave &theWave) const
Definition: LArWaveHelper.cxx:409
LArWFParams::setTcal
void setTcal(double tcal)
Definition: LArWFParams.h:226
LArWFParams::setFstep
void setFstep(double fstep)
Definition: LArWFParams.h:227
eta
Scalar eta() const
pseudorapidity method
Definition: AmgMatrixBasePlugin.h:79
LArWFParamTool::m_ShiftToStart
bool m_ShiftToStart
Definition: LArWFParamTool.h:109
AthCommonDataStore< AthCommonMsg< AlgTool > >::declareProperty
Gaudi::Details::PropertyBase & declareProperty(Gaudi::Property< T > &t)
Definition: AthCommonDataStore.h:145
LArWFParamTool::taurMinNum
double taurMinNum(const double taurmin, const double taurmax, const double tol, const LArWave &gCali, const LArWFParams &wf, const waveRange_t &) const
Definition: LArWFParamTool.cxx:810
LArWFParamTool::m_TtailMax
std::vector< int > m_TtailMax
Definition: LArWFParamTool.h:114
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
CaloIdManager::getEM_ID
const LArEM_ID * getEM_ID(void) const
Definition: CaloIdManager.cxx:80
conifer::pow
constexpr int pow(int x)
Definition: conifer.h:20
CaloCondBlobAlgs_fillNoiseFromASCII.gain
gain
Definition: CaloCondBlobAlgs_fillNoiseFromASCII.py:110
ReadCellNoiseFromCool.cabling
cabling
Definition: ReadCellNoiseFromCool.py:154
ALFA_EventTPCnv_Dict::t1
std::vector< ALFA_RawDataCollection_p1 > t1
Definition: ALFA_EventTPCnvDict.h:43
LArWave::getDt
const double & getDt() const
delta time
Definition: LArWave.h:50
LArWFParamTool::stepCorr
static LArWave stepCorr(const LArWave &gCali, const double &fstep, const double &Tc)
Definition: LArWFParamTool.cxx:398
LArWFParamTool::dFstep
double dFstep(const LArWave &gCali, const double fstep, const double Tc, const unsigned Ttail) const
Definition: LArWFParamTool.cxx:376
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
LArWFParamTool::dstepRespDfstep
LArWave dstepRespDfstep(const LArWave &gCali, const double &fstep, const double &Tc) const
Definition: LArWFParamTool.cxx:410
LArWFParamTool::NotFilled
@ NotFilled
Definition: LArWFParamTool.h:70
LArWFParamTool::stepResp
static LArWave stepResp(const LArWave &gCali, const double fstep, const double Tc)
Definition: LArWFParamTool.cxx:391
LArCaliWave::getDAC
int getDAC() const
DAC value.
Definition: LArCaliWave.h:156
LArEM_Base_ID::sampling
int sampling(const Identifier id) const
return sampling according to :
LArWFParamTool::OmegaScanHelper
omegaScanParams_t OmegaScanHelper(const Identifier id, const WaveTiming_t &wt) const
Definition: LArWFParamTool.cxx:498
JetTiledMap::N
@ N
Definition: TiledEtaPhiMap.h:44
LArWFParamTool::m_omegamax
std::vector< double > m_omegamax
Definition: LArWFParamTool.h:103
read_hist_ntuple.t
t
Definition: read_hist_ntuple.py:5
drawFromPickle.cos
cos
Definition: drawFromPickle.py:36
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
LArWFParamTool::m_cosRespScan
std::vector< bool > m_cosRespScan
Definition: LArWFParamTool.h:101
LArWFParamTool::m_npoints
std::vector< unsigned > m_npoints
Definition: LArWFParamTool.h:104
x
#define x
xAOD::unsigned
unsigned
Definition: RingSetConf_v1.cxx:662
LArWFParamTool::injRespRes
static LArWave injRespRes(const LArWave &w, const double omega0, const double taur)
Definition: LArWFParamTool.cxx:761
LArWave::unknown
@ unknown
Definition: LArWave.h:137
LArEM_Base_ID::eta
int eta(const Identifier id) const
return eta according to :
AthenaPoolTestRead.sc
sc
Definition: AthenaPoolTestRead.py:27
AthCommonDataStore< AthCommonMsg< AlgTool > >::detStore
const ServiceHandle< StoreGateSvc > & detStore() const
The standard StoreGateSvc/DetectorStore Returns (kind of) a pointer to the StoreGateSvc.
Definition: AthCommonDataStore.h:95
SG::VarHandleKeyArray::setOwner
virtual void setOwner(IDataHandleHolder *o)=0
LArWFParams::setTshaper
void setTshaper(double tsh)
Definition: LArWFParams.h:231
dqt_zlumi_alleff_HIST.A
A
Definition: dqt_zlumi_alleff_HIST.py:110
LArWFParamTool::Oscillating
@ Oscillating
Definition: LArWFParamTool.h:73
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
LArWFParamTool::FailExtract
@ FailExtract
Definition: LArWFParamTool.h:34
LArCaliWave
Definition: LArCaliWave.h:44
LArWaveHelper::getSumTail
double getSumTail(const LArWave &theWave, unsigned iFirst) const
Definition: LArWaveHelper.cxx:355
AthCommonDataStore
Definition: AthCommonDataStore.h:52
ATH_MSG_ERROR
#define ATH_MSG_ERROR(x)
Definition: AthMsgStreamMacros.h:33
CaloIdManager
This class initializes the Calo (LAr and Tile) offline identifiers.
Definition: CaloIdManager.h:45
LArWFParamTool::m_SQRT_EPSILON
static const double m_SQRT_EPSILON
Definition: LArWFParamTool.h:80
lumiFormat.i
int i
Definition: lumiFormat.py:92
LArWFParams::setFlag
void setFlag(unsigned flag)
Definition: LArWFParams.h:224
Identifier
Definition: DetectorDescription/Identifier/Identifier/Identifier.h:32
ret
T ret(T t)
Definition: rootspy.cxx:260
EL::StatusCode
::StatusCode StatusCode
StatusCode definition for legacy code.
Definition: PhysicsAnalysis/D3PDTools/EventLoop/EventLoop/StatusCode.h:22
ATH_MSG_DEBUG
#define ATH_MSG_DEBUG(x)
Definition: AthMsgStreamMacros.h:29
LArWFParamTool::GetFstep
StatusCode GetFstep(const LArWave &gCali, LArWFParams &wfParams, const WaveTiming_t &wt) const
Definition: LArWFParamTool.cxx:348
CaloNoise_fillDB.dt
dt
Definition: CaloNoise_fillDB.py:58
TRT::Hit::layer
@ layer
Definition: HitInfo.h:79
LArWFParams::setTaur
void setTaur(double taur)
Definition: LArWFParams.h:230
LArWFParamTool::cosRespShaper
LArWave cosRespShaper(const LArWave &gCali, const double &fstep, const double &tcal, const double &w, const double &tsh) const
Definition: LArWFParamTool.cxx:720
LArWaveHelper::getSumSquareRegion
double getSumSquareRegion(const LArWave &theWave, unsigned iFirst, unsigned iLast) const
Definition: LArWaveHelper.cxx:392
baseline
@ baseline
Definition: SUSYToolsTester.cxx:94
chi2
double chi2(TH1 *h0, TH1 *h1)
Definition: comparitor.cxx:522
plotBeamSpotVxVal.range
range
Definition: plotBeamSpotVxVal.py:195
LArWFParamTool::dstepCorrDfstep
static double dstepCorrDfstep(const double t, const double &fstep, const double &Tc)
Definition: LArWFParamTool.cxx:414
test_pyathena.parent
parent
Definition: test_pyathena.py:15
LArWFParamTool::fminbr
double fminbr(double a, double b, const double tol, double(LArWFParamTool::*f)(double, const LArWave &, const LArWFParams &, const waveRange_t &) const, const LArWave &gCali, const LArWFParams &wf, const waveRange_t &range) const
Definition: LArWFParamTool.cxx:868
LArWFParamTool::m_SubtractBaseline
bool m_SubtractBaseline
Definition: LArWFParamTool.h:110
ATH_CHECK
#define ATH_CHECK
Definition: AthCheckMacros.h:40
LArWFParamTool::m_isSC
bool m_isSC
Definition: LArWFParamTool.h:112
AthCommonDataStore< AthCommonMsg< AlgTool > >::m_detStore
StoreGateSvc_t m_detStore
Pointer to StoreGate (detector store by default)
Definition: AthCommonDataStore.h:393
LAR_MAX_DOUBLE
#define LAR_MAX_DOUBLE
Definition: LArWFParamTool.cxx:23
LArWFParams::omega0
double omega0() const
Definition: LArWFParams.h:270
LArWFParamTool::fstepMin
double fstepMin(const LArWave &gCali, double fstep, const double Tc, const unsigned Ttail) const
Definition: LArWFParamTool.cxx:360
LArWFParamTool::logChi2CosRespShaper
double logChi2CosRespShaper(const double omega, const LArWave &gCali, const LArWFParams &wf, const waveRange_t &range) const
Definition: LArWFParamTool.cxx:716
AthAlgTool::AthAlgTool
AthAlgTool()
Default constructor:
SG::VarHandleKeyArray::renounce
virtual void renounce()=0
LArWFParamTool::expTail
double expTail(const LArWave &gCali, const WaveTiming_t &wt) const
Definition: LArWFParamTool.cxx:315
SG::HandleClassifier::type
std::conditional< std::is_base_of< SG::VarHandleKeyArray, T >::value, VarHandleKeyArrayType, type2 >::type type
Definition: HandleClassifier.h:54
LArWFParamTool::RTM_Taur
StatusCode RTM_Taur(const LArWave &gCali, LArWFParams &wfParams, const WaveTiming_t &wt) const
Definition: LArWFParamTool.cxx:683
LArWFParamTool::m_EPSILON
static const double m_EPSILON
Definition: LArWFParamTool.h:81
LArOnlineID_Base
Helper for the Liquid Argon Calorimeter cell identifiers.
Definition: LArOnlineID_Base.h:105
LArWaveHelper::getSumSquareTail
double getSumSquareTail(const LArWave &theWave, unsigned iFirst) const
Definition: LArWaveHelper.cxx:387
LArWFParamTool::TooShort
@ TooShort
Definition: LArWFParamTool.h:69
merge_scale_histograms.doc
string doc
Definition: merge_scale_histograms.py:9
LArWaveHelper::getZeroCross
unsigned getZeroCross(const LArWave &theWave) const
Definition: LArWaveHelper.cxx:421
name
std::string name
Definition: Control/AthContainers/Root/debug.cxx:192
plotBeamSpotMon.b
b
Definition: plotBeamSpotMon.py:77
LArWFParamTool::Noisy
@ Noisy
Definition: LArWFParamTool.h:72
LArWFParamTool::m_onlineHelper
const LArOnlineID_Base * m_onlineHelper
Definition: LArWFParamTool.h:94
dqt_zlumi_alleff_HIST.B
B
Definition: dqt_zlumi_alleff_HIST.py:110
LArOnlineID
Definition: LArOnlineID.h:20
Base_Fragment.defaults
dictionary defaults
This includes now the top quark, the leptons and the bosons.
Definition: GeneratorFilters/share/common/Base_Fragment.py:79
LArOnline_SuperCellID
Definition: LArOnline_SuperCellID.h:20
LArEM_Base_ID::is_em_endcap_inner
bool is_em_endcap_inner(const Identifier id) const
test if the id belongs to the EM Endcap inner wheel
LArWFParamTool::m_UseOmegaScanHelper
bool m_UseOmegaScanHelper
Definition: LArWFParamTool.h:111
python.PyAthena.v
v
Definition: PyAthena.py:157
ReadCellNoiseFromCool.indexmin
indexmin
Definition: ReadCellNoiseFromCool.py:226
ALFA_EventTPCnv_Dict::t2
std::vector< ALFA_RawDataContainer_p1 > t2
Definition: ALFA_EventTPCnvDict.h:44
LArWFParamTool::DefaultNotSet
@ DefaultNotSet
Definition: LArWFParamTool.h:36
LArWFParamTool::m_TtailMin
std::vector< int > m_TtailMin
Definition: LArWFParamTool.h:113
LArWaveHelper::getMin
unsigned int getMin(const LArWave &theWave) const
return index of minimum sample
Definition: LArWaveHelper.cxx:74
a
TList * a
Definition: liststreamerinfos.cxx:10
h
Identifier::get_compact
value_type get_compact(void) const
Get the compact id.
run2time.fw
fw
Definition: run2time.py:52
LArEM_Base_ID::is_em_barrel
bool is_em_barrel(const Identifier id) const
test if the id belongs to the EM barrel
LArWFParams::setOmega0
void setOmega0(double omega0)
Definition: LArWFParams.h:229
LArWFParamTool::DoExtract
@ DoExtract
Definition: LArWFParamTool.h:35
ATH_MSG_WARNING
#define ATH_MSG_WARNING(x)
Definition: AthMsgStreamMacros.h:32
python.CaloScaleNoiseConfig.type
type
Definition: CaloScaleNoiseConfig.py:78
LArWaveCumul::getError
double getError(unsigned i) const
error per time bin
Definition: LArWaveCumul.h:143
python.CaloCondTools.log
log
Definition: CaloCondTools.py:20
LArWFParamTool::m_Tshaper
double m_Tshaper
Definition: LArWFParamTool.h:99
SG::VarHandleBase::vhKey
SG::VarHandleKey & vhKey()
Return a non-const reference to the HandleKey.
Definition: StoreGate/src/VarHandleBase.cxx:616
extractSporadic.q
list q
Definition: extractSporadic.py:98
declareProperty
#define declareProperty(n, p, h)
Definition: BaseFakeBkgTool.cxx:15
LArWFParamTool::m_TINY
static const double m_TINY
Definition: LArWFParamTool.h:79
LArWFParamTool::m_DeltaTtail
std::vector< int > m_DeltaTtail
Definition: LArWFParamTool.h:115
CaloIdManager::getEM_SuperCell_ID
const LArEM_SuperCell_ID * getEM_SuperCell_ID(void) const
Definition: CaloIdManager.cxx:115
python.Bindings.keys
keys
Definition: Control/AthenaPython/python/Bindings.py:790
LArWFParamTool::logChi2InjRespRes
double logChi2InjRespRes(const double taur, const LArWave &gCali, const LArWFParams &wf, const waveRange_t &range) const
Definition: LArWFParamTool.cxx:757
drawFromPickle.sin
sin
Definition: drawFromPickle.py:36
LArWFParamTool::m_wHelper
LArWaveHelper m_wHelper
Definition: LArWFParamTool.h:96
python.IoTestsLib.w
def w
Definition: IoTestsLib.py:200
LArOnlineID_Base::channel_name
std::string channel_name(const HWIdentifier id) const
Return a string corresponding to a feedthrough name given an identifier.
Definition: LArOnlineID_Base.cxx:218
LArWFParamTool::m_NBaseline
unsigned int m_NBaseline
Definition: LArWFParamTool.h:108
LArWFParamTool::m_emId
const LArEM_Base_ID * m_emId
Definition: LArWFParamTool.h:93
length
double length(const pvec &v)
Definition: FPGATrackSimLLPDoubletHoughTransformTool.cxx:26
AthCommonDataStore::declareGaudiProperty
Gaudi::Details::PropertyBase & declareGaudiProperty(Gaudi::Property< T > &hndl, const SG::VarHandleKeyType &)
specialization for handling Gaudi::Property<SG::VarHandleKey>
Definition: AthCommonDataStore.h:156
LArWaveHelper::expfit
std::vector< double > expfit(const LArWave &theWave, unsigned iFirst, unsigned iLast, double &rho) const
Definition: LArWaveHelper.cxx:475
LArWFParamTool::LowStat
@ LowStat
Definition: LArWFParamTool.h:71
fitman.rho
rho
Definition: fitman.py:532
TSU::T
unsigned long long T
Definition: L1TopoDataTypes.h:35
fitman.k
k
Definition: fitman.py:528
DiTauMassTools::TauTypes::ll
@ ll
Definition: PhysicsAnalysis/TauID/DiTauMassTools/DiTauMassTools/HelperFunctions.h:49
LArWaveCumul::getTrigger
int getTrigger(unsigned i) const
trigger per time bin
Definition: LArWaveCumul.h:157
LArWFParamTool::RTM_Omega0
StatusCode RTM_Omega0(const LArWave &gCali, const HWIdentifier chid, LArWFParams &wfParams, const WaveTiming_t &wt, const LArOnOffIdMapping *cabling, std::optional< LArCaliWave > &omegaScan) const
Definition: LArWFParamTool.cxx:426
LArWFParamTool::cosResp
static LArWave cosResp(const LArWave &gCali, const double &fstep, const double &tcal, const double &omega)
Definition: LArWFParamTool.cxx:727