HYDRA_development_version
 All Classes Namespaces Files Functions Variables Typedefs Enumerations Enumerator Friends Macros
hrpcdigitizer.cc
Go to the documentation of this file.
1 //*-- Author : 08/06/2006 D. Gonzalez-Diaz
2 //*-- Modified : 12/06/2006 D. Gonzalez-Diaz
3 //*-- Modified : 13/12/2009 D. Gonzalez-Diaz
4 //*-- Modified : 24/11/2010 P. Cabanelas DigiPar container moved to
5 //*-- Modified : condition style.
6 //*-- Modified : 22/06/2012 A.Mangiarotti General code cleanup.
7 //*-- Modified : Geometry parameters used in several places
8 //*-- Modified : are now stored as local variables (see D,
9 //*-- Modified : geaXLoc). Reading of the digitiser
10 //*-- Modified : parameters, which are constant, moved out
11 //*-- Modified : of the hit processing loop (see vprop,
12 //*-- Modified : sigma_el, sigma_T, t_offset, Qmean, gap)!
13 //*-- Modified : The inefficiency per gap for normally
14 //*-- Modified : incident particles ineff_gap_n is
15 //*-- Modified : calculated once for all outside the hit
16 //*-- Modified : loop. Namespace TMath used consistently
17 //*-- Modified : everywhere. The procedure has been
18 //*-- Modified : simplified. First the ideal left and
19 //*-- Modified : right times left->gtime and right->gtime
20 //*-- Modified : are calculated and after the resolutions
21 //*-- Modified : are added to obtain left->time and
22 //*-- Modified : right->time.
23 //*-- Modified : 20/09/2012 A.Mangiarotti Special treatment of
24 //*-- Modified : particles produced in the gap.
25 //*-- Modified : 20/11/2012 A.Mangiarotti modified to include the new
26 //*-- Modified : model II with parametrised dependences on
27 //*-- Modified : the beta of the particles. Efficiency and
28 //*-- Modified : time of flight resolution employ a
29 //*-- Modified : sigmoid function. The charge distribution
30 //*-- Modified : is now a Landau with parameters depending
31 //*-- Modified : on beta with second degree polynomials.
32 //*-- Modified : An attempt to correct on average for the
33 //*-- Modified : number of active gaps is included. The
34 //*-- Modified : old digitizer is now available as model
35 //*-- Modified : I. If the old parameter container is
36 //*-- Modified : found, model I is used automatically.
37 //*-- Modified : 27/11/2012 A.Mangiarotti added new cell wise mode of
38 //*-- Modified : operation controllable with a flag
39 //*-- Modified : (fMode=1). If the new mode is selected,
40 //*-- Modified : the gaps are first reorganised into
41 //*-- Modified : cells before applying the response with
42 //*-- Modified : model I or model II. Two new internal
43 //*-- Modified : structs celltrack and celldat added to
44 //*-- Modified : handle the reorganisation of the gaps
45 //*-- Modified : into cells. If model II is used in cell
46 //*-- Modified : wise mode, no further corrections are
47 //*-- Modified : needed for the average number of active
48 //*-- Modified : gaps.
49 //*-- Modified : 27/02/2012 A.Mangiarotti A small bug has been
50 //*-- Modified : corrected: the information about the
51 //*-- Modified : local track length normalised to the gap
52 //*-- Modified : was not propagated from gaps to cells.
53 //*-- Modified : The access to the HGeantRpc is done with
54 //*-- Modified : the new optimised getHitDigi to avoid
55 //*-- Modified : retrieving information that is not used.
56 //*-- Modified : 03/03/2013 A.Mangiarotti Two new (private) methods
57 //*-- Modified : have been introduced to streamline the
58 //*-- Modified : digitiser operation and prepare for the
59 //*-- Modified : different options available with the new
60 //*-- Modified : HGeantRpc structure.
61 //*-- Modified : 10/03/2013 A.Mangiarotti Digitizer adapted to the
62 //*-- Modified : new HGeantRpc structure: all the old
63 //*-- Modified : options remain available for the old
64 //*-- Modified : HGeantRpc to have full backward
65 //*-- Modified : compatibility. With the new HGeantRpc
66 //*-- Modified : only the cell wise mode is available.
67 //*-- Modified : 25/03/2013 J.Markert Code clean up. The particle
68 //*-- Modified : mass is now consistently retrieved from
69 //*-- Modified : HPhysicsConstants.
70 //*-- Modified : 09/07/2013 A.Mangiarotti counters nHGeantRpc and
71 //*-- Modified : nDigitizedRpc introduced to flag the
72 //*-- Modified : events with no generated hits and no
73 //*-- Modified : digitised hits, respectively. This
74 //*-- Modified : allows to avoid checking all
75 //*-- Modified : cellobjects when nHGeantRpc=0 and all
76 //*-- Modified : rpcobjects when nDigitizedRpc=0.
77 //*-- Modified : Warning: when nHGeantRpc=0, the
78 //*-- Modified : information on the HGeantRpc version
79 //*-- Modified : in HGeantRpc_version is not available.
80 //*-- Modified : 04/12/2013 G.Kornakov Added the embedding mode
81 /////////////////////////////////////////////////////////////////////
82 // HRpcDigitizer digitizes HGeantRpc data, puts output values into
83 // HRpcCalSim data category.
84 /////////////////////////////////////////////////////////////////////
85 
86 #include "hrpcdigitizer.h"
87 #include "hades.h"
88 #include "hphysicsconstants.h"
89 #include "hruntimedb.h"
90 #include "hdebug.h"
91 #include "hspectrometer.h"
92 #include "hrpcdetector.h"
93 #include "hevent.h"
94 #include "hcategory.h"
95 #include "hiterator.h"
96 #include "hlocation.h"
97 #include "rpcdef.h"
98 #include "hgeantkine.h"
99 #include "hrpccalsim.h"
100 #include "hrpccal.h"
101 #include "hrpcdigipar.h"
102 #include "hrpcgeomcellpar.h"
103 
104 #include "TRandom.h"
105 
106 #include <iostream>
107 #include <iomanip>
108 using namespace std;
109 
110 Float_t HRpcDigitizer::fCropDistance = 1.65;
111 
113  initVars();
114 }
115 
116 HRpcDigitizer::HRpcDigitizer(const Text_t *name, const Text_t *title) :
117 HReconstructor(name,title) {
118  initVars();
119 }
120 
122 
123  if(iterGeantRpc) delete iterGeantRpc;
124  if(iterRpcCal) delete iterRpcCal;
125  clearObjects();
126  cellobjects.clear();
127  rpcobjects.clear();
128 }
130 
131  fGeantRpcCat = 0;
132  fCalCat = 0;
133  fKineCat = 0;
134  fGeomCellPar = 0;
135  fDigiPar = 0;
136  fLoc.set(3,0,0,0);
137  iterGeantRpc = 0;
138  iterRpcCal = 0;
139 }
140 
143  if(!fGeomCellPar){
144  Error("HRpcDigitizer::init()","No RpcGeomCellPar Parameters");
145  return kFALSE;
146  }
147  fDigiPar =(HRpcDigiPar *) gHades->getRuntimeDb()->getContainer("RpcDigiPar");
148  if(!fDigiPar){
149  Error("HRpcDigitizer::init()","No RpcDigiPar Parameters");
150  return kFALSE;
151  }
152  return kTRUE;
153 }
154 
155 Bool_t HRpcDigitizer::init(void) {
156 
157  HRpcDetector* rpc = (HRpcDetector*)(gHades->getSetup()->getDetector("Rpc"));
158 
159 
160  if(!rpc){
161  Error("HRpcDigitizer::init()","No Rpc Detector found");
162  return kFALSE;
163  }
164  //---------------------------------------------------------------
165  // Working arrays
166  maxCol = rpc->getMaxColumns();
167  maxCell = rpc->getMaxCells();
168  rpcobjects.resize(6*maxCol*maxCell, 0 ); // Size is constant over run time
169  cellobjects.resize(6*maxCol*maxCell, 0 ); // Size is constant over run time
170  //---------------------------------------------------------------
171 
172  //---------------------------------------------------------------
173  // Parameters
174  if(!initParContainer()) return kFALSE;
175  //---------------------------------------------------------------
176 
177  //---------------------------------------------------------------
178  // Data
180  if(!fKineCat) {
181  Error("HRpcDigitizer::init()","HGeant kine input missing");
182  return kFALSE;
183  }
184 
186  if(!fGeantRpcCat) {
187  Error("HRpcDigitizer::init()","HGeant RPC input missing");
188  return kFALSE;
189  }
190 
191  // Build the Calibration category
192 
193  //Adding the embedding mode!
194  if(gHades->getEmbeddingMode()>0) {
195  //Getting the temporary category for calibrated rpc hits.
197  if(!fCalCat) {
198  fCalCat=rpc->buildMatrixCategory("HRpcCalSim",0.5);
200  }
201  } else {
203  if(!fCalCat) {
204  fCalCat=rpc->buildMatrixCategory("HRpcCalSim",0.5);
206  }
207  }
208 
209  iterGeantRpc = (HIterator *)fGeantRpcCat->MakeIterator("native");
210  iterRpcCal = (HIterator *)fCalCat ->MakeIterator("native");
211  //---------------------------------------------------------------
212 
213  return kTRUE;
214 }
215 
217 
218  HGeantRpc* geantrpc = 0;
219  HRpcCalSim* cal = 0;
220 
221  Float_t mass;
222  Int_t RefL=-1,trackNumber,gpid,mode,ngap,HGeantRpc_version=-1;
223  Int_t nHGeantRpc=0,nDigitizedRpc=0;
224 
225  // Load the relevant parameters
226 
227  vprop = fDigiPar->getVprop(); // [mm/ns]
228  sigma_el = (fDigiPar->getSigmaX()) / vprop; // [ns]
229  sigma0_T = (fDigiPar->getSigmaT()) / 1000.; // [ns]
230  sigma1_T = (fDigiPar->getSigmaT1()) / 1000.; // [ns]
231  sigma2_T = (fDigiPar->getSigmaT2()); // pure number
232  sigma3_T = (fDigiPar->getSigmaT3()); // pure number
233  t_offset = (fDigiPar->getToff()) / 1000.; // [ns]
234  Qmean0 = (fDigiPar->getQmean()); // [pC]
235  Qmean1 = (fDigiPar->getQmean1()); // [pC]
236  Qmean2 = (fDigiPar->getQmean2()); // [pC]
237  Qwid0 = (fDigiPar->getQwid()); // [pC]
238  Qwid1 = (fDigiPar->getQwid1()); // [pC]
239  Qwid2 = (fDigiPar->getQwid2()); // [pC]
240  Eff0 = (fDigiPar->getEff()); // pure number
241  Eff1 = (fDigiPar->getEff1()); // pure number
242  Eff2 = (fDigiPar->getEff2()); // pure number
243  Eff3 = (fDigiPar->getEff3()); // pure number
244  Eff4 = (fDigiPar->getEff4()); // pure number
245  Eff5 = (fDigiPar->getEff5()); // pure number
246  gap = fDigiPar->getGap(); // [mm]
247  mode = fDigiPar->getMode(); // mode flag
248  //
249  if((sigma1_T<=0.)||(sigma2_T<=0.)||(sigma3_T<=0.)) {
250  // Digitizing model I.
251  sigma_el *= TMath::Sqrt2();
252  }
253  //
254  //if((mode==0)&&(HGeantRpc_version==5)) {
255  // Error("HRpcDigitizer::init()","HGeantRpc version 5 does not allow gap mode");
256  // return kFALSE;
257  //}
258 
259 
260  //---------------------------------------------------------------
261  // Loop over the HGeantrpc objects, i.e, over the gaps/cells
262  // and fill temporary working objects
263  clearObjects();
264  iterGeantRpc->Reset();
265  nHGeantRpc=0;
266  nDigitizedRpc=0;
267  while ((geantrpc=(HGeantRpc *)iterGeantRpc->Next()) != 0) {
268  geantrpc->setVersion(5);
269  // Skip hit in virtual volume EBOX.
270  if(geantrpc->getDetectorID() < 0) continue;
271  // Count number of HGeantRpc objects excluding hits
272  // in virtual volume EBOX.
273 
274  // Crop 1.5 mm of the closest to the cell edges along the X coordinate
275  if(getDistanceToXedge(geantrpc)<fCropDistance) continue;
276 
277  nHGeantRpc++;
278 
279 
280  // Initialise HGeantRpc version and efficiency caluclation.
281  if(HGeantRpc_version==-1) {
282  HGeantRpc_version = geantrpc->getVersion();
283  if(HGeantRpc_version<=4) {
284  // Initialise the inefficency of a gap.
285  calc_eff_hit(-1);
286  } else {
287  // Initialise the inefficency of a cell.
288  calc_eff_hit(-2);
289  }
290  }
291 
292  // Retrive hit.
293  // Units are [mm], [ns], [MeV/c], [mm] in module ref system.
294  if(HGeantRpc_version<=4) {
295  // Get simulation output of a gap.
296  geantrpc->getHitDigi(geaX, geaTof, geaMom, geaLocLen);
297  } else {
298  // Get simulation output of a cell.
300  }
301  // If the gap enetering was missed in Geant, assume the gap as local track length.
302  if(geaLocLen<0.) {
303  geaLocLen=gap;
304  geaLocLenNorm=1.;
305  } else {
307  }
308 
309  // Determine the beta of the particle.
310  trackNumber = geantrpc->getTrack();
311  HGeantKine* kine = (HGeantKine*)fKineCat->getObject(trackNumber-1);
312  if(!kine) {
313  Warning("HRpcDigitizer::execute()",
314  "missing kine entry for track %i, assuming beta=0",trackNumber);
315  beta=0.;
316  } else {
317  gpid = kine->getID();
318  // From the Geant particle type find the mass (only charged
319  // particles need to be considered).
320  mass = HPhysicsConstants::mass(gpid);
321  if(mass <= 0 ){
322  if(mass < 0 ) Warning("HRpcDigitizer::execute()",
323  "unknown particle id %i, assuming proton mass",gpid);
324  mass = HPhysicsConstants::mass(14); // unknown + gamma
325  }
326 
327  beta=mass/geaMom;
328  beta=1./TMath::Sqrt(1.+beta*beta);
329  }
330 
331  fLoc[0] = geantrpc->getSector();
332  fLoc[1] = geantrpc->getColumn();
333  fLoc[2] = geantrpc->getCell();
334 
335  // Apply efficiency.
336  if(HGeantRpc_version<=4) {
337  // Calculate the efficiency of a gap.
338  calc_eff_hit(1);
339  } else {
340  // Calculate the efficiency of a cell.
341  calc_eff_hit(2);
342  }
343  // This may depend a bit on the digitization algorithm.
344  efhits hite;
345  Float_t axe = -9999;
346  Float_t aye = -9999;
347  Float_t aze = -9999;
348  Float_t ate = -9999;
349  geantrpc->getCellAverage(axe, aye, aze, ate);
350  Float_t rnd = gRandom->Uniform(1);
351  hite.set(fLoc[0], fLoc[1], fLoc[2], axe, aye, ate, rnd<=eff_hit);
352  //if(gRandom->Uniform(1) > eff_hit) {
353  Int_t efprev = -1;
354  for(UInt_t e=0;e<effi_vec.size();e++) {
355  if(fLoc[0]==effi_vec[e].sector &&
356  fLoc[1]==effi_vec[e].module &&
357  fLoc[2]==effi_vec[e].cell &&
358  fabs(axe-effi_vec[e].x)<2. &&
359  fabs(aye-effi_vec[e].y)<2. &&
360  fabs(ate-effi_vec[e].time)<2.)
361  efprev = effi_vec[e].effi;
362  }
363  if(efprev==0) {
364  continue;
365  }
366  if(efprev==-1 && rnd > eff_hit) {
367  effi_vec.push_back(hite);
368  continue;
369  }
370  if(efprev==-1 && rnd <= eff_hit) {
371  effi_vec.push_back(hite);
372  }
373 
374  if((mode==0)||(HGeantRpc_version==5)) {
375  /////////////////////////////////////////////////////////////
376  /////////////////////////////////////////////////////////////
377  //////////// BEGIN GAP WISE OPEREATION (MODE=0) /////////////
378  //////////// WITH OLD HGeantRpc before Jan 2013 /////////////
379  //////////// BEGIN CELL WISE OPEREATION /////////////
380  //////////// WITH NEW HGeantRpc after Jan 2013 /////////////
381  /////////////////////////////////////////////////////////////
382  /////////////////////////////////////////////////////////////
383 
384 
385  //---------------------------------------------------------
386  // Collect data
387  // objects are stored linear
388  Int_t ind = fLoc[0] * maxCol * maxCell + fLoc[1] * maxCell + fLoc[2];
389 
390  if(rpcobjects[ind] == 0) {
391  // First time we have to create the object
392  rpcobjects[ind] = new rpcdat;
393  //rpcobjects[ind]->linIndex= ind;
394  rpcobjects[ind]->sec = fLoc[0];
395  rpcobjects[ind]->col = fLoc[1];
396  rpcobjects[ind]->cell = fLoc[2];
397  }
398  rpcdat* dat = rpcobjects[ind];
399  //---------------------------------------------------------
400  // Create new objects for left/right of the gap
401  // and add them to the list of gaps for this cell
402  gaptrack* left = new gaptrack;
403  gaptrack* right = new gaptrack;
404 
405  left ->reset();
406  right->reset();
407 
408  dat->left .push_back(left);
409  dat->right.push_back(right);
410  //---------------------------------------------------------
411 
412  left ->refDgtr = fGeantRpcCat->getIndex(geantrpc);
413  left ->trackDgtr = ((HGeantRpc*)fGeantRpcCat->getObject(left->refDgtr))->getTrack();
414 
415  // Right is the same as left
416  right->refDgtr = left->refDgtr;
417  right->trackDgtr = left->trackDgtr;
418 
419  RefL = findMother(left->refDgtr); // Right is the same as left , do it only once
420 
421  if(RefL < 0){ // Mother not found. Very seldom. Keep info of daughter.
422  left ->ref = left ->refDgtr;
423  left ->track = left ->trackDgtr;
424  left ->isAtBox = kFALSE;
425  right->ref = left ->refDgtr;
426  right->track = left ->trackDgtr;
427  right->isAtBox = kFALSE;
428  Warning("HRpcDigitizer::execute()",
429  "mother of track not found in RPC box! will use RefLDgtr=%i, TrackLDgtr=%i",
430  left->refDgtr,left->trackDgtr);
431  } else { // Mother found
432  left ->track = ((HGeantRpc*)fGeantRpcCat->getObject(RefL))->getTrack();
433  left ->ref = RefL;
434  left ->isAtBox = kTRUE;
435 
436  right->track = left->track;
437  right->ref = left->ref;
438  right->isAtBox = kTRUE;
439  }
440 
441  // Cell length in mm
442  D = fGeomCellPar->getLength(fLoc[1],fLoc[2]);
443  if(HGeantRpc_version<=4) {
444  // Apply the response of a gap.
445  digitize_one_hit(left,right,0);
446  } else {
447  // Apply the response of a cell.
448  digitize_one_hit(left,right,1);
449  }
450  nDigitizedRpc++;
451 
452  //---------------------------------------------------------
453 
454  /////////////////////////////////////////////////////////////
455  /////////////////////////////////////////////////////////////
456  //////////// END GAP WISE OPEREATION (MODE=0) /////////////
457  //////////// WITH OLD HGeantRpc before Jan 2013 /////////////
458  //////////// END CELL WISE OPEREATION /////////////
459  //////////// WITH NEW HGeantRpc after Jan 2013 /////////////
460  /////////////////////////////////////////////////////////////
461  /////////////////////////////////////////////////////////////
462 
463 
464  } else {
465 
466 
467  /////////////////////////////////////////////////////////////
468  /////////////////////////////////////////////////////////////
469  //////////// BEGIN CELL WISE OPEREATION (MODE=1) ////////////
470  //////////// WITH OLD HGeantRpc before Jan 2013 ////////////
471  /////////////////////////////////////////////////////////////
472  /////////////////////////////////////////////////////////////
473  //---------------------------------------------------------
474  // Collect data
475  // objects are stored linear
476  Int_t ind = fLoc[0] * maxCol * maxCell + fLoc[1] * maxCell + fLoc[2];
477 
478  if(cellobjects[ind] == 0) {
479  // First time we have to create the object
480  cellobjects[ind] = new celldat;
481  //rpcobjects[ind]->linIndex= ind;
482  cellobjects[ind]->sec = fLoc[0];
483  cellobjects[ind]->col = fLoc[1];
484  cellobjects[ind]->cell = fLoc[2];
485  }
486  celldat* cdat = cellobjects[ind];
487  //---------------------------------------------------------
488  // Create new objects for the track crossing the cell
489  // and add them to the list of tracks for this cell
490  celltrack* celltr;
491  // CASE I: no tacks in this cell yet
492  if(cdat->celltr.size()==0) {
493  celltr = new celltrack;
494  celltr->reset();
495  cdat->celltr.push_back(celltr);
496  // CASE II: this cell has already tracks associated
497  // with it
498  } else {
499  // Look if current track is already present in the list
500  for(UInt_t i=0;i<cdat->celltr.size();i++){
501  celltr = cdat->celltr[i];
502  // CASE II a: the current track is already associated,
503  // so select it
504  if(celltr->track == trackNumber) break;
505  }
506  // CASE II b: the current track is not associated,
507  // so add it
508  if(celltr->track != trackNumber) {
509  celltr = new celltrack;
510  celltr->reset();
511  cdat->celltr.push_back(celltr);
512  }
513  }
514  //---------------------------------------------------------
515 
516  ngap = geantrpc->getGap();
517  // The condition on the time takes care of possible multiple
518  // re-entries of the same track.
519  if(celltr->gaptime[ngap]==0.) {
520  celltr->gaptime[ngap] = geaTof;
521  celltr->gappos[ngap] = geaX;
522  celltr->gapltln[ngap] = geaLocLenNorm;
523  celltr->gapbeta[ngap] = beta;
524  celltr->track = trackNumber;
525  celltr->geantrpcIndex = fGeantRpcCat->getIndex(geantrpc);
526  } else if(celltr->gaptime[ngap]<geaTof) {
527  celltr->gaptime[ngap] = geaTof;
528  celltr->gappos[ngap] = geaX;
529  celltr->gapltln[ngap] = geaLocLenNorm;
530  celltr->gapbeta[ngap] = beta;
531  celltr->track = trackNumber;
532  celltr->geantrpcIndex = fGeantRpcCat->getIndex(geantrpc);
533  Warning("HRpcDigitizer::execute()",
534  "reentry of track=%i in Sector=%i Module=%i Cell=%i",
535  trackNumber,fLoc[0],fLoc[1],fLoc[2]);
536  }
537 
538  /////////////////////////////////////////////////////////////
539  /////////////////////////////////////////////////////////////
540  //////////// END CELL WISE OPEREATION (MODE=1) /////////////
541  //////////// WITH OLD HGeantRpc before Jan 2013 /////////////
542  /////////////////////////////////////////////////////////////
543  /////////////////////////////////////////////////////////////
544 
545  }
546 
547  // End of algorithm
548 
549  } // End of HGeantRpc loop
550 
551 
552  //---------------------------------------------------------------
553  // If in cell mode and version of HGeantRpc is after Jan 2013,
554  // process cells
555  if((mode>0)&&(HGeantRpc_version<=4)&&(nHGeantRpc>0)) {
556  for(UInt_t i = 0; i < cellobjects.size(); i ++) {
557  celldat* cdat = cellobjects[i];
558  if(cdat){
559  fLoc[0] = cdat->sec;
560  fLoc[1] = cdat->col;
561  fLoc[2] = cdat->cell;
562 
563  // Change to cell coordinate system (with origin at the cell center)
564  // Note that fGeomCellPar->getX(column,cell) corresponds to the left-down corner
565  // Cell length in mm
566  D = fGeomCellPar->getLength(fLoc[1],fLoc[2]);
567 
568  // Objects are stored linear
569  Int_t ind = fLoc[0] * maxCol * maxCell + fLoc[1] * maxCell + fLoc[2];
570 
571  if(rpcobjects[ind] == 0) {
572  // First time we have to create the object
573  rpcobjects[ind] = new rpcdat;
574  //rpcobjects[ind]->linIndex= ind;
575  rpcobjects[ind]->sec = fLoc[0];
576  rpcobjects[ind]->col = fLoc[1];
577  rpcobjects[ind]->cell = fLoc[2];
578  }
579  rpcdat* dat = rpcobjects[ind];
580 
581 
582  for(UInt_t j = 0; j < cdat->celltr.size(); j ++) {
583  celltrack* celltr = cdat->celltr[j];
584  celltr->calcMeans();
585 
586  //-------------------------------------------------------
587  // Create new objects for left/right of the gap
588  // and add them to the list of gaps for this cell
589  gaptrack* left = new gaptrack;
590  gaptrack* right = new gaptrack;
591 
592  left ->reset();
593  right->reset();
594 
595  dat->left .push_back(left);
596  dat->right.push_back(right);
597  //-------------------------------------------------------
598 
599  left ->refDgtr = celltr->geantrpcIndex;
600  left ->trackDgtr = ((HGeantRpc*)fGeantRpcCat->getObject(left->refDgtr))->getTrack();
601 
602  // Right is the same as left
603  right->refDgtr = left->refDgtr;
604  right->trackDgtr = left->trackDgtr;
605 
606  RefL = findMother(left->refDgtr); // Right is the same as left , do it only once
607 
608  if(RefL < 0){ // Mother not found. Very seldom. Keep info of daughter.
609  left ->ref = left ->refDgtr;
610  left ->track = left ->trackDgtr;
611  left ->isAtBox = kFALSE;
612  right->ref = left ->refDgtr;
613  right->track = left ->trackDgtr;
614  right->isAtBox = kFALSE;
615  Warning("HRpcDigitizer::execute()",
616  "mother of track not found in RPC box! will use RefLDgtr=%i, TrackLDgtr=%i",
617  left->refDgtr,left->trackDgtr);
618  } else { // Mother found
619  left ->track = ((HGeantRpc*)fGeantRpcCat->getObject(RefL))->getTrack();
620  left ->ref = RefL;
621  left ->isAtBox = kTRUE;
622 
623  right->track = left->track;
624  right->ref = left->ref;
625  right->isAtBox = kTRUE;
626  }
627 
628  // Geant Position
629  geaX = celltr->pos;
630  // Geant Time
631  geaTof = celltr->time;
632  // Geant local track length normalised to the gap
633  geaLocLenNorm = celltr->ltln;
634  // Geant Beta
635  beta = celltr->beta;
636  // Apply response of a cell
637  digitize_one_hit(left,right,1);
638  nDigitizedRpc++;
639 
640 
641  //-------------------------------------------------------
642 
643  } // End of celltrack loop
644 
645  }
646 
647  } // End of cellobjects loop
648  }
649 
650 
651  //---------------------------------------------------------------
652  // Fill output
653  if(nDigitizedRpc>0) {
654 
655  Int_t Track [10];
656  Int_t TrackDgtr[10];
657  Bool_t isAtBox [10];
658  vector <Int_t> tracklist;
659  tracklist.reserve(20); // Minimum size
660 
661  for(UInt_t i = 0; i < rpcobjects.size(); i ++) {
662  rpcdat* dat = rpcobjects[i];
663  if(dat){
664  fLoc[0] = dat->sec;
665  fLoc[1] = dat->col;
666  fLoc[2] = dat->cell;
667 
668  //-------------------------------------------------------
669  // Test if cell in use. Needed in embedding mode:
670  //THIS OPTION IS NO MORE EXISTING: its used the tmp cat in the embedding mode
671  // Neither in embedding mode nor in the standard this part should not be used!
672  cal = (HRpcCalSim*) fCalCat->getObject(fLoc);
673  if(cal) {
674  // Add track from real data for sorting procedure
675  gaptrack* left = new gaptrack;
676  gaptrack* right = new gaptrack;
677 
678  left ->reset();
679  right->reset();
680 
681  dat->left .push_back(left);
682  dat->right.push_back(right);
683 
684  left ->time = cal->getLeftTime();
685  left ->gtime = cal->getLeftTime();
686  left ->charge = cal->getLeftCharge();
689  left ->isAtBox = kTRUE;
690  right->time = cal->getRightTime();
691  right->gtime = cal->getRightTime();
692  right->charge = cal->getRightCharge();
695  right->isAtBox = kTRUE;
696  } else {
697  cal = (HRpcCalSim*) fCalCat->getSlot(fLoc);
698  if(!cal) Error("execute()","Error: could not allocate a new slot in HRpcCalSim!");
699  cal = new(cal) HRpcCalSim;
700  cal->setAddress(fLoc[0], fLoc[1], fLoc[2]);
701  }
702  //-------------------------------------------------------
703  // Sort by GEANT time and select the fastest hit
704  dat->sortTime(kTRUE); // Right
705  dat->sortTime(kFALSE); // Left
706  if(((mode==0)&&((sigma1_T<=0.)||(sigma2_T<=0.)||(sigma3_T<=0.)))
707  ||(mode>0)||(HGeantRpc_version==5)) {
708  // Digitizing model I and II (except gap-wise)
709  // Take the fastest in the left and in the right.
710  cal->setRightTime(dat->getSmallestTof(kTRUE )); // Right
711  cal->setLeftTime (dat->getSmallestTof(kFALSE)); // Left
712  } else {
713  // Digitizing model II gap-wise.
714  // Take the average in the left and in the right.
715  cal->setRightTime(dat->getMeanTof(kTRUE )); // Right
716  cal->setLeftTime (dat->getMeanTof(kFALSE)); // Left
717  }
718  cal->setRightCharge(dat->getSumCharge(kTRUE )); // Right
719  cal->setLeftCharge (dat->getSumCharge(kFALSE)); // Left
720 
721  cal->setRefR (dat->right[0]->ref);
722  cal->setRefRDgtr(dat->right[0]->refDgtr);
723  cal->setRefL (dat->left [0]->ref);
724  cal->setRefLDgtr(dat->left [0]->refDgtr);
725  //-------------------------------------------------------
726 
727 
728  //-------------------------------------------------------
729  // Fill list of tracks
730  // and remove doubles
731 
732  //-------------------------------------------------------
733  // Right side
734  tracklist.clear();
735  Int_t ct = 0;
736 
737  for(UInt_t j = 0; j < 10; j ++) {
738  Track[j] = TrackDgtr[j] = -999;
739  isAtBox[j] = kFALSE;
740  }
741 
742  for(UInt_t j = 0; j < dat->right.size() && ct < 10; j ++ ){
743  Int_t tr = dat->right[j]->track;
744  if(find(tracklist.begin(),tracklist.end(),tr ) == tracklist.end()){
745  // Track was not stored before
746  Track [ct] = tr;
747  TrackDgtr[ct] = dat->right[j]->trackDgtr;
748  isAtBox [ct] = dat->right[j]->isAtBox;
749  // Remember used track
750  tracklist.push_back(tr);
751  ct ++;
752  }
753  }
754 
755  cal->setTrackRArray (Track);
756  cal->setTrackRDgtrArray(TrackDgtr);
757  cal->setRisAtBoxArray (isAtBox);
758  cal->setNTracksR(ct);
759  //-------------------------------------------------------
760 
761  //-------------------------------------------------------
762  // Left side
763  tracklist.clear();
764  ct = 0;
765 
766  for(UInt_t j = 0; j < 10; j ++) {
767  Track[j] = TrackDgtr[j] = -999;
768  isAtBox[j] = kFALSE;
769  }
770 
771  for(UInt_t j = 0; j < dat->left.size() && ct < 10 ; j ++ ){
772  Int_t tr = dat->left[j]->track;
773  if(find(tracklist.begin(),tracklist.end(),tr) == tracklist.end()){
774  // Track was not stored before
775  Track [ct] = tr;
776  TrackDgtr[ct] = dat->left[j]->trackDgtr;
777  isAtBox [ct] = dat->left[j]->isAtBox;
778  // Remember used track
779  tracklist.push_back(tr);
780  ct ++;
781  }
782  }
783 
784  cal->setTrackLArray (Track);
785  cal->setTrackLDgtrArray(TrackDgtr);
786  cal->setLisAtBoxArray (isAtBox);
787  cal->setNTracksL(ct);
788  //-------------------------------------------------------
789 
790  //-------------------------------------------------------
791  }
792  }
793  }
794  //---------------------------------------------------------------
795 
796  return 0;
797 }
798 
800  // Delete objects in working array and
801  // set pointer to 0. vector is still
802  // not cleared.
803  effi_vec.clear();
804  for(UInt_t i = 0; i < rpcobjects.size(); i ++){
805  if(rpcobjects[i]){
806  rpcobjects[i]->reset();
807  delete rpcobjects[i];
808  rpcobjects[i] = 0;
809  }
810  }
811  for(UInt_t i = 0; i < cellobjects.size(); i ++){
812  if(cellobjects[i]){
813  cellobjects[i]->reset();
814  delete cellobjects[i];
815  cellobjects[i] = 0;
816  }
817  }
818 }
819 
820 Int_t HRpcDigitizer::findMother(Int_t Ref_initial) {
821 
822  // Algorithm for finding mother. When not found, -1 is returned
823  // in order to tag the track. It very rarely happens and is
824  // always associated to neutral particles at the box.
825 
826  Int_t detectorID = 0, track_mother = -1, Ref_final = -1;
827 
828  HGeantRpc* geantrpc = 0;
829  HGeantKine* kine = 0;
830 
831  track_mother = ((HGeantRpc*)fGeantRpcCat->getObject(Ref_initial))->getTrack();
832  kine = (HGeantKine*)fKineCat ->getObject(track_mother - 1);
833 
834  while(kine && detectorID >= 0){
835 
836  if(track_mother == 0) { //End of loop. Mother not found
837  Ref_final = -999;
838  break;
839  }
840 
841  kine = (HGeantKine*)fKineCat->getObject(track_mother - 1);
842 
843  if(kine && kine->getNRpcHits() == 0) { //Mother has no hit in RPC cells
844  track_mother = kine->getParentTrack();
845  continue;
846  }
847 
848  Ref_final = kine->getFirstRpcHit(); //Look for the first hit (time-wise) of the track
849  geantrpc = (HGeantRpc*)fGeantRpcCat->getObject(Ref_final);
850  detectorID = geantrpc->getDetectorID();
851  track_mother = kine->getParentTrack();
852 
853  }
854 
855  return Ref_final;
856 }
857 
859 
860  // Algorithm to calculate the inefficiency of a gap. The efficiency
861  // in the digitizer parameters is ALWAYS per CELL.
862  // If mode=-1 the efficiency/inefficiency per hit are initialised as per gap,
863  // If mode=-2 the efficiency/inefficiency per hit are initialised as per cell,
864  // If mode=1 the efficiency/inefficiency per hit are calculated as per gap,
865  // If mode=2 the efficiency/inefficiency per hit are calculated as per cell.
866 
867  if(mode<0) {
868  //
869  // Initialisation call
870  //
871  if((Eff1==0.)||(Eff2<=0.)||(Eff3<=0.)) {
872  // Digitizing model I.
873  if(mode==-1) {
874  // HIT == GAP
875  ineff_hit_n = TMath::Sqrt(TMath::Sqrt(1. - fDigiPar->getEff()));
876  } else {
877  // HIT == CELL
878  ineff_hit_n = 1. - fDigiPar->getEff();
879  }
880  } else {
881  ineff_hit_n = 0.;
882  }
883  } else {
884  //
885  // Calculation call
886  //
887  if((Eff1==0.)||(Eff2<=0.)||(Eff3<=0.)) {
888  // Digitizing model I.
889  ineff_hit = TMath::Power(ineff_hit_n,geaLocLenNorm); // correction for angle of incidence
890  } else {
891  // Digitizing model II.
892  eff_hit = Eff0+Eff1/(1.+TMath::Exp(-Eff2*(beta-Eff3))) + TMath::Exp(Eff4*beta+Eff5);
893  if(mode==1) {
894  // HIT == GAP
895  ineff_hit = TMath::Sqrt(TMath::Sqrt(1. - eff_hit)); // convert to inefficency of a gap
896  } else {
897  // HIT == CELL
898  ineff_hit = 1. - eff_hit;
899  }
900  ineff_hit = TMath::Power(ineff_hit,(geaLocLenNorm)); // correction for angle of incidence
901  }
902  // Efficiency per gap
903  eff_hit = 1. - ineff_hit;
904  }
905 }
906 
908 
909  // Algorithm to calculate the response of a gap.
910  // If mode=0 in MODEL II a corection for the average number of active
911  // gaps is applyed.
912 
913  Float_t geaXLoc = 0.;
914  Float_t beta2,corr_ngap,sigma_T,sigma_el_here,X_smearing,T_smearing;
915  Float_t Qmean,Qwid,Qgap;
916 
917  // Change to cell coordinate system (with origin at the cell center)
918  // Note that fGeomCellPar->getX(column,cell) corresponds to the left-down corner
919  geaXLoc = fGeomCellPar->getX(fLoc[1],fLoc[2]) - geaX; // Position in cell frame
920 
921  // Calculate GEANT time left/right without smearing for sorting
922  left->gtime = geaTof + geaXLoc / vprop; // Geant Time at left-end
923  right->gtime = geaTof + (D-geaXLoc) / vprop; // Geant Time at right-end
924 
925 
926  // Common to left and right!. Intrinsic RPC fluctuations.
927  if((sigma1_T<=0.)||(sigma2_T<=0.)||(sigma3_T<=0.)) {
928  // Digitizing model I.
929  // Common to left and right!. Intrinsic RPC fluctuations.
930  T_smearing = gRandom->Gaus(t_offset, sigma0_T);
931  left ->time = left ->gtime + T_smearing + gRandom->Gaus(0.,sigma_el);
932  right->time = right->gtime + T_smearing + gRandom->Gaus(0.,sigma_el);
933  } else {
934  // Digitizing model II.
935  sigma_T = sigma0_T+sigma1_T/(1.+TMath::Exp(-sigma2_T*(beta-sigma3_T)));
936  sigma_el_here=sigma_el;
937 
938  // Attempt to approximately correct for the number of active gaps.
939  if(mode==0) {
940  Float_t norm=0.;
941  corr_ngap=0.;
942  for(Int_t i = 1; i < 5; i ++) {
943  Float_t w4i=TMath::Binomial(4,i)*TMath::Power(eff_hit,i)*TMath::Power(ineff_hit,4-i);
944  norm += w4i;
945  corr_ngap += w4i/TMath::Sqrt((Float_t)i);
946  }
947  // The correction factor for the sigma of the Gaussian is the
948  // inverse of corr_ngap/norm, to have a multiplicative correction
949  // it is calculated here once for all.
950  corr_ngap = norm/corr_ngap;
951  sigma_T *= corr_ngap;
952  sigma_el_here *= corr_ngap;
953  }
954 
955  T_smearing = gRandom->Gaus(t_offset,sigma_T);
956  // The position and time resolutions are decoupled.
957  X_smearing = gRandom->Gaus(0.,sigma_el_here);
958  //X_smearing = 0.;
959  left ->time = left ->gtime + T_smearing + X_smearing;
960  right->time = right->gtime + T_smearing - X_smearing;
961  }
962 
963  // Generated charge.
964  if(Qwid0<=0.) {
965  // Digitizing model I.
966  // Charge distribution assumed to be flat per gap. At present slewing
967  // correction is not included. Also charges in left and in right are
968  // *exactly* the same by definition. A smearing in charge to account
969  // for the resolution of the Q2W method can be easily included.
970  Qgap = (gRandom->Uniform(1)) * (2. * Qmean0) / 4. * geaLocLenNorm; // Correction for angle of incidence
971  } else {
972  // Digitizing model II.
973  // Use Landau distribution with a mean and width parametrised with
974  // second order polynomials in beta.
975  beta2 = beta*beta;
976  Qmean = Qmean0+Qmean1*beta+Qmean2*beta2;
977  Qwid = Qwid0 +Qwid1*beta +Qwid2*beta2;
978 
979  // Attempt to approximately correct for the number of active gaps.
980  if(mode==0) {
981  Float_t norm=0.;
982  corr_ngap=0.;
983  for(Int_t i = 1; i < 5; i ++) {
984  Float_t w4i=TMath::Binomial(4,i)*TMath::Power(eff_hit,i)*TMath::Power(ineff_hit,4-i);
985  norm += w4i;
986  corr_ngap += w4i*TMath::Sqrt((Float_t)i);
987  }
988  // The correction factor for the sigma of the Gaussian is the
989  // inverse of corr_ngap/norm, to have a multiplicative correction
990  // it is calculated here once for all. Note that this is very
991  // approximate for a Landau distribution.
992  corr_ngap = norm/corr_ngap;
993  // Per gap.
994  Qmean /= (4.*eff_hit);
995  // Per gap.
996  Qwid *= corr_ngap;
997  }
998 
999  // Correction for angle of incidence.
1000  Qmean *= geaLocLenNorm;
1001  // Correction for angle of incidence.
1002  Qwid *= geaLocLenNorm;
1003  Qgap = gRandom->Landau(Qmean,Qwid);
1004  }
1005  left ->charge = Qgap;
1006  right->charge = Qgap;
1007 }
1008 
1010  if(!fGeomCellPar || gea->getDetectorID() < 0) {
1011  return -1.;
1012  }
1013 
1014  Int_t module = gea->getColumn();
1015  Int_t cell = gea->getCell();
1016  if(module<0 || cell<0) {
1017  return -1.;
1018  }
1019  Float_t axHit = 0.;
1020  Float_t ayHit = 0.;
1021  Float_t azHit = 0.;
1022  Float_t atofHit = 0.;
1023  gea->getCellAverage(axHit, ayHit, azHit, atofHit);
1024  // In case the cell number is not the first:
1025  Float_t xCorner = fGeomCellPar->getX(module,cell);
1026  Float_t yCorner = fGeomCellPar->getY(module,cell);
1027  Float_t length = fGeomCellPar->getLength(module,cell);
1028  Float_t rxCorner = xCorner - length;
1029 
1030  Int_t trackNumber = gea->getTrack();
1031  HGeantKine* kine = (HGeantKine*)fKineCat->getObject(trackNumber-1);
1032  if(!kine) return 0;
1033 
1034  Float_t xCornerL=-1e5;
1035  Float_t lengthL=-1e5;
1036  Float_t yCornerL=-1e5;
1037  Float_t rxCornerL=1e-5;
1038  if(cell>0) {
1039  xCornerL = fGeomCellPar->getX(module,cell-1);
1040  lengthL = fGeomCellPar->getLength(module,cell-1);
1041  yCornerL = fGeomCellPar->getY(module,cell-1);
1042  rxCornerL = xCornerL - lengthL;
1043  }
1044 
1045  Float_t angle1 = 0.;
1046  Float_t angle2 = 0.;
1047  if(lengthL>0) {
1048  angle1 = atan2(xCorner-xCornerL ,yCorner-yCornerL);
1049  angle2 = atan2(rxCorner-rxCornerL,yCorner-yCornerL);
1050  // Check that is not one of the cells that has the outer part flat!
1051  if(cell<30 && cell>27) {
1052  if(xCorner == fGeomCellPar->getX(module,cell+1)) {
1053  angle1 = 0.;
1054  }
1055  if(rxCorner == (fGeomCellPar->getX(module,cell+1) - fGeomCellPar->getLength(module,cell+1)) ) {
1056  angle2 = 0.;
1057  }
1058  }
1059  } else {
1060  xCornerL = fGeomCellPar->getX(module,cell+1);
1061  yCornerL = fGeomCellPar->getY(module,cell+1);
1062  lengthL = fGeomCellPar->getLength(module,cell+1);
1063  rxCornerL = xCornerL + lengthL;
1064  angle1 = atan2( xCornerL-xCorner,yCornerL-yCorner);
1065  angle2 = atan2(rxCornerL-rxCorner,yCornerL-yCorner);
1066  }
1067 
1068  Float_t distL = -axHit + (xCorner + sin(angle1) * (ayHit-yCorner));
1069  Float_t distR = axHit - (rxCorner + sin(angle2) * (ayHit-yCorner));
1070 
1071  return distL<distR ? distL : distR;
1072 }
1073 
void setRefR(Int_t aRefR)
Definition: hrpccalsim.h:31
virtual Bool_t addCategory(Cat_t aCat, HCategory *cat, Option_t opt[])=0
Bool_t initParContainer()
void getCellAverage(Float_t gap, Float_t &axHit, Float_t &ayHit, Float_t &azHit, Float_t &atofHit, Float_t &amomHit, Float_t &aeHit, Float_t &aloctrackLength)
Definition: hgeantrpc.cc:317
Float_t sigma3_T
static Int_t getEmbeddingRealTrackId()
Definition: hades.h:102
void setLisAtBoxArray(Bool_t *LisAtBoxarray)
Definition: hrpccalsim.h:50
Float_t getLength(Int_t col, Int_t cell)
Float_t getLeftCharge()
Definition: hrpccal.h:45
Int_t getEmbeddingMode()
Definition: hades.h:98
void setRightTime(Float_t arightTime)
Definition: hrpccal.h:67
Float_t t_offset
Float_t getEff()
Definition: hrpcdigipar.h:58
Float_t geaLocLenNorm
void setRefRDgtr(Int_t aRefRDgtr)
Definition: hrpccalsim.h:33
Float_t getQmean1()
Definition: hrpcdigipar.h:53
Int_t getGap(void) const
Definition: hgeantrpc.h:154
Int_t getFirstRpcHit()
Definition: hgeantkine.h:185
Float_t sigma0_T
void calc_eff_hit(Int_t mode)
Float_t getSigmaT3()
Definition: hrpcdigipar.h:50
HRuntimeDb * getRuntimeDb(void)
Definition: hades.h:111
HEvent *& getCurrentEvent(void)
Definition: hades.cc:422
const Cat_t catGeantKine
Definition: hgeantdef.h:8
Float_t getRightTime()
Definition: hrpccal.h:40
struct HRpcDigitizer::celltrack celltrack
void setTrackRArray(Int_t *trackRarray)
Definition: hrpccalsim.h:48
Int_t maxCol
Iterator over HRpcCalSim category.
void setRefL(Int_t aRefL)
Definition: hrpccalsim.h:30
Int_t getNRpcHits(void)
Definition: hgeantkine.cc:817
Int_t getDetectorID(void)
Definition: hgeantrpc.h:83
ClassImp(HDbColumn) HDbColumn
Definition: hdbcolumn.cc:18
void setRefLDgtr(Int_t aRefLDgtr)
Definition: hrpccalsim.h:32
Int_t getMode()
Definition: hrpcdigipar.h:71
vector< efhits > effi_vec
temporary working array for digitized data
Float_t ineff_hit_n
HRpcDigiPar * fDigiPar
Geometrical parameters.
Float_t getVprop()
Definition: hrpcdigipar.h:45
HCategory * fKineCat
Pointer to Cal data category.
Float_t getSigmaT()
Definition: hrpcdigipar.h:47
Int_t getTrack(void)
Definition: hgeantrpc.h:82
HIterator * iterGeantRpc
Digitization parameters.
void setAddress(Short_t aAddress)
Definition: hrpccal.h:76
Int_t getID(void) const
Definition: hgeantkine.h:107
void setLeftCharge(Float_t aleftCharge)
Definition: hrpccal.h:72
vector< gaptrack * > right
Definition: hrpcdigitizer.h:64
HCategory * fCalCat
Pointer to Rpc Geant data category.
Int_t getVersion(void)
Definition: hgeantrpc.h:86
Float_t getQwid1()
Definition: hrpcdigipar.h:56
void setLeftTime(Float_t aleftTime)
Definition: hrpccal.h:68
Int_t getParentTrack(void) const
Definition: hgeantkine.h:108
struct HRpcDigitizer::gaptrack gaptrack
Float_t getSmallestTof(Bool_t isRight)
Float_t getSigmaT2()
Definition: hrpcdigipar.h:49
void getCellAverageDigi(Float_t gap, Float_t &axHit, Float_t &atofHit, Float_t &amomHit, Float_t &aloctrackLength)
Definition: hgeantrpc.cc:510
HRpcGeomCellPar * fGeomCellPar
Pointer to Kine data category.
Bool_t init(void)
vector< rpcdat * > rpcobjects
HSpectrometer * getSetup(void)
Definition: hades.h:112
Float_t getX(Int_t col, Int_t cell)
HDetector * getDetector(const Char_t *name)
void setNTracksL(Int_t anTracksL)
Definition: hrpccalsim.h:43
void setVersion(Int_t aHGeantRpc_version)
Definition: hgeantrpc.h:55
Float_t getEff3()
Definition: hrpcdigipar.h:61
Int_t execute(void)
Int_t getMaxCells()
Definition: hrpcdetector.h:26
Float_t getEff1()
Definition: hrpcdigipar.h:59
Float_t getMeanTof(Bool_t isRight)
Definition: hrpcdigitizer.h:93
static Float_t mass(const Int_t id)
HLocation fLoc
Float_t sigma_el
const Cat_t catRpcGeantRaw
Definition: hgeantdef.h:15
Float_t getQmean()
Definition: hrpcdigipar.h:52
void setTrackLDgtrArray(Int_t *trackLDgtrarray)
Definition: hrpccalsim.h:47
void initVars()
vector of hits for efficiency calculation
Hades * gHades
Definition: hades.cc:1213
Float_t getEff5()
Definition: hrpcdigipar.h:63
void getHitDigi(Float_t &axHit, Float_t &atofHit, Float_t &amomHit, Float_t &aloctrackLength)
Definition: hgeantrpc.cc:308
Float_t getY(Int_t col, Int_t cell)
const Cat_t catRpcCal
Definition: rpcdef.h:8
Float_t getSigmaX()
Definition: hrpcdigipar.h:46
Float_t getQmean2()
Definition: hrpcdigipar.h:54
HParSet * getContainer(const Text_t *)
Definition: hruntimedb.cc:124
Float_t getGap()
Definition: hrpcdigipar.h:70
Float_t getLeftTime()
Definition: hrpccal.h:41
HCategory * fGeantRpcCat
Location for new object.
Int_t findMother(Int_t Ref_initial)
Float_t getEff2()
Definition: hrpcdigipar.h:60
vector< celldat * > cellobjects
vector< gaptrack * > left
Definition: hrpcdigitizer.h:65
Int_t getMaxColumns()
Definition: hrpcdetector.h:25
Float_t getQwid()
Definition: hrpcdigipar.h:55
Float_t getRightCharge()
Definition: hrpccal.h:44
Float_t getDistanceToXedge(HGeantRpc *gea)
Float_t sigma2_T
Float_t geaLocLen
vector< celltrack * > celltr
static Float_t fCropDistance
HIterator * iterRpcCal
Iterator over catRpcGeantRaw category.
Float_t getQwid2()
Definition: hrpcdigipar.h:57
Int_t getSector(void) const
Definition: hgeantrpc.h:139
void sortTime(Bool_t isRight)
Definition: hrpcdigitizer.h:80
const Cat_t catRpcCalTmp
Definition: rpcdef.h:11
HCategory * buildMatrixCategory(const Text_t *, Float_t)
Definition: hrpcdetector.cc:67
void digitize_one_hit(gaptrack *left, gaptrack *right, Int_t mode)
Int_t mode
void set(Int_t se, Int_t co, Int_t ce, Float_t ax, Float_t ay, Float_t at, Bool_t eff)
virtual HCategory * getCategory(Cat_t aCat)=0
Int_t getCell(void) const
Definition: hgeantrpc.h:149
Float_t ineff_hit
Float_t getToff()
Definition: hrpcdigipar.h:51
void setTrackRDgtrArray(Int_t *trackRDgtrarray)
Definition: hrpccalsim.h:49
Float_t getSigmaT1()
Definition: hrpcdigipar.h:48
void setRightCharge(Float_t arightCharge)
Definition: hrpccal.h:71
void setNTracksR(Int_t anTracksR)
Definition: hrpccalsim.h:44
Float_t getEff4()
Definition: hrpcdigipar.h:62
Float_t sigma1_T
void setRisAtBoxArray(Bool_t *RisAtBoxarray)
Definition: hrpccalsim.h:51
Float_t getSumCharge(Bool_t isRight)
Definition: hrpcdigitizer.h:86
Int_t getColumn(void) const
Definition: hgeantrpc.h:144
void setTrackLArray(Int_t *trackLarray)
Definition: hrpccalsim.h:46