MilleAlign Class Reference

#include <MilleAlign.h>

Inheritance diagram for MilleAlign:

MdcAlign List of all members.

Public Member Functions

 MilleAlign ()
 ~MilleAlign ()
void clear ()
void initialize (TObjArray *hlist, IMdcGeomSvc *mdcGeomSvc, IMdcCalibFunSvc *mdcFunSvc)
void setParam (MdcAliParams &param)
bool fillHist (MdcAliEvent *event)
void updateConst (MdcAlignPar *alignPar)

Public Attributes

std::string fixMomLab

Private Member Functions

int getAlignParId (int lay, int iparHit)
bool getDeriLoc (int ipar, int lay, int cel, HepVector helix, HepSymMatrix &helixErr, double &deri)
bool getDeriGlo (int iparHit, int iparGB, int lay, int cel, HepVector helix, HepSymMatrix &helixErr, double wpos[], double &deri)
double moment (double phi0, double tanl)

Private Attributes

MdcAliParams m_param
TObjArray * m_hlist
IMdcGeomSvcm_mdcGeomSvc
IMdcCalibFunSvcm_mdcFunSvc
MdcUtilitySvcm_mdcUtilitySvc
double m_resiCut [LAYERNMAX]
double m_docaCut [LAYERNMAX][2]
double m_p [20][15]
double m_dxini [NEP]
double m_dyini [NEP]
double m_rzini [NEP]
Millepedem_pMilleAlign
int m_npar
bool m_dofs [NDOFALIGN]
double m_sigm [NDOFALIGN]
int m_nGloHit
int m_nglo
int m_nloc
std::vector< double > m_par
std::vector< double > m_error
std::vector< double > m_pull
std::vector< double > m_derGB
std::vector< double > m_derNonLin
std::vector< double > m_derLC
TH1F * m_hresAll
TH1F * m_hresInn
TH1F * m_hresStp
TH1F * m_hresOut
TH1F * m_hresLay [LAYERNMAX]
TH1F * m_hresAllRec
TH1F * m_hresLayRec [LAYERNMAX]
TH1F * m_hddoca
TH1F * m_hddocaLay [LAYERNMAX]

Detailed Description

Definition at line 16 of file MilleAlign.h.


Constructor & Destructor Documentation

MilleAlign::MilleAlign (  ) 

Definition at line 28 of file MilleAlign.cxx.

References Alignment::LAYERNMAX, m_docaCut, and m_resiCut.

00028                       {
00029      for(int lay=0; lay<LAYERNMAX; lay++){
00030           m_resiCut[lay] = 1.5;
00031           if(lay<8){
00032                m_docaCut[lay][0] = 0.5;
00033                m_docaCut[lay][1] = 5.5;
00034           } else{
00035                m_docaCut[lay][0] = 0.5;
00036                m_docaCut[lay][1] = 7.5;
00037           }
00038      }
00039 }

MilleAlign::~MilleAlign (  ) 

Definition at line 41 of file MilleAlign.cxx.

00041                        {
00042 }


Member Function Documentation

void MilleAlign::clear (  )  [virtual]

Implements MdcAlign.

Definition at line 44 of file MilleAlign.cxx.

References Alignment::LAYERNMAX, m_hddoca, m_hresAll, m_hresAllRec, m_hresInn, m_hresLay, m_hresLayRec, m_hresOut, m_hresStp, and m_pMilleAlign.

00044                       {
00045      delete m_hresAll;
00046      delete m_hresInn;
00047      delete m_hresStp;
00048      delete m_hresOut;
00049      for(int lay=0; lay<LAYERNMAX; lay++) delete m_hresLay[lay];
00050      delete m_hresAllRec;
00051      for(int lay=0; lay<LAYERNMAX; lay++) delete m_hresLayRec[lay];
00052      delete m_hddoca;
00053      delete m_pMilleAlign;
00054 }

bool MilleAlign::fillHist ( MdcAliEvent event  )  [virtual]

Implements MdcAlign.

Definition at line 198 of file MilleAlign.cxx.

