1 |
konec |
1.1 |
#ifndef HitSpecObj_H
|
2 |
|
|
#define HitSpecObj_H
|
3 |
|
|
#include "TObject.h"
|
4 |
|
|
|
5 |
|
|
#include "DataFormats/GeometryVector/interface/GlobalPoint.h"
|
6 |
|
|
#include "DataFormats/GeometryVector/interface/GlobalVector.h"
|
7 |
|
|
|
8 |
|
|
class HitSpecObj : public TObject {
|
9 |
|
|
|
10 |
|
|
public:
|
11 |
|
|
HitSpecObj( unsigned int id=0,
|
12 |
|
|
const GlobalPoint &pos = GlobalPoint(),
|
13 |
|
|
const GlobalVector &mom = GlobalVector())
|
14 |
|
|
: theRawId(id),
|
15 |
|
|
pos_x(pos.x()), pos_y(pos.y()),pos_z(pos.z()),
|
16 |
|
|
mom_x(mom.x()), mom_y(mom.y()),mom_z(mom.z()) {}
|
17 |
|
|
|
18 |
|
|
unsigned int rawId() const { return theRawId; }
|
19 |
|
|
GlobalPoint position() const { return GlobalPoint(pos_x,pos_y,pos_z); }
|
20 |
|
|
GlobalVector momentum() const { return GlobalVector(mom_x, mom_y, mom_z); }
|
21 |
|
|
|
22 |
|
|
private:
|
23 |
|
|
unsigned int theRawId;
|
24 |
|
|
double pos_x, pos_y, pos_z;
|
25 |
|
|
double mom_x, mom_y, mom_z;
|
26 |
|
|
|
27 |
|
|
friend std::ostream & operator << (std::ostream &out, const HitSpecObj&o) {
|
28 |
|
|
out <<" HitSpec DET: "<<o.theRawId<<", GlbPos: "<<o.position()<<", GlbMom: "<<o.momentum();
|
29 |
|
|
return out;
|
30 |
|
|
}
|
31 |
|
|
|
32 |
|
|
|
33 |
|
|
ClassDef(HitSpecObj,1)
|
34 |
|
|
};
|
35 |
|
|
#endif
|