00001 //////////////////////////////////////////////////////////////////////// 00002 // $Id: AlignChamZNoBF.h,v 1.1 2006/09/25 14:26:09 lebedev Exp $ 00003 // 00004 // lebedev@physics.harvard.edu 00005 //////////////////////////////////////////////////////////////////////// 00006 00007 #ifndef TRK_ALIGN_NO_B_F_H 00008 #define TRK_ALIGN_NO_B_F_H 00009 00010 #include "JobControl/JobCModuleFactory.h" 00011 #include "Geometry/GChamGeo.h" 00012 00013 #include <string> 00014 #include <vector> 00015 00016 //...................................................................... 00017 /// @author Andre Lebedev 00018 /// This module can be used to fit for DC1-PWC6 misalignment in z 00019 /// and rotation in xy-plane using field-off data. 00020 /// Track information is saved until the 00021 /// end of the run, and then TMinuit is used to minimize either the 00022 /// sum of chi squared or the sum of square of correlation coefficients 00023 /// between residuals and dx/dz. The former method is more general 00024 /// and will pick up rotations much better than the latter. 00025 /// 00026 class AlignChamZNoBF : public JobCModule { 00027 public: 00028 typedef struct track__ { 00029 float fWire[6][kNPlane]; ///< Wire number in the cluster 00030 float fWeight[6][kNPlane]; ///< Weight of the wire in the fit 00031 } TrkInfo_t; 00032 00033 AlignChamZNoBF(const char* version); 00034 ~AlignChamZNoBF(); 00035 00036 JobCResult Ana(const EDMEventHandle& evt); 00037 00038 void NewRun(int run, int subrun); 00039 00040 void EndRun(int run, int subrun); 00041 00042 void Update(const CfgConfig& c); 00043 00044 double ComputeF(); 00045 00046 private: 00047 double Fit(TrkInfo_t& ti, double resid[6][4], float* dydz = 0, 00048 float x[6][4] = 0, float y[6][4] = 0); 00049 void MakeTree(const char* name); 00050 double ComputeChi2F(); 00051 double ComputeCorrF(); 00052 00053 private: 00054 std::vector<TrkInfo_t> fTrackList; 00055 00056 int fDebug; // Controls level of debug printing 00057 std::string fSegFolder; 00058 int fMinNClust; 00059 std::vector<int> fFixCham; 00060 int fUseCorr; 00061 00062 }; 00063 00064 #endif // TRK_ALIGN_NO_B_F_H 00065 00066 ////////////////////////////////////////////////////////////////////////
1.4.7