References Bes_Common::DEBUG, MdcUtilitySvc::doca(), MdcAliParams::drCut, MdcAliParams::dzCut, getAlignParId(), getDeriGlo(), getDeriLoc(), MdcAliRecHit::getDocaInc(), MdcAliRecTrk::getHelix(), MdcAliRecTrk::getHelixErr(), MdcAliRecHit::getLR(), MdcAliEvent::getRecTrk(), MdcAliRecTrk::getStat(), Millepede::GetTrackNumber(), m_derGB, m_derLC, m_derNonLin, m_docaCut, m_hddoca, m_hddocaLay, m_hresAll, m_hresAllRec, m_hresInn, m_hresLay, m_hresLayRec, m_hresOut, m_hresStp, m_mdcGeomSvc, m_mdcUtilitySvc, m_nGloHit, m_nloc, m_param, m_pMilleAlign, m_resiCut, msgSvc(), MdcAliParams::nHitCut, MdcAliParams::nTrkCut, Alignment::NTRKPAR, and Alignment::NTRKPARALL.

00198                                            {
00199      IMessageSvc* msgSvc;
00200      Gaudi::svcLocator() -> service("MessageSvc", msgSvc);
00201      MsgStream log(msgSvc, "MilleAlign");
00202      log << MSG::DEBUG << "MilleAlign::fillTree()" << endreq;
00203 
00204      int recFlag;
00205      int itrk;
00206      int ihit;
00207      int fgGetDoca;
00208      int lr;
00209      int lay;
00210      int cel;
00211      double doca;
00212      double dmeas;
00213      double zhit;
00214      double resi;
00215      double resiRec;
00216      double deri;
00217      double hitSigm;
00218      double hitpos[3];
00219      double wpos[7];            // wpos[6] is wire tension
00220      const MdcGeoWire* pWire;
00221 
00222      double trkpar[NTRKPAR];
00223      double trkparms[NTRKPARALL];       // track parameters and errors
00224 
00225      // numerical derivative
00226      int ipar;
00227      int iparGB;
00228 
00229      MdcAliRecTrk* rectrk;
00230      MdcAliRecHit* rechit;
00231 
00232      int ntrk = event -> getNTrk();
00233      if( (ntrk<m_param.nTrkCut[0]) || (ntrk>m_param.nTrkCut[1])) return false;
00234 
00235      for(itrk=0; itrk<ntrk; itrk++){
00236           rectrk = event->getRecTrk(itrk);
00237           recFlag = rectrk->getStat();
00238 
00239           trkpar[0] = rectrk -> getDr();
00240           trkpar[1] = rectrk -> getPhi0();
00241           trkpar[2] = rectrk -> getKappa();
00242           trkpar[3] = rectrk -> getDz();
00243           trkpar[4] = rectrk -> getTanLamda();
00244 
00245           int nHit = rectrk -> getNHits();
00246           if(nHit < m_param.nHitCut) continue;
00247           if(fabs(trkpar[0]) > m_param.drCut) continue;
00248           if(fabs(trkpar[3]) > m_param.dzCut) continue;
00249 
00250           HepVector rechelix = rectrk->getHelix();
00251           HepVector helix = rectrk->getHelix();
00252           HepSymMatrix helixErr = rectrk->getHelixErr();
00253 
00254           int nHitUse = 0;
00255           for(ihit=0; ihit<nHit; ihit++){
00256                rechit = rectrk -> getRecHit(ihit);
00257                lr = rechit->getLR();
00258                lay = rechit -> getLayid();
00259                cel = rechit -> getCellid();
00260                pWire = m_mdcGeomSvc -> Wire(lay, cel); 
00261                dmeas = rechit -> getDmeas();
00262                zhit = rechit -> getZhit();
00263                hitSigm = rechit -> getErrDmeas();
00264 
00265                wpos[0] = pWire -> Backward().x(); // east end
00266                wpos[1] = pWire -> Backward().y();
00267                wpos[2] = pWire -> Backward().z();
00268                wpos[3] = pWire -> Forward().x(); // west end
00269                wpos[4] = pWire -> Forward().y();
00270                wpos[5] = pWire -> Forward().z();
00271                wpos[6] = pWire -> Tension();
00272 
00273                double docaRec = rechit->getDocaInc();
00274                double doca = (m_mdcUtilitySvc->doca(lay, cel, helix, helixErr))*10.0;
00275 
00276                resi = -1.0*dmeas - doca;
00277                if ((fabs(doca) < m_docaCut[lay][0]) || (fabs(doca) > m_docaCut[lay][1]) || 
00278                    (fabs(resi) > m_resiCut[lay])) continue;
00279                nHitUse++;
00280 
00281                resiRec = rechit -> getResiIncLR();
00282 
00283                double dd = fabs(doca) - fabs(rechit->getDocaInc());
00284                m_hddoca -> Fill(dd);
00285                m_hddocaLay[lay] -> Fill(dd);
00286 
00287                // fill histograms
00288                m_hresAll->Fill(resi);
00289                if(lay < 8) m_hresInn->Fill(resi);
00290                else if(lay < 20) m_hresStp->Fill(resi);
00291                else m_hresOut->Fill(resi);
00292                m_hresLay[lay]->Fill(resi);
00293 
00294                m_hresAllRec->Fill(resiRec);
00295                m_hresLayRec[lay]->Fill(resiRec);
00296 
00297                // reset the derivatives arrays
00298                m_pMilleAlign -> ZerLoc(&m_derGB[0], &m_derLC[0], &m_derNonLin[0]);
00299 
00300                // derivatives of local parameters
00301                for(ipar=0; ipar<m_nloc; ipar++){
00302                     if( ! getDeriLoc(ipar, lay, cel ,rechelix, helixErr, deri) ){
00303                          cout << "getDeriLoc == false!" << setw(12) << itrk << setw(12) << ipar << endl; 
00304                          return false;
00305                     }
00306                     m_derLC[ipar] = deri;
00307                }
00308 
00309                // derivatives of global parameters
00310                // ipar 0 - 5: dx_east, dx_west, dy_east, dy_west, rz_east, rz_west
00311                for(ipar=0; ipar<m_nGloHit; ipar++){
00312                     iparGB = getAlignParId(lay, ipar);
00313                     if( ! getDeriGlo(ipar, iparGB, lay, cel, helix, helixErr, wpos, deri) )
00314                     {
00315                          cout << "getDeriGlo == false!" << setw(12) << itrk << setw(12) << ipar << endl; 
00316                          return false;
00317                     }
00318                     m_derGB[iparGB] = deri;
00319                }
00320                m_pMilleAlign -> EquLoc(&m_derGB[0], &m_derLC[0], &m_derNonLin[0], resi, hitSigm);
00321           } // loop of nhit
00322 
00323           // local fit in Millepede
00324           bool sc = m_pMilleAlign -> FitLoc(m_pMilleAlign->GetTrackNumber(), trkparms, 0);
00325           if(sc) m_pMilleAlign -> SetTrackNumber( m_pMilleAlign->GetTrackNumber()+1 );
00326      } // track loop 
00327      return true;
00328 }

