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

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

Parent Directory Parent Directory | Revision Log Revision Log | View Patch Patch

revision 1.2 by mocchiut, Thu Jan 11 16:08:01 2007 UTC revision 1.4 by mocchiut, Mon Mar 26 14:02:03 2007 UTC
# Line 7  Line 7 
7  //  //
8  // default position used only in CaloStrip for the moment  // default position used only in CaloStrip for the moment
9  //  //
10  #define CTX 121.1  //
11  #define CTY 122.6  // old param
12    //
13    //#define CTX 121.1
14    //#define CTY 122.6
15    //#define CTZ -263.1
16    //
17    // new param
18    //
19    #define CTX 121.2
20    #define CTY 122.9
21  #define CTZ -263.1  #define CTZ -263.1
22  //  //
23    // Mechanical positions (used with option --use-standard-alig)
24    //
25    #define MECHCTX 121.
26    #define MECHCTY 122.
27    #define MECHCTZ -261.81
28    //
29    // just for testing purpose
30    //
31    //#define MECHCTX 0.
32    //#define MECHCTY 0.
33    //#define MECHCTZ -263.1
34    //
35    #include <sstream>
36    #include <fstream>
37    #include <string.h>
38  #include <TObject.h>  #include <TObject.h>
39    #include <TMath.h>
40  #include <TClonesArray.h>  #include <TClonesArray.h>
41  #include <TArrayI.h>  #include <TArrayI.h>
42    #include <TSystem.h>
43    #include <GLTables.h>
44  //  //
45  extern "C" int millim_(Int_t *, Float_t *);  extern "C" int millim_(Int_t *, Float_t *);
46  struct shift {  struct shift {
# Line 50  class CaloLevel1 : public TObject { Line 77  class CaloLevel1 : public TObject {
77      //      //
78      void Clear();      void Clear();
79      //      //
80        Float_t GetXalig(){return CTX;}; ///< return X alignement paramenter
81        Float_t GetYalig(){return CTY;}; ///< return Y alignement paramenter
82        Float_t GetZalig(){return CTZ;}; ///< return Z alignement paramenter
83        //
84      CaloLevel1(); ///< Constructor.      CaloLevel1(); ///< Constructor.
85      //      //
86      ClassDef(CaloLevel1,1);      ClassDef(CaloLevel1,1);
# Line 62  class CaloLevel1 : public TObject { Line 93  class CaloLevel1 : public TObject {
93  class CaloStrip : public TObject {  class CaloStrip : public TObject {
94    
95  private:  private:
96      CaloLevel1 *c1;      CaloLevel1 *c1; //< pointer to level1 object
97      Float_t fE;      Float_t fE; //< energy in mip of the strip
98      Float_t fX;      Float_t fX; //< X position in cm of the strip
99      Float_t fY;      Float_t fY; //< Y position in cm of the strip
100      Float_t fZ;      Float_t fZ; //< Z position in cm of the strip
101      Int_t fView;      Int_t fView; ///< view [1-2]
102      Int_t fPlane;      Int_t fPlane; ///< plane [1-22]
103      Int_t fStrip;      Int_t fStrip; ///< strip [1-96]
104        Bool_t ismech; ///< true = using mechanical alignement, false using experimental alignement parameters
105        Float_t UXal; ///< used X alignement parameter
106        Float_t UYal; ///< used Y alignement parameter
107        Float_t UZal; ///< used Z alignement parameter
108    
109  public:  public:
110      //      //
# Line 80  public: Line 115  public:
115      //      //
116      CaloStrip(CaloLevel1 *c1); ///< Constructor.      CaloStrip(CaloLevel1 *c1); ///< Constructor.
117      //      //
118      Float_t GetE(){return fE;};      Float_t GetE(){return fE;}; ///< Get energy in MIP for setted strip
119        //
120        Float_t GetX(){return fX;}; ///< Get X strip position
121        Float_t GetY(){return fY;}; ///< Get Y strip position
122        Float_t GetZ(){return fZ;}; /// Get Z strip position
123        //
124        Float_t GetXalig(){ return UXal;}; ///< return X alignement paramenter
125        Float_t GetYalig(){ return UYal;}; ///< return Y alignement paramenter
126        Float_t GetZalig(){ return UZal;}; ///< return Z alignement paramenter
127        //
128        Int_t GetView(){printf(" Obsolete! Use CaloStrip class instead\n"); return (fView-1);}; ///< Get strip view [0-1]
129        Int_t GetPlane(){printf(" Obsolete! Use CaloStrip class instead\n");return (fPlane-1);}; ///< Get strip plane [0-22]
130        Int_t GetStrip(){printf(" Obsolete! Use CaloStrip class instead\n");return (fStrip-1);}; ///< Get strip number [0-95]
131        //
132        void Set(Int_t view, Int_t plane, Int_t strip); ///< Set strip giving view [0-1], plane [0-22] and number [0-95]
133      //      //
134      Float_t GetX(){return fX;};      void Set(Float_t X, Float_t Y, Float_t Z); ///< Set strip giving position in PAMELA ref sys [cm]
     Float_t GetY(){return fY;};  
     Float_t GetZ(){return fZ;};  
     //  
     Int_t GetView(){return (fView-1);};  
     Int_t GetPlane(){return (fPlane-1);};  
     Int_t GetStrip(){return (fStrip-1);};  
135      //      //
136      void Set(Int_t view, Int_t plane, Int_t strip);      void UseMechanicalAlig(){ ismech = true; UXal = MECHCTX; UYal = MECHCTY; UZal = MECHCTZ;}; ///< Tells CaloStrip to use mechanical alignement parameters
137      void Set(Float_t X, Float_t Y, Float_t Z);      void UseStandardAlig(); ///< Tells CaloStrip to use default parameters it will find querying the DB. If connection fails uses parameters hard-coded in this file
138        void SetAlig(Float_t XALIG, Float_t YALIG, Float_t ZALIG){ ismech = false; UXal = XALIG; UYal = YALIG; UZal = ZALIG;};///< User defined alignement parameters
139        Bool_t IsMechanicalAlig(){return ismech;}; ///< True is using mechanical alignement parameters, false otherwise
140      //      //
141      void Clear(); ///< clear variables      void Clear(); ///< clear variables
142      //      //
143      CaloStrip* GetCaloStrip(){return this;}; ///< returns pointer to this object      CaloStrip* GetCaloStrip(){return this;}; ///< returns pointer to this object
144      //      //
145      ClassDef(CaloStrip,1);      ClassDef(CaloStrip,2);
146      //      //
147  };  };
148    

Legend:
Removed from v.1.2  
changed lines
  Added in v.1.4

  ViewVC Help
Powered by ViewVC 1.1.23