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