]> git.uio.no Git - u/mrichter/AliRoot.git/blame - ITS/AliITSAlignMille2Constraint.cxx
Bayesian PID: new parametrization and code update (E. Biolcati - F.Prino)
[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),
24fApplied(0)
25{}
26
27//________________________________________________________________________________________________________
28AliITSAlignMille2Constraint::AliITSAlignMille2Constraint(const Char_t* name,Int_t t,Int_t mdID,Double_t val,UInt_t pattern) :
29TNamed(name,""),
30fType(t),
31fVal(val),
32fModuleID(mdID),
33fApplied(0)
34{
35 SetPattern(pattern);
36}
37
38//________________________________________________________________________________________________________
39AliITSAlignMille2Constraint::AliITSAlignMille2Constraint(const AliITSAlignMille2Constraint& src) :
40TNamed(src),
41fType(src.fType),
42fVal(src.fVal),
43fModuleID(src.fModuleID),
44fApplied(src.fApplied)
45{/* DUMMY */}
46
47//________________________________________________________________________________________________________
45993b23 48Bool_t AliITSAlignMille2Constraint::IncludesModPar(const AliITSAlignMille2Module* mod, Int_t par) const
6526a72c 49{
50 // is this module/parameter mentioned in the list?
51 if (!IncludesParam(par)) return kFALSE;
52 if (fModuleID==-1 && !mod->GetParent()) return kTRUE;
53 return IncludesModule( mod->GetUniqueID() );
54}
55
56
57//________________________________________________________________________________________________________
58void AliITSAlignMille2Constraint::Print(Option_t* ) const
59{
60 printf("#%3d Constraint %s of type %d on module %d to value %+e\n",GetConstraintID(),GetName(),GetType(),GetModuleID(),GetValue());
61 printf("Paremeters: ");
62 for (int i=0;i<=8;i++) if (TestBit(0x1<<i)) printf("%d ",i); printf("\n");
63 //
64}
65