AlignChamZ.h

Go to the documentation of this file.
00001 ////////////////////////////////////////////////////////////////////////
00002 // $Id: AlignChamZ.h,v 1.1 2006/09/25 14:26:09 lebedev Exp $
00003 //
00004 // lebedev@physics.harvard.edu
00005 ////////////////////////////////////////////////////////////////////////
00006 
00007 #ifndef TRK_ALIGN_Z_H
00008 #define TRK_ALIGN_Z_H
00009 
00010 #include "JobControl/JobCModuleFactory.h"
00011 #include "Geometry/GChamGeo.h"
00012 
00013 #include <vector>
00014 #include <string>
00015 
00016 //......................................................................
00017 /// @author Andre Lebedev
00018 /// This module can be used to determine alignment in z for DC1-PWC6
00019 /// using field-on data. In principle, this should also work for
00020 /// field-off data. Reconstructed TrkCand's are picked up, and all
00021 /// single-wire clusters are used, except for those belonging to
00022 /// BC's. At the end of the run, TMinuit is used to minimize either
00023 /// the sum of all chi squared (faster and I think more reliable)
00024 /// or the sum of the squares of correlation coefficients between
00025 /// residuals and dx/dz.
00026 ///
00027 class AlignChamZ : public JobCModule {
00028 public:
00029   typedef struct track__ {
00030     float fWire[kNCham][kNPlane]; ///< Wire number in the cluster
00031     float fWeight[kNCham][kNPlane]; ///< Weight of the wire in the fit
00032   } TrkInfo_t;
00033 
00034   AlignChamZ(const char* version);
00035   ~AlignChamZ();
00036 
00037   JobCResult Ana(const EDMEventHandle& evt);
00038   
00039   void EndRun(int run, int subrun);
00040   void NewRun(int run, int subrun);
00041 
00042   void Update(const CfgConfig& c);
00043 
00044   double ComputeF();
00045 
00046 private:
00047   double Fit(const TrkInfo_t& ti, double resid[kNCham][kNPlane],
00048          double dxdz[kNCham]);
00049   void MakeTree();
00050   double ComputeCorrF();
00051   double ComputeChi2F();
00052 
00053 private:
00054   std::vector<TrkInfo_t> fTrackList;
00055   double fLambdaX[kNCham][kNPlane];
00056   double fLambdaY[kNCham][kNPlane];
00057   double fZ0;
00058 
00059   int fDebug; // Controls level of debug printing
00060   std::string fFolder;
00061   int fLoadAlignment; 
00062   int fMinNClust;
00063   std::vector<int> fFixParam;
00064   int fUseCorr;
00065 
00066 };
00067 
00068 #endif // TRK_ALIGN_Z_H
00069 
00070 ////////////////////////////////////////////////////////////////////////

Generated on Mon Nov 23 08:01:43 2009 for MIPP(E907) by  doxygen 1.4.7