]> git.uio.no Git - u/mrichter/AliRoot.git/blobdiff - ITS/AliITSAlignMille2Module.h
Added same task for ITS standalone tracks
[u/mrichter/AliRoot.git] / ITS / AliITSAlignMille2Module.h
index 39adb77c443c93955b047df9883cd439a420d913..3091166c7d37e55e29363774b8098fbf33b94bc8 100644 (file)
@@ -28,12 +28,12 @@ class AliITSAlignMille2Module : public TNamed
 { \r
 public: \r
   enum {kSPD,kSDD,kSSD};\r
-  enum {kMaxParGeom=6,kMaxParTot=8,kSensDefBit=0,kGlobalGeomBit=1};\r
+  enum {kMaxParGeom=6,kMaxParTot=8,kSensDefBit=BIT(14),kGlobalGeomBit=BIT(15),kNotInConfBit=BIT(16)};\r
   enum {kDOFTX,kDOFTY,kDOFTZ,kDOFPS,kDOFTH,kDOFPH,kDOFT0,kDOFDV};\r
   //\r
   AliITSAlignMille2Module(); \r
   AliITSAlignMille2Module(UShort_t volid);\r
-  AliITSAlignMille2Module(Int_t index, UShort_t volid, char* symname, TGeoHMatrix *m, Int_t nsv=0, UShort_t *volidsv=NULL);\r
+  AliITSAlignMille2Module(Int_t index, UShort_t volid, const char* symname, const TGeoHMatrix *m, Int_t nsv=0, const UShort_t *volidsv=NULL);\r
   AliITSAlignMille2Module(const AliITSAlignMille2Module& rhs); // copy constructor\r
   AliITSAlignMille2Module& operator=(const AliITSAlignMille2Module& rhs);  \r
   //\r
@@ -54,8 +54,9 @@ public:
   Float_t      GetSigmaZFactor()                      const {return fSigmaFactor[2];}\r
   Int_t        GetNProcessedPoints()                  const {return fNProcPoints;}\r
   Bool_t       IsFreeDOF(Int_t dof)                   const {return fParCstr[dof]>0;}\r
-  Bool_t       AreSensorsProvided()                   const {return TestBit(1<<(kSensDefBit+1));}\r
-  Bool_t       GeomParamsGlobal()                     const {return TestBit(1<<(kGlobalGeomBit+1));}\r
+  Bool_t       AreSensorsProvided()                   const {return TestBit(kSensDefBit);}\r
+  Bool_t       GeomParamsGlobal()                     const {return TestBit(kGlobalGeomBit);}\r
+  Bool_t       IsNotInConf()                          const {return TestBit(kNotInConfBit);}\r
   Bool_t       IsIn(UShort_t volid)                   const;\r
   Bool_t       IsAlignable()                          const;\r
   Bool_t       BelongsTo(AliITSAlignMille2Module* parent) const;\r
@@ -86,18 +87,19 @@ public:
   void         SetParVal(Int_t par,Double_t v=0)            {fParVals[par] = v;}\r
   void         SetParErr(Int_t par,Double_t e=0)            {fParErrs[par] = e;}\r
   void         SetParConstraint(Int_t par,Double_t s=1e6)   {fParCstr[par] = s>0. ? s:0.0;}\r
-  void         SetSigmaFactor(Int_t i,Float_t v)            {fSigmaFactor[i]=v;}\r
-  void         SetSigmaXFactor(Float_t v)                   {fSigmaFactor[0]=v;}\r
-  void         SetSigmaYFactor(Float_t v)                   {fSigmaFactor[1]=v;}\r
-  void         SetSigmaZFactor(Float_t v)                   {fSigmaFactor[2]=v;}\r
+  void         SetSigmaFactor(Int_t i,Float_t v)            {fSigmaFactor[i]=TMath::Max(0.001F,v);}\r
+  void         SetSigmaXFactor(Float_t v)                   {SetSigmaFactor(0,v);}\r
+  void         SetSigmaYFactor(Float_t v)                   {SetSigmaFactor(1,v);}\r
+  void         SetSigmaZFactor(Float_t v)                   {SetSigmaFactor(2,v);}\r
   void         IncNProcessedPoints(Int_t step=1)            {fNProcPoints += step;}\r
   void         SetNProcessedPoints(Int_t v)                 {fNProcPoints = v;}\r
   void         SetParent(AliITSAlignMille2Module* par)      {fParent = par;}\r
   void         AddChild(AliITSAlignMille2Module* cld)       {fChildren.Add(cld);}\r
   void         SetFreeDOF(Int_t dof,Double_t cstr);\r
-  void         SetSensorsProvided(Bool_t v=kTRUE)           {SetBit(1<<(kSensDefBit+1),v);}\r
-  void         SetGeomParamsGlobal(Bool_t v=kTRUE)          {SetBit(1<<(kGlobalGeomBit+1),v);}\r
-  Int_t        Set(Int_t index,UShort_t volid,char* symname,TGeoHMatrix *m,Int_t nsv=0,UShort_t *volidsv=0);\r
+  void         SetSensorsProvided(Bool_t v=kTRUE)           {SetBit(kSensDefBit,v);}\r
+  void         SetGeomParamsGlobal(Bool_t v=kTRUE)          {SetBit(kGlobalGeomBit,v);}\r
+  void         SetNotInConf(Bool_t v=kTRUE)                 {SetBit(kNotInConfBit,v);}\r
+  Int_t        Set(Int_t index,UShort_t volid, const char* symname, const TGeoHMatrix *m,Int_t nsv=0, const UShort_t *volidsv=0);\r
   //\r
   void         AddSensitiveVolume(UShort_t volid);\r
   void         DelSensitiveVolume(Int_t at);\r
@@ -125,6 +127,7 @@ public:
   void         CalcDerivGloLoc(Int_t idx,Double_t *deriv);\r
   void         CalcDerivGloLoc(Int_t sensVol,Int_t paridx,Double_t* derivative);\r
   void         CalcDerivCurLoc(Int_t sensVol,Int_t paridx,Double_t* derivative);\r
+  void         CalcDerivDPosDPar(Int_t sensVol,const Double_t *pl,Double_t *deriv);\r
   //\r
   // forse non serve...\r
   AliAlignObjParams *GetSensitiveVolumeGlobalMisalignment(UShort_t voluid, Double_t *deltalocal); \r
@@ -135,12 +138,13 @@ public:
   static UShort_t GetVolumeIDFromSymname(const Char_t *symname);\r
   static UShort_t GetVolumeIDFromIndex(Int_t index);\r
   static Bool_t   IsSensor(UShort_t vid);\r
+  static Int_t    SensVolMatrix(UShort_t volid, TGeoHMatrix *m); \r
+  static Int_t    SensVolOrigGlobalMatrix(UShort_t volid, TGeoHMatrix *m); \r
+\r
   //\r
 protected:\r
   //\r
   void         AssignDetType();\r
-  Int_t        SensVolMatrix(UShort_t volid, TGeoHMatrix *m); \r
-  Int_t        SensVolOrigGlobalMatrix(UShort_t volid, TGeoHMatrix *m); \r
   //\r
 protected:\r
   //\r