Index: /trunk/MagicSoft/Mars/mjobs/MJPedestal.cc
===================================================================
--- /trunk/MagicSoft/Mars/mjobs/MJPedestal.cc	(revision 6752)
+++ /trunk/MagicSoft/Mars/mjobs/MJPedestal.cc	(revision 6753)
@@ -1222,6 +1222,8 @@
           {
             hcam->DrawClone();
+            gPad->SaveAs(Form("%s/PulsePosTest_all.root",fPathOut.Data()));
             MHCalibrationPix &pix = (*hcam)[fCheckedPixId];
             pix.DrawClone();
+            gPad->SaveAs(Form("%s/PulsePosTest_Pixel%04d.root",fPathOut.Data(),fCheckedPixId));
           }
         
@@ -1233,7 +1235,5 @@
             const Float_t rmspulsetime = cam->GetAverageArea(0).GetHiGainRms();
             *fLog << inf << "Mean pulse time (cosmics): " << meanpulsetime << "+-" << rmspulsetime << endl;
-            const Int_t newfirst = 1.5*rmspulsetime > 3. 
-              ? (Int_t)(meanpulsetime-1.5*rmspulsetime) 
-              : (Int_t)(meanpulsetime-3.);
+            const Int_t newfirst = (Int_t)(meanpulsetime-2.5);
             Int_t wshigain = fExtractor->InheritsFrom("MExtractTimeAndCharge") 
               ?  ((MExtractTimeAndCharge*)fExtractor)->GetWindowSizeHiGain()
@@ -1244,7 +1244,5 @@
               ? ((MExtractTimeAndCharge*)fExtractor)->GetWindowSizeLoGain()
               : 6;
-            const Int_t newlast  = 1.5*rmspulsetime > 3. 
-              ? (Int_t)(meanpulsetime+1.5*rmspulsetime)
-              : (Int_t)(meanpulsetime+3.);
+            const Int_t newlast  = (Int_t)(meanpulsetime+6.);
             *fLog << inf << "Try to set new range limits: ("<<newfirst<<","<<newlast+wshigain<<")"<<endl;
             if (newfirst < 0)
