]> git.uio.no Git - u/mrichter/AliRoot.git/blob - HLT/trigger/AliHLTTriggerDetectorGeom.h
606eb8e7904ed60e71d495a5f198e6656a7e0df4
[u/mrichter/AliRoot.git] / HLT / trigger / AliHLTTriggerDetectorGeom.h
1 #ifndef ALIHLTTRIGGERDETECTORGEOM_H
2 #define ALIHLTTRIGGERDETECTORGEOM_H
3
4 //* This file is property of and copyright by the ALICE HLT Project        * 
5 //* ALICE Experiment at CERN, All rights reserved.                         *
6 //* See cxx source for full Copyright notice                               *
7
8 /// @file   AliHLTTriggerDetectorGeom.h
9 /// @author Oystein Djuvsland
10 /// @date   2009-10-08
11 /// @brief  HLT class describing simple geometry of (sub-)detectors.
12 ///         Used for the AliHLTTriggerBarrelGeomMultiplicity classes
13
14
15 #include "TString.h"
16 #include <ostream>
17 #include "TObject.h"
18 #include "TString.h"
19 #include <ostream>
20
21 /**
22  * @class  AliHLTTriggerDetectorGeom
23  * HLT class describing simple geometry cuts of (sub-)detectors.
24  * Used for the AliHLTTriggerBarrelGeomMultiplicity class
25  *
26  * \ingroup alihlt_trigger
27  */
28
29 class AliHLTTriggerDetectorGeom : public TObject
30 {
31 public: 
32   
33   /** Default constructor */
34   AliHLTTriggerDetectorGeom();   // Default constructor
35
36   /** Destructor */
37   virtual ~AliHLTTriggerDetectorGeom(); // Destructor
38
39   /**
40    * Set the minimum in eta
41    * @param etaMin is the minumum
42    */
43   void SetEtaMin(Double_t etaMin) { fEtaMin = etaMin; } // Set min in eta
44
45   /**
46    * Set the maximum in eta
47    * @param etaMax is the maxumum
48    */
49   void SetEtaMax(Double_t etaMax) { fEtaMax = etaMax; } // Set max in eta
50
51   /**
52    * Set the minimum in phi
53    * @param phiMin is the minumum
54    */
55   void SetPhiMin(Double_t phiMin) { fPhiMin = phiMin; } // Set min in phi
56
57   /**
58    * Set the maximum in phi
59    * @param phiMax is the maxumum
60    */
61   void SetPhiMax(Double_t phiMax) { fPhiMax = phiMax; } // Set max in phi
62
63   /** 
64    * Set the initial point describing the plane
65    * @param point is the point
66    */
67   void SetInitialPoint(Double_t *point); // Set initial point
68
69   /** 
70    * Set the vector describing the plane
71    * @param nVector is a the vector
72    */
73   void SetNormVector(Double_t *nVector); // Set normal vector
74
75   /**
76    * Set the name of the (sub-)detector
77    * @param name is the name
78    */
79   void SetDetName(TString &name) { fName = name; } // Set name
80
81   /** 
82    * Get the minimum in eta (should be moved...)
83    */
84   Double_t EtaMin() { return fEtaMin; }
85
86   /** 
87    * Get the maximum in eta (should be moved...)
88    */
89   Double_t EtaMax() { return fEtaMax; }
90
91   /** 
92    * Get the minimum in phi (should be moved...)
93    */
94   Double_t PhiMin() { return fPhiMin; }
95
96   /** 
97    * Get the maximum in phi (should be moved...)
98    */
99   Double_t PhiMax() { return fPhiMax; }
100
101   /** 
102    * Get the initial point
103    */
104   void GetInitialPoint(Double_t *point);
105
106   /**
107    * Get the normal vector
108    */
109   void GetNormVector(Double_t *vec);
110   
111   /** 
112    * Get the detector name
113    */
114   TString DetName() { return fName; }
115
116   /** 
117    * Print the geometry
118    */
119   void PrintDetectorGeom(std::ostream &out);
120
121   /** 
122    * Abstract method to check if a point is in the 
123    * acceptance of the geometry 
124    */
125   virtual Bool_t IsInDetector(Double_t point[3]) = 0;
126
127 protected:
128
129   /** The minimum in eta */
130   Double_t fEtaMin;   // The minimum in eta 
131
132   /** The maximum in eta */
133   Double_t fEtaMax;   // The maximum in eta 
134
135   /** The minimum in phi */
136   Double_t fPhiMin;   // The minimum in phi 
137
138   /** The maximum in phi */
139   Double_t fPhiMax;   // The maximum in phi 
140
141   /** Name of the (sub-)detector */
142   TString fName;      // Name of the (sub-)detector 
143   
144 private: 
145
146   /** 
147    * The point which together with a normal vector 
148    * defines the plane of the (sub-)detector
149    */
150   Double_t fInitalPoint[3]; // Point representing the plane
151
152   /** 
153    * The normal vector which together with a point
154    * defines the plane of the (sub-)detector
155    */
156   Double_t fNormVector[3]; // Normal vector representing the plane
157
158   ClassDef(AliHLTTriggerDetectorGeom, 1);
159
160 };
161
162 #endif