MarlinTPC  1.2.0
TPCDistortionMeasurement.h
1 /*
2  * TPCDistortionMeasurement.h
3  *
4  * Created on: Apr 2, 2014
5  * Author: zenker
6  */
7 #ifndef TPCDistortionMeasurement_h
8 #define TPCDistortionMeasurement_h 1
9 
10 //C++
11 #include "iostream"
12 #include "string"
13 
14 // CLHEP
15 #include <CLHEP/Vector/TwoVector.h>
16 
17 //LCIO
18 #include "lcio.h"
19 #include "EVENT/LCGenericObject.h"
20 #include "IMPL/LCGenericObjectImpl.h"
21 
22 namespace tpcconddata {
23 
24  class TPCDistortionMeasurement;
25 
35  class TPCDistortionMeasurement: public EVENT::LCGenericObject {
36 
37  public:
38 
45  TPCDistortionMeasurement(CLHEP::Hep3Vector* truePosition, CLHEP::Hep3Vector* reconstructedPosition, int dot_id);
48  TPCDistortionMeasurement(EVENT::LCObject* obj);
49 
52  virtual ~TPCDistortionMeasurement();
53  CLHEP::Hep3Vector getTruePosition() const;
54  CLHEP::Hep3Vector getReconstructedPosition() const;
55 
56  int getDotID() const;
57 
58  static std::string getRevision();
59  static std::string getDefaultColName();
60 
61  IMPL::LCGenericObjectImpl* obj() const {
62  return _myObj;
63  }
64  virtual int id() const {
65  return _myObj->id();
66  }
67 
68  void print(std::ostream& os = std::cout) const;
69 
70  // -------- need to implement abstract methods from LCGenericObject
71  virtual const std::string getTypeName() const {
72  return std::string("TPCDistortionMeasurement");
73  }
74 
75  virtual const std::string getDataDescription() const {
76  return std::string("d:trueX,trueY,trueZ,recoX,recoY,recoZ");
77  }
78 
79  // the other functions inherited from LCGenericObject
80  // just pass them to the implementation
81  virtual int getNInt() const {
82  return _myObj->getNInt();
83  }
84  virtual int getNFloat() const {
85  return _myObj->getNFloat();
86  }
87  virtual int getNDouble() const {
88  return _myObj->getNDouble();
89  }
90 
91  virtual int getIntVal(int i) const {
92  return _myObj->getIntVal(i);
93  }
94  virtual float getFloatVal(int i) const {
95  return _myObj->getFloatVal(i);
96  }
97  virtual double getDoubleVal(int i) const {
98  return _myObj->getDoubleVal(i);
99  }
100 
101  virtual bool isFixedSize() const {
102  return _myObj->isFixedSize();
103  }
104 
105 
106  protected:
107  bool _createObj;
108  IMPL::LCGenericObjectImpl* _myObj;
109 
110  };
111 
112 std::ostream &operator<<(std::ostream &os, const TPCDistortionMeasurement &acm);
113 }
114 #endif /* TPCDistortionMeasurement_H_ */
TPCDistortionMeasurement(CLHEP::Hep3Vector *truePosition, CLHEP::Hep3Vector *reconstructedPosition, int dot_id)
The constructor with all the member functions given.
Definition: TPCDistortionMeasurement.cc:15
virtual ~TPCDistortionMeasurement()
The desctructor.
Definition: TPCDistortionMeasurement.cc:53
class to store the distortions measured with the photoelectric system using a laser.
Definition: TPCDistortionMeasurement.h:35