00001 // $Id: StEEmcFastMaker.h,v 1.14 2010/08/05 21:23:45 stevens4 Exp $ 00002 00003 00004 /* \class StEEmcFastMaker 00005 \author Jan Balewski 00006 00007 Fast simulator of the E-EMC tower response converts energy loss in the tower tails generated by GEANT directly to ADC using eta-dependent conversion factor. The following assumptions are made: 00008 00009 <li> energy deposit in any tail is equal to the sum of contribution from all particles passing its volume. Number of fibers within the tail and type of scintillator is ignored. 00010 <li> all fibers transport to PMT 100% of energy deposited, except tails with a total deposit below 100 keV. 00011 <li> total Geant energy deposit is recorded as in StEvent 00012 <li> ADC=4095 * geantEnergy / samplingFrac / 60GeV / cosh(eta) is recorded as in StEvent 00013 00014 <pre> 00015 Details of the code 00016 ----------------------------- 00017 00018 Decoding of E-EMC hits in StEvent 00019 <hr> 00020 __ENDCAP__ 00021 TOWERS: det = kEndcapEmcTowerId 00022 sector 1-12 -->module 0-11 00023 subsector A-E -->submodule 0-4 00024 jeta 1-12 -->eta 0-11 00025 00026 PRE1-, PRE2-, POST-shower: all det = kEndcapEmcPreshowerId 00027 sector,subsector,eta : the same 00028 add 0, 5, or 10 to submodule for PRE1-, PRE2-, POST-shower 00029 00030 SmdU : det=kEndcapSmdUStripId 00031 SmdV : det=kEndcapSmdVStripId 00032 sector 1-12 -->module 0-11 00033 stripID 1-288 -->eta 0-287 00034 -->submodule=0 (not used) 00035 00036 --------------------------------------- 00037 StEEmcFastMaker::Make() { 00038 00039 EEmcMCData *evIN->readEventFromChain(this); // acquire E-EMC hit/track list 00040 00041 EEevent eeveRaw; 00042 evIN->write(&eeveRaw); // copy E-EMC hit/track to local TTree 00043 00044 EEevent eeveRaw.sumRawMC(eeve); //convert it to hit/tail list 00045 00046 EE2ST(eeve, stevent); // add hit/tail list to StEvent 00047 00048 } 00049 00050 ---------------------------------- 00051 usage in bfc.C 00052 00053 00054 StEEmcFastMaker *myMk=new StEEmcFastMaker; 00055 Char_t *after = "BbcSimulation"; 00056 StMaker *xMk = chain->GetMaker(after); 00057 assert(xMk); 00058 chain->AddAfter(after,myMk); 00059 00060 </pre> 00061 Example how to read back E-EMC data from StEvent: 00062 www.star.bnl.gov/STAR/eemc -->How To 00063 00064 */ 00065 00066 #ifndef STAR_StEEmcFastMaker 00067 #define STAR_StEEmcFastMaker 00068 00069 00070 #ifndef StMaker_H 00071 #include "StMaker.h" 00072 #endif 00073 class EEeventDst; 00074 class StEvent; 00075 class EEmcMCData; 00076 class StEmcCollection; 00077 00078 /* Translation of StEmcCollection names: EEMC -->BEMC 00079 00080 WARN: preserve sub<16=2^4, eta<512=2^9, mod<128=2^7 00081 00082 Jan 00083 */ 00084 00085 00086 class StEEmcFastMaker : public StMaker { 00087 00088 public: 00089 00090 static Float_t getSamplingFraction(); 00091 static Float_t *getTowerGains(); 00092 static Float_t getSmdGain(); 00093 static Float_t getPreshowerGain(); 00094 00095 static Int_t getMaxAdc() { return 4095; } // [ADC channels] 00096 static Int_t getMaxET() { return 60 ; } // [GeV] 00097 00098 private: 00099 00100 void mEE2ST(EEeventDst*, StEmcCollection* emcC); 00101 00102 protected: 00103 public: 00104 StEEmcFastMaker(const char *name="EEmcFastSim"); 00105 virtual ~StEEmcFastMaker(); 00106 virtual Int_t Init(); 00107 virtual Int_t Make(); 00108 virtual void Clear(Option_t *option=""); 00109 00110 void SetLocalStEvent(); 00111 void SetEmcCollectionLocal(bool x=true){mEmcCollectionIsLocal=x;} 00112 void SetEmbeddingMode(){SetEmcCollectionLocal(true);} 00113 void UseFullTower(bool flag = true) { mUseFullTower = flag; } // always create all hits, even if ADC=0 00114 void UseFullPreShower(bool flag = true) { mUseFullPreShower = flag; } // includes pre1/pre2/post 00115 void UseFullSmdu(bool flag = true) { mUseFullSmdu = flag; } 00116 void UseFullSmdv(bool flag = true) { mUseFullSmdv = flag; } 00117 StEmcCollection * GetLocalEmcCollection() { return mLocalStEmcCollection;} 00118 00119 virtual const char *GetCVS() const { 00120 static const char cvs[]="Tag $Name: $ $Id: StEEmcFastMaker.h,v 1.14 2010/08/05 21:23:45 stevens4 Exp $ built "__DATE__" "__TIME__ ; 00121 return cvs; 00122 } 00123 private: 00124 00125 EEmcMCData *mevIN; 00126 EEeventDst *meeve; 00127 float *mfixTgain; 00128 00129 StEmcCollection *mLocalStEmcCollection; // for special uses (embedding) 00130 bool mEmcCollectionIsLocal; 00131 bool mUseFullTower; 00132 bool mUseFullPreShower; 00133 bool mUseFullSmdu; 00134 bool mUseFullSmdv; 00135 00136 ClassDef(StEEmcFastMaker,0) 00137 }; 00138 00139 #endif 00140 00141 00142 // $Log: StEEmcFastMaker.h,v $ 00143 // Revision 1.14 2010/08/05 21:23:45 stevens4 00144 // Update sampling fraction to 4.8% 00145 // 00146 // Revision 1.13 2010/07/29 16:12:03 ogrebeny 00147 // Update after the peer review 00148 // 00149 // Revision 1.12 2009/12/09 20:38:00 ogrebeny 00150 // User-switchable function added to always create all hits, even if ADC=0. Requested by Pibero for the trigger simulator. 00151 // 00152 // Revision 1.11 2007/03/23 03:26:23 balewski 00153 // Corretions from Victor 00154 // 00155 // Revision 1.10 2007/01/24 21:07:02 balewski 00156 // 1) no cout or printf, only new Logger 00157 // 2) EndcapMixer: 00158 // - no assert() 00159 // - locks out on first fatal error til the end of the job 00160 // 00161 // Revision 1.9 2007/01/12 23:57:12 jwebb 00162 // Calculation of ideal gains moved into static member function getTowerGains() 00163 // to allow slow simulator to access them. 00164 // 00165 // Revision 1.8 2006/12/12 20:29:13 balewski 00166 // added hooks for Endcap embedding 00167 // 00168 // Revision 1.7 2005/06/09 20:04:23 balewski 00169 // upgrade for embedding 00170 // 00171 // Revision 1.6 2005/06/03 19:20:47 balewski 00172 // *** empty log message *** 00173 // 00174 // Revision 1.5 2004/05/26 21:28:37 jwebb 00175 // o Changes to StEEmcFastMaker to provide methods to get sampling fraction, 00176 // gains, etc... 00177 // 00178 // o StMuEEmcSimuMaker is now just a shell of its former self 00179 // 00180 // o Added StMuEEmcSimuReMaker. This maker takes a muDst as input, and uses 00181 // the database maker to "massage" the ADC response, to better simulate 00182 // the calorimeter as installed. For now, it simply uses the geant 00183 // energy response, combined with a single sampling fraction and the 00184 // database gains and pedestals to come up with a new ADC response. 00185 // 00186 // Revision 1.4 2004/04/08 21:33:49 perev 00187 // Leak off 00188 // 00189 // Revision 1.3 2003/09/10 19:47:08 perev 00190 // ansi corrs 00191 // 00192 // Revision 1.2 2003/02/20 05:15:51 balewski 00193 // *** empty log message *** 00194 // 00195 // Revision 1.1 2003/01/28 23:12:59 balewski 00196 // star 00197 //
1.5.9