ViewVC Help
View File | Revision Log | Show Annotations | Root Listing
root/cvsroot/UserCode/MitAna/DataTree/interface/PixelHit.h
Revision: 1.1
Committed: Fri Sep 25 08:39:10 2009 UTC (15 years, 7 months ago) by loizides
Content type: text/plain
Branch: MAIN
Log Message:
Added PixelHit

File Contents

# User Rev Content
1 loizides 1.1 //--------------------------------------------------------------------------------------------------
2     // $Id: PixelHit.h,v 1.9 2009/03/18 15:44:32 loizides Exp $
3     //
4     // PixelHit
5     //
6     // PixelHit 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    
17     namespace mithep
18     {
19     class PixelHit : public DataObject
20     {
21     public:
22     enum EType {
23     kUnknown=0,
24     kBLayer1=1,
25     kBLayer2=2,
26     kBLayer3=3,
27     kFNegDisk1=-11,
28     kFPosDisk1=+11,
29     kFNegDisk2=-12,
30     kFPosDisk2=+12
31     };
32    
33     PixelHit() : fType(0), fQuality(0), fCharge(0), fSize(0) {}
34     PixelHit(Double_t x, Double_t y, Double_t z) :
35     fPosition(x,y,z), fType(0), fQuality(0), fCharge(0), fSize(0) {}
36     PixelHit(const ThreeVector &pos) :
37     fPosition(pos), fType(0), fQuality(0), fCharge(0), fSize(0) {}
38    
39     const ThreeVector Position() const { return fPosition.V(); }
40     EObjType ObjType() const { return kPixelHit; }
41     void SetCharge(UInt_t u) { fCharge = u; }
42     void SetPosition(const ThreeVector &pos) { fPosition = pos; }
43     void SetPosition(Double_t x, Double_t y, Double_t z);
44     void SetQuality(UInt_t u) { fQuality = u; }
45     void SetType(Char_t t) { fType = t; }
46     void SetSize(UInt_t u) { fSize = u; }
47     Double_t X() const { return fPosition.X(); }
48     Double_t Y() const { return fPosition.Y(); }
49     Double_t Z() const { return fPosition.Z(); }
50    
51     protected:
52     Vect3 fPosition; //point in space
53     Char_t fType; //pixel type
54     UInt_t fQuality; //quality word as defined by SiPixelRecHitQuality
55     UInt_t fCharge; //charge of assigned cluster
56     UInt_t fSize; //size of assigned cluster
57    
58     ClassDef(PixelHit, 1) // PixelHit class
59     };
60     }
61    
62     //--------------------------------------------------------------------------------------------------
63     inline void mithep::PixelHit::SetPosition(Double_t x, Double_t y, Double_t z)
64     {
65     // Set pixel hit position.
66    
67     fPosition.SetXYZ(x,y,z);
68     }
69     #endif