store also difference in local Y
[u/mrichter/AliRoot.git] / ITS / AliITSAlignMille2Constraint.cxx
CommitLineData
6526a72c 1/*-----------------------------------------------------------------------------------------
2Simple constraint on the subunits of the module ID (if ID>=0) or all modules w/o
3parents (ID=-1): the mean or median of the GLOBAL corrections of each parameter requested
4in the pattern must be = 0. When added explicitly to the fit it requires addition of
5Lagrange multipliers which may require more powerfull matrix preconditioners. For this
6reason we usually ommit the constrain from explicit fit and apply it afterwards to obtained
7parameters (with median constraint this is the only method possible)
8
9Author: ruben.shahoyan@cern.ch
10------------------------------------------------------------------------------------------*/
11#include "AliITSAlignMille2Constraint.h"
12#include "AliITSAlignMille2Module.h"
13
14
15
16ClassImp(AliITSAlignMille2Constraint)
17
18//________________________________________________________________________________________________________
19AliITSAlignMille2Constraint::AliITSAlignMille2Constraint() :
20TNamed(),
21fType(kTypeMean),
22fVal(0),
23fModuleID(0),
ef24eb3b 24fApplied(0),
25fPattern(0)
6526a72c 26{}
27
28//________________________________________________________________________________________________________
29AliITSAlignMille2Constraint::AliITSAlignMille2Constraint(const Char_t* name,Int_t t,Int_t mdID,Double_t val,UInt_t pattern) :
30TNamed(name,""),
31fType(t),
32fVal(val),
33fModuleID(mdID),
ef24eb3b 34fApplied(0),
35fPattern(pattern)
6526a72c 36{
6526a72c 37}
38
39//________________________________________________________________________________________________________
40AliITSAlignMille2Constraint::AliITSAlignMille2Constraint(const AliITSAlignMille2Constraint& src) :
41TNamed(src),
42fType(src.fType),
43fVal(src.fVal),
44fModuleID(src.fModuleID),
ef24eb3b 45fApplied(src.fApplied),
46fPattern(src.fPattern)
6526a72c 47{/* DUMMY */}
48
49//________________________________________________________________________________________________________
45993b23 50Bool_t AliITSAlignMille2Constraint::IncludesModPar(const AliITSAlignMille2Module* mod, Int_t par) const
6526a72c 51{
52 // is this module/parameter mentioned in the list?
53 if (!IncludesParam(par)) return kFALSE;
54 if (fModuleID==-1 && !mod->GetParent()) return kTRUE;
55 return IncludesModule( mod->GetUniqueID() );
56}
57
58
59//________________________________________________________________________________________________________
60void AliITSAlignMille2Constraint::Print(Option_t* ) const
61{
b80c197e 62 // print data
6526a72c 63 printf("#%3d Constraint %s of type %d on module %d to value %+e\n",GetConstraintID(),GetName(),GetType(),GetModuleID(),GetValue());
64 printf("Paremeters: ");
65 for (int i=0;i<=8;i++) if (TestBit(0x1<<i)) printf("%d ",i); printf("\n");
66 //
67}
68