GRUTinizer
 All Classes Namespaces Files Functions Variables Typedefs Enumerations Enumerator Friends Macros Pages
TPhosWall.h
Go to the documentation of this file.
1 #ifndef TPHOSWALL_H
2 #define TPHOSWALL_H
3 
4 #include "TClonesArray.h"
5 #include "TDetector.h"
6 #include "TGEBEvent.h"
7 #include "TPhosWallHit.h"
8 
9 #define MAXPIXEL 256
10 
11 class TPhosWall : public TDetector {
12 
13 public:
14  TPhosWall();
15  ~TPhosWall();
16 
17  virtual void Copy(TObject&) const;
18  virtual void Clear(Option_t *opt = "");
19  virtual void Print(Option_t *opt = "") const ;
20 
21  virtual void InsertHit(const TDetectorHit& hit);
22 
23 
24  int Size() const { return phoswall_hits->GetEntries(); }
25 
26  Int_t GetLargestNumber() const { return fLargestHit; }
28  TPhosWallHit &GetPhosWallHit(int i) const { return *(TPhosWallHit*)phoswall_hits->At(i); }
29  TDetectorHit &GetHit(int i) { return *(TDetectorHit*)phoswall_hits->At(i); }
30 
31  //void Draw(Option_t *opt="");
32  //void DrawXY(Option_t *opt="");
33 
34  //static TVector3 FindWallPosition(const Int_t &pixel) { if(pixel<0||pixel>256) return TDetector::fB; return fWallPositions[pixel]; }
35  //void FindWeightedPosition();
36  //void SetWeightedPosition(const TVector3 &temp) { fWeightedPosition = temp; }
37 
38  static TVector3 GetWallPosition(int pixelnumber,double delta=5.0);
39 
40  inline const Long_t GetTimeStamp() { return fTimeStamp; }
41 
42 private:
43  virtual int BuildHits();
44 
45  Long_t fTimeStamp;
46  Short_t fLargestHit;
48 
49  TClonesArray *phoswall_hits; //->
50 
51  static TVector3 *fWallPositions[257];
52  static bool fPositionsSet;
53  static void SetWallPositions();
54 
56 };
57 
58 #endif