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 */
7 //------------------------------------------------------------------------
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.
13 // Main author: L. Gaudichet
14 // Contact: andrea.dainese@lnl.infn.it
16 //------------------------------------------------------------------------
20 #include <TClonesArray.h>
23 //-------------------------------------------------------------------------
24 class AliITSMisalignMaker : public TObject {
27 AliITSMisalignMaker();
29 ~AliITSMisalignMaker() {};
31 TClonesArray* GetArray() {return &fAlobj;}
33 void SetSeed(Int_t seed) {fRnd.SetSeed(seed); return;}
35 Double_t GetUnif(Double_t x1,Double_t x2) {return fRnd.Uniform(x1,x2);}
37 Int_t AddAlignObj(char* name,Double_t dx,Double_t dy,Double_t dz,
38 Double_t dpsi,Double_t dtheta,Double_t dphi,
41 Int_t AddAlignObj(Int_t lay,Double_t dx,Double_t dy,Double_t dz,
42 Double_t dpsi,Double_t dtheta,Double_t dphi,
45 Int_t AddAlignObj(Int_t lay,Int_t ladd,Double_t dx,Double_t dy,Double_t dz,
46 Double_t dpsi,Double_t dtheta,Double_t dphi,
47 Double_t xShift,Double_t yShift,Double_t zShift,
48 Double_t psiShift,Double_t thetaShift,Double_t phiShift,
51 Int_t AddSectorAlignObj(Int_t sectMin,Int_t sectMax,
52 Double_t dx,Double_t dy,Double_t dz,
53 Double_t dpsi,Double_t dtheta,Double_t dphi,
54 Double_t xShift,Double_t yShift,Double_t zShift,
55 Double_t psiShift,Double_t thetaShift,Double_t phiShift,
58 const char* GetSymbName(Int_t layer) const;
59 const char* GetSymbName(Int_t layer,Int_t ladd) const;
60 const char* GetSymbName(Int_t layer,Int_t ladd,Int_t mod) const;
61 const char* GetHalfStaveLadderSymbName(Int_t layer,Int_t ladd,Int_t halfStave) const;
62 Double_t GaussCut(Double_t mean,Double_t sigma,Double_t cutn);
63 static const char* GetParentSymName(const char* symname) ;
64 // const char* GetSistersSymName(const char* symname) const;
65 static Bool_t GetLayerAndLevel(const char* symname, Int_t &layer, Int_t &level);
67 static Int_t GetNLayers() {return kNLayers;}
68 static Int_t GetNLadders(Int_t lay) {return fgkNLadders[lay];}
69 static Int_t GetNDetectors(Int_t lay) {return fgkNDetectors[lay];}
70 static Int_t GetNSisters(const char* symname);
71 static Int_t GetNDaughters(const char* symname);
74 TRandom3 fRnd; // TRandom object
75 Int_t fInd; // index of current AliAlignObjParams in fAlobj
76 TClonesArray fAlobj; // array of AliAlignObjParams
77 TString fStrSPD; // name of SPD
78 TString fStrSDD; // name of SDD
79 TString fStrSSD; // name of SSD
80 TString fStrStave; // name of SPD stave
81 TString fStrHalfStave; // name of SPD half-stave
82 TString fStrLadder; // name of SPD ladder
83 TString fStrSector; // name of SPD sector
84 TString fStrSensor; // name of sensitive volume
87 enum {kNLayers = 6}; // The number of layers.
88 static const Int_t fgkNLadders[kNLayers]; // Array of the number of ladders/layer(layer)
89 static const Int_t fgkNDetectors[kNLayers];// Array of the number of detector/ladder(layer)
91 ClassDef(AliITSMisalignMaker,1) //ITS Misalign Maker