1 |
loizides |
1.1 |
//--------------------------------------------------------------------------------------------------
|
2 |
|
|
// $Id: StripHit.h,v 1.4 2009/11/17 21:14:33 loizides Exp $
|
3 |
|
|
//
|
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 |
|
|
StripHit() : fType(0), fGeoType(0), fCharge(0), fSizeX(0), fSizeY(0) {}
|
32 |
|
|
StripHit(Double_t x, Double_t y, Double_t z) :
|
33 |
|
|
fPosition(x,y,z), fType(0), fGeoType(0), fCharge(0), fSizeX(0), fSizeY(0) {}
|
34 |
|
|
StripHit(const ThreeVector &pos) :
|
35 |
|
|
fPosition(pos), fType(0), fGeoType(0), fCharge(0), fSizeX(0), fSizeY(0) {}
|
36 |
|
|
|
37 |
|
|
UInt_t Charge() const { return fCharge; }
|
38 |
|
|
Int_t GeoType() const { return fGeoType; }
|
39 |
|
|
EObjType ObjType() const { return kStripHit; }
|
40 |
|
|
const ThreeVector Position() const { return fPosition.V(); }
|
41 |
|
|
void SetCharge(UInt_t u) { fCharge = u; }
|
42 |
|
|
void SetGeoType(Int_t u) { fGeoType = u; }
|
43 |
|
|
void SetPosition(const ThreeVector &pos) { fPosition = pos; }
|
44 |
|
|
void SetPosition(Double_t x, Double_t y, Double_t z);
|
45 |
|
|
void SetSizeX(UInt_t u) { fSizeX = u; }
|
46 |
|
|
void SetSizeY(UInt_t u) { fSizeY = u; }
|
47 |
|
|
void SetType(Char_t t) { fType = t; }
|
48 |
|
|
UInt_t SizeX() const { return fSizeX; }
|
49 |
|
|
UInt_t SizeY() const { return fSizeY; }
|
50 |
|
|
EType Type() const
|
51 |
|
|
{ return static_cast<EType>(fType); }
|
52 |
|
|
Double_t X() const { return fPosition.X(); }
|
53 |
|
|
Double_t Y() const { return fPosition.Y(); }
|
54 |
|
|
Double_t Z() const { return fPosition.Z(); }
|
55 |
|
|
|
56 |
|
|
protected:
|
57 |
|
|
Vect3 fPosition; //point in space
|
58 |
|
|
Char_t fType; //strip type
|
59 |
|
|
Int_t fGeoType; //geometrical characteristics (layer, disk, side)
|
60 |
|
|
UInt_t fCharge; //charge of assigned cluster
|
61 |
|
|
UInt_t fSizeX; //size in local x of assigned cluster
|
62 |
|
|
UInt_t fSizeY; //size in local y of assigned cluster
|
63 |
|
|
|
64 |
|
|
ClassDef(StripHit, 1) // StripHit class
|
65 |
|
|
};
|
66 |
|
|
}
|
67 |
|
|
|
68 |
|
|
//--------------------------------------------------------------------------------------------------
|
69 |
|
|
inline void mithep::StripHit::SetPosition(Double_t x, Double_t y, Double_t z)
|
70 |
|
|
{
|
71 |
|
|
// Set pixel hit position.
|
72 |
|
|
|
73 |
|
|
fPosition.SetXYZ(x,y,z);
|
74 |
|
|
}
|
75 |
|
|
#endif
|