Revision: | 1.2 |
Committed: | Wed Nov 25 00:14:52 2009 UTC (15 years, 5 months ago) by loizides |
Content type: | text/plain |
Branch: | MAIN |
CVS Tags: | Mit_032, Mit_031, Mit_025c_branch2, Mit_025c_branch1, Mit_030, Mit_029c, Mit_029b, Mit_030_pre1, Mit_029a, Mit_029, Mit_029_pre1, Mit_028a, Mit_025c_branch0, Mit_028, Mit_027a, Mit_027, Mit_026, Mit_025e, Mit_025d, Mit_025c, Mit_025b, Mit_025a, Mit_025, Mit_025pre2, Mit_024b, Mit_025pre1, Mit_024a, Mit_024, Mit_023, Mit_022a, Mit_022, Mit_020d, TMit_020d, Mit_020c, Mit_021, Mit_021pre2, Mit_021pre1, Mit_020b, Mit_020a, Mit_020, Mit_020pre1, Mit_018, Mit_017, Mit_017pre3, Mit_017pre2, Mit_017pre1, Mit_016, Mit_015b, Mit_015a, Mit_015, Mit_014e, Mit_014d, Mit_014c, Mit_014b, Mit_014a, Mit_014, Mit_014pre3, Mit_014pre2, Mit_014pre1, Mit_013d, Mit_013c, Mit_013b, Mit_013a, Mit_013, Mit_013pre1, Mit_012i, Mit_012h, Mit_012g, Mit_012f, Mit_012e, Mit_012d, Mit_012c, HEAD |
Branch point for: | Mit_025c_branch |
Changes since 1.1: | +4 -13 lines |
Log Message: | Added StripHit |
# | User | Rev | Content |
---|---|---|---|
1 | loizides | 1.1 | //-------------------------------------------------------------------------------------------------- |
2 | loizides | 1.2 | // $Id: StripHit.h,v 1.1 2009/11/24 23:05:12 loizides Exp $ |
3 | loizides | 1.1 | // |
4 | // StripHit | ||
5 | // | ||
6 | // StripHit class implemented as a point in space holding fit error and additional information. | ||
7 | // | ||
8 | // Authors: C.Loizides | ||
9 | //-------------------------------------------------------------------------------------------------- | ||
10 | |||
11 | #ifndef MITANA_DATATREE_PIXELHIT_H | ||
12 | #define MITANA_DATATREE_PIXELHIT_H | ||
13 | |||
14 | #include "MitCommon/DataFormats/interface/Vect3.h" | ||
15 | #include "MitAna/DataTree/interface/DataObject.h" | ||
16 | #include <TMath.h> | ||
17 | |||
18 | namespace mithep | ||
19 | { | ||
20 | class StripHit : public DataObject | ||
21 | { | ||
22 | public: | ||
23 | enum EType { | ||
24 | kUnknown=0, | ||
25 | kTIB, | ||
26 | kTOB, | ||
27 | kTID, | ||
28 | kTEC | ||
29 | }; | ||
30 | |||
31 | loizides | 1.2 | StripHit() : fType(0), fGeoType(0) {} |
32 | loizides | 1.1 | StripHit(Double_t x, Double_t y, Double_t z) : |
33 | loizides | 1.2 | fPosition(x,y,z), fType(0), fGeoType(0) {} |
34 | loizides | 1.1 | StripHit(const ThreeVector &pos) : |
35 | loizides | 1.2 | fPosition(pos), fType(0), fGeoType(0) {} |
36 | loizides | 1.1 | |
37 | Int_t GeoType() const { return fGeoType; } | ||
38 | EObjType ObjType() const { return kStripHit; } | ||
39 | const ThreeVector Position() const { return fPosition.V(); } | ||
40 | void SetGeoType(Int_t u) { fGeoType = u; } | ||
41 | void SetPosition(const ThreeVector &pos) { fPosition = pos; } | ||
42 | void SetPosition(Double_t x, Double_t y, Double_t z); | ||
43 | void SetType(Char_t t) { fType = t; } | ||
44 | EType Type() const | ||
45 | { return static_cast<EType>(fType); } | ||
46 | Double_t X() const { return fPosition.X(); } | ||
47 | Double_t Y() const { return fPosition.Y(); } | ||
48 | Double_t Z() const { return fPosition.Z(); } | ||
49 | |||
50 | protected: | ||
51 | Vect3 fPosition; //point in space | ||
52 | Char_t fType; //strip type | ||
53 | Int_t fGeoType; //geometrical characteristics (layer, disk, side) | ||
54 | |||
55 | ClassDef(StripHit, 1) // StripHit class | ||
56 | }; | ||
57 | } | ||
58 | |||
59 | //-------------------------------------------------------------------------------------------------- | ||
60 | inline void mithep::StripHit::SetPosition(Double_t x, Double_t y, Double_t z) | ||
61 | { | ||
62 | // Set pixel hit position. | ||
63 | |||
64 | fPosition.SetXYZ(x,y,z); | ||
65 | } | ||
66 | #endif |