]> git.uio.no Git - u/mrichter/AliRoot.git/blob - ITS/AliITSsimulationSSD.cxx
New SDD code for much improved SDigit handling. Also bug fix made in the
[u/mrichter/AliRoot.git] / ITS / AliITSsimulationSSD.cxx
1 /**************************************************************************
2  * Copyright(c) 1998-1999, ALICE Experiment at CERN, All rights reserved. *
3  *                                                                        *
4  * Author: The ALICE Off-line Project.                                    *
5  * Contributors are mentioned in the code where appropriate.              *
6  *                                                                        *
7  * Permission to use, copy, modify and distribute this software and its   *
8  * documentation strictly for non-commercial purposes is hereby granted   *
9  * without fee, provided that the above copyright notice appears in all   *
10  * copies and that both the copyright notice and this permission notice   *
11  * appear in the supporting documentation. The authors make no claims     *
12  * about the suitability of this software for any purpose. It is          *
13  * provided "as is" without express or implied warranty.                  *
14  **************************************************************************/
15 /* $Id$ */
16
17 #include <stdio.h>
18 #include <stdlib.h>
19 #include <iostream.h>
20 #include <iomanip.h>
21 #include <TObjArray.h>
22 #include <TParticle.h>
23 #include <TRandom.h>
24 #include <TMath.h>
25 #include <TH1.h>
26
27 #include "AliITSmodule.h"
28 #include "AliITSMapA2.h"
29 #include "AliITSpList.h"
30 #include "AliITSresponseSSD.h"
31 #include "AliITSsegmentationSSD.h"
32 #include "AliITSdcsSSD.h"
33 #include "AliITS.h"
34 #include "AliITShit.h"
35 #include "AliRun.h"
36 #include "AliITSgeom.h"
37 #include "AliITSsimulationSSD.h"
38 #include "AliITSTableSSD.h"
39
40 ClassImp(AliITSsimulationSSD);
41 ////////////////////////////////////////////////////////////////////////
42 // Version: 0
43 // Written by Enrico Fragiacomo
44 // July 2000
45 //
46 // AliITSsimulationSSD is the simulation of SSDs.
47
48 //----------------------------------------------------------------------
49 AliITSsimulationSSD::AliITSsimulationSSD(){
50   //default Constructor
51
52   fDCS     = 0;
53   fDifConst[0] = fDifConst[1] = 0.0;
54   fDriftVel[0] = fDriftVel[1] = 0.0;
55   fMapA2   = 0;
56 //  fpList    = 0;
57 }
58 //----------------------------------------------------------------------
59 AliITSsimulationSSD::AliITSsimulationSSD(AliITSsegmentation *seg,
60                                          AliITSresponse *resp){
61     // Constructor 
62     // Input:
63     //   AliITSsegmentationSSD *seg  Pointer to the SSD segmentation to be used
64     //   AliITSresponseSSD   *resp Pointer to the SSD responce class to be used
65     // Outputs:
66     //   none.
67     // Return
68     //   none.
69
70     fDCS     = 0;
71     fDifConst[0] = fDifConst[1] = 0.0;
72     fDriftVel[0] = fDriftVel[1] = 0.0;
73     fMapA2   = 0;
74 //    fpList    = 0;
75     Init((AliITSsegmentationSSD*)seg,(AliITSresponseSSD*)resp);
76 }
77 //----------------------------------------------------------------------
78 void AliITSsimulationSSD::Init(AliITSsegmentationSSD *seg,
79                                AliITSresponseSSD *resp){
80     // Inilizer, Inilizes all of the variable as needed in a standard place.
81     // Input:
82     //   AliITSsegmentationSSD *seg  Pointer to the SSD segmentation to be used
83     //   AliITSresponseSSD   *resp Pointer to the SSD responce class to be used
84     // Outputs:
85     //   none.
86     // Return
87     //   none.
88
89     fSegmentation    = seg;
90     fResponse        = resp;
91     Float_t noise[2] = {0.,0.};
92     fResponse->GetNoiseParam(noise[0],noise[1]); // retrieves noise parameters
93     fDCS             = new AliITSdcsSSD(seg,resp); 
94
95     SetDriftVelocity(); // use default values in .h file
96     SetIonizeE();       // use default values in .h file
97     SetDiffConst();     // use default values in .h file
98     fpList           = new AliITSpList(2,GetNStrips());
99     fMapA2           = new AliITSMapA2(fSegmentation);
100 }
101 //______________________________________________________________________
102 AliITSsimulationSSD& AliITSsimulationSSD::operator=(
103                                          const AliITSsimulationSSD &s){
104   // Operator =
105
106   if(this==&s) return *this;
107
108   this->fDCS         = new AliITSdcsSSD(*(s.fDCS));
109   this->fMapA2       = s.fMapA2;
110   this->fIonE        = s.fIonE;
111   this->fDifConst[0] = s.fDifConst[0];
112   this->fDifConst[1] = s.fDifConst[1];
113   this->fDriftVel[0] = s.fDriftVel[0];
114   this->fDriftVel[1] = s.fDriftVel[1];
115   return *this;
116 }
117 //______________________________________________________________________
118 AliITSsimulationSSD::AliITSsimulationSSD(const AliITSsimulationSSD &source){
119   // copy constructor
120
121   *this = source;
122 }
123 //______________________________________________________________________
124 AliITSsimulationSSD::~AliITSsimulationSSD() {
125   // destructor
126   delete fMapA2;
127   delete fDCS;
128 }
129 //______________________________________________________________________
130 void AliITSsimulationSSD::InitSimulationModule(Int_t module,Int_t event){
131     // Creates maps to build the list of tracks for each sumable digit
132     // Inputs:
133     //   Int_t module    // Module number to be simulated
134     //   Int_t event     // Event number to be simulated
135     // Outputs:
136     //   none.
137     // Return
138     //    none.
139
140     fModule = module;
141     fEvent  = event;
142     fMapA2->ClearMap();
143     fpList->ClearMap();
144 }
145 //______________________________________________________________________
146 void AliITSsimulationSSD::FinishSDigitiseModule(){
147     // Does the Sdigits to Digits work
148     // Inputs:
149     //   none.
150     // Outputs:
151     //   none.
152     // Return:
153     //   none.
154
155     FillMapFrompList(fpList);  // need to check if needed here or not????
156     SDigitToDigit(fModule,fpList);
157     fpList->ClearMap();
158     fMapA2->ClearMap();
159 }
160 //______________________________________________________________________
161 void AliITSsimulationSSD::DigitiseModule(AliITSmodule *mod,
162                                          Int_t dummy0,Int_t dummy1) {
163   // Digitizes hits for one SSD module
164   Int_t module     = mod->GetIndex();
165
166   HitsToAnalogDigits(mod,fpList);
167   SDigitToDigit(module,fpList);
168
169   fpList->ClearMap();
170   fMapA2->ClearMap();
171 }
172 //______________________________________________________________________
173 void AliITSsimulationSSD::SDigitiseModule(AliITSmodule *mod,Int_t dummy0,
174                                           Int_t dummy1) {
175   // Produces Summable/Analog digits and writes them to the SDigit tree. 
176
177   HitsToAnalogDigits(mod,fpList);
178
179   WriteSDigits(fpList);
180
181   fpList->ClearMap();
182   fMapA2->ClearMap();
183 }
184 //______________________________________________________________________
185 void AliITSsimulationSSD::SDigitToDigit(Int_t module,AliITSpList *pList){
186   // Takes the pList and finishes the digitization.
187                                
188   //    FillMapFrompList(pList);  //commented out to avoid double counting of the
189                                 //charge
190
191   ApplyNoise(pList,module);
192   ApplyCoupling(pList,module);
193
194   ChargeToSignal(pList);
195 }
196 //______________________________________________________________________
197 void AliITSsimulationSSD::HitsToAnalogDigits(AliITSmodule *mod,
198                                              AliITSpList *pList){
199     // Loops over all hits to produce Analog/floating point digits. This
200     // is also the first task in producing standard digits.
201     Int_t lasttrack     = -2;
202     Int_t idtrack       = -2;
203     Double_t x0=0.0, y0=0.0, z0=0.0;
204     Double_t x1=0.0, y1=0.0, z1=0.0;
205     Double_t de=0.0;
206     Int_t module = mod->GetIndex();
207
208     TObjArray *hits = mod->GetHits();
209     Int_t nhits     = hits->GetEntriesFast();
210     if (nhits<=0) return;
211     AliITSTableSSD * tav = new AliITSTableSSD(GetNStrips());
212     module = mod->GetIndex();
213     if ( mod->GetLayer() == 6 ) GetSegmentation()->SetLayer(6);
214     if ( mod->GetLayer() == 5 ) GetSegmentation()->SetLayer(5);
215     for(Int_t i=0; i<nhits; i++) {    
216         // LineSegmentL returns 0 if the hit is entering
217         // If hits is exiting returns positions of entering and exiting hits
218         // Returns also energy loss
219 //      cout << i << " ";
220 //      cout << mod->GetHit(i)->GetXL() << " "<<mod->GetHit(i)->GetYL();
221 //      cout << " " << mod->GetHit(i)->GetZL();
222 //      cout << endl;
223         if (mod->LineSegmentL(i, x0, x1, y0, y1, z0, z1, de, idtrack)) {
224             HitToDigit(module, x0, y0, z0, x1, y1, z1, de,tav);
225             if (lasttrack != idtrack || i==(nhits-1)) {
226                 GetList(idtrack,i,module,pList,tav);
227             } // end if
228             lasttrack=idtrack;
229         } // end if
230     }  // end loop over hits
231     delete tav; tav=0;
232     return;
233 }
234 //----------------------------------------------------------------------
235 void AliITSsimulationSSD::HitToDigit(Int_t module, Double_t x0, Double_t y0, 
236                                      Double_t z0, Double_t x1, Double_t y1, 
237                                      Double_t z1, Double_t de,
238                                      AliITSTableSSD *tav) {
239     // Turns hits in SSD module into one or more digits.
240     Float_t tang[2] = {0.0,0.0};
241     GetSegmentation()->Angles(tang[0], tang[1]);//stereo<<->tan(stereo)~=stereo
242     Double_t x, y, z;
243     Double_t dex=0.0, dey=0.0, dez=0.0; 
244     Double_t pairs; // pair generation energy per step.
245     Double_t sigma[2] = {0.,0.};// standard deviation of the diffusion gaussian
246     Double_t tdrift[2] = {0.,0.}; // time of drift
247     Double_t w;
248     Double_t inf[2], sup[2], par0[2];                 
249
250     // Steps in the module are determined "manually" (i.e. No Geant)
251     // NumOfSteps divide path between entering and exiting hits in steps 
252     Int_t numOfSteps = NumOfSteps(x1, y1, z1, dex, dey, dez);
253     // Enery loss is equally distributed among steps
254     de    = de/numOfSteps;
255     pairs = de/GetIonizeE(); // e-h pairs generated
256     for(Int_t j=0; j<numOfSteps; j++) {     // stepping
257         x = x0 + (j+0.5)*dex;
258         y = y0 + (j+0.5)*dey;
259         if ( y > (GetSegmentation()->Dy()/2+10)*1.0E-4 ) {
260             // check if particle is within the detector
261             Warning("HitToDigit","hit out of detector y0=%e,y=%e,dey=%e,j =%e",
262                     y0,y,dey,j);
263             return;
264         } // end if
265         z = z0 + (j+0.5)*dez;
266 //      cout <<"HitToDigit "<<x<<" "<<y<<" "<<z<< " "<<dex<<" "<<dey<<" "<<dez<<endl;
267         // calculate drift time
268         // y is the minimum path
269         tdrift[0] = (y+(GetSegmentation()->Dy()*1.0E-4)/2)/GetDriftVelocity(0);
270         tdrift[1] = ((GetSegmentation()->Dy()*1.0E-4)/2-y)/GetDriftVelocity(1);
271
272         for(Int_t k=0; k<2; k++) {   // both sides    remember: 0=Pside 1=Nside
273
274             tang[k]=TMath::Tan(tang[k]);
275
276             // w is the coord. perpendicular to the strips
277             if(k==0) {
278                 w = (x+(GetSegmentation()->Dx()*1.0E-4)/2) -
279                     (z+(GetSegmentation()->Dz()*1.0E-4)/2)*tang[k]; 
280             }else{
281                 w = (x+(GetSegmentation()->Dx()*1.0E-4)/2) + 
282                     (z-(GetSegmentation()->Dz()*1.0E-4)/2)*tang[k];
283             } // end if
284             w /= (GetStripPitch()*1.0E-4); // w is converted in units of pitch
285
286             if((w<(-0.5)) || (w>(GetNStrips()-0.5))) {
287                 // this check rejects hits in regions not covered by strips
288                 // 0.5 takes into account boundaries 
289                 return; // There are dead region on the SSD sensitive volume.
290             } // end if
291
292             // sigma is the standard deviation of the diffusion gaussian
293             if(tdrift[k]<0) return;
294             sigma[k] = TMath::Sqrt(2*GetDiffConst(k)*tdrift[k]);
295             sigma[k] /= (GetStripPitch()*1.0E-4);  //units of Pitch
296             if(sigma[k]==0.0) {         
297                 Error("HitToDigit"," sigma[%d]=0",k);
298                 exit(0);
299             } // end if
300
301             par0[k] = pairs;
302             // we integrate the diffusion gaussian from -3sigma to 3sigma 
303             inf[k] = w - 3*sigma[k]; // 3 sigma from the gaussian average  
304             sup[k] = w + 3*sigma[k]; // 3 sigma from the gaussian average
305             // IntegrateGaussian does the actual
306             // integration of diffusion gaussian
307             IntegrateGaussian(k, par0[k], w, sigma[k], inf[k], sup[k],tav);
308         }  // end for loop over side (0=Pside, 1=Nside)      
309     } // end stepping
310 }
311 //______________________________________________________________________
312 void AliITSsimulationSSD::ApplyNoise(AliITSpList *pList,Int_t module){
313   // Apply Noise.
314   Int_t    k,ix;
315   Double_t signal,noise;
316   Double_t noiseP[2] = {0.,0.};
317   Float_t a,b;
318
319   fResponse->GetNoiseParam(a,b); // retrieves noise parameters
320   noiseP[0] = (Double_t) a; noiseP[1] = (Double_t) b;
321   for(k=0;k<2;k++){                    // both sides (0=Pside, 1=Nside)
322         for(ix=0;ix<GetNStrips();ix++){      // loop over strips
323             noise  = gRandom->Gaus(0,noiseP[k]);// get noise to signal
324             signal = noise + fMapA2->GetSignal(k,ix);//get signal from map
325             if(signal<0.) signal=0.0;           // in case noise is negative...
326             fMapA2->SetHit(k,ix,signal); // give back signal to map
327             if(signal>0.0) pList->AddNoise(k,ix,module,noise);
328         } // loop over strip 
329   } // loop over k (P or N side)
330 }
331 //______________________________________________________________________
332 void AliITSsimulationSSD::ApplyCoupling(AliITSpList *pList,Int_t module) {
333   // Apply the effect of electronic coupling between channels
334   Int_t ix;
335   Double_t signalLeft=0, signalRight=0,signal=0;
336
337   for(ix=0;ix<GetNStrips();ix++){
338         // P side coupling
339         if(ix>0.)signalLeft = fMapA2->GetSignal(0,ix-1)*fDCS->GetCouplingPL();
340         else signalLeft = 0.0;
341         if(ix<(GetNStrips()-1)) signalRight = fMapA2->GetSignal(0,ix+1)*
342                               fDCS->GetCouplingPR();
343         else signalRight = 0.0;
344         signal = signalLeft + signalRight;
345         fMapA2->AddSignal(0,ix,signal);
346         if(signal>0.0) pList->AddNoise(0,ix,module,signal);
347
348         signalLeft = signalRight = signal = 0.0;
349         // N side coupling
350         if(ix>0.) signalLeft = fMapA2->GetSignal(1,ix-1)*fDCS->GetCouplingNL();
351         else signalLeft = 0.0;
352         if(ix<(GetNStrips()-1)) signalRight = fMapA2->GetSignal(1,ix+1)*
353                               fDCS->GetCouplingNR();
354         else signalRight = 0.0;
355         signal = signalLeft + signalRight;
356         fMapA2->AddSignal(1,ix,signal);
357         if(signal>0.0) pList->AddNoise(1,ix,module,signal);
358   } // loop over strips 
359 }
360 //______________________________________________________________________
361 Float_t AliITSsimulationSSD::F(Float_t av, Float_t x, Float_t s) {
362   // Computes the integral of a gaussian using Error Function
363   Float_t sqrt2 = TMath::Sqrt(2.0);
364   Float_t sigm2 = sqrt2*s;
365   Float_t integral;
366
367   integral = 0.5 * TMath::Erf( (x - av) / sigm2);
368   return integral;
369 }
370 //______________________________________________________________________
371 void AliITSsimulationSSD::IntegrateGaussian(Int_t k,Double_t par, Double_t w,
372                                             Double_t sigma, 
373                                             Double_t inf, Double_t sup,
374                                             AliITSTableSSD *tav) {
375   // integrate the diffusion gaussian
376   // remind: inf and sup are w-3sigma and w+3sigma
377   //         we could define them here instead of passing them
378   //         this way we are free to introduce asimmetry
379
380   Double_t a=0.0, b=0.0;
381   Double_t dXCharge1 = 0.0, dXCharge2 = 0.0;
382   // dXCharge1 and 2 are the charge to two neighbouring strips
383   // Watch that we only involve at least two strips
384   // Numbers greater than 2 of strips in a cluster depend on
385   //  geometry of the track and delta rays, not charge diffusion!   
386   
387   Double_t strip = TMath::Floor(w);         // closest strip on the left
388
389   if ( TMath::Abs((strip - w)) < 0.5) { 
390       // gaussian mean is closer to strip on the left
391       a = inf;                         // integration starting point
392       if((strip+0.5)<=sup) {
393           // this means that the tail of the gaussian goes beyond
394           // the middle point between strips ---> part of the signal
395           // is given to the strip on the right
396           b = strip + 0.5;               // integration stopping point
397           dXCharge1 = F( w, b, sigma) - F(w, a, sigma);
398           dXCharge2 = F( w, sup, sigma) - F(w ,b, sigma); 
399       }else { 
400           // this means that all the charge is given to the strip on the left
401           b = sup;
402           dXCharge1 = 0.9973;   // gaussian integral at 3 sigmas
403           dXCharge2 = 0.0;
404       } // end if
405       dXCharge1 = par * dXCharge1;// normalize by mean of number of carriers
406       dXCharge2 = par * dXCharge2;
407
408       // for the time being, signal is the charge
409       // in ChargeToSignal signal is converted in ADC channel
410       fMapA2->AddSignal(k,(Int_t)strip,dXCharge1);
411       tav->Add(k,(Int_t)strip);
412       if(((Int_t) strip) < (GetNStrips()-1)) {
413           // strip doesn't have to be the last (remind: last=GetNStrips()-1)
414           // otherwise part of the charge is lost
415           fMapA2->AddSignal(k,((Int_t)strip+1),dXCharge2);
416           tav->Add(k,((Int_t)(strip+1)));
417       } // end if
418   }else{
419       // gaussian mean is closer to strip on the right
420       strip++;     // move to strip on the rigth
421       b = sup;     // now you know where to stop integrating
422       if((strip-0.5)>=inf) { 
423           // tail of diffusion gaussian on the left goes left of
424           // middle point between strips
425           a = strip - 0.5;        // integration starting point
426           dXCharge1 = F(w, b, sigma) - F(w, a, sigma);
427           dXCharge2 = F(w, a, sigma) - F(w, inf, sigma);
428       }else {
429           a = inf;
430           dXCharge1 = 0.9973;   // gaussian integral at 3 sigmas
431           dXCharge2 = 0.0;
432       } // end if
433       dXCharge1 = par * dXCharge1;    // normalize by means of carriers
434       dXCharge2 = par * dXCharge2;
435       // for the time being, signal is the charge
436       // in ChargeToSignal signal is converted in ADC channel
437       fMapA2->AddSignal(k,(Int_t)strip,dXCharge1);
438       tav->Add(k,(Int_t)strip);
439       if(((Int_t) strip) > 0) {
440           // strip doesn't have to be the first
441           // otherwise part of the charge is lost
442           fMapA2->AddSignal(k,((Int_t)strip-1),dXCharge2);
443           tav->Add(k,((Int_t)(strip-1)));
444       } // end if
445   } // end if
446 }
447 //______________________________________________________________________
448 Int_t AliITSsimulationSSD::NumOfSteps(Double_t x, Double_t y, Double_t z,
449                                       Double_t & dex,Double_t & dey,Double_t & dez){
450   // number of steps
451   // it also returns steps for each coord
452   //AliITSsegmentationSSD *seg = new AliITSsegmentationSSD();
453
454   Double_t step = 25E-4;
455   //step = (Double_t) seg->GetStepSize();  // step size (cm)
456   Int_t numOfSteps = (Int_t) (TMath::Sqrt(x*x+y*y+z*z)/step); 
457
458   if (numOfSteps < 1) numOfSteps = 1;       // one step, at least
459
460   // we could condition the stepping depending on the incident angle
461   // of the track
462   dex = x/numOfSteps;
463   dey = y/numOfSteps;
464   dez = z/numOfSteps;
465
466   return numOfSteps;
467 }
468 //----------------------------------------------------------------------
469 void AliITSsimulationSSD::GetList(Int_t label,Int_t hit,Int_t mod,
470                                   AliITSpList *pList,AliITSTableSSD *tav) {
471   // loop over nonzero digits
472   Int_t ix,i;
473   Double_t signal=0.;
474
475   for(Int_t k=0; k<2; k++) {
476     ix=tav->Use(k);
477     while(ix>-1){
478       signal = fMapA2->GetSignal(k,ix);
479       if(signal==0.0) {
480         ix=tav->Use(k);
481         continue;
482       } // end if signal==0.0
483       // check the signal magnitude
484       for(i=0;i<pList->GetNSignals(k,ix);i++){
485         signal -= pList->GetTSignal(k,ix,i);
486       } // end for i
487       //  compare the new signal with already existing list
488       if(signal>0)pList->AddSignal(k,ix,label,hit,mod,signal);
489       ix=tav->Use(k);
490     } // end of loop on strips
491   } // end of loop on P/N side
492   tav->Clear();
493 }
494 //----------------------------------------------------------------------
495 void AliITSsimulationSSD::ChargeToSignal(AliITSpList *pList) {
496   // charge to signal
497   static AliITS *aliITS = (AliITS*)gAlice->GetModule("ITS");
498   Float_t threshold = 0.;
499   Int_t   digits[3], tracks[3],hits[3],j1;
500   Float_t charges[3] = {0.0,0.0,0.0};
501   Float_t signal;
502   Float_t noise[2] = {0.,0.};
503
504   ((AliITSresponseSSD*)fResponse)->GetNoiseParam(noise[0],noise[1]);
505
506   for(Int_t k=0;k<2;k++){         // both sides (0=Pside, 1=Nside)
507         // Threshold for zero-suppression
508         // It can be defined in AliITSresponseSSD
509         //             threshold = (Float_t)fResponse->MinVal(k);
510         // I prefer to think adjusting the threshold "manually", looking
511         // at the scope, and considering noise standard deviation
512         threshold = 4.0*noise[k]; // 4 times noise is a choice
513         for(Int_t ix=0;ix<GetNStrips();ix++){     // loop over strips
514             if(fMapA2->GetSignal(k,ix) <= threshold)continue;
515             // convert to ADC signal
516             signal = ((AliITSresponseSSD*)fResponse)->DEvToADC(
517                                                       fMapA2->GetSignal(k,ix));
518             if(signal>1024.) signal = 1024.;//if exceeding, accumulate last one
519             digits[0] = k;
520             digits[1] = ix;
521             digits[2] = (Int_t) signal;
522             for(j1=0;j1<3;j1++){ // only three in digit.
523                 tracks[j1]  = pList->GetTrack(k,ix,j1);
524                 hits[j1]    = pList->GetHit(k,ix,j1);
525             } // end for j1
526             // finally add digit
527             aliITS->AddSimDigit(2,0,digits,tracks,hits,charges);
528         } // end for ix
529   } // end for k
530 }
531 //______________________________________________________________________
532 void AliITSsimulationSSD::WriteSDigits(AliITSpList *pList){
533   // Fills the Summable digits Tree
534   Int_t i,ni,j,nj;
535   static AliITS *aliITS = (AliITS*)gAlice->GetModule("ITS");
536
537   pList->GetMaxMapIndex(ni,nj);
538   for(i=0;i<ni;i++)for(j=0;j<nj;j++){
539       if(pList->GetSignalOnly(i,j)>0.0){
540           aliITS->AddSumDigit(*(pList->GetpListItem(i,j)));
541 //          cout << "pListSSD: " << *(pList->GetpListItem(i,j)) << endl;
542       } // end if
543   } // end for i,j
544   return;
545 }
546 //______________________________________________________________________
547 void AliITSsimulationSSD::FillMapFrompList(AliITSpList *pList){
548   // Fills fMap2A from the pList of Summable digits
549   Int_t k,ix;
550
551   for(k=0;k<2;k++)for(ix=0;ix<GetNStrips();ix++) 
552         fMapA2->AddSignal(k,ix,pList->GetSignal(k,ix));
553   return;
554 }
555 //______________________________________________________________________
556 void AliITSsimulationSSD::Print(ostream *os){
557   //Standard output format for this class
558
559   //AliITSsimulation::Print(os);
560   *os << fIonE <<",";
561   *os << fDifConst[0] <<","<< fDifConst[1] <<",";
562   *os << fDriftVel[0] <<","<< fDriftVel[1];
563   //*os <<","; fDCS->Print(os);
564   //*os <<","; fMapA2->Print(os);
565 }
566 //______________________________________________________________________
567 void AliITSsimulationSSD::Read(istream *is){
568   // Standard output streaming function.
569
570   //AliITSsimulation::Read(is);
571   *is >> fIonE;
572   *is >> fDifConst[0] >> fDifConst[1];
573   *is >> fDriftVel[0] >> fDriftVel[1];
574   //fDCS->Read(is);
575   //fMapA2->Read(is);
576 }
577 //______________________________________________________________________
578 ostream &operator<<(ostream &os,AliITSsimulationSSD &source){
579   // Standard output streaming function.
580
581   source.Print(&os);
582   return os;
583 }
584 //______________________________________________________________________
585 istream &operator>>(istream &os,AliITSsimulationSSD &source){
586   // Standard output streaming function.
587
588   source.Read(&os);
589   return os;
590 }
591 //______________________________________________________________________
592
593
594
595
596