00001 #ifndef STAR_StEmcSimpleSimulator 00002 #define STAR_StEmcSimpleSimulator 00003 00004 // $Id: StEmcSimpleSimulator.h,v 1.8 2007/10/08 15:28:37 kocolosk Exp $ 00005 00006 #include "TRandom3.h" 00007 00008 #include "StEmcVirtualSimulator.h" 00009 #include "StEvent/StEnumerations.h" 00010 00011 class StBemcTables; 00012 class StEmcGeom; 00013 00014 /***************************************************************************** 00015 * @class StEmcSimpleSimulator 00016 * @author A.Pavlinov -> A.Suaide -> A.Kocoloski 00017 * 00018 * This class provides simple transition from deposit energy to ADC using 00019 * ADC's scale, energy scale and sampling fraction function. It is correct for 00020 * case when the main fluctuations come from shower fluctuations. Possible 00021 * modes of operation include 00022 * 00023 * kTestMode: ADC = 0 and energy = dE * sampling fraction 00024 * kSimpleMode: Simple transition using DB tables and sampling fraction 00025 *****************************************************************************/ 00026 class StEmcSimpleSimulator : public StEmcVirtualSimulator 00027 { 00028 protected: 00029 StDetectorId mDetectorId; 00030 StEmcSimulatorMode mMode; 00031 00032 const StBemcTables* mTables; 00033 const StEmcGeom* mGeom; 00034 00035 double mSF[3]; 00036 double mMaxADC; 00037 double mMaxADCSpread; 00038 00039 bool mEmbeddingMode; 00040 double mCalibScale; 00041 double mCalibSpread; 00042 00043 TRandom3 mRandom; 00044 00045 double samplingFraction(double eta); 00046 00047 public: 00048 StEmcSimpleSimulator(StDetectorId det, StEmcSimulatorMode mode); 00049 virtual ~StEmcSimpleSimulator() { /* nothing */ } 00050 00052 void setTables(const StBemcTables *tables) { mTables = tables; } 00053 00055 void setCalibScale(float scale) { mCalibScale = scale; } 00056 00058 void setCalibSpread(float spread) { mCalibSpread = spread; } 00059 00061 void setEmbeddingMode(bool flag) { mEmbeddingMode = flag; } 00062 00064 void setMaximumAdc(double adc) { mMaxADC = adc; } 00065 00067 void setMaximumAdcSpread(double spread) { mMaxADCSpread = spread; } 00068 00070 virtual StEmcRawHit* makeRawHit(const StMcCalorimeterHit *mcHit); 00071 00072 ClassDef(StEmcSimpleSimulator, 2) 00073 }; 00074 #endif 00075 00076 /***************************************************************************** 00077 * $Log: StEmcSimpleSimulator.h,v $ 00078 * Revision 1.8 2007/10/08 15:28:37 kocolosk 00079 * setMaximumAdc(Spread) methods allow for better simulation of BSMD ADC response 00080 * http://www.star.bnl.gov/HyperNews-star/get/emc2/2507.html 00081 * 00082 * Revision 1.7 2007/09/11 21:56:07 kocolosk 00083 * remove a couple of unused variables 00084 * 00085 * Revision 1.6 2007/09/11 21:49:14 kocolosk 00086 * complete overhaul of the BEMC simulator 00087 * http://www.star.bnl.gov/HyperNews-star/get/emc2/2486.html 00088 * 00089 * Revision 1.5 2005/03/21 21:36:39 suaide 00090 * fixed problem with chain 00091 * 00092 * Revision 1.4 2004/08/06 13:24:48 suaide 00093 * New features added and fixed some bugs in the database 00094 * 00095 * Revision 1.3 2003/09/23 15:19:51 suaide 00096 * fixed bugs and modifications for embedding 00097 * 00098 * Revision 1.2 2002/06/04 16:09:36 pavlinov 00099 * added option with DB(pedestal ans calibration coefficients 00100 * 00101 * Revision 1.1 2000/10/23 22:53:14 pavlinov 00102 * First working C++ version 00103 *****************************************************************************/
1.5.9