Ignore:
Timestamp:
12/22/04 22:37:16 (20 years ago)
Author:
gaug
Message:
*** empty log message ***
File:
1 edited

Legend:

Unmodified
Added
Removed
  • trunk/MagicSoft/Mars/mhcalib/MHCalibrationChargeCam.cc

    r5415 r5687  
    161161const Axis_t  MHCalibrationChargeCam::fgChargeLoGainFirst = -350.5;
    162162const Axis_t  MHCalibrationChargeCam::fgChargeLoGainLast  =  2049.5;
     163const Float_t MHCalibrationChargeCam::fgProbLimit         = 0.00001;
    163164const TString MHCalibrationChargeCam::gsHistName          = "Charge";
    164165const TString MHCalibrationChargeCam::gsHistTitle         = "Signals";
     
    225226  SetLast (fgChargeHiGainLast );
    226227
     228  SetProbLimit(fgProbLimit);
     229
    227230  SetLoGainNbins(fgChargeLoGainNbins);
    228231  SetLoGainFirst(fgChargeLoGainFirst);
     
    464467      for (Int_t i=0; i<npixels; i++)
    465468      {
    466         fHiGainArray->AddAt(new MHCalibrationChargePix(Form("%s%s%4i",fHistName.Data(),"HiGainPix",i),
    467                                                        Form("%s%s%4i",fHistTitle.Data()," High Gain Pixel",i)),i);
     469        fHiGainArray->AddAt(new MHCalibrationChargePix(Form("%sHiGainPix%04d",fHistName.Data(),i),
     470                                                       Form("%s High Gain Pixel%04d",fHistTitle.Data(),i)),i);
    468471
    469472        MHCalibrationChargePix &pix = (MHCalibrationChargePix&)(*this)[i];
     
    473476        pix.SetLast (fLast);
    474477
     478        pix.SetProbLimit(fProbLimit);
     479
    475480        pix.SetAbsTimeNbins(higainsamples);
    476481        pix.SetAbsTimeFirst(-0.5);
    477482        pix.SetAbsTimeLast(higainsamples-0.5);
    478483
     484        InitHists(pix,fIntensBad ? (*fIntensBad)[i] : (*fBadPixels)[i],i);
     485
    479486        h = pix.GetHAbsTime();
    480487
    481         h->SetName (Form("%s%s%s%4i","H",fAbsHistName.Data(),"HiGainPix",i));
    482         h->SetTitle(Form("%s%s%4i",fAbsHistTitle.Data()," High Gain Pixel ",i));
     488        h->SetName (Form("H%sHiGainPix%04d",fAbsHistName.Data(),i));
     489        h->SetTitle(Form("%s High Gain Pixel %04d",fAbsHistTitle.Data(),i));
    483490        h->SetXTitle(fAbsHistXTitle.Data());
    484491        h->SetYTitle(fAbsHistYTitle.Data());
    485 
    486         MBadPixelsPix &bad = fIntensBad ? (*fIntensBad)[i] : (*fBadPixels)[i];
    487         InitHists((*this)[i],bad,i);
    488492      }
    489493  }
     
    494498    for (Int_t j=0; j<nareas; j++)
    495499      {
    496         fAverageHiGainAreas->AddAt(new MHCalibrationChargePix(Form("%s%s%d",fHistName.Data(),"HiGainArea",j),
    497                                                   Form("%s%s%d",fHistTitle.Data()," High Gain Area Idx ",j)),j);
     500        fAverageHiGainAreas->AddAt(new MHCalibrationChargePix(Form("%sHiGainArea%d",fHistName.Data(),j),
     501                                                  Form("%s High Gain Area Idx %d",fHistTitle.Data(),j)),j);
    498502       
    499503        MHCalibrationChargePix &pix = (MHCalibrationChargePix&)GetAverageHiGainArea(j);
     
    511515        h =  pix.GetHAbsTime();
    512516       
    513         h->SetName (Form("%s%s%s%d","H",fAbsHistName.Data(),"HiGainArea",j));
     517        h->SetName (Form("H%sHiGainArea%d",fAbsHistName.Data(),j));
    514518        h->SetTitle(Form("%s%s%d",fAbsHistTitle.Data(),
    515519                         " averaged on event-by-event basis High Gain Area Idx ",j));
     
    523527      for (Int_t j=0; j<nsectors; j++)
    524528        {
    525           fAverageHiGainSectors->AddAt(new MHCalibrationChargePix(Form("%s%s%2i",fHistName.Data(),"HiGainSector",j),
    526                                                       Form("%s%s%2i",fHistTitle.Data()," High Gain Sector ",j)),j);
     529          fAverageHiGainSectors->AddAt(new MHCalibrationChargePix(Form("%sHiGainSector%02d",fHistName.Data(),j),
     530                                                      Form("%s High Gain Sector %02d",fHistTitle.Data(),j)),j);
    527531
    528532          MHCalibrationChargePix &pix = (MHCalibrationChargePix&)GetAverageHiGainSector(j);
     
    536540          pix.SetAbsTimeLast(higainsamples-0.5);
    537541         
     542          InitHists(pix,fIntensCam ? fIntensCam->GetAverageBadSector(j) : fCam->GetAverageBadSector(j),j);
     543
    538544          h =  pix.GetHAbsTime();
    539545         
    540           h->SetName (Form("%s%s%s%2i","H",fAbsHistName.Data(),"HiGainSector",j));
    541           h->SetTitle(Form("%s%s%2i",fAbsHistTitle.Data(),
     546          h->SetName (Form("H%sHiGainSector%02d",fAbsHistName.Data(),j));
     547          h->SetTitle(Form("%s%s%02d",fAbsHistTitle.Data(),
    542548                           " averaged on event-by-event basis High Gain Area Sector ",j));
    543549          h->SetXTitle(fAbsHistXTitle.Data());
    544550          h->SetYTitle(fAbsHistYTitle.Data());
    545          
    546           InitHists(pix,fIntensCam ? fIntensCam->GetAverageBadSector(j) : fCam->GetAverageBadSector(j),j);
    547551      }
    548552  }
     
    582586      for (Int_t i=0; i<npixels; i++)
    583587        {
    584           fLoGainArray->AddAt(new MHCalibrationChargePix(Form("%s%s%4i",fHistName.Data(),"LoGainPix",i),
    585                                        Form("%s%s%4i",fHistTitle.Data()," Low Gain Pixel",i)),i);
     588          fLoGainArray->AddAt(new MHCalibrationChargePix(Form("%sLoGainPix%04d",fHistName.Data(),i),
     589                                       Form("%s Low Gain Pixel %04d",fHistTitle.Data(),i)),i);
    586590
    587591          MHCalibrationChargePix &pix = (MHCalibrationChargePix&)(*this)(i);
     
    591595          pix.SetLast (fLoGainLast);
    592596         
     597          pix.SetProbLimit(fProbLimit);
     598
    593599          pix.SetAbsTimeNbins(logainsamples);
    594600          pix.SetAbsTimeFirst(-0.5);
    595601          pix.SetAbsTimeLast(logainsamples-0.5);
    596602         
     603          InitHists(pix,fIntensBad ? (*fIntensBad)[i] : (*fBadPixels)[i],i);
     604
    597605          h = pix.GetHAbsTime();
    598606         
    599           h->SetName (Form("%s%s%s%4i","H",fAbsHistName.Data(),"HiGainPix",i));
    600           h->SetTitle(Form("%s%s%4i",fAbsHistTitle.Data()," High Gain Pixel ",i));
     607          h->SetName (Form("H%sLoGainPix%04d",fAbsHistName.Data(),i));
     608          h->SetTitle(Form("%s Low Gain Pixel %04d",fAbsHistTitle.Data(),i));
    601609          h->SetXTitle(fAbsHistXTitle.Data());
    602610          h->SetYTitle(fAbsHistYTitle.Data());
    603 
    604           MBadPixelsPix &bad = fIntensBad ? (*fIntensBad)[i] : (*fBadPixels)[i];
    605           InitHists(pix,bad,i);
    606611      }
    607612  }
     
    611616      for (Int_t j=0; j<nareas; j++)
    612617        {
    613           fAverageLoGainAreas->AddAt(new MHCalibrationChargePix(Form("%s%s%d",fHistName.Data(),"LoGainArea",j),
    614                                        Form("%s%s%d",fHistTitle.Data()," Low Gain Area Idx ",j)),j);
     618          fAverageLoGainAreas->AddAt(new MHCalibrationChargePix(Form("%sLoGainArea%d",fHistName.Data(),j),
     619                                       Form("%s Low Gain Area Idx %d",fHistTitle.Data(),j)),j);
    615620       
    616621          MHCalibrationChargePix &pix = (MHCalibrationChargePix&)GetAverageLoGainArea(j);
     
    624629          pix.SetAbsTimeLast(logainsamples-0.5);
    625630         
     631          InitHists(pix,fIntensCam ? fIntensCam->GetAverageBadArea(j) : fCam->GetAverageBadArea(j),j);
     632
    626633          h =  pix.GetHAbsTime();
    627634         
    628           h->SetName (Form("%s%s%s%2i","H",fAbsHistName.Data(),"LoGainArea",j));
    629           h->SetTitle(Form("%s%s%2i",fAbsHistTitle.Data(),
     635          h->SetName (Form("H%sLoGainArea%02d",fAbsHistName.Data(),j));
     636          h->SetTitle(Form("%s%s%02d",fAbsHistTitle.Data(),
    630637                           " averaged on event-by-event basis Low Gain Area Idx ",j));
    631638          h->SetXTitle(fAbsHistXTitle.Data());
    632639          h->SetYTitle(fAbsHistYTitle.Data());
    633          
    634           InitHists(pix,fIntensCam ? fIntensCam->GetAverageBadArea(j) : fCam->GetAverageBadArea(j),j);
    635640        }
    636641    }
     
    641646    for (Int_t j=0; j<nsectors; j++)
    642647      {
    643         fAverageLoGainSectors->AddAt(new MHCalibrationChargePix(Form("%s%s%2i",fHistName.Data(),"LoGainSector",j),
    644                                                         Form("%s%s%2i",fHistTitle.Data()," Low Gain Sector ",j)),j);
     648        fAverageLoGainSectors->AddAt(new MHCalibrationChargePix(Form("%sLoGainSector%02d",fHistName.Data(),j),
     649                                                        Form("%s Low Gain Sector %02d",fHistTitle.Data(),j)),j);
    645650       
    646651        MHCalibrationChargePix &pix = (MHCalibrationChargePix&)GetAverageLoGainSector(j);
     
    654659        pix.SetAbsTimeLast(logainsamples-0.5);
    655660       
     661        InitHists(pix,fIntensCam ? fIntensCam->GetAverageBadSector(j) : fCam->GetAverageBadSector(j),j);
     662
    656663        h =  pix.GetHAbsTime();
    657664       
    658         h->SetName (Form("%s%s%s%2i","H",fAbsHistName.Data(),"LoGainSector",j));
    659         h->SetTitle(Form("%s%s%2i",fAbsHistTitle.Data(),
     665        h->SetName (Form("H%sLoGainSector%02d",fAbsHistName.Data(),j));
     666        h->SetTitle(Form("%s%s%02d",fAbsHistTitle.Data(),
    660667                           " averaged on event-by-event basis Low Gain Area Sector ",j));
    661668        h->SetXTitle(fAbsHistXTitle.Data());
    662669        h->SetYTitle(fAbsHistYTitle.Data());
    663 
    664         InitHists(pix,fIntensCam ? fIntensCam->GetAverageBadSector(j) : fCam->GetAverageBadSector(j),j);
    665670      }
    666671  }
     
    897902  MBadPixelsCam   *badcam    = fIntensBad ? fIntensBad->GetCam() : fBadPixels;
    898903
    899 
    900904  for (Int_t i=0; i<fHiGainArray->GetSize(); i++)
    901905    {
     
    11101114    {
    11111115      *fLog << warn
    1112             << Form("%s%3.1f%s%2.1f%s%2.0f%s%s","Mean ArrivalTime: ",mean," < ",fTimeLowerLimit,
    1113                     " slices from lower edge: ",lowerlimit," in pixel ",hist.GetName()) << endl;
     1116            << Form("Mean ArrivalTime: %3.1f < %2.1f slices from lower edge: %2i in pixel %s",
     1117                    mean,fTimeLowerLimit,(Int_t)first,hist.GetName()) << endl;
    11141118      bad.SetUncalibrated( MBadPixelsPix::kMeanTimeInFirstBin );
    11151119    }
     
    11181122    {
    11191123      *fLog << warn
    1120             << Form("%s%3.1f%s%2.1f%s%2.0f%s%s","Mean ArrivalTime: ",mean," > ",fTimeUpperLimit,
    1121                     " slices from upper edge: ",upperlimit," in pixel ",hist.GetName()) << endl;
     1124            << Form("Mean ArrivalTime: %3.1f > %2.1f slices from upper edge: %2i in pixel %s",
     1125                    mean,fTimeUpperLimit,(Int_t)last,hist.GetName()) << endl;
    11221126      bad.SetUncalibrated( MBadPixelsPix::kMeanTimeInLast2Bins );
    11231127    }
     
    12261230       // Ask for Hi-Gain saturation
    12271231       //
    1228        *fLog << err << hipix.GetSaturated() << "   " << fNumHiGainSaturationLimit*hipix.GetHGausHist()->GetEntries() <<  endl;
    12291232       if (hipix.GetSaturated() > fNumHiGainSaturationLimit*hipix.GetHGausHist()->GetEntries() && IsLoGain())
    12301233         {
Note: See TracChangeset for help on using the changeset viewer.