- // integrate the diffusion gaussian
- // remind: inf and sup are w-3sigma and w+3sigma
- // we could define them here instead of passing them
- // this way we are free to introduce asimmetry
-
- Double_t a=0.0, b=0.0;
- Double_t dXCharge1 = 0.0, dXCharge2 = 0.0;
- // dXCharge1 and 2 are the charge to two neighbouring strips
- // Watch that we only involve at least two strips
- // Numbers greater than 2 of strips in a cluster depend on
- // geometry of the track and delta rays, not charge diffusion!
-
- Double_t strip = TMath::Floor(w); // closest strip on the left
-
- if ( TMath::Abs((strip - w)) < 0.5) {
- // gaussian mean is closer to strip on the left
- a = inf; // integration starting point
- if((strip+0.5)<=sup) {
- // this means that the tail of the gaussian goes beyond
- // the middle point between strips ---> part of the signal
- // is given to the strip on the right
- b = strip + 0.5; // integration stopping point
- dXCharge1 = F( w, b, sigma) - F(w, a, sigma);
- dXCharge2 = F( w, sup, sigma) - F(w ,b, sigma);
- }else {
- // this means that all the charge is given to the strip on the left
- b = sup;
- dXCharge1 = 0.9973; // gaussian integral at 3 sigmas
- dXCharge2 = 0.0;
- } // end if
- dXCharge1 = par * dXCharge1;// normalize by mean of number of carriers
- dXCharge2 = par * dXCharge2;
-
- // for the time being, signal is the charge
- // in ChargeToSignal signal is converted in ADC channel
- fMapA2->AddSignal(k,(Int_t)strip,dXCharge1);
- tav->Add(k,(Int_t)strip);
- if(((Int_t) strip) < (GetNStrips()-1)) {
- // strip doesn't have to be the last (remind: last=GetNStrips()-1)
- // otherwise part of the charge is lost
- fMapA2->AddSignal(k,((Int_t)strip+1),dXCharge2);
- tav->Add(k,((Int_t)(strip+1)));
- } // end if
-
-
- }else{
- // gaussian mean is closer to strip on the right
- strip++; // move to strip on the rigth
- b = sup; // now you know where to stop integrating
- if((strip-0.5)>=inf) {
- // tail of diffusion gaussian on the left goes left of
- // middle point between strips
- a = strip - 0.5; // integration starting point
- dXCharge1 = F(w, b, sigma) - F(w, a, sigma);
- dXCharge2 = F(w, a, sigma) - F(w, inf, sigma);
- }else {
- a = inf;
- dXCharge1 = 0.9973; // gaussian integral at 3 sigmas
- dXCharge2 = 0.0;
- } // end if
- dXCharge1 = par * dXCharge1; // normalize by means of carriers
- dXCharge2 = par * dXCharge2;
-
- // for the time being, signal is the charge
- // in ChargeToSignal signal is converted in ADC channel
- fMapA2->AddSignal(k,(Int_t)strip,dXCharge1);
- tav->Add(k,(Int_t)strip);
- if(((Int_t) strip) > 0) {
- // strip doesn't have to be the first
- // otherwise part of the charge is lost
- fMapA2->AddSignal(k,((Int_t)strip-1),dXCharge2);
- tav->Add(k,((Int_t)(strip-1)));
- } // end if
-
-
- } // end if
+ // integrate the diffusion gaussian
+ // remind: inf and sup are w-3sigma and w+3sigma
+ // we could define them here instead of passing them
+ // this way we are free to introduce asimmetry
+
+ Double_t a=0.0, b=0.0;
+ Double_t dXCharge1 = 0.0, dXCharge2 = 0.0;
+ // dXCharge1 and 2 are the charge to two neighbouring strips
+ // Watch that we only involve at least two strips
+ // Numbers greater than 2 of strips in a cluster depend on
+ // geometry of the track and delta rays, not charge diffusion!
+
+ Double_t strip = TMath::Floor(w); // closest strip on the left
+
+ if ( TMath::Abs((strip - w)) < 0.5) {
+ // gaussian mean is closer to strip on the left
+ a = inf; // integration starting point
+ if((strip+0.5)<=sup) {
+ // this means that the tail of the gaussian goes beyond
+ // the middle point between strips ---> part of the signal
+ // is given to the strip on the right
+ b = strip + 0.5; // integration stopping point
+ dXCharge1 = F( w, b, sigma) - F(w, a, sigma);
+ dXCharge2 = F( w, sup, sigma) - F(w ,b, sigma);
+ }else {
+ // this means that all the charge is given to the strip on the left
+ b = sup;
+ dXCharge1 = 0.9973; // gaussian integral at 3 sigmas
+ dXCharge2 = 0.0;
+ } // end if
+ dXCharge1 = par * dXCharge1;// normalize by mean of number of carriers
+ dXCharge2 = par * dXCharge2;
+
+ // for the time being, signal is the charge
+ // in ChargeToSignal signal is converted in ADC channel
+ fMapA2->AddSignal(k,(Int_t)strip,dXCharge1);
+ tav->Add(k,(Int_t)strip);
+ if(((Int_t) strip) < (GetNStrips()-1)) {
+ // strip doesn't have to be the last (remind: last=GetNStrips()-1)
+ // otherwise part of the charge is lost
+ fMapA2->AddSignal(k,((Int_t)strip+1),dXCharge2);
+ tav->Add(k,((Int_t)(strip+1)));
+ } // end if
+ }else{
+ // gaussian mean is closer to strip on the right
+ strip++; // move to strip on the rigth
+ b = sup; // now you know where to stop integrating
+ if((strip-0.5)>=inf) {
+ // tail of diffusion gaussian on the left goes left of
+ // middle point between strips
+ a = strip - 0.5; // integration starting point
+ dXCharge1 = F(w, b, sigma) - F(w, a, sigma);
+ dXCharge2 = F(w, a, sigma) - F(w, inf, sigma);
+ }else {
+ a = inf;
+ dXCharge1 = 0.9973; // gaussian integral at 3 sigmas
+ dXCharge2 = 0.0;
+ } // end if
+ dXCharge1 = par * dXCharge1; // normalize by means of carriers
+ dXCharge2 = par * dXCharge2;
+ // for the time being, signal is the charge
+ // in ChargeToSignal signal is converted in ADC channel
+ fMapA2->AddSignal(k,(Int_t)strip,dXCharge1);
+ tav->Add(k,(Int_t)strip);
+ if(((Int_t) strip) > 0) {
+ // strip doesn't have to be the first
+ // otherwise part of the charge is lost
+ fMapA2->AddSignal(k,((Int_t)strip-1),dXCharge2);
+ tav->Add(k,((Int_t)(strip-1)));
+ } // end if
+ } // end if