| 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 | CaloLevel1(); ///< Constructor. | 
| 54 | // | 
| 55 | ClassDef(CaloLevel1,1); | 
| 56 | }; | 
| 57 |  | 
| 58 | /** | 
| 59 | * \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 | 
| 60 | * | 
| 61 | */ | 
| 62 | class CaloStrip : public TObject { | 
| 63 |  | 
| 64 | private: | 
| 65 | CaloLevel1 *c1; | 
| 66 | Float_t fE; | 
| 67 | Float_t fX; | 
| 68 | Float_t fY; | 
| 69 | Float_t fZ; | 
| 70 | Int_t fView; | 
| 71 | Int_t fPlane; | 
| 72 | Int_t fStrip; | 
| 73 |  | 
| 74 | public: | 
| 75 | // | 
| 76 | // METHODS | 
| 77 | // | 
| 78 | // | 
| 79 | CaloStrip(); ///< Default Constructor. | 
| 80 | // | 
| 81 | CaloStrip(CaloLevel1 *c1); ///< Constructor. | 
| 82 | // | 
| 83 | Float_t GetE(){return fE;}; | 
| 84 | // | 
| 85 | Float_t GetX(){return fX;}; | 
| 86 | Float_t GetY(){return fY;}; | 
| 87 | Float_t GetZ(){return fZ;}; | 
| 88 | // | 
| 89 | Int_t GetView(){return (fView-1);}; | 
| 90 | Int_t GetPlane(){return (fPlane-1);}; | 
| 91 | Int_t GetStrip(){return (fStrip-1);}; | 
| 92 | // | 
| 93 | void Set(Int_t view, Int_t plane, Int_t strip); | 
| 94 | void Set(Float_t X, Float_t Y, Float_t Z); | 
| 95 | // | 
| 96 | void Clear(); ///< clear variables | 
| 97 | // | 
| 98 | CaloStrip* GetCaloStrip(){return this;}; ///< returns pointer to this object | 
| 99 | // | 
| 100 | ClassDef(CaloStrip,1); | 
| 101 | // | 
| 102 | }; | 
| 103 |  | 
| 104 | #endif |