00001 // $Id: StTrsMaker.h,v 1.24 2008/06/20 15:00:57 fisyak Exp $ 00002 // 00003 // $Log: StTrsMaker.h,v $ 00004 // Revision 1.24 2008/06/20 15:00:57 fisyak 00005 // move from StTrsData to StTpcRawData 00006 // 00007 // Revision 1.23 2005/09/09 22:12:48 perev 00008 // Bug fix + IdTruth added 00009 // 00010 // Revision 1.21 2005/07/19 22:21:06 perev 00011 // Bug fix 00012 // 00013 // Revision 1.20 2003/12/24 13:44:47 fisyak 00014 // Add (GEANT) track Id information in Trs; propagate it via St_tpcdaq_Maker; account interface change in StTrsZeroSuppressedReaded in StMixerMaker 00015 // 00016 // Revision 1.19 2003/09/10 19:47:41 perev 00017 // ansi corrs 00018 // 00019 // Revision 1.18 2003/05/02 23:54:19 hardtke 00020 // Allow user to adjust normalFactor (i.e. Fudge Factor) 00021 // 00022 // Revision 1.17 2002/02/05 22:21:28 hardtke 00023 // Move Init code to InitRun 00024 // 00025 // Revision 1.16 2000/08/04 21:03:58 perev 00026 // Leaks + Clear() cleanup 00027 // 00028 // Revision 1.15 2000/01/10 23:11:07 lasiuk 00029 // Include MACROS for compatibility with SUN CC5.0 00030 // 00031 // Revision 1.14 1999/11/11 19:42:25 calderon 00032 // Add #ifdef HISTOGRAM for Ntuple Diagnostics. 00033 // Use ROOT_DATABASE_PARAMETERS. As soon as Jeff and Dave give Ok, 00034 // we will switch to TPC_DATABASE_PARAMETERS. 00035 // 00036 // Revision 1.13 1999/11/05 22:10:13 calderon 00037 // Added Clear() method in StTrsMaker. 00038 // Removed StTrsUnpacker from maker. 00039 // Added StTrsZeroSuppressedReader and StTrsZeroSuppressedReader 00040 // for DAQ type interface to event data. 00041 // Made private copy constructor and operator= in classes that needed it. 00042 // Renamed the DigitalSignalGenerators: Fast -> Old, Parameterized -> Fast, 00043 // and the default to use is the new "Fast" which has the 10-8 bit conversion. 00044 // Removed vestigial loop in AnalogSignalGenerator. 00045 // Added Time diagnostics. 00046 // Added trsinterface.pdf in doc/ directory. 00047 // Write version of data format in .trs data file. 00048 // 00049 // Revision 1.12 1999/10/11 23:54:32 calderon 00050 // Version with Database Access and persistent file. 00051 // Not fully tested due to problems with cons, it 00052 // doesn't find the local files at compile time. 00053 // Yuri suggests forcing commit to work directly with 00054 // files in repository. 00055 // 00056 // Revision 1.11 1999/10/04 17:33:43 long 00057 // add mUseParameterizedSignalGenerator 00058 // 00059 // Revision 1.10 1999/07/20 02:16:59 lasiuk 00060 // bring in line with new options (TSS algorithms) 00061 // 00062 // Revision 1.9 1999/07/15 13:57:31 perev 00063 // cleanup 00064 // 00065 // Revision 1.8 1999/03/20 20:07:57 fisyak 00066 // Add access to DataSet with parameters 00067 // 00068 // Revision 1.7 1999/03/20 03:23:58 lasiuk 00069 // setMiniSegmentLength() 00070 // setFirstSectorToProcess() 00071 // setLastSectorToProcess() 00072 // 00073 // Revision 1.6 1999/03/16 02:01:45 lasiuk 00074 // add Finish() which frees the memory allocated in Init() 00075 // 00076 // Revision 1.5 1999/03/15 02:52:26 perev 00077 // new Maker schema 00078 // 00079 // Revision 1.4 1999/02/19 16:28:24 fisyak 00080 // Change given name of Maker 00081 // 00082 // Revision 1.3 1999/02/10 04:30:02 lasiuk 00083 // add unpacker and rawevent as data members/ passed by dataset 00084 // 00085 // Revision 1.2 1999/02/04 18:39:25 lasiuk 00086 // Add private member whichSector() to decode volumeId; 00087 // add multiple sector capabilities 00088 // add unpacker 00089 // runs in LINUX 00090 // 00091 // Revision 1.1 1999/01/22 21:31:46 lasiuk 00092 // Name change 00093 // 00094 // Revision 1.2 1999/01/22 11:43:09 lasiuk 00095 // add output structures 00096 // 00097 // 00098 #ifndef STAR_St_Trs_Maker 00099 #define STAR_St_Trs_Maker 00100 00102 // // 00103 // StTrsMaker virtual base class for Maker // 00104 // // 00106 #ifndef StMaker_H 00107 #include "StMaker.h" 00108 #endif 00109 00110 #ifndef HEP_SYSTEM_OF_UNITS_H 00111 #include "SystemOfUnits.h" 00112 #endif 00113 #ifndef ST_NO_NAMESPACES 00114 using namespace units; 00115 #endif 00116 00117 00118 // Dbs 00119 class StTpcGeometry; 00120 class StTpcSlowControl; 00121 class StMagneticField; 00122 class StTpcElectronics; 00123 class StTrsDeDx; 00124 00125 // Processes 00126 class StTrsChargeTransporter; 00127 class StTrsAnalogSignalGenerator; 00128 class StTrsDigitalSignalGenerator; 00129 00130 // Containers 00131 class StTrsWireHistogram; 00132 class StTrsSector; 00133 #include "StTrsDigitalSector.hh" 00134 00135 // Output Data 00136 #include "StTrsRawDataEvent.hh" 00137 00138 class TFile; 00139 class TNtuple; 00140 class g2t_tpc_hit_st; 00141 00142 class StTrsMaker : public StMaker { 00143 private: 00144 StTrsMaker(const StTrsMaker&); 00145 StTrsMaker& operator=(const StTrsMaker&); 00146 // static Char_t m_VersionCVS = "$Id: StTrsMaker.h,v 1.24 2008/06/20 15:00:57 fisyak Exp $"; 00147 // Int_t m_mode; // mode 1 = primaries; 00148 // St_stk_stkpar *m_stk_stkpar; //! pointer to stk parameters 00149 00150 00151 // DataBases 00152 char mBeg[1]; 00153 StTpcGeometry *mGeometryDb; 00154 StTpcSlowControl *mSlowControlDb; 00155 StMagneticField *mMagneticFieldDb; 00156 StTpcElectronics *mElectronicsDb; 00157 StTrsDeDx *mGasDb; 00158 00159 // Processes 00160 StTrsChargeTransporter *mChargeTransporter; 00161 StTrsAnalogSignalGenerator *mAnalogSignalGenerator; 00162 StTrsDigitalSignalGenerator *mDigitalSignalGenerator; 00163 00164 // Container 00165 StTrsWireHistogram *mWireHistogram; 00166 StTrsSector *mSector; 00167 StTrsDigitalSector *mDigitalSector; 00168 00169 // Output 00170 StTrsRawDataEvent *mAllTheData; 00171 00172 // Calculation and Initialization Done Internally in the Maker 00173 double mMiniSegmentLength; 00174 int mFirstSectorToProcess; 00175 int mLastSectorToProcess; 00176 // should be a boolean 00177 int mProcessPseudoPadRows; 00178 int mWriteToFile; 00179 int mReadFromFile; 00180 00181 // Which Algorithm to be used: 00182 int mUseParameterizedSignalGenerator; 00183 00184 // Gain normalization Factor 00185 double mNormalFactor; 00186 00187 protected: 00188 00189 public: 00190 TFile* mTrsNtupleFile; 00191 TNtuple* mWireNtuple; 00192 TNtuple* mContinuousAnalogNtuple; 00193 TNtuple* mDiscreteAnalogNtuple; 00194 TNtuple* mDigitalNtuple; 00195 char mEnd[1]; 00196 00197 public: 00198 StTrsMaker(const char *name="Trs"); 00199 ~StTrsMaker(); 00200 Int_t Init(); 00201 Int_t InitRun(int runnumber); 00202 Int_t Make(); 00203 Int_t Finish(); 00204 void Clear(const char *opt=""); 00205 00206 void setMiniSegmentLength(double len=4.) {mMiniSegmentLength = len*millimeter;} // *MENU* 00207 void setFirstSectorToProcess(int first=1){mFirstSectorToProcess = first;} // *MENU* 00208 void setLastSectorToProcess(int last=24) {mLastSectorToProcess = last;} // *MENU* 00209 00210 int readFile(char*); 00211 int writeFile(char*, int); 00212 void setNormalFactor(double FudgeFactor=1.0); 00213 00214 virtual const char *GetCVS() const 00215 { 00216 static const char cvs[]= "Tag $Name: $ $Id: StTrsMaker.h,v 1.24 2008/06/20 15:00:57 fisyak Exp $ built __DATE__ __TIME__" ; return cvs;} 00217 00218 ClassDef(StTrsMaker,0) //StAF chain virtual base class for Makers 00219 00220 private: 00221 void whichSector(int, int*, int*, int*); 00222 void CheckTruth(int no_tpc_hits, g2t_tpc_hit_st *tpc_hit); 00223 00224 }; 00225 00226 #endif
1.5.9