00001 00002 00003 // Program name: CDPreFilterModule.cxx 00004 // 00005 // Package: CalDetTracker 00006 // 00007 // Purpose: To only pass snarls with what you are interested in. 00008 // 00009 // Contact: Chris Smith, Ryan Nichol, Leo Jenner or Jeff Hartnell 00011 00012 #ifndef CDPREFILTERMODULE_H 00013 #define CDPREFILTERMODULE_H 00014 00015 #include <string> 00016 00017 #include "JobControl/JobCModule.h" 00018 #include "Conventions/Detector.h" 00019 00020 class RawDigitDataBlock; 00021 class MomNavigator; 00022 00023 class CDPreFilterModule : public JobCModule 00024 { 00025 00030 00032 00033 public: 00034 00035 CDPreFilterModule(); 00036 00037 //methods that modify the objects state 00038 JobCResult Ana(const MomNavigator *mom); //Analysis method 00039 void Config(const Registry &r); 00040 void EndJob(); 00041 void HandleCommand(JobCommand* cmd); //Handle a job command 00042 00043 //methods that don't modify the objects state 00044 const Registry &DefaultConfig() const; 00045 00046 private: 00047 00048 //methods that modify the objects state 00049 Bool_t FilterOnSnarlSize(const RawDigitDataBlock* rddb); 00050 Bool_t FilterSnarlForErrors(const RawDigitDataBlock* rddb); 00051 00052 //methods that don't modify the objects state 00053 std::string GetCutStatus(Int_t cut) const; 00054 std::string GetErrorString() const; 00055 std::string Pct(Double_t top,Double_t bottom) const; 00056 void PrintFilterSummary() const; 00057 std::string SForm(Int_t number) const; 00058 00059 //declare the variables to control the cuts 00060 int fplanetrig;//plane trigger (only has implementations for 0 and 1) 00061 UInt_t fnplane;//pass at least n/n+1 plane trigger 00062 00063 //beam spill trigger. For this option, there is also: 00064 //2 = accept only if there are digits in raw tof block 00065 //-2 = accept only if there are NO digits in raw tof block 00066 int fbeamonly; 00067 int fcerenkov; //Cerenkov 00068 int fnodeadchips; //No Dead Chips 00069 int fli; //LI 00070 int ftof; //Time of flight 00071 Int_t fNoNdErrors; 00072 Int_t fNoFdErrors; 00073 Int_t fBigSnarls; 00074 00075 //declare the counters 00076 Int_t fPlaneTrigCounter; 00077 Int_t fBeamOnlyCounter; 00078 Int_t fCerenkovCounter; 00079 Int_t fNoDeadChipsCounter; 00080 Int_t fLiCounter; 00081 Int_t fTofCounter; 00082 Int_t fTotalFailedCounter; 00083 Int_t fTotalPassedCounter; 00084 Int_t fTotalInputCounter; 00085 Int_t fNoNdErrorsCounter; 00086 Int_t fNoFdErrorsCounter; 00087 Int_t fBigSnarlsCounter; 00088 00089 //high level error counters 00090 Int_t fNdSnarlErrorCounter; 00091 Int_t fNdSnarlFFFFCounter; 00092 Int_t fFdSnarlErrorCounter; 00093 Int_t fDigitCounter; 00094 Int_t fNdDigitCounter; 00095 Int_t fFdDigitCounter; 00096 Int_t fNdDigitErrorCounter; 00097 Int_t fNdDigitFFFFCounter; 00098 Int_t fFdDigitErrorCounter; 00099 00100 //individual error counters 00101 Int_t fNdParityErrorCounter; 00102 Int_t fNdCapIdErrorCounter; 00103 Int_t fNdMisCountErrorCounter; 00104 Int_t fNdPriorityTruncateCounter; 00105 Int_t fFdAdcNegativeCounter; 00106 Int_t fFdNonStdDataCounter; 00107 Int_t fFdWarningStateCounter; 00108 Int_t fFdParityErr0Counter; 00109 Int_t fFdParityErr1Counter; 00110 Int_t fFdWordBitErr0Counter; 00111 Int_t fFdWordBitErr1Counter; 00112 00113 //variables for cutting on snarl size 00114 UInt_t fMinNumDigitsHit; 00115 UInt_t fMinNumChannelsHit; 00116 00117 //other 00118 Detector::Detector_t fDetector; 00119 }; 00120 00121 #endif // CDPREFILTERMODULE_H 00122 00123 00124 00125 00126 00127 00128 00129 00130 00131
1.3.9.1