AlignRotB.h

Go to the documentation of this file.
00001 ////////////////////////////////////////////////////////////////////////
00002 // $Id: AlignRotB.h,v 1.1 2007/01/09 21:45:45 lebedev Exp $
00003 //
00004 // lebedev@physics.harvard.edu
00005 ////////////////////////////////////////////////////////////////////////
00006 
00007 #ifndef TRK_ROTB_H
00008 #define TRK_ROTB_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 rotation of B-field components
00019 /// around z-axis. The reason one may want to do this is that in the
00020 /// event that Hall probes were not perfectly well aligned during
00021 /// survey, By will bleed into Bx, which will cause an incorrect
00022 /// kick in y. This module requires TrkCandBuilder with BC tracks
00023 /// pulled into the fit.
00024 ///
00025 class AlignRotB : public JobCModule {
00026 public:
00027   typedef struct track__ {
00028     float fWire[kNCham][kNPlane]; ///< Wire number in the cluster
00029     float fWeight[kNCham][kNPlane]; ///< Weight of the wire in the fit
00030   } TrkInfo_t;
00031 
00032   AlignRotB(const char* version);
00033   ~AlignRotB();
00034 
00035   JobCResult Ana(const EDMEventHandle& evt);
00036   
00037   void EndRun(int run, int subrun);
00038   void NewRun(int run, int subrun);
00039 
00040   void Update(const CfgConfig& c);
00041 
00042   double ComputeF();
00043 
00044 private:
00045   double Fit(const TrkInfo_t& ti, double resid[kNCham][kNPlane],
00046          double dxdz[kNCham]);
00047   void MakeTree();
00048 
00049 private:
00050   std::vector<TrkInfo_t> fTrackList;
00051   double fLambdaX[kNCham][kNPlane];
00052   double fLambdaY[kNCham][kNPlane];
00053   double fZ0;
00054 
00055   int fDebug; // Controls level of debug printing
00056   std::string fFolder;
00057   int fMinNClust;
00058   std::vector<int> fFixParam;
00059 };
00060 
00061 #endif // ALIGN_ROTB_H
00062 
00063 ////////////////////////////////////////////////////////////////////////

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