57 {
59 Gaudi::svcLocator() -> service(
"MessageSvc",
msgSvc);
60 MsgStream log(
msgSvc,
"MilleAlign");
61 log << MSG::INFO << "MilleAlign::initialize()" << endreq;
62
63
65 StatusCode sc = Gaudi::svcLocator() -> service ("MdcUtilitySvc",imdcUtilitySvc);
66 m_mdcUtilitySvc=
dynamic_cast<MdcUtilitySvc*
> (imdcUtilitySvc);
67 if ( sc.isFailure() ){
68 log << MSG::FATAL << "Could not load MdcUtilitySvc!" << endreq;
69 }
70
71 m_hlist = hlist;
72 m_mdcGeomSvc = mdcGeomSvc;
73 m_mdcFunSvc = mdcFunSvc;
74
75
76 m_hresAll = new TH1F("HResAllInc", "", 200, -1.0, 1.0);
77 m_hlist->Add(m_hresAll);
78
79 m_hresInn = new TH1F("HResInnInc", "", 200, -1.0, 1.0);
80 m_hlist->Add(m_hresInn);
81
82 m_hresStp = new TH1F("HResStpInc", "", 200, -1.0, 1.0);
83 m_hlist->Add(m_hresStp);
84
85 m_hresOut = new TH1F("HResOutInc", "", 200, -1.0, 1.0);
86 m_hlist->Add(m_hresOut);
87
88 char hname[200];
90 sprintf(hname, "Res_Layer%02d", lay);
91 m_hresLay[lay] = new TH1F(hname, "", 200, -1.0, 1.0);
92 m_hlist->Add(m_hresLay[lay]);
93 }
94
95 m_hresAllRec = new TH1F("HResAllRecInc", "", 200, -1.0, 1.0);
96 m_hlist->Add(m_hresAllRec);
98 sprintf(hname, "Res_LayerRec%02d", lay);
99 m_hresLayRec[lay] = new TH1F(hname, "", 200, -1.0, 1.0);
100 m_hlist->Add(m_hresLayRec[lay]);
101 }
102
103
104 m_hddoca = new TH1F("delt_doca", "", 200, -1.0, 1.0);
105 m_hlist->Add(m_hddoca);
106
108 sprintf(hname, "delt_docaLay%02d", lay);
109 m_hddocaLay[lay] = new TH1F(hname, "", 200, -1.0, 1.0);
110 m_hlist->Add(m_hddocaLay[lay]);
111 }
112
113
118
119 int i;
123 }
124
126 m_pMilleAlign -> InitMille(&m_dofs[0], &m_sigm[0], m_nglo, m_nloc,
128
129 m_derGB.resize(m_npar);
130 m_derNonLin.resize(m_npar);
131 m_par.resize(m_npar);
132 m_error.resize(m_npar);
133 m_pull.resize(m_npar);
134
135 m_derLC.resize(m_nloc);
136
137
138 std::vector<double> constTX;
139 std::vector<double> constTY;
140 std::vector<double> constRZ;
141
142 std::vector<double> constTXE;
143 std::vector<double> constTXW;
144 std::vector<double> constTYE;
145 std::vector<double> constTYW;
146 std::vector<double> constRZE;
147 std::vector<double> constRZW;
148
149 constTX.resize(m_npar);
150 constTY.resize(m_npar);
151 constRZ.resize(m_npar);
152
153 constTXE.resize(m_npar);
154 constTXW.resize(m_npar);
155 constTYE.resize(m_npar);
156 constTYW.resize(m_npar);
157 constRZE.resize(m_npar);
158 constRZW.resize(m_npar);
159
160 for(i=0; i<m_npar; i++){
161 constTX[i] = 0.0;
162 constTY[i] = 0.0;
163 constRZ[i] = 0.0;
164
165 constTXE[i] = 0.0;
166 constTXW[i] = 0.0;
167 constTYE[i] = 0.0;
168 constTYW[i] = 0.0;
169 constRZE[i] = 0.0;
170 constRZW[i] = 0.0;
171 }
172 constTX[7] = 1.0;
173 constTX[15] = 1.0;
174 constTY[23] = 1.0;
175 constTY[31] = 1.0;
176 constRZ[39] = 1.0;
177 constRZ[47] = 1.0;
178
179 constTXE[7] = 1.0;
180 constTXW[15] = 1.0;
181 constTYE[23] = 1.0;
182 constTYW[31] = 1.0;
183 constRZE[39] = 1.0;
184 constRZW[47] = 1.0;
185
186
187
188
189
190 m_pMilleAlign -> ConstF(&constTXE[0], 0.0);
191 m_pMilleAlign -> ConstF(&constTXW[0], 0.0);
192 m_pMilleAlign -> ConstF(&constTYE[0], 0.0);
193 m_pMilleAlign -> ConstF(&constTYW[0], 0.0);
194 m_pMilleAlign -> ConstF(&constRZE[0], 0.0);
195 m_pMilleAlign -> ConstF(&constRZW[0], 0.0);
196}
const double g_res_cut_init
const double g_start_chi_cut