int MilleAlign::getAlignParId ( int  lay,
int  iparHit 
) [private]

Definition at line 368 of file MilleAlign.cxx.

Referenced by fillHist().

00368                                                  {
00369      int ip;
00370      if(lay < 8) ip = 0;
00371      else if(lay < 10) ip = 1;
00372      else if(lay < 12) ip = 2;
00373      else if(lay < 14) ip = 3;
00374      else if(lay < 16) ip = 4;
00375      else if(lay < 18) ip = 5;
00376      else if(lay < 20) ip = 6;
00377      else ip = 7;
00378 
00379      // iparHit 0 - 5: dx_east, dx_west, dy_east, dy_west, rz_east, rz_west
00380      int ipar = iparHit * 8 + ip;
00381      return ipar;
00382 }

bool MilleAlign::getDeriGlo ( int  iparHit,
int  iparGB,
int  lay,
int  cel,
HepVector  helix,
HepSymMatrix &  helixErr,
double  wpos[],
double &  deri 
) [private]

Definition at line 417 of file MilleAlign.cxx.

References MdcUtilitySvc::doca(), Alignment::gNsamGB, Alignment::gStepGB, genRecEmupikp::i, and m_mdcUtilitySvc.

Referenced by fillHist().

00418                                                                                 {
00419      int i;
00420      double doca;
00421      double xxGB[gNsamGB];
00422      double yyGB[gNsamGB];
00423      double dAlignPar;
00424      double dAlignParini = 0.0;
00425      double startpar = dAlignParini - 0.5*gStepGB[iparGB]*(double)gNsamGB;
00426      double wposSam[7];
00427      for(i=0; i<7; i++) wposSam[i] = wpos[i]; // 0-2:east; 3-5:west
00428 
00429      for(i=0; i<gNsamGB; i++){
00430           dAlignPar = startpar + (double)i * gStepGB[iparGB];
00431           xxGB[i] = dAlignPar;
00432           if(0 == iparHit){     // dx_east
00433                wposSam[0] = wpos[0] + dAlignPar;
00434           } else if(1 == iparHit){      // dx_west
00435                wposSam[3] = wpos[3] + dAlignPar;
00436           } else if(2 == iparHit){      // dy_east
00437                wposSam[1] = wpos[1] + dAlignPar;
00438           } else if(3 == iparHit){      // dy_west
00439                wposSam[4] = wpos[4] + dAlignPar;
00440           } else if(4 == iparHit){      // rz_east
00441                wposSam[0] = wpos[0] - (wpos[1] * dAlignPar * 0.001);
00442                wposSam[1] = wpos[1] + (wpos[0] * dAlignPar * 0.001);
00443           } else if(5 == iparHit){      // rz_west
00444                wposSam[3] = wpos[3] - (wpos[4] * dAlignPar * 0.001);
00445                wposSam[4] = wpos[4] + (wpos[3] * dAlignPar * 0.001);
00446           }
00447 
00448           HepPoint3D eastP(wposSam[0]/10., wposSam[1]/10., wposSam[2]/10.);
00449           HepPoint3D westP(wposSam[3]/10., wposSam[4]/10., wposSam[5]/10.);
00450           doca = (m_mdcUtilitySvc->doca(lay, cel, eastP, westP, helix, helixErr))*10.0; // cm->mm
00451 
00452           if(NULL == doca) return false; 
00453  
00454           yyGB[i] = doca;
00455      }
00456 
00457      TSpline3* pSpline3 = new TSpline3("deri", xxGB, yyGB, gNsamGB);
00458      deri = pSpline3 -> Derivative(dAlignParini);
00459      delete pSpline3;
00460      return true;
00461 }

