StRoot  1
 All Classes Namespaces Files Functions Variables Typedefs Enumerations Enumerator Friends Groups Pages
StEmcSimulatorMaker.cxx
1 // $Id: StEmcSimulatorMaker.cxx,v 1.60 2015/03/13 01:02:05 perev Exp $
2 
3 #include "StEmcSimulatorMaker.h"
4 
5 #include <assert.h>
6 #include <set>
7 
8 #include "StMcEvent/StMcCalorimeterHit.hh"
9 #include "StMcEvent/StMcEmcModuleHitCollection.hh"
10 #include "StMcEvent/StMcEmcHitCollection.hh"
11 #include "StMcEvent/StMcEvent.hh"
12 #include "StMcEvent/StMcTrack.hh"
13 
14 #include "StEvent/StEmcRawHit.h"
15 #include "StEvent/StEmcDetector.h"
16 #include "StEvent/StEmcCollection.h"
17 #include "StEvent/StEvent.h"
18 
19 #include "StMuDSTMaker/COMMON/StMuDst.h"
20 
21 #include "StEmcUtil/database/StBemcTables.h"
22 #include "StEmcUtil/geometry/StEmcGeom.h"
23 #include "StEmcUtil/projection/StEmcPosition.h"
24 
25 #include "StEmcSimpleSimulator.h"
26 #include "StEmcPmtSimulator.h"
27 
28 ClassImp(StEmcSimulatorMaker)
29 
31  // checking if this is embedding mode by looking for StEmcRawMaker or StEmcADCtoEMaker in this chain
32  mEmbeddingMode = (GetMaker("emcRaw") || GetMaker("Eread"));
33  LOG_INFO <<"StEmcSimulatorMaker EMBEDDING mode = "<< (Int_t)mEmbeddingMode <<endm;
34 
35  // initialize control table
36  for(int i=0; i<MAXDETBARREL; i++) {
37  mMakeFullDetector[i] = false;
38  mCheckStatus[i] = true;
39  mDoZeroSuppression[i] = (mEmbeddingMode) ? false:true;
40  mPedestalCut[i] = 1.5;
41  mCalibOffset[i] = 0.0;
42  mCalibSpread[i] = 0.0;
43  mMaxAdcSpread[i] = 0.0;
44  mCrossTalk[i] = 0.0;
45  }
46 
47  mMaxAdc[0] = 4095;
48  mMaxAdc[1] = 1023;
49  mMaxAdc[2] = 1023;
50  mMaxAdc[3] = 1023;
51 
52  // adc2e doesn't suppress BTOW hits, so we won't either
53  mDoZeroSuppression[0] = false;
54 
55  // trigger emulation expects full peds for BTOW
56  mMakeFullDetector[0] = true;
57 
58  mMcEvent = NULL;
59  mEmcCollection = NULL;
60 
61  for(int i=0; i<MAXDETBARREL; i++) {
62  mEmcMcHits[i] = NULL;
63  mGeom[i] = StEmcGeom::instance(i+1);
64  if(!mGeom[i]) {
65  LOG_FATAL << "Geometry for detector "<<i+1<<" undefined" << endm;
66  assert(0);
67  }
68  }
69 
70  mTables = new StBemcTables(kTRUE, kTRUE);
71  mPosition = new StEmcPosition();
72 
73  // simulators are instantiated in Init, but we set some params here in case the user wants to change them
74  mSimulatorMode[BTOW-1] = StEmcVirtualSimulator::kPrimarySecondaryFullMode;
75  mSimulatorMode[BPRS-1] = StEmcVirtualSimulator::kPrimarySecondaryFullMode;
76  mSimulatorMode[BSMDE-1] = StEmcVirtualSimulator::kSimpleMode;
77  mSimulatorMode[BSMDP-1] = StEmcVirtualSimulator::kSimpleMode;
78 
79  mIsBFC = GetParentChain()->InheritsFrom("StBFChain");
80  LOG_INFO << "Is StEmcSimulatorMaker in BFC? " << mIsBFC << endm;
81 }
82 
83 StEmcSimulatorMaker::~StEmcSimulatorMaker() {
84 #if 0
85  delete mSimulator[BTOW-1];
86  delete mSimulator[BPRS-1];
87  delete mSimulator[BSMDE-1];
88  delete mSimulator[BSMDP-1];
89 
90  delete mTables;
91  delete mPosition;
92 #endif
93 }
94 
96  mSimulator[BTOW-1] = new StEmcPmtSimulator(kBarrelEmcTowerId, mSimulatorMode[BTOW-1]);
97  mSimulator[BPRS-1] = new StEmcPmtSimulator(kBarrelEmcPreShowerId, mSimulatorMode[BPRS-1]);
98  mSimulator[BSMDE-1] = new StEmcSimpleSimulator(kBarrelSmdEtaStripId, mSimulatorMode[BSMDE-1]);
99  mSimulator[BSMDP-1] = new StEmcSimpleSimulator(kBarrelSmdPhiStripId, mSimulatorMode[BSMDP-1]);
100 
101  for(int det=BTOW; det<=BSMDP; det++) {
102  mSimulator[det-1]->setEmbeddingMode(mEmbeddingMode);
103  mSimulator[det-1]->setTables(mTables);
104  mSimulator[det-1]->setCalibScale(1.0 + mCalibOffset[det-1]);
105  mSimulator[det-1]->setCalibSpread(mCalibSpread[det-1]);
106  mSimulator[det-1]->setMaximumAdc(mMaxAdc[det-1]);
107  mSimulator[det-1]->setMaximumAdcSpread(mMaxAdcSpread[det-1]);
108  }
109 
110  return kStOk;
111 }
112 
113 void StEmcSimulatorMaker::Clear(const char*) {
114  mMcEvent = NULL;
115 }
116 
118  mMcEvent = dynamic_cast<StMcEvent*>(GetDataSet("StMcEvent"));
119  if(!mMcEvent) {
120  LOG_ERROR << "couldn't find StMcEvent for this event" << endm;
121  return kStErr;
122  }
123 
124  mEmcMcHits[0] = mMcEvent->bemcHitCollection();
125  mEmcMcHits[1] = mMcEvent->bprsHitCollection();
126  mEmcMcHits[2] = mMcEvent->bsmdeHitCollection();
127  mEmcMcHits[3] = mMcEvent->bsmdpHitCollection();
128 
129  // simulation of optical cross-talk in BSMDE by M.Betancourt 11/2007
130  vector<StMcTrack*> McTracks = mMcEvent->tracks();
131  for(unsigned int i = 0; i < McTracks.size(); ++i) {
132  StMcTrack *track = McTracks.at(i);
133  if(track->stopVertex()) continue; // Existing stopVertex means intermediate particle
134  makeCrossTalk(track);
135  }
136 
137  // simulate pedestals where no hit was found if makeFullDetector is specified
138  int maxChannels[4] = {4800, 4800, 18000, 18000};
139  std::vector<int> hasHit;
140  std::vector<int>::const_iterator iter;
141 
142  int softId, module, eta, sub;
143  for(int det=BTOW; det<=BSMDP; det++) {
144  if(mMakeFullDetector[det-1] == 0) continue;
145 
146  // identify the channels that already have real hits
147  for(unsigned int mod=1; mod<=mEmcMcHits[det-1]->numberOfModules(); mod++) {
148  const StMcEmcModuleHitCollection* module = mEmcMcHits[det-1]->module(mod);
149  const vector<StMcCalorimeterHit*> hits = module->detectorHits();
150  for(unsigned long i=0; i<hits.size(); i++) {
151  mGeom[det-1]->getId(hits[i]->module(), hits[i]->eta(), hits[i]->sub(), softId);
152  hasHit.push_back(softId);
153  }
154  }
155 
156  // sort the vector for constant-time access while looping through all channels
157  std::sort(hasHit.begin(), hasHit.end());
158  iter = hasHit.begin();
159  int nextHitId = 0;
160  if(hasHit.size()) nextHitId = *iter;
161 
162  StMcCalorimeterHit *mcHit = new StMcCalorimeterHit();
163 
164  // add hits with 0 energy to channels that don't have real hits
165  for(int softId=1; softId<=maxChannels[det-1]; softId++) {
166  if( softId != nextHitId ) {
167  mGeom[det-1]->getBin(softId,module,eta,sub);
168  mcHit->setModule(module);
169  mcHit->setEta(eta);
170  mcHit->setSub(sub);
171  mcHit->setdE(0.0);
172  mcHit->setParentTrack(NULL);
173 
174  // push_back manually instead of using addHit to save (lots of) time
175  mEmcMcHits[det-1]->module(module)->detectorHits().push_back(mcHit);
176  mcHit = new StMcCalorimeterHit();
177  }
178  else {
179  iter++;
180  if(iter != hasHit.end()) nextHitId = *iter;
181  }
182  }
183 
184  delete mcHit;
185  hasHit.clear();
186  }
187 
188  // lots of LOG_DEBUG statements
189  for(int det=BTOW; det<=BSMDP; det++) {
190  LOG_DEBUG << *(mEmcMcHits[det-1]) << endm;
191  for(unsigned int mod=1; mod<=mEmcMcHits[det-1]->numberOfModules(); mod++) {
192  const StMcEmcModuleHitCollection *module = mEmcMcHits[det-1]->module(mod);
193  const vector<StMcCalorimeterHit*> hits = module->detectorHits();
194  for(unsigned long i=0; i<hits.size(); i++) {
195  int softId; mGeom[det-1]->getId(hits[i]->module(), hits[i]->eta(), hits[i]->sub(), softId);
196  LOG_DEBUG << "softId:" << softId << " mod:" << hits[i]->module() << " eta:" << hits[i]->eta() << " sub:" << hits[i]->sub() << " dE:" << hits[i]->dE() << endm;
197  }
198  }
199  }
200 
201  // now convert the energy depositions to ADC values
202  makeRawHits();
203 
204  return StMaker::Make();
205 }
206 
207 // translate each StMcCalorimeterHit into an StEmcRawHit and save in StEmcCollection
208 void StEmcSimulatorMaker::makeRawHits() {
209  mTables->loadTables(this);
210 
211  // get a valid StEmcCollection to store the hits
212  if (mEmbeddingMode) {
213  mEmcCollection = new StEmcCollection();
214  } else {
215  StEvent* event = (StEvent*)GetInputDS("StEvent");
216  if (!event) {
217  event = new StEvent();
218  AddData(event);
219  }
220  mEmcCollection = event->emcCollection();
221  if (!mEmcCollection) {
222  mEmcCollection = new StEmcCollection();
223  event->setEmcCollection(mEmcCollection);
224  }
225  StMuDst* mudst = (StMuDst*)GetInputDS("MuDst");
226  if (mudst) {
227  mudst->setEmcCollection(mEmcCollection);
228  }
229  }
230 
231  for (int det = BTOW;det <= BSMDP;det++) {
232  StDetectorId detectorId = kUnknownId;
233  switch(det) {
234  case BTOW: detectorId = kBarrelEmcTowerId; break;
235  case BPRS: detectorId = kBarrelEmcPreShowerId; break;
236  case BSMDE: detectorId = kBarrelSmdEtaStripId; break;
237  case BSMDP: detectorId = kBarrelSmdPhiStripId; break;
238  }
239  StEmcDetector *detector = new StEmcDetector(detectorId, 120); // should this be a magic number?
240  mEmcCollection->setDetector(detector);
241 
242  for (unsigned int mod = 1;mod <= mEmcMcHits[det-1]->numberOfModules();mod++) {
243  const StMcEmcModuleHitCollection* module = mEmcMcHits[det-1]->module(mod);
244  const vector<StMcCalorimeterHit*> hits = module->detectorHits();
245  for (unsigned long i = 0;i < hits.size();i++) {
246  int softId;
247  mGeom[det-1]->getId(hits[i]->module(), hits[i]->eta(), hits[i]->sub(), softId);
248  LOG_DEBUG << "-----------------------------------------------------------------------------------------------" << endm;
249  // check hit status
250  if (mCheckStatus[det-1]) {
251  if (mTables->status(det, softId) != 1) {
252  LOG_DEBUG << Form("det=%2d softId=%5d -- removing hit b/c DB status!=1", detectorId, softId) << endm;
253  continue;
254  }
255  }
256 
257  StEmcRawHit *rawHit = mSimulator[det-1]->makeRawHit(hits[i]);
258  rawHit->setCalibrationType(0);
259 
260  // do zero suppression
261  if (mDoZeroSuppression[det-1]) {
262  float pedMean = mTables->pedestal(det, softId);
263  float pedRMS = mTables->pedestalRMS(det, softId);
264  if ((rawHit->adc() - pedMean) < (mPedestalCut[det-1] * pedRMS)) {
265  LOG_DEBUG << "removing hit b/c it failed pedestal cut" << endm;
266  delete rawHit;
267  continue;
268  }
269  }
270 
271  // store GEANT dE in MuDST if this is BFC
272  if (mIsBFC && !mEmbeddingMode) {
273  rawHit->setEnergy(hits[i]->dE());
274  }
275 
276  detector->addHit(rawHit);
277  } // loop over hits
278  } // loop over modules
279  } // loop over detectors
280 }
281 
283 // Leak energy deposited by track //
284 // per optical cross talk //
286 void StEmcSimulatorMaker::makeCrossTalk(StMcTrack *track)
287 {
288  // Loop over BEMC detectors
289  for (int det = BSMDE;det <= BSMDP;++det) {
290  // No cross talk for the phi strips (not sure how to simulate yet)
291  if(det == BSMDP) continue;
292  // Fetch calorimeter hits deposited by the StMcTrack
293  vector<StMcCalorimeterHit*> trackHits;
294  switch(det) {
295  case BSMDE: trackHits = track->bsmdeHits(); break;
296  case BSMDP: trackHits = track->bsmdpHits(); break;
297  }
298  LOG_DEBUG << " this track has BSMD of size = " << trackHits.size() << endm;
299 
301  // Find the detector element with the largest energy deposition //
303  double highEnergy = -1;
304  int highElement = -1;
305  for (unsigned long j = 0;j < trackHits.size();++j) {
306  double energy = trackHits.at(j)->dE();
307  if ((energy > highEnergy) || (highEnergy < 0)) {
308  highEnergy = energy;
309  highElement = j;
310  }
311  }
312  if (highElement != -1) {
314  // Calculate the software ID of the high element and its nearest neighbors //
316  StMcCalorimeterHit* highHit = trackHits.at(highElement);
317 
318  const Int_t numCross = 5;
319  int softIds[2 * numCross + 1] = {0};
320  // Pointers to the relevant detector hits
321  // Will be assigned to point to the strip in the next step.
322  StMcCalorimeterHit *detectorNextHits[2 * numCross + 1] = {0};
323 
324  switch (det) {
325  //1=bemc, 2=bprs, 3=bsmde, 4=bsmdp
326  case BSMDE:
327  case BSMDP:
328  for (Int_t i = 0;i < (2*numCross + 1);i++) {
329  softIds[i] = mPosition->getNextId(det, highHit->module(), highHit->eta(), highHit->sub(), (det == BSMDE) ? (i - numCross) : 0, (det == BSMDP) ? (i - numCross) : 0);
330  }
331  break;
332  }
333 
334  int modHigh = 0;
335  float etaHigh = 0;
336  mGeom[det - 1]->getId(highHit->module(), highHit->eta(), highHit->sub(), softIds[numCross]);
337  modHigh = highHit->module();
338  mGeom[det - 1]->getEta(softIds[numCross], etaHigh);
339 
341  // Find the calorimeter hits corresponding to the high strip and its neighbors //
343  double totalenergyb = 0; // total energy before cross talk, part of the energy conservation check
344  double totalenergya = 0; // total energy after cross talk
345  for (unsigned int mod = 1;mod <= mEmcMcHits[det- 1]->numberOfModules();++mod) {
346  const StMcEmcModuleHitCollection* module = mEmcMcHits[det - 1]->module(mod);
347  const vector<StMcCalorimeterHit*> &detectorHits = module->detectorHits();
348  for (unsigned long k = 0;k < detectorHits.size();++k) {
349  int softTemp;
350  mGeom[det - 1]->getId(detectorHits[k]->module(), detectorHits[k]->eta(), detectorHits[k]->sub(), softTemp);
351  // loop through the strips in this module and assign the pointer to the strip objects
352  for (Int_t i = 0;i < (2*numCross + 1);i++) {
353  if (softTemp == softIds[i]) {
354  detectorNextHits[i] = detectorHits[k];
355  totalenergyb += detectorHits[k]->dE();
356  }
357  }
358  } // detectorHits
359  } // Modules
360 
361  // cross-talk falls off linearly as we approach edge of barrel
362  const float crossTalk = mCrossTalk[det - 1] * (1 - fabs(etaHigh) );
363 
364  double leakE1 = 0, leakE2 = 0;
365  StMcCalorimeterHit *tempHit = new StMcCalorimeterHit();
366  for (int i = 0;i <= numCross;i++) {
367  double energy1 = detectorNextHits[numCross + i] ? detectorNextHits[numCross + i]->dE() : 0;
368  double energy2 = detectorNextHits[numCross - i] ? detectorNextHits[numCross - i]->dE() : 0;
369  {LOG_DEBUG << "In: softId1 = " << softIds[numCross + i] << ", softId2 = " << softIds[numCross - i] << endm;}
370  {LOG_DEBUG << "In: energy1 = " << energy1 << ", energy2 = " << energy2 << endm;}
371  {LOG_DEBUG << "In: leakE1 = " << leakE1 << ", leakE2 = " << leakE2 << endm;}
372  //if (i == 0) {LOG_DEBUG << "old high Energy = " << energy1 << endm;}
373  energy1 += leakE1;
374  energy2 += leakE2;
375  // there are 3 situations:
376  // 1: From the geometry, there is no next next strip (softNextNext==0)
377  // 2: There should be next next strip, but no pointer/hit to it, meaning it has zero energy (detectorNextNext==NULL)
378  // 3: There is next next strip and a pointer/hit with energy
379  // wenqin
380  if ((i < numCross) && softIds[numCross + i] && softIds[numCross + (i + 1)]) {
381  // situation2 or situation3, leak the difference
382  const double energyNext1 = detectorNextHits[numCross + (i + 1)] ? detectorNextHits[numCross + (i + 1)]->dE() : 0;
383  //if (i == 0) {LOG_DEBUG << "old next Energy = " << energyNext1 << endm;}
384  leakE1 = crossTalk * (energy1 - energyNext1);
385  } else {
386  leakE1 = 0; //situation1: do nothing
387  }
388  //if (i == 0) {LOG_DEBUG << "central strip leakage " << leakE1 << endm;}
389  if ((i < numCross) && softIds[numCross - i] && softIds[numCross - (i + 1)]) {
390  // situation2 or situation3, leak the difference
391  const double energyNext2 = detectorNextHits[numCross - (i + 1)] ? detectorNextHits[numCross - (i + 1)]->dE() : 0;
392  //if (i == 0) {LOG_DEBUG << "old previous Energy = " << energyNext2 << endm;}
393  leakE2 = crossTalk * (energy2 - energyNext2);
394  } else {
395  leakE2 = 0; //situation1: do nothing
396  }
397  //if (i == 0) {LOG_DEBUG << "central strip forward leakage " << leakE2 << endm;}
398  energy1 -= leakE1;
399  if (i == 0) {
400  energy1 -= leakE2;
401  } else {
402  energy2 -= leakE2;
403  }
404  {LOG_DEBUG << "Out: energy1 = " << energy1 << ", energy2 = " << energy2 << endm;}
405  {LOG_DEBUG << "Out: leakE1 = " << leakE1 << ", leakE2 = " << leakE2 << endm;}
406  //if (i == 0) {LOG_DEBUG << "new high Energy after leaking is " << energy1 << endm;}
407  int module, eta, sub;
408  if (detectorNextHits[numCross + i]) {
409  detectorNextHits[numCross + i]->setdE(energy1);
410  } else {
411  if (softIds[numCross + i]) {
413  // Create empty calorimeter hits for neighbors with no energy deposited,//
414  // i.e. energy is zero! excluding neighbors in different modules //
416  mGeom[det - 1]->getBin(softIds[numCross + i], module, eta, sub);
417  tempHit->setModule(module);
418  tempHit->setEta(eta);
419  tempHit->setSub(sub);
420  tempHit->setParentTrack(NULL);
421  tempHit->setdE(energy1);
422  detectorNextHits[numCross + i] = tempHit;
423  StMcEmcHitCollection::EAddHit returnCode = mEmcMcHits[det - 1]->addHit(tempHit);
424  if (returnCode == StMcEmcHitCollection::kNew) {
425  tempHit = new StMcCalorimeterHit();
426  }
427  }
428  }
429  if (i != 0) {
430  if (detectorNextHits[numCross - i]) {
431  detectorNextHits[numCross - i]->setdE(energy2);
432  } else {
433  if (softIds[numCross - i]) {
434  mGeom[det - 1]->getBin(softIds[numCross - i], module, eta, sub);
435  tempHit->setModule(module);
436  tempHit->setEta(eta);
437  tempHit->setSub(sub);
438  tempHit->setParentTrack(NULL);
439  tempHit->setdE(energy2);
440  detectorNextHits[numCross - i] = tempHit;
441  StMcEmcHitCollection::EAddHit returnCode = mEmcMcHits[det - 1]->addHit(tempHit);
442  if (returnCode == StMcEmcHitCollection::kNew) {
443  tempHit = new StMcCalorimeterHit();
444  }
445  }
446  }
447  }
448  totalenergya += detectorNextHits[numCross + i] ? detectorNextHits[numCross + i]->dE() : 0;
449  if (i != 0) totalenergya += detectorNextHits[numCross - i] ? detectorNextHits[numCross - i]->dE() : 0;
450  }
451  {LOG_DEBUG << "total energy before is " << totalenergyb << " and total energy after immediately, is " << totalenergya << endm;}
452  delete tempHit;
453  } // highElement
454  } // det Loop
455 }
456 
457 /*****************************************************************************
458  * $Log: StEmcSimulatorMaker.cxx,v $
459  * Revision 1.60 2015/03/13 01:02:05 perev
460  * remove delete which crashed BFC
461  *
462  * Revision 1.59 2010/10/14 21:18:57 ogrebeny
463  * Changes from Wenqin (wqxu@ucla.edu):
464  *
465  * For the cross talk part, make the energy assignments of the newly created
466  * strips happen before they are added to the mEmcMcHits collection, otherwise
467  * the energy assignments won't be recorded in the collection.
468  *
469  * The cross talk leakage is now proportional to the difference of energies of two neighbor
470  * strips. The leakage range is extended to +/- 5 strips.
471  *
472  * The cross talk in the BSMD-Phi still needs more solid adjustment, disabled for now.
473  *
474  * Revision 1.58 2008/11/17 21:44:24 kocolosk
475  * don't store GEANT dE in MuDST if we're embedding
476  *
477  * Revision 1.56 2008/01/24 15:22:36 kocolosk
478  * set MuDst's StEmcCollection pointer
479  *
480  * Revision 1.55 2007/12/12 23:29:47 kocolosk
481  * full pedestal simulation is now default for BTOW
482  *
483  * Revision 1.54 2007/12/12 22:12:47 kocolosk
484  * push_back detector hits manually instead of using addHit to save (lots of) time
485  *
486  * Revision 1.53 2007/11/28 16:18:58 kocolosk
487  * optical cross-talk simulation by Mike Betancourt
488  * http://www.star.bnl.gov/HyperNews-star/protected/get/phana/144.html
489  *
490  * Revision 1.52 2007/10/08 15:28:38 kocolosk
491  * setMaximumAdc(Spread) methods allow for better simulation of BSMD ADC response
492  * http://www.star.bnl.gov/HyperNews-star/get/emc2/2507.html
493  *
494  * Revision 1.51 2007/09/21 13:16:20 kocolosk
495  * bugfix with Martijn's help. There is currently an important difference
496  * between the way StMcEvent fills its collections and the way the old simulator
497  * filled them. This fix ensures at most one MC hit per detector element (tower/strip)
498  *
499  * Revision 1.50 2007/09/15 18:36:35 kocolosk
500  * changed defaults so makeFullDetector is false and so zero suppression is turned off for BTOW
501  *
502  * Revision 1.49 2007/09/12 13:31:45 kocolosk
503  * two small changes to suppress compiler warnings
504  *
505  * Revision 1.48 2007/09/12 03:06:11 kocolosk
506  * embedding mode also set if StEmcADCtoEMaker is in chain (non-bfc embedding)
507  *
508  * Revision 1.47 2007/09/12 02:58:53 kocolosk
509  * look for emcRaw, not emcEmbed, to determine if it's an embedding chain
510  *
511  * Revision 1.46 2007/09/12 02:55:15 kocolosk
512  * don't do zero suppression on embedding hits (they have no pedestal)
513  *
514  * Revision 1.45 2007/09/11 21:49:14 kocolosk
515  * complete overhaul of the BEMC simulator
516  * http://www.star.bnl.gov/HyperNews-star/get/emc2/2486.html
517  *
518  * Revision 1.44 2007/08/06 22:55:56 kocolosk
519  * fixed a logic error in logging that was causing segfaults (RT #1012)
520  *
521  * Revision 1.43 2007/07/13 13:44:20 fisyak
522  * Delete mEmcCollection if set mEmbed
523  *
524  * Revision 1.42 2007/04/05 19:04:33 kocolosk
525  * fix AutoBuild warning
526  *
527  * Revision 1.41 2007/03/22 22:48:28 perev
528  * Small old bug fix, thanx to Oleksandr
529  *
530  * Revision 1.40 2007/03/22 21:51:36 perev
531  * Leak of StMcCalorimeterHit fix
532  *
533  * Revision 1.39 2007/01/23 20:38:59 kocolosk
534  * logger update
535  *
536  * Revision 1.38 2007/01/23 20:36:25 kocolosk
537  * oops ... keyDb should have been keyDB in rev.1.37
538  *
539  * Revision 1.37 2007/01/23 20:14:21 kocolosk
540  * added code in Init() toautomatically set embedding mode controlTable flags if StEmcADCtoEMaker and/or StEmcMixerMaker. Users do not need to do this in their own macros any more.
541  *
542  * Revision 1.36 2007/01/23 19:44:24 kocolosk
543  * few additional logger fixes
544  *
545  * Revision 1.35 2007/01/22 19:13:40 kocolosk
546  * use STAR logger for all output
547  *
548  * Revision 1.34 2006/09/20 13:44:25 kocolosk
549  * fix autobuild warnings
550  *
551  * Revision 1.33 2006/02/16 16:11:41 suaide
552  * small modification in the way the calibration spread/offset is created
553  *
554  * Revision 1.32 2006/01/24 16:31:47 suaide
555  * disabled printout
556  *
557  * Revision 1.31 2005/05/13 15:49:36 suaide
558  * set correct StEmcRawHit::calibrationType() for simulated hits
559  *
560  * Revision 1.30 2005/03/21 21:36:39 suaide
561  * fixed problem with chain
562  *
563  * Revision 1.29 2005/01/07 11:31:20 suaide
564  * small bug fixed
565  *
566  * Revision 1.28 2004/08/09 19:43:28 suaide
567  * moved global variables to private members and
568  * made small modifications to run in embedding mode
569  *
570  * Revision 1.27 2004/08/06 13:24:48 suaide
571  * New features added and fixed some bugs in the database
572  *
573  * Revision 1.26 2004/04/09 21:33:53 perev
574  * Cleanup. destructor of maker more deleting
575  *
576  * Revision 1.25 2004/04/08 21:35:12 perev
577  * Leak off
578  *
579  * Revision 1.24 2003/10/01 00:43:16 pavlinov
580  * Change searching order for Geant hits
581  *
582  * Revision 1.23 2003/09/30 01:28:49 jeromel
583  * Undo correction until logic reshape
584  *
585  * Revision 1.22 2003/09/28 03:06:01 jeromel
586  * restored leak_assign (logic needs to be modified to get rid of it)
587  *
588  * Revision 1.21 2003/09/28 01:57:55 jeromel
589  * LEAK_SCOPE and LEAK_ASSIGN removed
590  *
591  * Revision 1.20 2003/09/23 15:19:52 suaide
592  * fixed bugs and modifications for embedding
593  *
594  * Revision 1.18 2003/09/02 17:58:00 perev
595  * gcc 3.2 updates + WarnOff
596  *
597  * Revision 1.17 2003/04/30 20:36:47 perev
598  * Warnings cleanup. Modified lines marked VP
599  *
600  * Revision 1.16 2003/01/23 03:09:02 jeromel
601  * Include modif
602  *
603  * Revision 1.15 2003/01/17 21:21:28 suaide
604  * small bug fixed to compile on Solaris
605  *
606  * Revision 1.14 2003/01/17 00:44:20 suaide
607  * Added new EMC database scheme
608  *
609  * Revision 1.13 2002/09/17 18:37:01 pavlinov
610  * mDbMaker was zero
611  *
612  * Revision 1.12 2002/09/16 22:14:50 pavlinov
613  * No DB for EMC before 24-09-2001
614  *
615  * Revision 1.11 2002/09/10 16:51:32 pavlinov
616  * Discard line with mDbMaker->SetDateTime
617  *
618  * Revision 1.10 2002/06/04 16:09:36 pavlinov
619  * added option with DB(pedestal ans calibration coefficients
620  *
621  * Revision 1.9 2002/06/03 23:35:10 pavlinov
622  * Last correction without DB for ped and calib. coeff.
623  *
624  * Revision 1.8 2002/05/30 17:35:06 pavlinov
625  * changed the way of searching of GEANT data
626  *
627  * Revision 1.7 2001/09/22 00:29:42 pavlinov
628  * No public constructor for StEmcGeom
629  *
630  * Revision 1.6 2001/05/14 01:21:45 pavlinov
631  * In method StMcEmcHitCollection::module(m) m is module number, not index
632  *
633  * Revision 1.5 2001/03/23 19:02:51 pavlinov
634  * Get pointer to chain via list of browsables
635  *
636  * Revision 1.4 2001/03/22 22:04:38 pavlinov
637  * Clean up for mdc4
638  *
639  * Revision 1.3 2001/03/15 17:21:32 pavlinov
640  * Fixed error for module=1
641  *
642  * Revision 1.2 2001/02/02 23:59:59 pavlinov
643  * New function Browse() and cleanup for new version of BFC
644  *
645  * Revision 1.1 2000/10/23 22:53:14 pavlinov
646  * First working C++ version
647  *****************************************************************************/
648 
virtual void AddData(TDataSet *data, const char *dir=".data")
User methods.
Definition: StMaker.cxx:332
int status(int det, int softId, const char *option="") const
Int_t getNextId(Int_t det, Int_t m, Int_t e, Int_t s, Int_t nEta, Int_t nPhi) const
Return neighbor id (works for all detectors 1=bemc, 2=bprs, 3=bsmde, 4=bsmdp)
Monte Carlo Track class All information on a simulated track is stored in this class: kinematics...
Definition: StMcTrack.hh:144
virtual Int_t Make()
Definition: StMaker.cxx:898
void loadTables(StMaker *anyMaker)
load tables.
virtual void Clear(const char *)
resets the pointer to the current StMcEvent
virtual Int_t Init()
creates the detector simulators and sets their properties
Int_t getBin(const Float_t phi, const Float_t eta, Int_t &m, Int_t &e, Int_t &s) const
Definition: StEmcGeom.h:321
static void setEmcCollection(StEmcCollection *emc_coll)
set pointer to current StEmcCollection
Definition: StMuDst.h:146
Definition: Stypes.h:44
Event data structure to hold all information from a Monte Carlo simulation. This class is the interfa...
Definition: StMcEvent.hh:169
Definition: Stypes.h:41