Main Page | Modules | Namespace List | Class Hierarchy | Alphabetical List | Class List | Directories | File List | Namespace Members | Class Members | File Members | Related Pages

MakeAlignmentModule.h

Go to the documentation of this file.
00001 
00002 //
00003 //
00004 // MakeAlignmentModule
00005 //
00006 // Package: DetectorAlignment
00007 //
00008 // Alignment engine that processes ntuples files
00009 //
00010 // Contact: rustem@fnal.gov
00011 //
00012 // Created on: Fri Sep 24 15:26:05 2004
00013 //
00015 
00016 #ifndef MAKEALIGNMENTMODULE_H
00017 #define MAKEALIGNMENTMODULE_H
00018 
00019 //LOCAL
00020 #include "AlignmentStrip.h"
00021 #include "AlignmentAlgorithm.h"
00022 #include "AlignmentHistograms.h"
00023 #include "AlignmentRunSummary.h"
00024 
00025 //MINOS
00026 #include "JobControl/JobCModule.h"
00027 #include "Plex/PlexStripEndId.h"
00028 #include "Validity/VldContext.h"
00029 
00030  //ROOT
00031 #include "TStopwatch.h"
00032 
00033 //C++
00034 #include <iostream>
00035 #include <string>
00036 #include <map>
00037 #include <vector>
00038 
00039 using std::map;
00040 using std::vector;
00041 
00042 class MomNavigator;
00043 class UgliGeomHandle;
00044 class UgliStripHandle;
00045 
00046 class AlignmentHistograms;
00047 class NtpAlignmentRecord;
00048 class NtpAlignTrackStrip;
00049 class NtpAlignCandStrip;
00050 
00051 class MakeAlignmentModule : public JobCModule
00052 {
00053 public:
00054    
00055    MakeAlignmentModule();
00056    virtual ~MakeAlignmentModule(){};
00057    void BeginJob();              
00058    JobCResult Ana(const MomNavigator* mom);
00059    void EndJob();
00060 
00061 private:
00062    
00063    bool ReadRecord(const NtpAlignmentRecord* ntprec);
00064 
00065    void ProcessRecord(const NtpAlignmentRecord* ntprec);
00066 
00067    bool RecalculateResiduals();
00068    
00069    bool GetTrackQuality(const NtpAlignmentRecord* ntprec);
00070    
00071    double FitTrackLessOne(vector<AlignmentStrip>::const_iterator begin, 
00072                           vector<AlignmentStrip>::const_iterator end, 
00073                           vector<AlignmentStrip>::const_iterator skip);
00074    
00075    void ConvertToLocal(AlignmentStrip &astrip, 
00076                        PlexStripEndId &plexid, 
00077                        UgliGeomHandle &ugh,
00078                        UgliStripHandle &ush);
00079 
00080    void PrintJobStatistics();
00081 
00082    void PrintAlignmentStrip(const AlignmentStrip& astrip);
00083 
00084    //three major alignment objects
00085    AlignmentAlgorithm* fAlgorithm;
00086    AlignmentHistograms* fHistogram;
00087    AlignmentRunSummary fRunSummary;
00088    
00089    const VldTimeStamp fNearCoilOn; //Time when ND coil was first turned on
00090    
00091    TFile *fRootFile;
00092 
00093    int fIteration; //Alignment iteration number
00094    VldContext fValidityContext; //VldContext of current record
00095 
00096    int fCurrentRun;
00097    int fCurrentSubRun;
00098    int fNProcessedSubruns;
00099    const int fNSubRunsPerSubset;
00100 
00101    vector<AlignmentStrip> fTrackVStrip;
00102    vector<AlignmentStrip> fTrackUStrip;
00103    vector<AlignmentStrip> fCandVStrip;
00104    vector<AlignmentStrip> fCandUStrip;
00105 
00106    const Double_t fMaxTrackChargeCut;
00107    const Double_t fMinTrackChargeCut;
00108    const Double_t fMaxSigmaOfTPosCut;
00109    const Double_t fTrackChargeRatioCut;
00110    const Double_t fMinCosZCut;
00111    const Double_t fMinTrackStripChargeCut;
00112    const Double_t fMaxTrackStripChargeCut;
00113 
00114    const Int_t fSpecialNDRunNumber;
00115    
00116    bool fRecalculateResidual;
00117    bool fApplyCuts;
00118 
00119    const unsigned int fStatisticalSubsetSize;   
00120 
00121    unsigned int fNFailedFit;
00122    unsigned int fNRecords;
00123    unsigned int fNPassedRecords;
00124    unsigned int fNSubsetRecords;
00125    unsigned int fNFailedRead;
00126    unsigned int fNMissedVPlane;
00127    unsigned int fNMissedUPlane;
00128    unsigned int fTotalVPlaneHits;
00129    unsigned int fTotalUPlaneHits;
00130    unsigned int fFailedCut;
00131    unsigned int fNHitsOutsideStrip;
00132    unsigned int fNFailedCutMaxVStripCharge;
00133    unsigned int fNFailedCutMaxUStripCharge;
00134    
00135    Double_t fMissedVPlaneMeanCharge;
00136    Double_t fMissedUPlaneMeanCharge;
00137    Double_t fMissedVPlaneChargeSigma;
00138    Double_t fMissedUPlaneChargeSigma;
00139    
00140    unsigned int fNFailedTrackChargeCut;
00141    unsigned int fNFailedStripChargeCut;
00142    unsigned int fNFailedCosZCut;
00143    unsigned int fNFailedChargeRatioCut;
00144    unsigned int fNFailedSigmaTPosCut;
00145 
00146    TStopwatch fTimer;
00147    TStopwatch fTimerInterval;
00148 };
00149 
00150 
00151 #endif

Generated on Mon Feb 15 11:06:56 2010 for loon by  doxygen 1.3.9.1