bool MilleAlign::getDeriLoc ( int  ipar,
int  lay,
int  cel,
HepVector  helix,
HepSymMatrix &  helixErr,
double &  deri 
) [private]

Definition at line 384 of file MilleAlign.cxx.

References MdcUtilitySvc::doca(), Alignment::gNsamLC, Alignment::gStepLC, genRecEmupikp::i, m_mdcUtilitySvc, m_nloc, and Alignment::NTRKPAR.

Referenced by fillHist().

00384                                                                                                                {
00385      int i;
00386      double doca;
00387      HepVector sampar(NTRKPAR, 0);
00388      double xxLC[gNsamLC];
00389      double yyLC[gNsamLC];
00390 
00391      for(i=0; i<m_nloc; i++) sampar[i] = rechelix[i];
00392      double startpar = rechelix[ipar] - 0.5*gStepLC[ipar]*(double)gNsamLC;
00393 
00394      for(i=0; i<gNsamLC; i++){
00395           sampar[ipar] = startpar + (double)i * gStepLC[ipar];
00396           xxLC[i] = sampar[ipar];
00397           if(0==ipar || 3==ipar) xxLC[i] *= 10.;        // cm -> mm
00398 
00399           HepVector helix = sampar;
00400           bool passCellRequired = false;
00401           doca = (m_mdcUtilitySvc->doca(lay, cel, helix, helixErr,passCellRequired))*10.0;
00402 
00403           if(NULL == doca){
00404 //           cout << "in getDeriLoc, doca = " << doca << endl;
00405                return false;
00406           }
00407           yyLC[i] = doca;
00408      }
00409 
00410      if (0==ipar || 3==ipar) rechelix[ipar] *= 10.; // cm -> mm
00411      TSpline3* pSpline3 = new TSpline3("deri", xxLC, yyLC, gNsamLC);
00412      deri = pSpline3->Derivative(rechelix[ipar]);
00413      delete pSpline3;
00414      return true;
00415 }

