ATLAS Offline Software
TilePulseShape.h
Go to the documentation of this file.
1 /*
2  Copyright (C) 2002-2022 CERN for the benefit of the ATLAS collaboration
3 */
4 
5 #ifndef TILEPULSESIMULATOR_TILEPULSESHAPE_H
6 #define TILEPULSESIMULATOR_TILEPULSESHAPE_H
7 
9 #include "TString.h"
10 #include <vector>
11 
12 class TF1;
13 class TGraph;
14 class TSpline;
15 class IMessageSvc;
16 
17 class TilePulseShape : public AthMessaging {
18  public:
19  TilePulseShape(IMessageSvc* msgSvc, const std::string& name);
20  TilePulseShape(IMessageSvc* msgSvc, const std::string& name, const TString& fileName);
21  TilePulseShape(IMessageSvc* msgSvc, const std::string& name, const std::vector<double>& shapevec);
22  virtual ~TilePulseShape();
23  void loadPulseShape(const TString& fileName);
24  void setPulseShape(const std::vector<double>& shapevec);
25 
26  //=== access to the underlying graph
27  TGraph* getGraph(double t0=0., double ped=0., double amp=1.);
28  double eval(double x, bool useSpline=true, bool useUndershoot=false);
29 
30  //=== modify the pulseshape
31  void resetDeformation();
32  int scalePulse(double leftSF=1., double rightSF=1.);
33 
34  private:
35  TGraph* m_pulseShape{nullptr};
36  TGraph* m_deformedShape{nullptr};
37  TSpline* m_deformedSpline{nullptr};
38 };
39 
40 #endif // TILEPULSESIMULATOR_TILEPULSESHAPE_H
TilePulseShape::getGraph
TGraph * getGraph(double t0=0., double ped=0., double amp=1.)
Definition: TilePulseShape.cxx:165
TilePulseShape::eval
double eval(double x, bool useSpline=true, bool useUndershoot=false)
Definition: TilePulseShape.cxx:75
ALFA_EventTPCnv_Dict::t0
std::vector< ALFA_RawData_p1 > t0
Definition: ALFA_EventTPCnvDict.h:42
TilePulseShape
Definition: TilePulseShape.h:17
x
#define x
TilePulseShape::TilePulseShape
TilePulseShape(IMessageSvc *msgSvc, const std::string &name)
Definition: TilePulseShape.cxx:19
TilePulseShape::m_deformedSpline
TSpline * m_deformedSpline
Definition: TilePulseShape.h:37
FortranAlgorithmOptions.fileName
fileName
Definition: FortranAlgorithmOptions.py:13
StdJOSetup.msgSvc
msgSvc
Provide convenience handles for various services.
Definition: StdJOSetup.py:36
TilePulseShape::loadPulseShape
void loadPulseShape(const TString &fileName)
Definition: TilePulseShape.cxx:47
AthMessaging
Class to provide easy MsgStream access and capabilities.
Definition: AthMessaging.h:55
TilePulseShape::scalePulse
int scalePulse(double leftSF=1., double rightSF=1.)
Definition: TilePulseShape.cxx:138
name
std::string name
Definition: Control/AthContainers/Root/debug.cxx:195
TilePulseShape::~TilePulseShape
virtual ~TilePulseShape()
Definition: TilePulseShape.cxx:39
Example_ReadSampleNoise.ped
ped
Definition: Example_ReadSampleNoise.py:45
TilePulseShape::resetDeformation
void resetDeformation()
Definition: TilePulseShape.cxx:126
AthMessaging.h
TilePulseShape::m_deformedShape
TGraph * m_deformedShape
Definition: TilePulseShape.h:36
TilePulseShape::m_pulseShape
TGraph * m_pulseShape
Definition: TilePulseShape.h:35
TilePulseShape::setPulseShape
void setPulseShape(const std::vector< double > &shapevec)
Definition: TilePulseShape.cxx:60