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

TrackDirectionModule.h

Go to the documentation of this file.
00001 
00002 //
00003 //
00004 // TrackDirectionModule
00005 //
00006 // Package: DetectorAlignment
00007 //
00008 // Contact: rustem@fnal.gov
00009 //
00010 // Created on: Fri Jul 23 15:26:05 2005
00011 //
00013 
00014 #ifndef TRACKDIRECTIONMODULE_H
00015 #define TRACKDIRECTIONMODULE_H
00016 
00017 //LOCAL
00018 #include "AlignmentStrip.h"
00019 
00020 //MINOS
00021 #include "JobControl/JobCModule.h"
00022 #include "Plex/PlexStripEndId.h"
00023 
00024  //ROOT
00025 #include "TStopwatch.h"
00026 
00027 //C++
00028 #include <vector>
00029 
00030 using std::vector;
00031 
00032 class VldContext;
00033 class MomNavigator;
00034 class NtpAlignmentRecord;
00035 class UgliGeomHandle;
00036 class UgliStripHandle;
00037 class TFile;
00038 class TTree;
00039 class TH1D;
00040 class TH2D;
00041 
00042 class TrackDirectionModule : public JobCModule
00043 {
00044 public:
00045    
00046    TrackDirectionModule();
00047    virtual ~TrackDirectionModule(){};
00048    void BeginJob();              
00049    JobCResult Ana(const MomNavigator* mom);
00050    void EndJob();
00051 
00052 private:
00053    
00054    bool ProcessRecord(const NtpAlignmentRecord* ntprec, 
00055                       const VldContext& vldc);
00056    
00057    bool GetTrackRecoQuality(const NtpAlignmentRecord* ntprec);
00058    
00059    void CountNHits(const PlexStripEndId& plexid);
00060 
00061    void ConvertToLocal(AlignmentStrip &astrip, 
00062                        PlexStripEndId &plexid, 
00063                        UgliGeomHandle &ugh,
00064                        UgliStripHandle &ush);
00065 
00066    void PrintJobStatistics();
00067    
00068    bool GetDirectionalCosines(Double_t &cosx, Double_t &cosy, Double_t &cosz, 
00069                               Double_t &length, Double_t &sigma, const VldContext &vld);
00070    
00071    TFile *fTrackDirectionFile;
00072 
00073    TStopwatch fTimer;
00074    TStopwatch fTimerInterval;
00075    
00076    int fRun;
00077    int fSubRun;
00078    
00079    vector<AlignmentStrip> fTrackVStrip;
00080    vector<AlignmentStrip> fTrackUStrip;
00081 
00082    TH1D *fhCosX;
00083    TH1D *fhCosY;
00084    TH1D *fhCosZ;
00085    TH1D *fhTrackLength;
00086    
00087    TH2D *f2hCosXvsCosZ;
00088    TH2D *f2hCosYvsCosZ;
00089    TH2D *f2hCosYvsCosX;
00090 
00091    //track quality cuts
00092    const Double_t fMaxTrackChargeCut;
00093    const Double_t fMinTrackChargeCut;
00094    const Double_t fMaxSigmaOfTPosCut;
00095    const Double_t fTrackChargeRatioCut;
00096    const Double_t fMinCosZCut;
00097    const Double_t fMinTrackStripChargeCut;
00098    const Double_t fMaxTrackStripChargeCut;
00099    
00100    bool fApplyCuts;  
00101    
00102    //tree and tree variables
00103    TTree *fTrackDirectionTree;
00104    Double_t fCosX;
00105    Double_t fCosY;
00106    Double_t fCosZ;
00107    Double_t fLength;
00108    Double_t fSigma;
00109    Double_t fTime;
00110    Double_t fAltitude;
00111    Double_t fAzimuth;
00112    Double_t fCharge;
00113    Double_t fNStrip;
00114    UInt_t fYear, fMonth, fDay, fHour, fMinute, fSec;
00115 
00116    unsigned int fNRecords;
00117    unsigned int fNFailedRead;
00118    unsigned int fFailedCut;
00119    unsigned int fNFailedCutMaxVStripCharge;
00120    unsigned int fNFailedCutMaxUStripCharge;
00121    unsigned int fNFailedTrackChargeCut;
00122    unsigned int fNFailedCosZCut;
00123    unsigned int fNFailedChargeRatioCut;
00124    unsigned int fNFailedSigmaTPosCut;
00125 };
00126 
00127 #endif //TRACKDIRECTIONMODULE_H

Generated on Mon Feb 15 11:07:43 2010 for loon by  doxygen 1.3.9.1