void MilleAlign::initialize ( TObjArray *  hlist,
IMdcGeomSvc mdcGeomSvc,
IMdcCalibFunSvc mdcFunSvc 
) [virtual]

Implements MdcAlign.

Definition at line 56 of file MilleAlign.cxx.

References Bes_Common::FATAL, Alignment::g_dofs, Alignment::g_res_cut, Alignment::g_res_cut_init, Alignment::g_Sigm, Alignment::g_start_chi_cut, genRecEmupikp::i, Bes_Common::INFO, Alignment::LAYERNMAX, m_derGB, m_derLC, m_derNonLin, m_dofs, m_error, m_hddoca, m_hddocaLay, m_hlist, m_hresAll, m_hresAllRec, m_hresInn, m_hresLay, m_hresLayRec, m_hresOut, m_hresStp, m_mdcFunSvc, m_mdcGeomSvc, m_mdcUtilitySvc, m_nglo, m_nGloHit, m_nloc, m_npar, m_par, m_pMilleAlign, m_pull, m_sigm, msgSvc(), Alignment::NDOFALIGN, Alignment::NEP, and Alignment::NTRKPAR.

00057                                                        {
00058      IMessageSvc* msgSvc;
00059      Gaudi::svcLocator() -> service("MessageSvc", msgSvc);
00060      MsgStream log(msgSvc, "MilleAlign");
00061      log << MSG::INFO << "MilleAlign::initialize()" << endreq;
00062 
00063      // Initialze MdcUtilitySvc
00064      IMdcUtilitySvc* imdcUtilitySvc;
00065      StatusCode sc = Gaudi::svcLocator() -> service ("MdcUtilitySvc",imdcUtilitySvc);
00066      m_mdcUtilitySvc= dynamic_cast<MdcUtilitySvc*> (imdcUtilitySvc);
00067      if ( sc.isFailure() ){
00068           log << MSG::FATAL << "Could not load MdcUtilitySvc!" << endreq;
00069      }
00070 
00071      m_hlist = hlist;
00072      m_mdcGeomSvc = mdcGeomSvc;
00073      m_mdcFunSvc = mdcFunSvc;
00074 
00075      // initialize hitograms
00076      m_hresAll = new TH1F("HResAllInc", "", 200, -1.0, 1.0);
00077      m_hlist->Add(m_hresAll);
00078 
00079      m_hresInn = new TH1F("HResInnInc", "", 200, -1.0, 1.0);
00080      m_hlist->Add(m_hresInn);
00081 
00082      m_hresStp = new TH1F("HResStpInc", "", 200, -1.0, 1.0);
00083      m_hlist->Add(m_hresStp);
00084 
00085      m_hresOut = new TH1F("HResOutInc", "", 200, -1.0, 1.0);
00086      m_hlist->Add(m_hresOut);
00087 
00088      char hname[200];
00089      for(int lay=0; lay<LAYERNMAX; lay++){
00090           sprintf(hname, "Res_Layer%02d", lay);
00091           m_hresLay[lay] = new TH1F(hname, "", 200, -1.0, 1.0);
00092           m_hlist->Add(m_hresLay[lay]);
00093      }
00094 
00095      m_hresAllRec = new TH1F("HResAllRecInc", "", 200, -1.0, 1.0);
00096      m_hlist->Add(m_hresAllRec);
00097      for(int lay=0; lay<LAYERNMAX; lay++){
00098           sprintf(hname, "Res_LayerRec%02d", lay);
00099           m_hresLayRec[lay] = new TH1F(hname, "", 200, -1.0, 1.0);
00100           m_hlist->Add(m_hresLayRec[lay]);
00101      }
00102 
00103      // for debug
00104      m_hddoca = new TH1F("delt_doca", "", 200, -1.0, 1.0);
00105      m_hlist->Add(m_hddoca);
00106 
00107      for(int lay=0; lay<LAYERNMAX; lay++){
00108           sprintf(hname, "delt_docaLay%02d", lay);
00109           m_hddocaLay[lay] = new TH1F(hname, "", 200, -1.0, 1.0);
00110           m_hlist->Add(m_hddocaLay[lay]);
00111      }
00112 
00113      // initialize millepede
00114      m_nglo = NEP;
00115      m_nloc = NTRKPAR;
00116      m_nGloHit = 2 * NDOFALIGN;
00117      m_npar = NDOFALIGN * m_nglo;
00118 
00119      int i;
00120      for(i=0; i<NDOFALIGN; i++){
00121           m_dofs[i] = g_dofs[i];
00122           m_sigm[i] = g_Sigm[i];
00123      }
00124 
00125      m_pMilleAlign = new Millepede();
00126      m_pMilleAlign -> InitMille(&m_dofs[0], &m_sigm[0], m_nglo, m_nloc,
00127                                 g_start_chi_cut, 3, g_res_cut, g_res_cut_init);
00128 
00129      m_derGB.resize(m_npar);
00130      m_derNonLin.resize(m_npar);
00131      m_par.resize(m_npar);
00132      m_error.resize(m_npar);
00133      m_pull.resize(m_npar);
00134 
00135      m_derLC.resize(m_nloc);
00136 
00137      // contraints
00138      std::vector<double> constTX;
00139      std::vector<double> constTY;
00140      std::vector<double> constRZ;
00141 
00142      std::vector<double> constTXE;
00143      std::vector<double> constTXW;
00144      std::vector<double> constTYE;
00145      std::vector<double> constTYW;
00146      std::vector<double> constRZE;
00147      std::vector<double> constRZW;
00148 
00149      constTX.resize(m_npar);
00150      constTY.resize(m_npar);
00151      constRZ.resize(m_npar);
00152 
00153      constTXE.resize(m_npar);
00154      constTXW.resize(m_npar);
00155      constTYE.resize(m_npar);
00156      constTYW.resize(m_npar);
00157      constRZE.resize(m_npar);
00158      constRZW.resize(m_npar);
00159 
00160      for(i=0; i<m_npar; i++){
00161           constTX[i] = 0.0;
00162           constTY[i] = 0.0;
00163           constRZ[i] = 0.0;
00164 
00165           constTXE[i] = 0.0;
00166           constTXW[i] = 0.0;
00167           constTYE[i] = 0.0;
00168           constTYW[i] = 0.0;
00169           constRZE[i] = 0.0;
00170           constRZW[i] = 0.0;
00171      }
00172      constTX[7] = 1.0;
00173      constTX[15] = 1.0;
00174      constTY[23] = 1.0;
00175      constTY[31] = 1.0;
00176      constRZ[39] = 1.0;
00177      constRZ[47] = 1.0;
00178 
00179      constTXE[7] = 1.0;
00180      constTXW[15] = 1.0;
00181      constTYE[23] = 1.0;
00182      constTYW[31] = 1.0;
00183      constRZE[39] = 1.0;
00184      constRZW[47] = 1.0;
00185 
00186      //m_pMilleAlign -> ConstF(&constTX[0], 0.0);
00187      //m_pMilleAlign -> ConstF(&constTY[0], 0.0);
00188 //      m_pMilleAlign -> ConstF(&constRZ[0], 0.0);
00189 
00190      m_pMilleAlign -> ConstF(&constTXE[0], 0.0);
00191      m_pMilleAlign -> ConstF(&constTXW[0], 0.0);
00192      m_pMilleAlign -> ConstF(&constTYE[0], 0.0);
00193      m_pMilleAlign -> ConstF(&constTYW[0], 0.0);
00194      m_pMilleAlign -> ConstF(&constRZE[0], 0.0);
00195      m_pMilleAlign -> ConstF(&constRZW[0], 0.0);
00196 }

