00001 00002 // $Id: AutoPIDMaker.h,v 1.6 2003/09/17 09:40:51 kordosky Exp $ 00003 // 00004 // FILL_IN: [Document your code!!] 00005 // 00006 // kordosky@hep.utexas.edu 00008 #ifndef AUTOPIDMAKER_H 00009 #define AUTOPIDMAKER_H 00010 #ifndef JOBCMODULE_H 00011 #include "JobControl/JobCModule.h" 00012 #endif 00013 00014 #include <string> 00015 #include <map> 00016 00017 class AutoPIDMaker : public JobCModule 00018 { 00019 public: 00020 AutoPIDMaker(); 00021 ~AutoPIDMaker(); 00022 00023 public: 00024 // Handle job status changes 00025 void BeginJob(); 00026 void EndJob(); 00027 void BeginFile(); 00028 void EndFile(); 00029 void BeginRun(); 00030 void EndRun(); 00031 00032 // Analysis and Reconstruction methods 00033 JobCResult Ana(const MomNavigator* mom); 00034 JobCResult Reco(MomNavigator* mom); 00035 00036 // I/O methods 00037 JobCResult Get(MomNavigator* mom); 00038 00039 // Module configuration 00040 const Registry& DefaultConfig() const; 00041 void Config(const Registry& r); 00042 00043 // User interface methods 00044 void Help(); 00045 00046 00047 private: 00048 float CorrProtonWidth(float p, float w) const; 00049 float CorrProtonTOF(float p) const; 00050 void RCtoMap(std::string& s, std::map<std::string, std::string>&) const; 00051 bool ExtractDouble(std::string& v, double& val) const ; 00052 bool FindDouble(std::map<std::string, std::string>& ms, 00053 const char* k, double& value) const; 00054 bool SanityCheck() const; 00055 static void SetTestComment(const char* c){ftestcomment=c;} 00056 // Module member data 00057 bool fdidrun; // true if the current run has already been dealt with 00058 00059 int fcorrproton; // do tof correction for low energy protons 00060 int fwritetemp; // !=0 if we should write to a temp table 00061 int ftest; // !=0 if we want to test using ftestcomment 00062 static std::string ftestcomment; // a string to mock up the run comments 00063 double ftl; // tof length in meters 00064 double ftp; // tof ped in 35ps tdc ticks, by convention = mean for elec. 00065 double ftw; // tof width in 35 ps tdc ticks 00066 double fbp; // beam momentum 00067 double fuspr; // us cer pressure 00068 double fmidpr; // mid cer pressure 00069 double fdspr; // ds cer pressure 00070 00071 double ftofsigma; // # of sigma to use in tof windows 00072 00073 // ranges here in adc counts 00074 float fuscerlow; // low edge for selection on uscer 00075 float fuscerhigh; // low edge for selection on uscer 00076 float fmidcerlow; // low edge for selection on midcer 00077 float fmidcerhigh; // low edge for selection on midcer 00078 float fdscerlow; // low edge for selection on dscer 00079 float fdscerhigh; // low edge for selection on dscer 00080 00081 // cer timing window ranges in ns 00082 float fusctwlow; // us cerenkov timing window low edge 00083 float fusctwhigh;// us cerenkov timing window high edge 00084 float fmidctwlow; // mid cerenkov timing window low edge 00085 float fmidctwhigh;// mid cerenkov timing window high edge 00086 float fdsctwlow; // ds cerenkov timing window low edge 00087 float fdsctwhigh;// ds cerenkov timing window high edge 00088 00089 // overlap removal window ranges here in ns 00090 float felecollow; // electron low edge of overlap window 00091 float felecolhigh;// electrion high edge of overlap window 00092 float fhadollow; // hadron low edge of overlap window 00093 float fhadolhigh; // hadron low edge of overlap window 00094 00095 00096 }; 00097 #endif // AUTOPIDMAKER_H 00098 00099
1.3.9.1