]> git.uio.no Git - u/mrichter/AliRoot.git/blob - ITS/AliITSMisalignMaker.h
moved component registration to agent; added component configuration/initialization...
[u/mrichter/AliRoot.git] / ITS / AliITSMisalignMaker.h
1 #ifndef ALIITSMISALIGNMAKER_H
2 #define ALIITSMISALIGNMAKER_H
3 /* Copyright(c) 1998-2007, ALICE Experiment at CERN, All rights reserved. *
4  * See cxx source for full Copyright notice                               */
5
6 /* $Id$  */
7 //------------------------------------------------------------------------
8 //
9 // This class is a helper, producing ITS aligmnent objects.
10 // It provides also some useful functions
11 // See the parameters of the misalignment at the end of this script.
12 //
13 // Main author: L. Gaudichet
14 // Contact: andrea.dainese@lnl.infn.it
15 //
16 //------------------------------------------------------------------------
17
18 #include <TRandom3.h>
19 #include <TString.h>
20 #include <TClonesArray.h>
21
22
23 //-------------------------------------------------------------------------
24 class AliITSMisalignMaker : public TObject {
25   
26 public:
27   AliITSMisalignMaker();
28   
29   ~AliITSMisalignMaker() {};
30   
31   TClonesArray* GetArray() {return &fAlobj;}
32
33   void  SetSeed(Int_t seed) {fRnd.SetSeed(seed); return;}
34   
35   Int_t AddAlignObj(char* name,Double_t dx,Double_t dy,Double_t dz,
36                     Double_t dpsi,Double_t dtheta,Double_t dphi,
37                     Bool_t unif);
38
39   Int_t AddAlignObj(Int_t lay,Double_t dx,Double_t dy,Double_t dz,
40                     Double_t dpsi,Double_t dtheta,Double_t dphi,
41                     Bool_t unif);
42
43   Int_t AddAlignObj(Int_t lay,Int_t ladd,Double_t dx,Double_t dy,Double_t dz,
44                     Double_t dpsi,Double_t dtheta,Double_t dphi,
45                     Bool_t unif);
46
47   Int_t AddSectorAlignObj(Int_t sectMin,Int_t sectMax,
48                           Double_t dx,Double_t dy,Double_t dz,
49                           Double_t dpsi,Double_t dtheta,Double_t dphi,
50                           Double_t xShift,Double_t yShift,Double_t zShift,
51                           Double_t psiShift,Double_t thetaShift,Double_t phiShift,
52                           Bool_t unif);
53
54   TString  GetSymbName(Int_t layer) const;
55   TString  GetSymbName(Int_t layer,Int_t ladd) const;
56   TString  GetHalfStaveLadderSymbName(Int_t layer,Int_t ladd,Int_t halfStave) const;
57   //TString  GetSymbName(Int_t layer,Int_t ladd,Int_t mod) const;
58   Double_t GaussCut(Double_t mean,Double_t sigma,Double_t cutn);
59   
60   static Int_t GetNLayers()             {return kNLayers;}
61   static Int_t GetNLadders(Int_t lay)   {return fgkNLadders[lay];}
62   static Int_t GetNDetectors(Int_t lay) {return fgkNDetectors[lay];}
63
64 protected:
65   TRandom3     fRnd; // TRandom object
66   Int_t        fInd; // index of current AliAlignObjParams in fAlobj
67   TClonesArray fAlobj; // array of AliAlignObjParams
68   TString      fStrSPD; // name of SPD
69   TString      fStrSDD; // name of SDD
70   TString      fStrSSD; // name of SSD
71   TString      fStrStave; // name of SPD stave
72   TString      fStrHalfStave; // name of SPD half-stave
73   TString      fStrLadder; // name of SPD ladder
74   TString      fStrSector; // name of SPD sector
75   TString      fStrSensor; // name of sensitive volume
76
77 private:
78   enum {kNLayers = 6}; // The number of layers.
79   static const Int_t  fgkNLadders[kNLayers];  // Array of the number of ladders/layer(layer)
80   static const Int_t  fgkNDetectors[kNLayers];// Array of the number of detector/ladder(layer)
81
82   ClassDef(AliITSMisalignMaker,1)   //ITS Misalign Maker
83 };
84
85
86 #endif
87