double MilleAlign::moment ( double  phi0,
double  tanl 
) [private]

void MilleAlign::setParam ( MdcAliParams param  )  [inline, virtual]

Implements MdcAlign.

Definition at line 82 of file MilleAlign.h.

References m_param, and MdcAlign::setParam().

00082                                                    {
00083      MdcAlign::setParam(param);
00084      m_param = param;
00085 }

void MilleAlign::updateConst ( MdcAlignPar alignPar  )  [virtual]

Implements MdcAlign.

Definition at line 331 of file MilleAlign.cxx.

References showlog::err, genRecEmupikp::i, Bes_Common::INFO, m_dofs, m_error, m_par, m_pMilleAlign, m_pull, msgSvc(), Alignment::NDOFALIGN, Alignment::NEP, MdcAlignPar::setDelDx(), MdcAlignPar::setDelDy(), MdcAlignPar::setDelRz(), MdcAlignPar::setErrDx(), MdcAlignPar::setErrDy(), and MdcAlignPar::setErrRz().

00331                                                  {
00332      IMessageSvc* msgSvc;
00333      Gaudi::svcLocator() -> service("MessageSvc", msgSvc);
00334      MsgStream log(msgSvc, "MilleAlign");
00335      log << MSG::INFO << "MilleAlign::updateConst()" << endreq;
00336 
00337      m_pMilleAlign -> MakeGlobalFit(&m_par[0], &m_error[0], &m_pull[0]);
00338 
00339      int iEP;
00340      int ipar;
00341      double val;
00342      double err;
00343      for(int i=0; i<NDOFALIGN; i++){
00344           for(iEP=0; iEP<NEP; iEP++){
00345                ipar = i * NEP + iEP;
00346                if(m_dofs[i]){
00347                     val = m_par[ipar];
00348                     err = m_error[ipar];
00349                } else{
00350                     val = 0.0;
00351                     err = 0.0;
00352                }
00353 
00354                if(0 == i){
00355                     alignPar->setDelDx(iEP, val);
00356                     alignPar->setErrDx(iEP, err);
00357                } else if(1 == i){
00358                     alignPar->setDelDy(iEP, val);
00359                     alignPar->setErrDy(iEP, err);
00360                } else if(2 == i){
00361                     alignPar->setDelRz(iEP, val/1000.0); // mrad -> rad
00362                     alignPar->setErrRz(iEP, err/1000.0); // mrad -> rad
00363                }
00364           }
00365      }
00366 }


