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