/[PAMELA software]/DarthVader/CalorimeterLevel2/inc/CaloLevel1.h
ViewVC logotype

Contents of /DarthVader/CalorimeterLevel2/inc/CaloLevel1.h

Parent Directory Parent Directory | Revision Log Revision Log


Revision 1.3 - (show annotations) (download)
Tue Mar 20 13:15:38 2007 UTC (17 years, 8 months ago) by mocchiut
Branch: MAIN
Changes since 1.2: +4 -0 lines
File MIME type: text/plain
Added methods to retrieve alignement parameters

1 /**
2 * \file inc/CaloLevel1.h
3 * \author Emiliano Mocchiutti
4 */
5 #ifndef CaloLevel1_h
6 #define CaloLevel1_h
7 //
8 // default position used only in CaloStrip for the moment
9 //
10 #define CTX 121.1
11 #define CTY 122.6
12 #define CTZ -263.1
13 //
14 #include <TObject.h>
15 #include <TClonesArray.h>
16 #include <TArrayI.h>
17 //
18 extern "C" int millim_(Int_t *, Float_t *);
19 struct shift {
20 Float_t shift;
21 };
22 //
23
24 /**
25 * \brief Calorimeter level1 class
26 *
27 * This class contains level1 calorimeter variables
28 *
29 **/
30 class CaloLevel1 : public TObject {
31
32 private:
33
34 public:
35 //
36 Int_t istrip; ///< total number of strip hit
37 //
38 // Number of strip with energy > emip and their value coded with view plane and strip number:
39 // view x[y] plane PP strip SS with energy mmmm.iip = +[-] ( PP*10^6 + SS*10^4 + mmmm.iip )
40 //
41 TArrayI estrip; ///< MIP values for each strip with energy > emin coded with view plane and strip number. NOTICE: precision is limited to the 5 most significative ciphers
42 //
43 CaloLevel1* GetCaloLevel1(){return this;}; ///< returns pointer to this object
44 //
45 //
46 Float_t GetEstrip(Int_t view, Int_t plane, Int_t strip); ///< returns saved MIP value for the indicated strip.
47 Float_t DecodeEstrip(Int_t entry, Int_t &view, Int_t &plane, Int_t &strip); ///< returns saved MIP value for the entry number "entry" of the TArrayI.
48 Float_t qtotpl(Int_t nplane); ///< Returns energy released on plane nplane (where 0<= nplane <= 43, 0 = 1Y, 1 = 1X, 2 = 2Y, 3 = 2X, etc. etc.).
49 Float_t qtotpl(Int_t view, Int_t plane); ///< Returns energy released on view "view" (0 = X, 1 = Y) and plane "plane" ( 0 <= plane <= 21 ).
50 //
51 void Clear();
52 //
53 Float_t GetXalig(){return CTX;}; ///< return X alignement paramenter
54 Float_t GetYalig(){return CTY;}; ///< return Y alignement paramenter
55 Float_t GetZalig(){return CTZ;}; ///< return Z alignement paramenter
56 //
57 CaloLevel1(); ///< Constructor.
58 //
59 ClassDef(CaloLevel1,1);
60 };
61
62 /**
63 * \brief Calorimeter strip class, needed to perform operation on a strip level, for example to retrieve the position of the strips or to retrieve the closest strip to a cerain position
64 *
65 */
66 class CaloStrip : public TObject {
67
68 private:
69 CaloLevel1 *c1;
70 Float_t fE;
71 Float_t fX;
72 Float_t fY;
73 Float_t fZ;
74 Int_t fView;
75 Int_t fPlane;
76 Int_t fStrip;
77
78 public:
79 //
80 // METHODS
81 //
82 //
83 CaloStrip(); ///< Default Constructor.
84 //
85 CaloStrip(CaloLevel1 *c1); ///< Constructor.
86 //
87 Float_t GetE(){return fE;};
88 //
89 Float_t GetX(){return fX;};
90 Float_t GetY(){return fY;};
91 Float_t GetZ(){return fZ;};
92 //
93 Int_t GetView(){return (fView-1);};
94 Int_t GetPlane(){return (fPlane-1);};
95 Int_t GetStrip(){return (fStrip-1);};
96 //
97 void Set(Int_t view, Int_t plane, Int_t strip);
98 void Set(Float_t X, Float_t Y, Float_t Z);
99 //
100 void Clear(); ///< clear variables
101 //
102 CaloStrip* GetCaloStrip(){return this;}; ///< returns pointer to this object
103 //
104 ClassDef(CaloStrip,1);
105 //
106 };
107
108 #endif

  ViewVC Help
Powered by ViewVC 1.1.23