? recent.diffs
Index: PhotonCalibratedPeComputer.cxx
===================================================================
RCS file: /cvs/minoscvs/rep1/minossoft/PhotonTransport/PhotonCalibratedPeComputer.cxx,v
retrieving revision 1.5
retrieving revision 1.3
diff -r1.5 -r1.3
39d38
<   ok = ok && r.Get("ScintillatorClipping",fScintillatorClipping);
68c67
< 
---
>   
71,106d69
<   
<   double clippedfrac = 1.0;
< 
<   UgliGeomHandle ugli(fContext);
<   UgliStripHandle ustrip=ugli.GetStripHandle(inHit->StripEndId());
< 
<   if(fScintillatorClipping) {
<     // Clip the photon response by shaving off photons lost out the
<     // ends of the scintillator either at the planed edges or the bore hole.
< 
<     // To do this, we cheat a bit: we assume that ALL strip ends play a role
<     // in diminishing the return. 
<    
<     double distToEnd;
<     
<     distToEnd = ustrip.GetHalfLength()-x; // +ve end.
<     clippedfrac *= ClipFraction( distToEnd ); // End1
< 
<     distToEnd = x+ustrip.GetHalfLength(); // -ve end.
<     clippedfrac *= ClipFraction( distToEnd ); // End2
<     if(ustrip.WlsBypass() > 0.) {
<       // There is a coil bypass, so look at coil stripends.
<       if(x<0) {
< 	distToEnd = (-x) - ( ustrip.GetHalfLength() - ustrip.PartialLength(StripEnd::kNegative));
< 	clippedfrac *= ClipFraction( distToEnd );
<       } else {
< 	distToEnd = (x) - ( ustrip.GetHalfLength() - ustrip.PartialLength(StripEnd::kPositive));
< 	clippedfrac *= ClipFraction( distToEnd );
<       }
<     }
<     MSG("Photon",Msg::kWarning) << "x = " << x << "  " << ustrip.GetSEId().AsString() << "  ClipFrac: " << clippedfrac << endl;
<   }
<  
<   PlexStripEndId end[2];
<   end[0] = inHit->StripEndId(); end[0].SetEnd(StripEnd::kNegative);
<   end[1] = inHit->StripEndId(); end[1].SetEnd(StripEnd::kPositive);
107a71,73
>   PlexStripEndId neg = inHit->StripEndId(); neg.SetEnd(StripEnd::kNegative);
>   PlexStripEndId pos = inHit->StripEndId(); pos.SetEnd(StripEnd::kPositive);
> 	
110,112c76,77
<   double emips = 
<     clippedfrac                       // Light that didnt' leak out ends of strip                   
<     * fOverallLightOutput             // Tuning parameter.
---
>   double emips =  
>     fOverallLightOutput             // Tuning parameter.
119a85,88
>   sigmap[0] = cal.DecalMIP( emips * 0.5, neg); // Send half the light left
>   sigmap[1] = cal.DecalMIP( emips * 0.5, pos); // and half to the right
> 
>   // SigMap->SigCorr
120a90,93
>   sigcorr[0] = cal.DecalAttenCorrected(sigmap[0],x,neg);
>   sigcorr[1] = cal.DecalAttenCorrected(sigmap[1],x,pos);
> 
>   // SigCorr->SigLin (siglin = ADCs for no drift, no linearity)
121a95,98
>   siglin[0] = cal.DecalStripToStrip(sigcorr[0],neg);
>   siglin[1] = cal.DecalStripToStrip(sigcorr[1],pos);
>   
>   // SigLin->Pe
123,150c100,101
< 
<   if(ustrip.IsMirrored(StripEnd::kNegative) || ustrip.IsMirrored(StripEnd::kPositive) ) {
<     // All of the energy goes to one end.
<   } else {
<     // The energy is split so that light goes both ways.
<     emips *= 0.5;
<   }
< 
<   for(int i=0;i<2;i++) {
<     if( ustrip.IsMirrored(end[i].GetEnd()) ) {
<       // This end doesn't read out. Set the output to zero.
<       sigmap[i] = sigcorr[i] = siglin[i] = pe[i] = 0;
<     } else {
<       // Go through the decalibrtation chain:
< 
<       // Mips -> sigmaps.
<       sigmap[i] =  cal.DecalMIP( emips , end[i]);
< 
<       // SigMap->SigCorr
<       sigcorr[i] = cal.DecalAttenCorrected(sigmap[i],x,end[i]);
< 
<       // SigCorr->SigLin (siglin = ADCs for no drift, no linearity)
<       siglin[i] = cal.DecalStripToStrip(sigcorr[i],end[i]);
< 
<       // SigLin->Pe
<       pe[i] = cal.GetPhotoElectrons(siglin[i],end[i]);
<     }
<   }
---
>   pe[0] = cal.GetPhotoElectrons(siglin[0],neg);
>   pe[1] = cal.GetPhotoElectrons(siglin[1],pos);
180,201d130
< }
< 
< Double_t PhotonCalibratedPeComputer::ClipFraction(double x) const
< {
<   // Returns the integral of the double-lorentzian blue photon profile
<   // from -inf to x.
<   
<   // Same parameters as in PhotonFastBlueModel.
< 
<   const double kLorentzWidth1 = 0.017853;
<   const double kArea1 = 8.178052;
<   const double kLorentzWidth2 = 0.001309;
<   const double kArea2 = 0.864215;
< 
<   const double kArea = kArea1+kArea2;
< 
<   double frac = kArea1 * atan(x/kLorentzWidth1)
<     + kArea2 * atan(x/kLorentzWidth2);
<   frac = frac / (kArea * TMath::Pi());
<   frac += 0.5;
< 
<   return frac;
Index: PhotonCalibratedPeComputer.h
===================================================================
RCS file: /cvs/minoscvs/rep1/minossoft/PhotonTransport/PhotonCalibratedPeComputer.h,v
retrieving revision 1.2
retrieving revision 1.1
diff -r1.2 -r1.1
29,30d28
<   virtual Double_t ClipFraction(double x) const;
<   
34d31
<   Int_t    fScintillatorClipping;
Index: PhotonConfiguration.cxx
===================================================================
RCS file: /cvs/minoscvs/rep1/minossoft/PhotonTransport/PhotonConfiguration.cxx,v
retrieving revision 1.6
retrieving revision 1.5
diff -r1.6 -r1.5
29d28
<     photon.Set("ScintillatorClipping",     1);