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

AlignmentAlgorithm.h

Go to the documentation of this file.
00001 
00002 //
00003 //
00004 // AlignmentAlgorithm
00005 //
00006 // Package: DetectorAlignment
00007 //
00008 // An alignment engine's class 
00009 //
00010 // Contact: rustem@fnal.gov
00011 //
00012 // Created: Wed Jul 27 21:25:05 2005
00013 //
00015 
00016 #ifndef ALIGNMENTALGORITHM_H
00017 #define ALIGNMENTALGORITHM_H
00018 
00019 //Local package headers
00020 #include "SubsetStat.h"
00021 #include "AlignmentStripHistograms.h"
00022 #include "StatisticalFluctuations.h"
00023 
00024 //MINOS headers
00025 #include "Plex/PlexStripEndId.h"
00026 
00027 //C++ headers
00028 #include <map>
00029 #include <cstring>
00030 
00031 using std::map;
00032 
00033 class TDirectory;
00034 class TH1D;
00035 class TProfile;
00036 class TFile;
00037 class NtpAlignmentRecord;
00038 class VldContext;
00039 
00040 class AlignmentAlgorithm
00041 {
00042    
00043 public:
00044    
00045    AlignmentAlgorithm(TFile *rootfile, const VldContext vldc);
00046 
00047    virtual ~AlignmentAlgorithm();
00048    
00049    void Fill(const AlignmentStrip& astrip);
00050 
00051    void FillCandStrip(const AlignmentStrip& astrip);
00052 
00053    void ResetSubset(const VldContext &vldc, const int ntracks) {fFluctuations.Reset(vldc, ntracks);};
00054 
00055    void FitStripAttenuationHistograms();
00056 
00057    void RunAlgorithm();
00058 
00059 private:
00060 
00061    TFile *fRootFile;
00062    TDirectory *fdNonTrackStripChargeDir;
00063    TDirectory *fdMdlResDir;
00064    TDirectory *fdMdlRotResDir;
00065    TDirectory *fdPlaneRotResDir;
00066 
00067    TDirectory *fdResidualDir;
00068    TDirectory *fdChargeDir;
00069    TDirectory *fdAttenDir;
00070    TDirectory *fdOccupancyDir;
00071    TDirectory *fdRotResDir;
00072 
00073    TProfile* GetMdlRotationalResidualHistogram(int plane, int module, double low, double high);
00074    TProfile* GetPlaneRotationalResidualHistogram(int plane, double low, double high);
00075 
00076    void AnalyzeStripData();
00077 
00078    void AnalyzeModuleResiduals();
00079 
00080    void FitPlaneRotRes();
00081    
00082    StatisticalFluctuations fFluctuations;
00083 
00084    //Module residuals
00085    map<PlexScintMdlId, TH1D *> fmModuleResidual; 
00086 
00087    //Object that and initilizes and holds pointers to strip histograms
00088    map<PlexStripEndId, AlignmentStripHistograms> fmStripHistograms; 
00089    
00090    //Rotational module residual TProfile histograms
00091    map<PlexScintMdlId, TProfile *> fpMdlRotationalResidual; 
00092 
00093    //Rotational plane residual TProfile histograms
00094    map<PlexPlaneId, TProfile *> fpPlaneRotationalResidual; 
00095 
00096    //Candidate strip charge histograms
00097    map<PlexStripEndId, TH1D *> fhCandStripCharge;
00098 
00099    bool fAlignmentAlgorithmCompleted;
00100 
00101    const Int_t fNStripChargeBins;
00102    const Int_t fNMdlResBins;
00103    const Double_t fStripChargeLimit;
00104    const Double_t fMdlResLimit;
00105    const Double_t fMdlRotResBinWidth;
00106    const Double_t fMinResHistEntriesForFit;
00107    const Double_t fMinAttenHistEntriesForFit;
00108    const Double_t fMinRotResHistEntriesForFit;
00109    const Double_t fMinStripRotResHistEntriesForFit;
00110    const Double_t fPlaneRotResBinWidth;
00111    
00112    //initial values for strip attenuation exponential fit
00113    const Double_t fStripAttenPar0;
00114    const Double_t fStripAttenPar1;
00115 };
00116 
00117 #endif //ALIGNMENTHISTOGRAMS_H

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