AlignTPCDrift2.h

Go to the documentation of this file.
00001 ////////////////////////////////////////////////////////////////////////
00002 // $Id: AlignTPCDrift2.h,v 1.1 2007/03/06 15:49:49 lebedev Exp $
00003 //
00004 // lebedev@physics.harvard.edu
00005 ////////////////////////////////////////////////////////////////////////
00006 
00007 #ifndef ALIGN_TPC_DRIFT2_H
00008 #define ALIGN_TPC_DRIFT2_H
00009 
00010 #include "JobControl/JobCModuleFactory.h"
00011 #include <vector>
00012 #include <string>
00013 
00014 class SwimMIPP;
00015 
00016 //......................................................................
00017 /// @author lebedev@physics.harvard.edu
00018 /// Class which picks up global tracks and minimizes the sum of chi
00019 /// squared by scaling drift velocity vector components
00020 ///
00021 class AlignTPCDrift2 : public JobCModule {
00022 public:
00023   typedef struct {
00024     int   fNTPCHit;
00025     float fPadX[128];
00026     float fPadZ[128];
00027     float fDriftT[128];
00028 
00029     int   fNChamHit;
00030     float fChamZ[36];
00031     float fU[36];
00032     float fW[36];
00033     float fCosA[36];
00034     float fSinA[36];
00035     double fPar[5];
00036     double fZ0;
00037     SwimMIPP* fSwim;
00038   } TrkInfo_t;
00039 
00040   AlignTPCDrift2(const char* version);
00041   ~AlignTPCDrift2();
00042 
00043   JobCResult Ana(const EDMEventHandle& evt);
00044   
00045   void NewRun(int run, int subrun);
00046   void EndRun(int run, int subrun);
00047 
00048   void Update(const CfgConfig& c);
00049 
00050   static void MinFCN(int& /*npar*/, double* /*gin*/, double& f,
00051             double* par, int /*iflag*/);
00052 
00053 private:
00054   double ComputeTrkChi2(TrkInfo_t& trk);
00055 
00056 private:
00057   static AlignTPCDrift2* gModule;
00058   
00059   std::vector<TrkInfo_t> fTrkInfo;
00060 
00061   int fDebug; // Controls level of debug printing
00062   std::vector<int> fFixParam; 
00063   std::string fFolder;
00064   int fMinTrkVtx;
00065   int fRequireBeamTrk;
00066   int fMinTPCHits;
00067   int fMaxTPCHits;
00068   int fMinChamHits;
00069   float fMinP;
00070   float fMinGoF;
00071   float fTPCSigmaX;
00072   float fTPCSigmaY;
00073   float fMinTrkTime;
00074   float fMaxTrkTime;
00075   
00076 };
00077 
00078 #endif // ALIGN_TPC_DRIFT2_H
00079 
00080 ////////////////////////////////////////////////////////////////////////

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