FairRoot/PandaRoot
PndSdsCalcStripDif.cxx
Go to the documentation of this file.
1 //
2 // C++ Implementation: PndSdsCalcStrip
3 //
4 // Description:
5 //
6 //
7 // Author: HG Zaunick <hg.zaunick@physik.tu-dresden.de>, (C) 2007
8 //
9 // Copyright: See COPYING file that comes with this distribution
10 //
11 //
12 #include <cmath>
13 
14 #include "PndSdsCalcStripDif.h"
15 #include "TRandom3.h"
16 
18  fPitch = 0.;
19  fOrient = 0.;
20  fAnchor = TVector2(0.,0.);
21  fNrStrips = 0;
22  fThreshold = 0.;
23  fNoise = 0.;
24  fVerboseLevel = 0;
25  fRNG = new TRandom3();
26 }
27 
29  Int_t nrStrips, Int_t nrFeChannels,
30  const TVector2& firstStripAnchor,
32 : fPitch(pitch), fOrient(orient),
33 fNrStrips(nrStrips), fNrFeChannels(nrFeChannels),
34 fAnchor(firstStripAnchor),
35 fThreshold(threshold), fNoise(noise)
36 {
39  fVerboseLevel = 0;
40  fRNG = new TRandom3();
41  fSigma = sigma;
42  //Print();
43 }
44 
46 {
47  if(side == kTOP)
48  {
49  fPitch = digipar->GetTopPitch();
50  fOrient = digipar->GetOrient();
51  fAnchor = digipar->GetTopAnchor();
52  fNrStrips = digipar->GetNrTopFE()*digipar->GetNrFECh();
53  }
54  else if(side == kBOTTOM)
55  {
56  fPitch = digipar->GetBotPitch();
57  fOrient = digipar->GetOrient() + digipar->GetSkew();
58  fAnchor = digipar->GetBotAnchor();
59  fNrStrips = digipar->GetNrBotFE()*digipar->GetNrFECh();
60  }
61  fNrFeChannels = digipar->GetNrFECh();
62  fThreshold = digipar->GetThreshold();
63  fNoise = digipar->GetNoise();
64 
67  fVerboseLevel = 0;
68  fRNG = new TRandom3();
69  if (fVerboseLevel > 0) Print();
70 }
71 
72 
73 std::vector<PndSdsStrip>
75  Double_t outx, Double_t outy, Double_t outz,
76  Double_t eLoss)
77 {
78  if (fVerboseLevel > 2) std::cout<<"-I- PndSdsCalcStrip::GetStrips "<<std::endl;
79 
80  // 2d-Projection of trajectory
81  TVector2 in(inx,iny);
82  TVector2 out(outx,outy);
83  TVector2 path=out-in;
84 
85  if (fVerboseLevel > 2){
86  std::cout<<" InPoint: ("<<in.X()<<","<<in.Y()<<")"<<std::endl;
87  std::cout<<" OutPoint: ("<<out.X()<<","<<out.Y()<<")"<<std::endl;
88  }
89 
90  std::vector<PndSdsStrip> strips;
91  //Double_t smearedQ;
92 
93  if (path.Mod()<1E-18) {
94  std::cout<<"-W- PndSdsCalcStrip::GetStrips : No Trajectory inside Sensor! (out-in).Mod() = "<<path.Mod()<<std::endl;
95  return strips;
96  }
97 
98  if (fVerboseLevel > 1) std::cout<<" pathlength: "<<path.Mod()<<std::endl;
99 
100  Double_t nuIn = CalcStripFromPoint(inx,iny);
101  Double_t nuOut = CalcStripFromPoint(outx,outy);
102 
103  if (fVerboseLevel > 2) std::cout<<" nuIn = "<<nuIn<<" ; nuOut = "<<nuOut<<std::endl;
104 
105 
106  Double_t Q = ChargeFromEloss(eLoss);//*1E9/3.61; // 3.6 eV/Electron in Silicon
107  if (fVerboseLevel > 1) std::cout<<" integral charge = "<<Q<<std::endl;
108 
109  // did we hit the active area ?
110  // if ( (nuIn<0.5 && nuOut<0.5) || (((nuIn+0.5) > Double_t(fNrStrips-1)) && ((nuOut+0.5) > Double_t(fNrStrips-1)))){
111  if ( (nuIn<0. && nuOut<0.) || ((nuIn > Double_t(fNrStrips)) && (nuOut > Double_t(fNrStrips))) )
112  {
113  if (fVerboseLevel > 1) std::cout<<"-W- PndSdsCalcStrip::GetStrips: Hit outside active area."<<std::endl;
114  return strips;
115  }
116 
117  // is the In-Point inside active area ?
118  // only charge fraction inside active area taken
119  if (nuIn<0.){
120  Q *= (nuOut)/(nuOut-nuIn);
121  nuIn = 0.;
122  } else if (nuIn > (Double_t(fNrStrips))){
123  Q *= ((Double_t)fNrStrips-nuOut)/(-nuOut+nuIn);
124  nuIn = Double_t(fNrStrips);
125  }
126 
127  // is the Out-Point inside active area ?
128  if (nuOut<0.){
129  Q *= (nuIn)/(-nuOut+nuIn);
130  nuOut = 0.;
131  } else if (nuOut > (Double_t(fNrStrips))){
132  Q *= ((Double_t)fNrStrips-nuIn)/(nuOut-nuIn);
133  nuOut = Double_t(fNrStrips);
134  }
135 
136  //path direction
137  Double_t dir = (nuIn<nuOut)? 1 : -1;
138 
139  //Strip number for FE channel
140  Int_t inStrip = Int_t(nuIn);
141  Int_t outStrip = Int_t(nuOut);
142 
144  Double_t Path1 = (nuIn-inStrip) * fPitch;
145  Double_t Path2 = (nuOut-outStrip) * fPitch;
146  Double_t pathO = std::fabs(nuOut-nuIn) * fPitch;
147 
148  // only one strip hit ?
149  if (inStrip == outStrip){
150  // this strip collected the entire charge
151  // smearedQ = SmearCharge(Q);
152  //if (smearedQ >= fThreshold)
153  // strips.push_back(PndSdsStrip(Int_t(nuOut),smearedQ));
154 
155  //--------------------------Tsito Digi with diffusion------------------------------------------------
156  //Double_t path_real = path.Mod();
157  Int_t index = inStrip;
158 
159  Double_t charge1, charge2, dQ, dQR, dQL, QL, QR, QM;
160  Int_t id;
161  Double_t q_head,q_tail;
162  //charge diffusion according to the gaussian smearing
163  //between the 3 strips of index-1, index, and index+1
164 
165  QL = ChargeDiffusion(0,Path1,pathO,dir,Q);//the diffusion charge from -infinite to index
166  QR = Q - ChargeDiffusion(fPitch,Path1,pathO,dir,Q);//the diffusion charge from index to infinite
167  QM = Q - QR -QL;// the charge left on the strip index
168 
169  if (fVerboseLevel > 1)
170  std::cout<<"the QL,QR,QM are: "<<QL<<","<<QR<<","<<QM<<std::endl;
171 
172  //noise smearing for the QL,QR and QM
173  dQR = SmearCharge(QR);
174  dQL = SmearCharge(QL);
175 
176  //is it only 1 strip involved
177  if(dQL<fThreshold && dQR<fThreshold){
178  dQ = SmearCharge(QM);
179  if(dQ>fThreshold)
180  strips.push_back(PndSdsStrip(index,dQ));
181 
182  }else{
183  Int_t i=0;
184  Int_t j=1;
185 
186  if(QL>=fThreshold){
187  //charge distribution at the head of the track
188  charge1 = ChargeDiffusion((i-1)*fPitch,Path1,pathO,dir,Q);//charge distribution from -infinite to strip of index-1
189  if (fVerboseLevel > 1)
190  std::cout<<"if QL>fThrehold, the charge on the strip(i-1)*fPitch is :"<<charge1<<",path1= "<<Path1<<std::endl;
191  charge2 = ChargeDiffusion(i*fPitch,Path1,pathO,dir,Q);
192  if (fVerboseLevel > 1)
193  std::cout<<"if QL>fThrehold, the charge on the strip(i)*fPitch is :"<<charge2<<std::endl;
194  q_head = charge2 - charge1;
195  id = index + i-1;
196  dQ = SmearCharge(q_head);
197  if(dQ>fThreshold)
198  strips.push_back(PndSdsStrip(id,dQ));
199  }
200 
201  if(QR>=fThreshold){
202  //charge distribution at the head of the track
203  charge1 = ChargeDiffusion(j*fPitch,Path1,pathO,dir,Q);//charge distribution from -infinite to strip of index-1
204  if (fVerboseLevel > 1)
205  std::cout<<"if dQR>fThrehold, the charge on the strip(j)*fPitch is :"<<charge1<<std::endl;
206  charge2 = ChargeDiffusion((j+1)*fPitch,Path1,pathO,dir,Q);
207  if (fVerboseLevel > 1)
208  std::cout<<"if dQR>fThrehold, the charge on the strip(j+1)*fPitch is :"<<charge2<<std::endl;
209  q_tail = charge2 - charge1;
210  id = index + j;
211  dQ = SmearCharge(q_tail);
212  if(dQ>fThreshold)
213  strips.push_back(PndSdsStrip(id,dQ));
214  }
215 
216  //the charge left on the center strip
217  Double_t restQ = ChargeDiffusion(fPitch,Path1,pathO,dir,Q) - ChargeDiffusion(0,Path1,pathO,dir,Q);
218  restQ = SmearCharge(restQ);
219 
220  if(restQ>fThreshold)//added on Sep.17,2009
221  strips.push_back(PndSdsStrip(index,restQ));
222  if (fVerboseLevel > 1)
223  std::cout<<"the rest Q on the middle strip is :"<<restQ<<std::endl;
224  }
225 
226  //-----------------------End Tsito Digi with diffusion-------------------------------------------------
227 
228  if (fVerboseLevel > 1) std::cout<<" -> "<<strips.size()<<" strips hit."<<std::endl;
229  } else {
230  Double_t dQ=Q/std::fabs(nuOut-nuIn);
231  //Double_t dPath=path.Mod()/std::fabs(nuOut-nuIn);
232  //Double_t dir = (nuOut>nuIn) ? 1. : -1.;
233  Int_t nrHits = 0;
234  // calculate portion of track in first strip
235  Int_t nextIn = Int_t(nuIn + 0.5+0.5*dir);
236  Double_t Q1 = dQ*std::fabs(nextIn-nuIn);
237  if (fVerboseLevel > 2){
238  std::cout<<" part of first strip : "<<nextIn-nuIn<<std::endl ;
239  std::cout<<" charge : "<<Q1<<std::endl ;
240  std::cout<<" next strip : "<<nextIn<<std::endl ;
241  }
242  //smearedQ = SmearCharge(Q1);
243  if (Q1 >= fThreshold) strips.push_back(PndSdsStrip(Int_t(nuIn),Q1));
244  nrHits++;
245  Q -= Q1;
246 
247  // calculate portion of track in last strip
248  Int_t prevOut = Int_t(nuOut + 0.5-0.5*dir);
249  Double_t Q2 = dQ*std::fabs(nuOut-prevOut);
250  if (fVerboseLevel > 2){
251  std::cout<<" part of last strip : "<<(nuOut-prevOut)<<std::endl ;
252  std::cout<<" charge : "<<Q2<<std::endl ;
253  std::cout<<" end of previous strip : "<<prevOut<<std::endl ;
254  }
255  //smearedQ = SmearCharge(Q2);
256  if (Q2 >= fThreshold) strips.push_back(PndSdsStrip(Int_t(nuOut),Q2));
257  nrHits++;
258  Q -= Q2;
259 
260 
261  // Distribute the charge among the intermediate strips
262  nextIn = Int_t(nextIn - 0.5 + 0.5*dir);
263  prevOut = Int_t(prevOut - 0.5 + 0.5*dir);
264  if (fVerboseLevel > 2) {
265  std::cout<<" dir="<<Int_t(dir)<<std::endl;
266  std::cout<<" begin="<<nextIn<<" end="<<prevOut<<std::endl;
267  }
268 
269  for (Int_t n = nextIn ; n != prevOut; n += Int_t(dir) )
270  {
271  if (fVerboseLevel > 2) std::cout<<" n = "<<n<<std::endl;
272  //smearedQ = SmearCharge(dQ);
273  if (dQ >= fThreshold) strips.push_back(PndSdsStrip(n,dQ));
274  nrHits++;
275  Q -= dQ;
276  }
277 
278 
279 
280  //--------------------------Tsito Digi with diffusion-------------------------------------------------
281 
282  if(strips.size()<1)
283  return strips;
284 
285  //for the strips
286  Double_t head_Path; //, tail_Path;
287  std::vector<PndSdsStrip> strip_head;
288  std::vector<PndSdsStrip> strip_tail;
289  std::vector<PndSdsStrip> strip_middle;
290  PndSdsStrip str_head;
291  PndSdsStrip str_tail;
292  std::vector<PndSdsStrip> str_middle;
293  Int_t size = strips.size();
294  Double_t total_Q = ChargeFromEloss(eLoss);
295 
296  if(inStrip<outStrip){
297  str_head = strips[0];
298  //if(!str_head)cout<<"str_head is available"<<endl;
299  str_tail = strips[size-1];
300  head_Path = Path1;
301  //tail_Path = Path2+(size-1)*fPitch;
302  // cout<<"when inStrip!=outStrip, the head Path is "<<head_Path<<endl;
303  for(Int_t i = 1; i<size-1;i++)
304  str_middle.push_back(strips[i]);
305 
306  dir=-1;
307 
308  }
309  else{
310  str_tail = strips[0];
311  //if(!str_tail)cout<<"str_tail is available, inStrip<outStrip"<<endl;
312  str_head = strips[size-1];
313  head_Path = Path2;
314  //tail_Path = Path1+(size-1)*fPitch;
315  // cout<<"when inStrip>outStrip, the head Path is "<<head_Path<<endl;
316  // cout<<"the dir and size is "<<dir<<","<<size<<endl;
317  for(Int_t i = size-2; i>0;i--)
318  str_middle.push_back(strips[i]);
319 
320  dir=1;
321 
322  }
323 
324  strips.erase(strips.begin(),strips.begin()+size);
325 
326  //strips initialization
327  Int_t index_head = str_head.GetIndex();
328  //Double_t path_head = str_head.GetPath();
329 
330  Int_t index_tail = str_tail.GetIndex();
331  //Double_t path_tail = str_tail.GetPath();
332 
333  //for the left strip of the head strip
334  Double_t charge1, charge2;
335  Int_t id;
336  //Double_t ipath;
337  //Double_t q_head,q_tail;
338  Double_t dq_head = ChargeDiffusion(0,head_Path,path.Mod(),dir,total_Q);//the diffusion charge from -infinite to index
339  // cout<<"the dir is "<<dir<<endl;
340  Double_t dq_tail = total_Q - ChargeDiffusion(size*fPitch,head_Path,path.Mod(),dir,total_Q);//the diffusion charge from index+size to infinite
341  // cout<<"the dq between -infinite to 0.01 is"<<ChargeDiffusion(size*fPitch,head_Path,path,dir,total_Q)<<endl;
342  Double_t q_head = ChargeDiffusion(fPitch,head_Path,path.Mod(),dir,total_Q) - dq_head;// the charge left on the strip index
343  // cout<<"the dq between -infinite to 0.005 is"<<ChargeDiffusion(fPitch,head_Path,path,dir,total_Q)<<endl;
344  Double_t q_tail = ChargeDiffusion(size*fPitch,head_Path,path.Mod(),dir,total_Q)
345  -ChargeDiffusion((size-1)*fPitch,head_Path,path.Mod(),dir,total_Q);
346  // cout<<"the dir is "<<dir<<endl;
347  if (fVerboseLevel > 2)
348  std::cout<<"the dq_head,dq_tail,q_head,q_tail are :"<<dq_head<<","<<dq_tail<<","<<q_head<<","<<q_tail<<std::endl;
349 
350  Double_t dQ_head = SmearCharge(dq_head);
351  Double_t dQ_tail = SmearCharge(dq_tail);
352  Double_t Q_head = SmearCharge(q_head);
353  Double_t Q_tail = SmearCharge(q_tail);
354 
355  if(dQ_head>fThreshold) {
356  id = index_head-1;
357  strip_head.push_back(PndSdsStrip(id,dQ_head));
358  }
359  if(Q_head>fThreshold) {
360  id = index_head;
361  strip_head.push_back(PndSdsStrip(id,Q_head));
362  }
363  strips.insert(strips.begin(),strip_head.begin(),strip_head.end());
364 
365  if(dQ_tail>fThreshold) {
366  id = index_tail+1;
367  strip_tail.push_back(PndSdsStrip(id,dQ_tail));
368  }
369  if(Q_tail>fThreshold) {
370  id = index_tail;
371  strip_head.push_back(PndSdsStrip(id,Q_tail));
372  }
373 
374  strips.insert(strips.end(),strip_tail.begin(),strip_tail.end());
375 
376  //for the strips between the head and the tail
377  //condition for middle strips
378  nextIn = Int_t(nuIn+0.5+0.5*dir);
379  prevOut = Int_t(nuOut+0.5-0.5*dir);
380 
381  nextIn=Int_t(nextIn-0.5+0.5*dir);
382  prevOut=Int_t(prevOut-0.5+0.5*dir);
383  if(nextIn != prevOut){
384  for(Int_t i= 1;i< size-1;i++){
385  charge1 = ChargeDiffusion(i*fPitch,head_Path,path.Mod(),dir,total_Q);
386  charge2 = ChargeDiffusion((i+1)*fPitch,head_Path,path.Mod(),dir,total_Q);
387  dQ = charge2 - charge1;
388  //std::vector<PndSdsStrip>::iterator iter_ii=strip_middle.begin();
389  if(dir==-1)
390  id = i;
391  else
392  id = size-1-i;
393  //id = iter_ii->GetIndex();
394  //ipath = iter_ii->GetPath();
395  Double_t tmpCharge = SmearCharge(dQ);
396  if(tmpCharge>fThreshold) strip_middle.push_back(PndSdsStrip(id,tmpCharge));
397  //iter_ii++;
398  }//loop for all strips between head and tail
399  strips.insert(strips.begin()+strip_head.size(),strip_middle.begin(),strip_middle.begin()+strip_middle.size());
400 
401  /*for(Int_t i=0; i<strip_head.size(); i++)
402  strips.push_back(strip_head[i]);
403  for(Int_t i=0; i<strip_middle.size(); i++)
404  strips.push_back(strip_middle.[i]);
405  for(Int_t i=0; i<strip_tail.size(); i++)
406  strips.push_back(strip_tail[i]);*/
407  }//if strips fired exceed 3
408 
409  //-----------------------End Tsito Digi with diffusion-------------------------------------------------
410 
411  if (fVerboseLevel > 2) if (fabs(Q)>1.) std::cout<<" charge Q = "<<Q<<" not detected!"<<std::endl;
412  if (fVerboseLevel > 1) std::cout<<" -> "<<strips.size()<<" strips hit."<<std::endl;
413  }
414 
415  return strips;
416 }
417 
419 {
420  Double_t smeared = fRNG->Gaus(charge,fNoise);
421  if (fVerboseLevel > 3) std::cout<<" charge = "<<charge<<", smeared = "<<smeared<<std::endl;
422  return smeared;
423 }
424 
426 {
427  // fOrthoDir is already set to magnitude == 1., makes it cheaper here.
428  return ((x-fAnchor.X())*fOrthoDir.X() + (y-fAnchor.Y())*fOrthoDir.Y())/fPitch;
429 }
430 
432 {
433  point = fPitch*(strip+0.5)*fOrthoDir + fAnchor;
434 }
435 
436 Int_t PndSdsCalcStripDif::CalcFEfromStrip(Int_t stripNr) const { return (stripNr/fNrFeChannels); }
437 
438 Int_t PndSdsCalcStripDif::CalcChannelfromStrip(Int_t stripNr) const { return (stripNr%fNrFeChannels); }
439 
440 void PndSdsCalcStripDif::CalcFeChToStrip(Int_t fe, Int_t channel, Int_t& strip, enum SensorSide& side) const
441 {
442  //Caution! The top side s always the reference side!
443  Int_t nr = fe * fNrFeChannels + channel;
444  if (nr < fNrStrips) {
445  side = kTOP;
446  } else {
447  nr -= fNrStrips;
448  side = kBOTTOM;
449  }
450  strip = nr;
451 }
452 
453 //charge diffusion during collecting after ionization,
454 //here, the u means the range which approaching the mean value a.
455 //the area was expressed by the Erf function as below
456 // f(x) = 1/2*(1+TMath::Erf((u-a)/sigma*TMath::sqrt(2.))))
458 { Int_t N = 10;
459  //Int_t n = 0;
460  Double_t Npath = path/N;
461  Double_t NQ = Q/N;
462  Double_t Delta; //the area of Gaussian from (-infinite,u)
463  Double_t dQ=0; //the Q in the given range
464  //define sigma of charge diffusion as a function of sensor thickness
465  // suppose the function is linear the sigma woulde be decreased with the thickness
466  // if the sigma = 8um when thickness is 300um, then the sigma = 4um for thickness = 150um
467  // the sigma shall be changed in the cycle calculation.
468  // Double_t sigma = fSigma
469  // cout<<endl;
470  // cout<<"the parameters for charge diffusion are: u, a, path, dir, Q "<< u<<","<<a<<","<<path<<","<<dir<<","<<Q<<endl;
471 
472  if(path==0.)
473  {
474  // Delta = 0.5 *(1+TMath::Erf((u-a)/fSigma*std::sqrt(2.)));
475  Delta = 0.5 *(1+TMath::Erf((u-a)/fSigma*std::sqrt(2.)));
476  dQ = NQ*Delta;
477  // cout<<"when path ==0 ,the dQ = "<<dQ<<endl;
478  }
479  else {
480  if(dir>0.)
481  {
482  for(Double_t da =a,n = 0; n<N; n++)
483  { //da = a;
484  da +=Npath;
485  // Delta = 0.5*(1+TMath::Erf((u-da)/(fSigma*std::sqrt(2.))));
486  //here the sigma square is linear as thickness
487  Delta = 0.5 *(1+TMath::Erf((u-a)/(std::sqrt(((N-n)/N))*(fSigma/std::sqrt(2.))*std::sqrt(2.))));//fSigma is from para list and for 300um sensor,so
488  dQ +=NQ * Delta;
489  // cout<<"when dir = 1 the delta = "<<Delta<<endl;
490  // cout<<"when dir = 1 the dQ = "<<dQ<<endl;
491  }
492  } // cout<<"when dir = 1 the dQ = "<<dQ<<endl;
493 
494  if(dir<0)
495  {
496  for(Double_t da=a-path,n=0;n<N; n++)
497  {
498  da+=Npath;
499  // Delta = 0.5*(1+TMath::Erf((u-da)/(fSigma*std::sqrt(2.))));
500  Delta = 0.5*(1+TMath::Erf((u-da)/(std::sqrt(((N-n)/N))*(fSigma/std::sqrt(2.))*std::sqrt(2.))));
501  dQ +=NQ * Delta;
502  // cout<<"when dir = -1 the delta = "<<Delta<<endl;
503  // cout<<"when dir = -1 the dQ = "<<dQ<<endl;
504  }
505  // cout<<"when dir = -1 the dQ = "<<dQ<<endl;
506  }//dir<<0
507 
508  }//path>0
509  return dQ;
510 }
511 
513 {
514  std::cout<<"-I- PndSdsCalcStrip Info :"<<std::endl;
515  std::cout<<" pitch = "<<fPitch*10000.<<" um"<<std::endl;
516  std::cout<<" orientation angle = "<<fOrient/TMath::Pi()*180.<<" deg"<<std::endl;
517  std::cout<<" nr of strips = "<<fNrStrips<<std::endl;
518  std::cout<<" nr of channels per FE = "<<fNrFeChannels<<std::endl;
519  std::cout<<" nr of frontends = "<<fNrStrips/fNrFeChannels<<std::endl;
520  std::cout<<" anchor point = ("<<fAnchor.X()<<","<<fAnchor.Y()<<")"<<std::endl;
521  std::cout<<" strip-direction vector = ("<<fStripDir.X()<<","<<fStripDir.Y()<<")"<<std::endl;
522 }
523 
524 
525 
526 
527 
Double_t fThreshold
anchor point on first strip
Double_t fNoise
charge threshold
friend F32vec4 cos(const F32vec4 &a)
Definition: P4_F32vec4.h:112
TVector2 GetBotAnchor() const
Int_t i
Definition: run_full.C:25
friend F32vec4 sqrt(const F32vec4 &a)
Definition: P4_F32vec4.h:29
friend F32vec4 sin(const F32vec4 &a)
Definition: P4_F32vec4.h:111
void QR(TMatrixD &A)
Replaces A with an upper right matrix connected to A by an orthongonal transformation. I.e., it computes R from a QR decomposition of A = QR, replacing A.
int n
Double_t ChargeDiffusion(Double_t u, Double_t a, Double_t path, Double_t dir, Double_t Q)
Double_t GetNoise() const
Double_t sigma[nsteps]
Definition: dedx_bands.C:65
Class representing strips on wafer-scale.
Definition: PndSdsStrip.h:15
int nrStrips
Definition: anaLmdDigi.C:76
Double_t GetThreshold() const
Int_t fVerboseLevel
Random Number Generator.
Double_t GetOrient() const
TRandom3 * fRNG
vector orthogonal to strip direction
Int_t CalcChannelfromStrip(Int_t stripNr) const
const Double_t ChargeFromEloss(Double_t eloss) const
Int_t a
Definition: anaLmdDigi.C:126
int strip
Definition: anaMvdDigi.C:135
void CalcFeChToStrip(Int_t fe, Int_t channel, Int_t &strip, enum SensorSide &side) const
Double_t GetSkew() const
Double_t
Int_t CalcFEfromStrip(Int_t stripNr) const
int nrFeChannels
Definition: anaLmdDigi.C:75
Double_t CalcStripFromPoint(Double_t x, Double_t y)
Digitization Parameter Class for MVD-Strip part.
SensorSide
Int_t fNrFeChannels
Nr. of strips on active area.
friend F32vec4 fabs(const F32vec4 &a)
Definition: P4_F32vec4.h:47
TFile * out
Definition: reco_muo.C:20
double threshold
void CalcStripPointOnLine(const Double_t strip, TVector2 &point) const
std::vector< PndSdsStrip > GetStrips(Double_t inx, Double_t iny, Double_t inz, Double_t outx, Double_t outy, Double_t outz, Double_t eLoss)
Int_t fNrStrips
strip orientation angle to x axis
Double_t x
Int_t GetNrFECh() const
Double_t GetBotPitch() const
int fe
Definition: anaLmdDigi.C:67
Double_t fOrient
strip pitch (cm)
Int_t GetIndex() const
Definition: PndSdsStrip.h:31
TVector2 fAnchor
Nr of Channels per FE.
double orient
Int_t GetNrTopFE() const
Int_t GetNrBotFE() const
Double_t y
TVector2 GetTopAnchor() const
Double_t Pi
Double_t SmearCharge(Double_t charge)
double noise
Double_t GetTopPitch() const
TVector2 fOrthoDir
vector perpendicular to strip direction
PndSdsMCPoint * point
Definition: anaLmdCluster.C:72