Member Data Documentation

std::string MilleAlign::fixMomLab

Reimplemented from MdcAlign.

Definition at line 28 of file MilleAlign.h.

std::vector<double> MilleAlign::m_derGB [private]

Definition at line 64 of file MilleAlign.h.

Referenced by fillHist(), and initialize().

std::vector<double> MilleAlign::m_derLC [private]

Definition at line 66 of file MilleAlign.h.

Referenced by fillHist(), and initialize().

std::vector<double> MilleAlign::m_derNonLin [private]

Definition at line 65 of file MilleAlign.h.

Referenced by fillHist(), and initialize().

double MilleAlign::m_docaCut[LAYERNMAX][2] [private]

Definition at line 46 of file MilleAlign.h.

Referenced by fillHist(), and MilleAlign().

bool MilleAlign::m_dofs[NDOFALIGN] [private]

Definition at line 56 of file MilleAlign.h.

Referenced by initialize(), and updateConst().

double MilleAlign::m_dxini[NEP] [private]

Definition at line 49 of file MilleAlign.h.

double MilleAlign::m_dyini[NEP] [private]

Definition at line 50 of file MilleAlign.h.

std::vector<double> MilleAlign::m_error [private]

Definition at line 62 of file MilleAlign.h.

Referenced by initialize(), and updateConst().

