/home/bes3soft/bes3soft/Boss/7.0.2/dist/7.0.2/Mdc/MdcAlignAlg/MdcAlignAlg-00-01-04/MdcAlignAlg/Alignment.h

Go to the documentation of this file.
00001 #ifndef ALIGNMENT_H
00002 #define ALIGNMENT_H
00003 
00004 #include <string>
00005 #include <vector>
00006 
00007 namespace Alignment{
00008 
00009     /* exterior product */
00010     void expd(double veca[3], double vecb[3], double val[3]);
00011 
00012     /* distance of two lines */
00013     int dist2Line(double sta[3], double stb[3], double veca[3],
00014             double vecb[3],double &d, double &za, double &zb, int fgZcal = 1);
00015 
00016     /* doca of straight track and wire(line) */
00017     double docaLineWire(double trkpar[], double wirest[],
00018             double wirev[], double &zwire, int fgZcal = 1);
00019 
00020     /* doca of helix track and wire(line) */
00021     double docaHelixWireNewton(double trkpar[], double wirest[],
00022             double wirev[], double &zwire, double zini);
00023     double docaHelixWire(double trkpar[], double wirest[],
00024             double wirev[], double &zwire, double zini);
00025 
00026     bool getDoca(double trkpar[], double wpos[], double &doca,
00027             double whitPos[], double zini);
00028     double getPhiIni(double trkpar[], double rLayer, double pos[]);
00029 
00030     int getEpId(int lay, int iEnd); /* get index of the endplate */
00031 
00032 
00033     /* global variables */
00034     extern bool gFlagMag;               /* w/o magnetic field */
00035 
00036     /* number of iteration in doca calculation */
00037     extern int gNiter;
00038 
00039     const double CC   = 2.99792458E10;       // cm/sec, light velocity
00040     const double PI   = 3.141592653;
00041     const double PI2  = 6.283185307;
00042     const double HFPI = 1.570796327;
00043 
00044     const int WIRENMAX  = 6796;
00045     const int LAYERNMAX = 43;
00046     const int CELLNMAX  = 288;
00047     const int INNERNMAX = 8;
00048     const int NEP = 16; /* number of endplates */
00049     const int NTRKPAR = 5;      /* number of track parameters */
00050     const int NTRKPARALL = 10;  /* number of track parameters and errors */
00051 
00052     const double BFIELD = 1.0;  /* Tesla */
00053 
00054     /* the following definition is for Millepede */
00055 
00056     const std::string MSG_DEBUG("DEBUG:   ");
00057     const std::string MSG_INFO("INFO:    ");
00058     const std::string MSG_WARNING("WARNING: ");
00059     const std::string MSG_ERROR("ERROR:   ");
00060     const std::string MSG_FATAL("FATAL:   ");
00061 
00062     const int NDOFALIGN = 3;    /* dx, dy, rz */
00063     /*      const int NDOFALIGN = 2;    /\* dx, rz *\/ */
00064 
00065     /* the following 4 statements are moved from Millepede.h by wulh on 06/08/29 */
00066     const bool m_iteration  = true;
00067     const bool debug_mode   = false;   // More printouts
00068     const bool verbose_mode = false;  // Definitely more printouts (matrices,...)
00069     const bool verbose_reject = false; /* added by wulh on 06/08/28 */
00070 
00071     const bool g_dofs[3] = {1, 1, 1}; // Degrees of freedom to take into account (Boolean version)
00072     /*      const bool g_dofs[] = {1, 1}; // Degrees of freedom to take into account (Boolean version) */
00073 
00074     // Individual constraint on alignment constants (set via ParSig in Millepede)
00075 
00076 /*     const double g_Sigm[3] = {0.1, 0.1, 0.25};       /\* for dx, dy, rz *\/ */
00077     const double g_Sigm[3] = {0.1, 0.01, 0.05}; /* for dx, dy, rz */
00078     /*      const double g_Sigm[] = {0.1, 0.25}; /\* for dx, rz *\/ */
00079 
00080     // Cuts on residuals (when fitting the tracks) (in mm)
00081     // !!! Adapt them to your situation !!!
00082 
00083     const double g_res_cut = 1.2;
00084     const double g_res_cut_init = 3.; // Larger for the first iteration (you are misaligned !!!)
00085     const double g_start_chi_cut = 100.;
00086 
00087     const int gNsamLC = 100;
00088     const int gNsamGB = 100;
00089 /*     const double gStepLC[5] = {0.00001, 0.000001, 0.00001, 0.0001, 0.00001}; /\* units of dr&dz are cm *\/ */
00090     const double gStepLC[5] = {0.001, 0.001, 0.00001, 0.0001, 0.0001};  /* units of dr&dz are cm */
00091     const double gStepGB[48] = {0.0001, 0.0001, 0.0001, 0.0001, 0.0001, 0.0001, 0.0001, 0.0001, /* dx */
00092                                 0.0001, 0.0001, 0.0001, 0.0001, 0.0001, 0.0001, 0.0001, 0.0001,
00093                                 0.0001, 0.0001, 0.0001, 0.0001, 0.0001, 0.0001, 0.0001, 0.0001, /* dy */
00094                                 0.0001, 0.0001, 0.0001, 0.0001, 0.0001, 0.0001, 0.0001, 0.0001,
00095                                 0.001, 0.001, 0.001, 0.001, 0.001, 0.001, 0.001, 0.001, /*rz, mrad*/
00096                                 0.001, 0.001, 0.001, 0.001, 0.001, 0.001, 0.001, 0.001};
00097 
00098 /*     const double gStepGB[32] = {0.0001, 0.0001, 0.0001, 0.0001, 0.0001, 0.0001, 0.0001, 0.0001, /\* dx *\/ */
00099 /*                              0.0001, 0.0001, 0.0001, 0.0001, 0.0001, 0.0001, 0.0001, 0.0001, */
00100 /*                              0.001, 0.001, 0.001, 0.001, 0.001, 0.001, 0.001, 0.001, /\* rz *\/ */
00101 /*                              0.001, 0.001, 0.001, 0.001, 0.001, 0.001, 0.001, 0.001}; */
00102 
00103 /*     const int gNsamLC = 50; */
00104 /*     const int gNsamGB = 50; */
00105 /*     const double gStepLC[5] = {0.00002, 0.000002, 0.00002, 0.0002, 0.00002}; /\* units of dr&dz are cm *\/ */
00106 /*     const double gStepGB[48] = {0.0002, 0.0002, 0.0002, 0.0002, 0.0002, 0.0002, 0.0002, 0.0002, /\* dx *\/ */
00107 /*                              0.0002, 0.0002, 0.0002, 0.0002, 0.0002, 0.0002, 0.0002, 0.0002, */
00108 /*                              0.0002, 0.0002, 0.0002, 0.0002, 0.0002, 0.0002, 0.0002, 0.0002, /\* dy *\/ */
00109 /*                              0.0002, 0.0002, 0.0002, 0.0002, 0.0002, 0.0002, 0.0002, 0.0002, */
00110 /*                              0.000002, 0.000002, 0.000002, 0.000002, 0.000002, 0.000002, 0.000002, 0.000002, /\* rz *\/ */
00111 /*                              0.000002, 0.000002, 0.000002, 0.000002, 0.000002, 0.000002, 0.000002, 0.000002}; */
00112 
00113 }
00114 
00115 #endif/* ALIGNMENT_H */
00116 

Generated on Tue Nov 29 23:12:47 2016 for BOSS_7.0.2 by  doxygen 1.4.7