TH1F* MilleAlign::m_hddoca [private]

Definition at line 78 of file MilleAlign.h.

Referenced by clear(), fillHist(), and initialize().

TH1F* MilleAlign::m_hddocaLay[LAYERNMAX] [private]

Definition at line 79 of file MilleAlign.h.

Referenced by fillHist(), and initialize().

TObjArray* MilleAlign::m_hlist [private]

Definition at line 40 of file MilleAlign.h.

Referenced by initialize().

TH1F* MilleAlign::m_hresAll [private]

Definition at line 69 of file MilleAlign.h.

Referenced by clear(), fillHist(), and initialize().

TH1F* MilleAlign::m_hresAllRec [private]

Definition at line 75 of file MilleAlign.h.

Referenced by clear(), fillHist(), and initialize().

TH1F* MilleAlign::m_hresInn [private]

Definition at line 70 of file MilleAlign.h.

Referenced by clear(), fillHist(), and initialize().

TH1F* MilleAlign::m_hresLay[LAYERNMAX] [private]

Definition at line 73 of file MilleAlign.h.

Referenced by clear(), fillHist(), and initialize().

TH1F* MilleAlign::m_hresLayRec[LAYERNMAX] [private]

Definition at line 76 of file MilleAlign.h.

Referenced by clear(), fillHist(), and initialize().

TH1F* MilleAlign::m_hresOut [private]

Definition at line 72 of file MilleAlign.h.

Referenced by clear(), fillHist(), and initialize().

TH1F* MilleAlign::m_hresStp [private]

Definition at line 71 of file MilleAlign.h.

Referenced by clear(), fillHist(), and initialize().

IMdcCalibFunSvc* MilleAlign::m_mdcFunSvc [private]

Definition at line 42 of file MilleAlign.h.

Referenced by initialize().

IMdcGeomSvc* MilleAlign::m_mdcGeomSvc [private]

Definition at line 41 of file MilleAlign.h.

Referenced by fillHist(), and initialize().

MdcUtilitySvc* MilleAlign::m_mdcUtilitySvc [private]

Definition at line 43 of file MilleAlign.h.

Referenced by fillHist(), getDeriGlo(), getDeriLoc(), and initialize().

int MilleAlign::m_nglo [private]

Definition at line 59 of file MilleAlign.h.

Referenced by initialize().

int MilleAlign::m_nGloHit [private]

Definition at line 58 of file MilleAlign.h.

Referenced by fillHist(), and initialize().

int MilleAlign::m_nloc [private]

Definition at line 60 of file MilleAlign.h.

Referenced by fillHist(), getDeriLoc(), and initialize().

int MilleAlign::m_npar [private]

Definition at line 55 of file MilleAlign.h.

Referenced by initialize().

double MilleAlign::m_p[20][15] [private]

Definition at line 48 of file MilleAlign.h.

std::vector<double> MilleAlign::m_par [private]

Definition at line 61 of file MilleAlign.h.

Referenced by initialize(), and updateConst().

MdcAliParams MilleAlign::m_param [private]

Reimplemented from MdcAlign.

Definition at line 39 of file MilleAlign.h.

Referenced by fillHist(), and setParam().

Millepede* MilleAlign::m_pMilleAlign [private]

Definition at line 54 of file MilleAlign.h.

Referenced by clear(), fillHist(), initialize(), and updateConst().

std::vector<double> MilleAlign::m_pull [private]

Definition at line 63 of file MilleAlign.h.

Referenced by initialize(), and updateConst().

double MilleAlign::m_resiCut[LAYERNMAX] [private]

Definition at line 45 of file MilleAlign.h.

Referenced by fillHist(), and MilleAlign().

double MilleAlign::m_rzini[NEP] [private]

Definition at line 51 of file MilleAlign.h.

double MilleAlign::m_sigm[NDOFALIGN] [private]

Definition at line 57 of file MilleAlign.h.

Referenced by initialize().


Generated on Tue Nov 29 23:20:25 2016 for BOSS_7.0.2 by  doxygen 1.4.7