Changeset 6858


Ignore:
Timestamp:
03/18/05 18:07:46 (20 years ago)
Author:
tbretz
Message:
*** empty log message ***
Location:
trunk/MagicSoft/Mars
Files:
2 deleted
16 edited

Legend:

Unmodified
Added
Removed
  • trunk/MagicSoft/Mars/Changelog

    r6847 r6858  
    2121
    2222                                                 -*-*- END OF LINE -*-*-
     23 2005/03/18 Thomas Bretz
     24
     25   * Makefile:
     26     - removed mone from list of compiled programs
     27
     28   * mars.cc:
     29     - replaced the MARS display by the Camera Display directly
     30
     31   * manalysis/MCameraData.[h,cc], mcalib/MCalibrateData.[h,cc],
     32     mbadpixels/MBadPixelsTreat.[h,cc], mcalib/MCalibrateRelTimes.[h,cc],
     33     mimage/MCameraSmooth.[h,cc], mimage/MConcentration.[h,cc],
     34     mimage/MHillas.[h,cc], mimage/MHillasExt.[h,cc],
     35     mimage/MImgCleanStd.[h,cc], mimage/MNewImagePar.[h,cc],
     36     mimage/MImagePar.[h,cc], MNewImagePar.[h,cc],
     37     mjobs/MJCalibTest.cc, mhcalib/MHCalibrationTestCam.[h,cc],
     38     mpedestal/MPedPhotCalc.[h,cc], mjobs/MJCalibrateSignal.cc:
     39     - removed dependancy on MArrivalTime, information now
     40       found in MSignalCam
     41     - replaced MCerPhotEvt by MSignalCam
     42     - it was renamed because it will be completely incompatible
     43       anyhow
     44
     45   * mjobs/MJCalibrateSignal.cc:
     46     - use new MSignalCam type to display pulse position of cosmics
     47
     48   * mcalib/MCalibrateData.cc:
     49     - calculate number of saturated pixels
     50
     51   * manalysis/MCerPhotEvt.[h,cc]:
     52     - removed possibility for zero-supression. Now the index
     53       is identical with the position in the array
     54     - renamed and moved to msignal/MSignalCam.[h,cc]
     55
     56   * manalysis/MCerPhotPix.cc:
     57     - removed obsolete values
     58     - added arrival time
     59     - renamed and moved to msignal/MSignalPix.[h,cc]
     60
     61   * mcalib/MCalibrationChargeCalc.cc:
     62     - some cosmetic changes and small fixed from the Munich cvs
     63       (undocumented)
     64
     65   * mfileio/MWriteRootFile.cc:
     66     - fixed bug in RecursiveRemove which caused crashed with real
     67       data
     68
     69   * mhft/MGeomCamMagicEnhance.cc, mhft/MHexagonalFTCalc.cc:
     70     - updated, but untested
     71
     72   * mhist/MHCamEvent.[h,cc]:
     73     - some fixes in Draw to get a correct display in root 4.02/00
     74       (at least on 64-bit systems)
     75     - removed kSqrtVariance it is included in kProfile now
     76
     77   * mhist/MHCamera.[h,cc]:
     78     - removed sqrtvariance option which is included in profile now
     79     - the profile now uses the new array fBinEntries to display
     80       a more accurate profile
     81
     82   * mhist/MHEvent.cc:
     83     - set to type 6 for arrival times
     84
     85   * mimage/MHillasCalc.cc:
     86     - updated text for error=1
     87
     88   * mimage/MImagePar.cc:
     89     - copy number of saturated pixels from MSignalCam
     90
     91   * mjobs/MJStar.cc:
     92     - enhanced title of some histogram
     93
     94   * mjobs/MSequence.cc:
     95     - updated path to fit data center (D.Dorner)
     96
     97   * mmain/MEventDisplay.cc:
     98     - display Arrival Time from MSignalCam now
     99
     100   * msignal/MArrivalTimeCam.cc:
     101     - implemented a new case 6 which is identical with the
     102       default case AND arrival time from MSignalCam
     103
     104   * manalysis/Makefile, manalysis/AnalysisLinkDef.h,
     105     manalysis/:
     106     - removed MCerPhotEvt
     107     - removed MCerPHotPix
     108     - removed MCerPhotAnal
     109     - removed MCerPhotAnal2
     110     - removed MCerPhotCalc
     111
     112   * mimage/Makefile, manalysis/ImageLinkDef.h:
     113     - removed MHillasSrcCalc
     114
     115   * manalysis/MSupercutsCalc.cc:
     116     - removed an obsolete include
     117
     118   * mhist/Makefile, mhist/HistLinkDef.h:
     119     - removed MHSigmaTheta
     120
     121   * mmain/Makefile, mmain/HistLinkDef.h:
     122     - removed MDataCheck
     123     - removed Mars
     124     - removed MAnalysis
     125     - removed MMonteCarlo
     126     - removed MGDisplayAdc
     127     - removed MOnlineDisplay
     128     - removed MOnlineDump
     129
     130   * msignal/Makefile, msignal/HistLinkDef.h, msignal/:
     131     - added MSignalCam
     132     - added MSignalPix
     133     - added MSignalCalc
     134
     135   * msql/Makefile, msql/SqlLinkDef.h:
     136     - removed MSqlInsertRun
     137
     138   * mfilter/Makefile, mfilter/FilterLinkDef.h:
     139     - removed MFSelBasic
     140     - removed MFSelStandard
     141     - removed MFSelFinal
     142
     143
     144
    23145 2005/03/17 Thomas Bretz
    24146
     
    41163     - moved to manalysisct1
    42164
     165   * mfilter/Makefile, mfilter/FilterLinkDef.h:
     166     - removed MFCT1SelBasic
     167     - removed MFCT1SelStandard
     168     - removed MFCT1SelFinal
     169
     170   * manalysis/Makefile, manalysis/AnalysisLinkDef.h:
     171     - removed MPad
     172     - removed MMakePadHistograms
     173     - removed MSigmabar
     174     - removed MSigmabarParam
     175     - removed MSigmabarCalc
     176
     177   * mimage/Makefile, mimage/ImageLinkDef.h:
     178     - removed MImgCleanTGB
     179
     180   * mmontecarlo/Makefile, mmontecarlo/MonteCarloLinkDef.h
     181     - removed MMcEnergyEst
     182     - removed MMcTimeGenerate
     183
     184   * msignal/Makefile, msignal/SignalLinkDef.h:
     185     - removed MArrivalTime
     186     - removed MArrivalTimeCalc
     187     - removed MArrivalTimeCalc2
     188
     189   * mjobs/MJCalibration.cc:
     190     - followed some undocumented changes from the other cvs
     191
    43192
    44193
     
    47196   * callisto.cc:
    48197     - set changed extractor in MJCalibrateSignal from MJPedestal
    49       - don't process 'range finding' for MonteCarlo data
     198     - don't process 'range finding' for MonteCarlo data
    50199
    51200   * callisto.rc:
  • trunk/MagicSoft/Mars/NEWS

    r6591 r6858  
    8686      accurate now
    8787
     88    - completely revised the container in which the signal is stored
     89      MCerPhotEvt/Pix, MArrivalTime --> MSignalCam/Pix
     90       * the new implementation is faster and
     91       * needs less storage space
     92
     93     - FIRST version which can process Monte Carlos through the
     94       whole chain of programs (callisto, star, etc)
     95
    8896
    8997
  • trunk/MagicSoft/Mars/mbadpixels/MBadPixelsTreat.cc

    r6377 r6858  
    5353//
    5454//  Input Containers:
    55 //   MCerPhotEvt
     55//   MSignalCam
    5656//   MPedPhotCam
    5757//   MBadPixelsCam
     
    5959//
    6060//  Output Containers:
    61 //   MCerPhotEvt
     61//   MSignalCam
    6262//
    6363/////////////////////////////////////////////////////////////////////////////
     
    7979#include "MGeomCam.h"
    8080
    81 #include "MCerPhotPix.h"
    82 #include "MCerPhotEvt.h"
     81#include "MSignalPix.h"
     82#include "MSignalCam.h"
    8383
    8484#include "MPedPhotPix.h"
     
    8888#include "MBadPixelsCam.h"
    8989
    90 #include "MArrivalTime.h"
     90//#include "MArrivalTime.h"
    9191
    9292ClassImp(MBadPixelsTreat);
     
    132132//
    133133//  - Try to find or create MBlindPixels in parameter list.
    134 //  - get the MCerPhotEvt from the parlist (abort if missing)
     134//  - get the MSignalCam from the parlist (abort if missing)
    135135//  - if no pixels are given by the user try to determin the starfield
    136136//    from the monte carlo run header.
     
    145145    }
    146146
    147     fEvt = (MCerPhotEvt*)pList->FindObject(AddSerialNumber("MCerPhotEvt"));
     147    fEvt = (MSignalCam*)pList->FindObject(AddSerialNumber("MSignalCam"));
    148148    if (!fEvt)
    149149    {
    150         *fLog << err << AddSerialNumber("MCerPhotEvt") << " not found... aborting." << endl;
     150        *fLog << err << AddSerialNumber("MSignalCam") << " not found... aborting." << endl;
    151151        return kFALSE;
    152152    }
     
    191191            {
    192192                *fLog << err << AddSerialNumber(o->GetName()) << " [MPedPhotCam] not found... aborting." << endl;
    193                 //*fLog << " Use  MBadPixelsTreat::SetProcessPedestalRun(kFALSE)  and" << endl;
    194                 //*fLog << " MBadPixelsTreat::SetProcessPedestalEvt(kFALSE) to switch" << endl;
    195                 //*fLog << " Pedestal treatment off." << endl;
    196193                return kFALSE;
    197194            }
    198195
    199196            fPedPhotCams.Add(p);
    200         }
    201     }
    202 
    203     fTimes = 0;
    204     if (IsProcessTimes())
    205     {
    206         fTimes = (MArrivalTime*)pList->FindObject(AddSerialNumber("MArrivalTime"));
    207         if (!fTimes)
    208         {
    209             *fLog << err << AddSerialNumber("MArrivalTime") << " not found... aborting." << endl;
    210             *fLog << " Use MBadPixelsTreat::SetProcessTimes(kFALSE) to switch time interpolation off." << endl;
    211             return kFALSE;
    212197        }
    213198    }
     
    245230    for (UShort_t i=0; i<entries; i++)
    246231    {
    247         MCerPhotPix *pix = fEvt->GetPixById(i);
     232        MSignalPix *pix = fEvt->GetPixById(i);
    248233
    249234        //
     
    255240        //
    256241        // Get a pointer to this pixel. If it is not yet existing
    257         // create a new entry for this pixel in MCerPhotEvt
     242        // create a new entry for this pixel in MSignalCam
    258243        //
    259244        if (!pix)
     
    301286            // Check whether the neighbor has a signal stored
    302287            //
    303             const MCerPhotPix *evtpix = fEvt->GetPixById(nidx);
     288            const MSignalPix *evtpix = fEvt->GetPixById(nidx);
    304289            if (!evtpix)
    305290                continue;
     
    416401        if (num < fNumMinNeighbors)
    417402        {
    418             MCerPhotPix *pix =fEvt->GetPixById(i);
     403            MSignalPix *pix =fEvt->GetPixById(i);
    419404            if (!pix)
    420405                pix = fEvt->AddPixel(i, 0, 0);
     
    454439void MBadPixelsTreat::InterpolateTimes() const
    455440{
    456     Int_t n = fTimes->GetSize();
     441    Int_t n = fEvt->GetNumPixels();
    457442
    458443    for (int i=0; i<n; i++)
     
    474459        for (unsigned int j=0; j<time.GetSize(); j++)
    475460        {
    476             const Double_t t = (*fTimes)[gpix.GetNeighbor(j)];
     461            const Double_t t = (*fEvt)[j].GetArrivalTime();
    477462            if (t>=0)
    478463                time[n0++] = t;
     
    498483        // FIXME: Request a minimum number of neighbors to take action?
    499484        if (p0>=0 && p1>=0 && TMath::Abs(time[p0] - time[p1])<250)
    500             fTimes->SetTime(i, (time[p0]+time[p1])/2);
    501     }
    502 }
    503 
    504 // --------------------------------------------------------------------------
    505 //
    506 //  Replaces each pixel (signal, signal error, pedestal, pedestal rms)
    507 //  by the average of its surrounding pixels.
    508 //  If TESTBIT(fFlags, kUseCentralPixel) is set the central pixel is also
    509 //  included.
    510 //
    511 //  NT: Informations about the interpolated pedestals are added.
    512 //      When the option Interpolated is called, the blind pixel with the new
    513 //      values of signal and fluttuation is included in the calculation of
    514 //      the Image Parameters.
    515 //
    516 /*
    517 void MBadPixelsTreat::Interpolate() const
    518 {
    519     const UShort_t entries = fGeomCam->GetNumPixels();
    520 
    521     //
    522     // Create arrays
    523     //
    524     TArrayD nphot(entries);
    525     TArrayD perr(entries);
    526     TArrayD ped(entries);
    527     TArrayD pedrms(entries);
    528  
    529     //
    530     // Loop over all pixels
    531     //
    532     for (UShort_t i=0; i<entries; i++)
    533     {
    534         MCerPhotPix *pix = fEvt->GetPixById(i);
    535 
    536         //
    537         // Check whether pixel with idx i is blind
    538         //
    539         if (pix && (*fBadPixels)[i].IsOK())
    540             continue;
    541 
    542         //
    543         // Get a pointer to this pixel. If it is not yet existing
    544         // create a new entry for this pixel in MCerPhotEvt
    545         //
    546         if (!pix)
    547         {
    548             pix = fEvt->AddPixel(i, 0, 0);
    549             (*fBadPixels)[i].SetUnsuitable(MBadPixelsPix::kUnsuitableEvt);
    550         }
    551 
    552         //
    553         // Get the corresponding geometry and pedestal
    554         //
    555         const MGeomPix &gpix    = (*fGeomCam)[i];
    556         const MPedPhotPix &ppix = (*fPedPhot)[i];
    557 
    558         // Do Not-Use-Central-Pixel
    559         const Bool_t nucp = !TESTBIT(fFlags, kUseCentralPixel);
    560 
    561         Int_t num = nucp ? 0 : 1;
    562 
    563         nphot[i]  = nucp ? 0 : pix->GetNumPhotons();
    564         ped[i]    = nucp ? 0 : ppix.GetMean();
    565         perr[i]   = nucp ? 0 : Pow2(pix->GetErrorPhot());
    566         pedrms[i] = nucp ? 0 : Pow2(ppix.GetRms());
    567 
    568         //
    569         // The values are rescaled to the small pixels area for the right comparison
    570         //
    571         const Double_t ratio = fGeomCam->GetPixRatio(i);
    572 
    573         if (nucp)
    574         {
    575             nphot[i]  *= ratio;
    576             perr[i]   *= ratio;
    577             ped[i]    *= ratio;
    578             pedrms[i] *= ratio;
    579         }
    580 
    581         //
    582         // Loop over all its neighbors
    583         //
    584         const Int_t n = gpix.GetNumNeighbors();
    585         for (int j=0; j<n; j++)
    586         {
    587             const UShort_t nidx = gpix.GetNeighbor(j);
    588 
    589             //
    590             // Do not use blind neighbors
    591             //
    592             if ((*fBadPixels)[nidx].IsBad())
    593                 continue;
    594 
    595             //
    596             // Check whether the neighbor has a signal stored
    597             //
    598             const MCerPhotPix *evtpix = fEvt->GetPixById(nidx);
    599             if (!evtpix)
    600                 continue;
    601 
    602             //
    603             // Get the geometry for the neighbor
    604             //
    605             const Double_t nratio = fGeomCam->GetPixRatio(nidx);
    606             MPedPhotPix &nppix    = (*fPedPhot)[nidx];
    607 
    608             //
    609             // The error is calculated as the quadratic sum of the errors
    610             //
    611             nphot[i]  += nratio*evtpix->GetNumPhotons();
    612             ped[i]    += nratio*nppix.GetMean();
    613             perr[i]   += nratio*Pow2(evtpix->GetErrorPhot());
    614             pedrms[i] += nratio*Pow2(nppix.GetRms());
    615 
    616             num++;
    617         }
    618 
    619         if (num<fNumMinNeighbors)
    620         {
    621             pix->SetPixelUnmapped();
    622             nphot[i]  = 0;
    623             ped[i]    = 0;
    624             perr[i]   = 0;
    625             pedrms[i] = 0;
    626             continue;
    627         }
    628 
    629         //
    630         // Now the mean is calculated and the values rescaled back to the pixel area
    631         //
    632         nphot[i] /= num*ratio;
    633         ped[i]   /= num*ratio;
    634         perr[i]   = TMath::Sqrt(perr[i]/(num*ratio));
    635         pedrms[i] = TMath::Sqrt(pedrms[i]/(num*ratio));
    636 
    637     }
    638 
    639     //
    640     // Now the new pixel values are calculated and can be replaced in
    641     // the corresponding containers
    642     //
    643     for (UShort_t i=0; i<entries; i++)
    644     {
    645         //
    646         // Do not use blind neighbors
    647         //
    648         if ((*fBadPixels)[i].IsOK())
    649             continue;
    650 
    651         //
    652         // It must exist, we have created it in the loop before.
    653         //
    654         fEvt->GetPixById(i)->Set(nphot[i], perr[i]);
    655         (*fPedPhot)[i].Set(ped[i], pedrms[i]);
    656     }
    657 }
    658 */
     485            (*fEvt)[i].SetArrivalTime((time[p0]+time[p1])/2);
     486    }
     487}
    659488
    660489// --------------------------------------------------------------------------
     
    673502    for (UShort_t i=0; i<entries; i++)
    674503    {
    675         MCerPhotPix &pix = (*fEvt)[i];
    676 
    677         if (IsPixelBad(pix.GetPixId()))
    678             pix.SetPixelUnmapped();
     504        if (IsPixelBad(i))
     505            (*fEvt)[i].SetPixelUnmapped();
    679506    }
    680507}
  • trunk/MagicSoft/Mars/mbadpixels/MBadPixelsTreat.h

    r5728 r6858  
    77
    88class MGeomCam;
    9 class MCerPhotEvt;
     9class MSignalCam;
    1010class MPedPhotCam;
    11 class MArrivalTime;
    1211class MBadPixelsCam;
    1312
     
    1615private:
    1716    MGeomCam      *fGeomCam;   //!
    18     //MPedPhotCam   *fPedPhot;   //!
    19     MCerPhotEvt   *fEvt;       //!
    20     MArrivalTime  *fTimes;     //!
     17    MSignalCam    *fEvt;       //!
    2118    MBadPixelsCam *fBadPixels; //!
    2219
     
    2623    Byte_t fNumMinNeighbors;
    2724
    28     //TString fNamePedPhotCam; // name of the 'MPedPhotCam' container
    2925    TList fNamePedPhotCams;
    3026
  • trunk/MagicSoft/Mars/mfileio/MWriteRootFile.cc

    r6513 r6858  
    287287        return;
    288288
    289     *fLog << all << underline << "File: " << GetFileName() << endl;
     289    *fLog << all << underline << "File: " << GetFileName() << dec << endl;
    290290
    291291    if (fTrees.GetEntries()==0)
     
    10471047void MWriteRootFile::RecursiveRemove(TObject *obj)
    10481048{
    1049     if (obj==fOut && TestBit(kIsNotOwner))
     1049    if (obj==fOut)
    10501050        fOut=0;
    10511051}
  • trunk/MagicSoft/Mars/mfilter/FilterLinkDef.h

    r6847 r6858  
    1212#pragma link C++ class MFParticleId+;
    1313
    14 #pragma link C++ class MFSelBasic+;
    15 #pragma link C++ class MFSelStandard+;
    16 #pragma link C++ class MFSelFinal+;
    1714#pragma link C++ class MFSoftwareTrigger+;
    1815#pragma link C++ class MFCosmics+;
  • trunk/MagicSoft/Mars/mfilter/MFSoftwareTrigger.cc

    r6489 r6858  
    5757//
    5858//  WARNING: Using trigger type kAllPattern resets the BIT(21) bit
    59 //           of all pixels in MCerPhotEvt
     59//           of all pixels in MSignalCam
    6060//
    6161//
    6262//  Input:
    63 //    MCerPhotEvt
    64 //    MArrivalTime
     63//    MSignalCam
    6564//    MGeomCam
    6665//
     
    7675#include "MGeomCam.h"
    7776
    78 #include "MCerPhotEvt.h"
    79 #include "MArrivalTime.h"
     77#include "MSignalCam.h"
     78//#include "MArrivalTime.h"
    8079
    8180ClassImp(MFSoftwareTrigger);
     
    8887//
    8988MFSoftwareTrigger::MFSoftwareTrigger(const char *name, const char *title)
    90     : fCam(NULL), fEvt(NULL), fTme(NULL), fThreshold(5),
     89    : fCam(NULL), fEvt(NULL), fThreshold(5),
    9190    fTimeWindow(0.5), fNumNeighbors(4), fType(kSinglePixelNeighbors)
    9291{
     
    112111{
    113112    // Try to get the pixel information of a pixel with this index
    114     MCerPhotPix *pix = fEvt->GetPixById(idx);
     113    MSignalPix *pix = fEvt->GetPixById(idx);
    115114
    116115    // If a pixel with this index is not existing... do nothing.
     
    133132        return 0;
    134133
    135     const Float_t tm1 = fTme ? (*fTme)[idx] : 0;
    136     if (fTme && TMath::Abs(tm1-tm0)>fTimeWindow)
     134    const Float_t tm1 = pix->GetArrivalTime();
     135    if (TMath::Abs(tm1-tm0)>fTimeWindow)
    137136        return 0;
    138137
     
    157156{
    158157    // Try to get the pixel information of a pixel with this index
    159     MCerPhotPix *pix = fEvt->GetPixById(idx);
     158    MSignalPix *pix = fEvt->GetPixById(idx);
    160159
    161160    // If a pixel with this index is not existing... do nothing.
     
    210209    ResetBits(kWasChecked);
    211210
     211    const UInt_t npixevt = fEvt->GetNumPixels();
     212    for (UInt_t idx=0; idx<npixevt; idx++)
     213    {
     214        const MSignalPix &pix = (*fEvt)[idx];
     215        if (!pix.IsPixelUsed())
     216            continue;
     217
     218        // Check if trigger condition is fullfilled for this pixel
     219        if (CountPixels(idx, pix.GetArrivalTime()) >= fNumNeighbors)
     220            return kTRUE;
     221    }
     222
     223/*
    212224    // Reset bit
    213     MCerPhotPix *pix=0;
     225    MSignalPix *pix=0;
    214226
    215227    // We could loop over all indices which looks more straight
    216228    // forward but should be a lot slower (assuming zero supression)
    217229    TIter Next(*fEvt);
    218     while ((pix=static_cast<MCerPhotPix*>(Next())))
     230    while ((pix=static_cast<MSignalPix*>(Next())))
    219231    {
    220232        // Check if trigger condition is fullfilled for this pixel
     
    223235            return kTRUE;
    224236    }
    225 
     237  */
    226238    return kFALSE;
    227239}
     
    230242{
    231243    // Try to get the pixel information of a pixel with this index
    232     MCerPhotPix *pix = fEvt->GetPixById(idx);
     244    MSignalPix *pix = fEvt->GetPixById(idx);
    233245
    234246    // If a pixel with this index is not existing... do nothing.
     
    283295{
    284296    // Reset bit
    285     MCerPhotPix *pix=0;
     297    MSignalPix *pix=0;
    286298
    287299    // We could loop over all indices which looks more straight
    288300    // forward but should be a lot slower (assuming zero supression)
    289301    TIter Next(*fEvt);
    290     while ((pix=static_cast<MCerPhotPix*>(Next())))
     302    while ((pix=static_cast<MSignalPix*>(Next())))
    291303    {
    292304        ResetBits(kWasChecked|kIsCoincident);
     
    302314*/
    303315
    304 Bool_t MFSoftwareTrigger::CheckPixel(const MCerPhotPix &pix) const
    305 {
     316const MSignalPix *MFSoftwareTrigger::CheckPixel(Int_t i) const
     317{
     318    const MSignalPix &pix = (*fEvt)[i];
     319
    306320    if (!pix.IsPixelUsed())
    307         return kFALSE;
    308 
    309     if (pix.GetNumPhotons()*fCam->GetPixRatio(pix.GetPixId())<fThreshold)
    310         return kFALSE;
    311 
    312     if ((*fCam)[pix.GetPixId()].IsInOutermostRing())
    313         return kFALSE;
    314 
    315     return kTRUE;
     321        return NULL;
     322
     323    if (pix.GetNumPhotons()*fCam->GetPixRatio(i)<fThreshold)
     324        return NULL;
     325
     326    if ((*fCam)[i].IsInOutermostRing())
     327        return NULL;
     328
     329    return &pix;
    316330}
    317331
     
    326340    for (Int_t i=0; i<entries; i++)
    327341    {
    328         const MCerPhotPix &pix0 = (*fEvt)[i];
    329         if (!CheckPixel(pix0))
     342        const MSignalPix *pix0 = CheckPixel(i);
     343        if (!pix0)
    330344            continue;
    331345
    332346        Int_t num = 1;
    333347
    334         const MGeomPix &gpix = (*fCam)[pix0.GetPixId()];
     348        const MGeomPix &gpix = (*fCam)[i];
    335349
    336350        const Int_t nneighbors = gpix.GetNumNeighbors();
     
    338352        {
    339353            const Int_t idx1 = gpix.GetNeighbor(n);
    340             if (!CheckPixel(*fEvt->GetPixById(idx1)))
     354
     355            const MSignalPix *pix1 = CheckPixel(idx1);
     356            if (!pix1)
    341357                continue;
    342358
    343             if (fTme)
    344             {
    345                 const Float_t t0 = (*fTme)[pix0.GetPixId()];
    346                 const Float_t t1 = (*fTme)[idx1];
    347 
    348                 if (TMath::Abs(t0-t1)>fTimeWindow)
    349                     continue;
    350             }
     359            const Float_t t0 = pix0->GetArrivalTime();
     360            const Float_t t1 = pix1->GetArrivalTime();
     361
     362            if (TMath::Abs(t0-t1)>fTimeWindow)
     363                continue;
    351364
    352365            if (++num==fNumNeighbors)
     
    359372// --------------------------------------------------------------------------
    360373//
    361 // Request pointer to MCerPhotEvt and MGeomCam from paremeter list
     374// Request pointer to MSignalCam and MGeomCam from paremeter list
    362375//
    363376Int_t MFSoftwareTrigger::PreProcess(MParList *pList)
    364377{
    365     fEvt = (MCerPhotEvt*)pList->FindObject("MCerPhotEvt");
     378    fEvt = (MSignalCam*)pList->FindObject("MSignalCam");
    366379    if (!fEvt)
    367380    {
    368         *fLog << err << "MCerPhotEvt not found... aborting." << endl;
     381        *fLog << err << "MSignalCam not found... aborting." << endl;
    369382        return kFALSE;
    370383    }
     
    375388        *fLog << err << "MGeomCam not found... aborting." << endl;
    376389        return kFALSE;
    377     }
    378 
    379     fTme = 0;
    380     if (fTimeWindow>0)
    381     {
    382         fTme = (MArrivalTime*)pList->FindObject("MArrivalTime");
    383         if (!fTme)
    384         {
    385             *fLog << err << "MArrivalTime not found... aborting." << endl;
    386             return kFALSE;
    387         }
    388390    }
    389391
  • trunk/MagicSoft/Mars/mfilter/MFSoftwareTrigger.h

    r6460 r6858  
    88class MMcEvt;
    99class MGeomCam;
    10 class MCerPhotEvt;
    11 class MCerPhotPix;
     10class MSignalCam;
     11class MSignalPix;
    1212class MArrivalTime;
    1313
     
    2323private:
    2424    const MGeomCam     *fCam; // Camera Geometry
    25     const MCerPhotEvt  *fEvt; // Cerenkov Photon Event
     25    const MSignalCam   *fEvt; // Cerenkov Photon Event
    2626    const MArrivalTime *fTme;
    2727
     
    4747
    4848    void ResetBits(Int_t bits) const;
    49     Bool_t CheckPixel(const MCerPhotPix &pix) const;
     49    const MSignalPix *CheckPixel(Int_t i) const;
    5050    Bool_t SwTrigger() const;
    5151    Bool_t SwCoincidence() const;
  • trunk/MagicSoft/Mars/mfilter/Makefile

    r6847 r6858  
    2424           MFParticleId.cc \
    2525           MFAlpha.cc \
    26            MFSelBasic.cc \
    27            MFSelStandard.cc \
    28            MFSelFinal.cc \
    2926           MFSoftwareTrigger.cc \
    3027           MFCosmics.cc \
  • trunk/MagicSoft/Mars/mhcalib/MHCalibrationTestTimeCam.cc

    r6210 r6858  
    9494#include "MCalibrationPix.h"
    9595
    96 #include "MArrivalTime.h"
     96#include "MSignalCam.h"
     97#include "MSignalPix.h"
    9798
    9899#include "MGeomCam.h"
     
    116117const TString MHCalibrationTestTimeCam::gsHistXTitle = "Arrival Time [FADC slices]";
    117118const TString MHCalibrationTestTimeCam::gsHistYTitle = "Nr. events";
     119
    118120// --------------------------------------------------------------------------
    119121//
     
    168170    return kFALSE;
    169171
    170   MArrivalTime *signal = (MArrivalTime*)pList->FindObject("MArrivalTime");
    171   if (!signal)
    172   {
    173       *fLog << err << "MArrivalTime not found... abort." << endl;
    174       return kFALSE;
    175   }
    176 
    177172  const Int_t npixels  = fGeom->GetNumPixels();
    178173  const Int_t nsectors = fGeom->GetNumSectors();
     
    203198{
    204199
    205   MArrivalTime *calibration = (MArrivalTime*)par;
     200  MSignalCam *calibration = (MSignalCam*)par;
    206201  if (!calibration)
    207202    {
     
    227222        continue;
    228223
    229       const Float_t  time = (*calibration)[i];
     224      const Float_t  time = (*calibration)[i].GetArrivalTime();
    230225      const Int_t  aidx   = (*fGeom)[i].GetAidx();
    231226      const Int_t  sector = (*fGeom)[i].GetSector();
  • trunk/MagicSoft/Mars/mjobs/MJCalibTest.cc

    r6777 r6858  
    5050#include "MHCamera.h"
    5151
     52#include "MSignalCam.h"
    5253#include "MPedestalCam.h"
    5354#include "MPedPhotCam.h"
     
    5657#include "MBadPixelsCalc.h"
    5758#include "MBadPixelsMerge.h"
    58 #include "MCerPhotEvt.h"
    59 #include "MArrivalTime.h"
    6059#include "MCalibrationChargeCam.h"
    6160#include "MCalibrationRelTimeCam.h"
     
    392391  plist.AddToList(&tmcam);
    393392
    394   MCerPhotEvt          cerphot;
     393  MSignalCam           cerphot;
    395394  MPedPhotCam          pedphot;
    396395  MHCalibrationTestCam testcam;
     
    479478  MHCamEvent evt0(0,"Signal", "Un-Calibrated Signal;;S [FADC cnts]" );
    480479  MHCamEvent evt1(0,"CalSig", "Cal. and Interp. Sig. by Pixel Size Ratio;;S [phe]");
    481   MHCamEvent evt2(0,"Times" , "Arrival Time;;T [slice]");
     480  MHCamEvent evt2(6,"Times" , "Arrival Time;;T [slice]");
    482481
    483482  MFillH fill0(&evt0, "MExtractedSignalCam", "FillUncalibrated");
    484   MFillH fill1(&evt1, "MCerPhotEvt", "FillCalibrated");
    485   MFillH fill2(&evt2, "MArrivalTime","FillTimes");
    486  
    487   MFillH fillcam("MHCalibrationTestCam",     "MCerPhotEvt" ,"FillTest");
    488   MFillH filltme("MHCalibrationTestTimeCam", "MArrivalTime","FillTestTime");
     483  MFillH fill1(&evt1, "MSignalCam", "FillCalibrated");
     484  MFillH fill2(&evt2, "MSignalCam", "FillTimes");
     485 
     486  MFillH fillcam("MHCalibrationTestCam",     "MSignalCam" ,"FillTest");
     487  MFillH filltme("MHCalibrationTestTimeCam", "MSignalCam", "FillTestTime");
    489488  fillcam.SetBit(MFillH::kDoNotDisplay);
    490489  filltme.SetBit(MFillH::kDoNotDisplay);
  • trunk/MagicSoft/Mars/mjobs/MJCalibrateSignal.cc

    r6839 r6858  
    5353#include "MGeomCam.h"
    5454#include "MHCamEvent.h"
     55//#include "MHCamEventTH.h"
    5556#include "MPedestalCam.h"
    5657#include "MBadPixelsCam.h"
     
    610611    MHCamEvent evt5(0, "Interp'd",   "Interpolated Signal;;S [phe]");
    611612    MHCamEvent evt6(2, "Unsuitable", "Fraction of unsuitable events per Pixel;;[1]");
    612     MHCamEvent evt7(0, "Times",      "Calibrated Arrival Time;;T [fadc sl]");
     613    MHCamEvent evt7(6, "Times",      "Calibrated Arrival Time;;T [fadc sl]");
    613614    MHCamEvent evt8(0, "Conv",       "Calibration Conv. Factors;;[phe/fadc cnts]");
    614     //MHCamEvent evt9(0, "PulsePos",   "Pulse Position of cosmics"); //Calibration Conv. Factors;;[phe/fadc cnts]
    615 
     615    MHCamEvent evt9(7, "PulsePos",  "Pulse Position of cosmics (>15phe);;T"); //Calibration Conv. Factors;;[phe/fadc cnts]
     616    /*
     617     MHCamEventTH evt9(6, "PulsePos",  "Pulse Position of cosmics"); //Calibration Conv. Factors;;[phe/fadc cnts]
     618     evt9.SetNameThreshold("MCerPhotEvt");
     619     evt9.SetThreshold(15);
     620     */
     621/*
    616622    evt0.EnableSqrtVariance();
    617623    evt1.EnableSqrtVariance();
     
    622628    evt7.EnableSqrtVariance();
    623629    evt8.EnableSqrtVariance();
    624 
     630  */
    625631    MFillH fill0(&evt0, "MPedestalFundamental",    "FillPedFLG");
    626632    MFillH fill1(&evt1, "MPedestalFromExtractorRndm", "FillPedRmsFLG");
     
    630636    MFillH fill5(&evt5, "MCerPhotEvt",             "FillInterpolated");
    631637    MFillH fill6(&evt6, "MBadPixelsCam",           "FillUnsuitable");
    632     MFillH fill7(&evt7, "MArrivalTime",            "FillTimes");
     638    MFillH fill7(&evt7, "MCerPhotEvt",             "FillTimes");
    633639    MFillH fill8(&evt8, "MCalibConstCam",          "FillConv");
    634     //MFillH fill9(&evt9, "MCalibConstCam",          "FillPulse");
     640    MFillH fill9(&evt9, "MCerPhotEvt",             "FillPulse");
    635641
    636642    MTaskEnv fillflorian("FinalFantasy");
    637643    fillflorian.SetDefault();
    638 
    639     // Write the special MC tree
    640     MWriteRootFile writemc(2, fname, fOverwrite?"RECREATE":"NEW");
    641     writemc.SetName("WriteMC");
    642     writemc.AddContainer("MMcEvtBasic", "OriginalMC");
    643644
    644645    // The second rule is for the case reading raw-files!
     
    664665    write.AddContainer("MTime",                     "Events",     kFALSE);
    665666    write.AddContainer("MRawEvtHeader",             "Events");
    666     write.AddContainer("MArrivalTime",              "Events",     kFALSE);
     667    //write.AddContainer("MArrivalTime",              "Events",     kFALSE);
    667668    write.AddContainer("MPointingPos",              "Events",     kFALSE);
    668669    // Slow-Control: Current-tree
     
    688689    write.AddContainer("MReportCC",                 "CC",         kFALSE);
    689690    write.AddContainer("MTimeCC",                   "CC",         kFALSE);
     691
     692    // Write the special MC tree
     693    MWriteRootFile writemc(2, fname, fOverwrite?"RECREATE":"NEW");
     694    writemc.SetName("WriteMC");
     695    writemc.AddContainer("MMcEvtBasic", "OriginalMC");
    690696
    691697    // Now setup tasklist for events
     
    754760    if (extractor2 || extractor1->InheritsFrom("MExtractTimeAndCharge"))
    755761      tlist2.AddToList(&fill7);
     762    tlist2.AddToList(&fill9);
    756763
    757764    tlist2.AddToList(&fillflorian);
  • trunk/MagicSoft/Mars/mjobs/MJCalibration.cc

    r6828 r6858  
    1919!   Author(s): Markus Gaug, 02/2004 <mailto:markus@ifae.es>
    2020!
    21 !   Copyright: MAGIC Software Development, 2000-2004
     21!   Copyright: MAGIC Software Development, 2000-2005
    2222!
    2323!
    2424\* ======================================================================== */
     25
    2526/////////////////////////////////////////////////////////////////////////////
    2627//
     
    178179const TString MJCalibration::fgReferenceFile = "mjobs/calibrationref.rc";
    179180const TString MJCalibration::fgHiLoCalibFile = "mjobs/hilocalib_df4.root";
     181
    180182// --------------------------------------------------------------------------
    181183//
     
    14791481
    14801482  TFile file(fHiLoCalibFile,"READ");
     1483  if (!file.IsOpen())
     1484  {
     1485    *fLog << err << "ERROR - Couldn't open hi-lo intercalibration file " << fHiLoCalibFile << " for reading..." << endl;
     1486    return kFALSE;
     1487  }
    14811488
    14821489  MCalibrationHiLoCam hilocam;
     
    17741781        plist.AddToList(&fIntensQECam);
    17751782        plist.AddToList(&fIntensCalibCam);
    1776         plist.AddToList(&fIntensBlindCam);
    17771783        //        plist.AddToList(&fIntensCalibrationPINDiode);
    17781784        plist.AddToList(&fIntensRelTimeCam);
    17791785        plist.AddToList(&fIntensBadCam);
     1786        if (IsUseBlindPixel())
     1787            plist.AddToList(&fIntensBlindCam);
    17801788    }
    17811789    else
     
    17831791        plist.AddToList(&fQECam);
    17841792        plist.AddToList(&fCalibrationCam);
    1785         plist.AddToList(&fCalibrationBlindCam);
    1786         plist.AddToList(&fCalibrationPINDiode);
    17871793        plist.AddToList(&fRelTimeCam);
     1794        if (IsUseBlindPixel())
     1795            plist.AddToList(&fCalibrationBlindCam);
     1796        if (IsUsePINDiode())
     1797            plist.AddToList(&fCalibrationPINDiode);
    17881798    }
    17891799
     
    18291839    MExtractBlindPixel       blindext;
    18301840
    1831     InitBlindPixel(blindext, blindcam);
     1841    if (IsUseBlindPixel())
     1842        InitBlindPixel(blindext, blindcam);
    18321843
    18331844    MExtractSlidingWindow    extract2;
     
    21572168Bool_t MJCalibration::WriteResult(MParList &plist)
    21582169{
     2170    if (IsNoStorage())
     2171        return kTRUE;
     2172
    21592173    TObjArray cont;
    21602174
    2161     if (!IsNoStorage())
    2162     {
    2163         if (IsIntensity())
    2164         {
    2165             cont.Add(&fIntensBadCam);
    2166             cont.Add(&fIntensCalibCam);
    2167             cont.Add(&fIntensQECam);
    2168             cont.Add(&fIntensBlindCam);
    2169         }
    2170         else
    2171         {
    2172             cont.Add(&fBadPixels);
    2173             cont.Add(&fCalibrationCam);
    2174             cont.Add(&fQECam);
    2175             cont.Add(&fCalibrationBlindCam);
    2176         }
    2177         cont.Add(&fCalibrationPINDiode);
    2178 
    2179         //if (IsRelTimes())
    2180         cont.Add(IsIntensity() ? (TObject*)&fIntensRelTimeCam : (TObject*)&fRelTimeCam);
    2181 
    2182         if (fExtractorCam.GetSize() != 0)
    2183           cont.Add(&fExtractorCam);
    2184        
    2185         TObject *pedcam = plist.FindObject("MPedestalCam");
    2186         if (!pedcam)
    2187           *fLog << warn << " - WARNING - MPedestalCam (fundamental)... not found for writing!" << endl;
    2188         else
    2189           cont.Add(pedcam);
    2190        
    2191         TObject *geom = plist.FindObject("MGeomCam");
    2192         if (!geom)
    2193             *fLog << warn << " - WARNING - MGeomCam... not found for writing!" << endl;
    2194         else
    2195             cont.Add(geom);
    2196     }
     2175    if (IsIntensity())
     2176    {
     2177        cont.Add(&fIntensBadCam);
     2178        cont.Add(&fIntensCalibCam);
     2179        cont.Add(&fIntensQECam);
     2180        cont.Add(&fIntensBlindCam);
     2181    }
     2182    else
     2183    {
     2184        cont.Add(&fBadPixels);
     2185        cont.Add(&fCalibrationCam);
     2186        cont.Add(&fQECam);
     2187        cont.Add(&fCalibrationBlindCam);
     2188    }
     2189    cont.Add(&fCalibrationPINDiode);
     2190
     2191    //if (IsRelTimes())
     2192    cont.Add(IsIntensity() ? (TObject*)&fIntensRelTimeCam : (TObject*)&fRelTimeCam);
     2193
     2194    if (fExtractorCam.GetSize() != 0)
     2195        cont.Add(&fExtractorCam);
     2196
     2197    TObject *pedcam = plist.FindObject("MPedestalCam");
     2198    if (!pedcam)
     2199        *fLog << warn << " - WARNING - MPedestalCam (fundamental)... not found for writing!" << endl;
     2200    else
     2201        cont.Add(pedcam);
     2202
     2203    TObject *geom = plist.FindObject("MGeomCam");
     2204    if (!geom)
     2205        *fLog << warn << " - WARNING - MGeomCam... not found for writing!" << endl;
     2206    else
     2207        cont.Add(geom);
    21972208
    21982209    if (IsHistsStorage())
  • trunk/MagicSoft/Mars/mjobs/MJPedestal.cc

    r6838 r6858  
    12331233    if (fIsPulsePosCheck)
    12341234      {
    1235 
    1236         MHCalibrationPulseTimeCam *hcam = (MHCalibrationPulseTimeCam*)plist.FindObject("MHCalibrationPulseTimeCam");
    1237         if (fIsPixelCheck)
     1235       
     1236        Int_t numhigainsamples = 0;
     1237        Int_t numlogainsamples = 0;
     1238        Float_t meanpulsetime  = 0.;
     1239        Float_t rmspulsetime   = 0.;
     1240
     1241        if (IsUseMC())
    12381242          {
    1239             hcam->DrawClone();
    1240             gPad->SaveAs(Form("%s/PulsePosTest_all.root",fPathOut.Data()));
    1241             MHCalibrationPix &pix = (*hcam)[fCheckedPixId];
    1242             pix.DrawClone();
    1243             gPad->SaveAs(Form("%s/PulsePosTest_Pixel%04d.root",fPathOut.Data(),fCheckedPixId));
    1244           }
    1245        
    1246         MCalibrationPulseTimeCam *cam = (MCalibrationPulseTimeCam*)plist.FindObject("MCalibrationPulseTimeCam");
    1247         MRawEvtData *data = (MRawEvtData*)plist.FindObject("MRawEvtData");
    1248         if (cam)
    1249           {
    1250             const Float_t meanpulsetime = cam->GetAverageArea(0).GetHiGainMean();
    1251             const Float_t rmspulsetime = cam->GetAverageArea(0).GetHiGainRms();
    1252             *fLog << all << "Mean pulse time (cosmics): " << meanpulsetime << "+-" << rmspulsetime << endl;
    1253             const Int_t newfirst = (Int_t)(meanpulsetime-fExtractWinLeft);
    1254             Int_t wshigain = fExtractor->InheritsFrom("MExtractTimeAndCharge")
    1255               ?  ((MExtractTimeAndCharge*)fExtractor)->GetWindowSizeHiGain()
    1256               : 6;
    1257             if (wshigain > 6)
    1258               wshigain = 6;
    1259             Int_t wslogain = fExtractor->InheritsFrom("MExtractTimeAndCharge")
    1260               ? ((MExtractTimeAndCharge*)fExtractor)->GetWindowSizeLoGain()
    1261               : 6;
    1262             if (wslogain > 6)
    1263               wslogain = 6;
    1264             const Int_t newlast  = (Int_t)(meanpulsetime+fExtractWinRight);
    1265             *fLog << all << underline
    1266                   << "Try to set new range limits: ("<<newfirst<<","<<newlast<<"+"<<wshigain
    1267                   <<","<<newfirst-1<<","<<newlast<<"+"<<wslogain<<")"<<endl;
    1268             if (newfirst < 0)
    1269               {
    1270                 *fLog << err << "Pulse is too much to the left, cannot go below 0! " << endl;
    1271                 return kFALSE;
    1272               }
    1273             if (newlast+wshigain > data->GetNumHiGainSamples()+data->GetNumLoGainSamples()-1)
    1274               {
    1275                 *fLog << err << "Pulse is too much to the right, cannot go beyond limits! " << endl;
    1276                 *fLog << " Cannot extract at all! ... " << endl;
    1277                 return kFALSE;
    1278               }
    1279             if (newlast+wslogain > data->GetNumLoGainSamples())
    1280               {
    1281                 *fLog << err << "Pulse is too much to the right, cannot go beyond logain limits! " << endl;
    1282                 *fLog << endl;
    1283                 *fLog << "Try to use a different extractor (e.g. with a window size of only 4 sl.) or:" << endl;
    1284                 *fLog << "Set the limit to a lower value (callisto.rc: line 310): " << endl;
    1285                 *fLog << "    MJPedestalY2:ExtractWinRight: 5.0           " << endl;
    1286                 *fLog << "(ATTENTION, you will lose late cosmics pulses!)" << endl;
    1287                 *fLog << endl;
    1288                 return kFALSE;
    1289               }
    1290             fExtractor->SetRange(newfirst,newlast+wshigain,
    1291                                  newfirst>0?newfirst-1:newfirst,data->GetNumLoGainSamples()-1);
    1292             /*if (!WriteExtractor())
    1293               {
    1294                 *fLog << err << "Could not write the changes to disk, abort... " << endl;
    1295                 return kFALSE;
    1296               }*/
     1243            //
     1244            // FIXME:
     1245            // The MC cannot run over the first 2000 pedestal events since almost all
     1246            // events are empty, therefore a pulse pos. check is not possible, either.
     1247            // For the moment, have to fix the problem hardcoded...
     1248            //
     1249            //            MMcEvt *evt = (MMcEvt*)plist.FindObject("MMcEvt");
     1250            //            const Float_t meanpulsetime = evt->GetFadcTimeJitter();
     1251            meanpulsetime = 4.5;
     1252            rmspulsetime  = 1.0;
     1253
     1254            *fLog << all << "Mean pulse time (MC): " << meanpulsetime << "+-" << rmspulsetime << endl;
     1255
     1256            numhigainsamples = 15;
     1257            numlogainsamples = 15;
     1258
    12971259          }
    12981260        else
    12991261          {
    1300             *fLog << err << "Could not determine mean pulse position, abort... " << endl;
     1262            MHCalibrationPulseTimeCam *hcam = (MHCalibrationPulseTimeCam*)plist.FindObject("MHCalibrationPulseTimeCam");
     1263            if (fIsPixelCheck)
     1264              {
     1265                hcam->DrawClone();
     1266                gPad->SaveAs(Form("%s/PulsePosTest_all.root",fPathOut.Data()));
     1267                MHCalibrationPix &pix = (*hcam)[fCheckedPixId];
     1268                pix.DrawClone();
     1269                gPad->SaveAs(Form("%s/PulsePosTest_Pixel%04d.root",fPathOut.Data(),fCheckedPixId));
     1270              }
     1271           
     1272            MCalibrationPulseTimeCam *cam = (MCalibrationPulseTimeCam*)plist.FindObject("MCalibrationPulseTimeCam");
     1273            if (!cam)
     1274              {
     1275                *fLog << err << "Could not determine mean pulse position, abort... " << endl;
     1276                return kFALSE;
     1277              }
     1278           
     1279            meanpulsetime = cam->GetAverageArea(0).GetHiGainMean();
     1280            rmspulsetime  = cam->GetAverageArea(0).GetHiGainRms();
     1281
     1282            *fLog << all << "Mean pulse time (cosmics): " << meanpulsetime << "+-" << rmspulsetime << endl;
     1283
     1284            MRawEvtData *data = (MRawEvtData*)plist.FindObject("MRawEvtData");
     1285
     1286            numhigainsamples = data->GetNumHiGainSamples();
     1287            numlogainsamples = data->GetNumLoGainSamples();
     1288          }
     1289       
     1290        //
     1291        // Get the ranges for the new extractor setting
     1292        //
     1293        const Int_t newfirst = (Int_t)(meanpulsetime-fExtractWinLeft);
     1294        Int_t wshigain = fExtractor->InheritsFrom("MExtractTimeAndCharge")
     1295          ?  ((MExtractTimeAndCharge*)fExtractor)->GetWindowSizeHiGain()
     1296          : 6;
     1297
     1298        if (wshigain > 6)
     1299          wshigain = 6;
     1300
     1301        Int_t wslogain = fExtractor->InheritsFrom("MExtractTimeAndCharge")
     1302          ? ((MExtractTimeAndCharge*)fExtractor)->GetWindowSizeLoGain()
     1303          : 6;
     1304        if (wslogain > 6)
     1305          wslogain = 6;
     1306
     1307        const Int_t newlast  = (Int_t)(meanpulsetime+fExtractWinRight);
     1308
     1309        *fLog << all << underline
     1310              << "Try to set new range limits: ("<<newfirst<<","<<newlast<<"+"<<wshigain
     1311              <<","<<newfirst-1<<","<<newlast<<"+"<<wslogain<<")"<<endl;
     1312        //
     1313        // Check the ranges for the new extractor setting
     1314        //
     1315        if (newfirst < 0)
     1316          {
     1317            *fLog << err << "Pulse is too much to the left, cannot go below 0! " << endl;
    13011318            return kFALSE;
    13021319          }
     1320        if (newlast+wshigain > numhigainsamples+numlogainsamples-1)
     1321          {
     1322            *fLog << err << "Pulse is too much to the right, cannot go beyond limits: "
     1323                  << numhigainsamples << "+" << numlogainsamples << "-1" << endl;
     1324            *fLog << " Cannot extract at all! ... " << endl;
     1325            return kFALSE;
     1326          }
     1327        if (newlast+wslogain > numlogainsamples)
     1328          {
     1329            *fLog << err << "Pulse is too much to the right, cannot go beyond logain limits! " << endl;
     1330            *fLog << endl;
     1331            *fLog << "Try to use a different extractor (e.g. with a window size of only 4 sl.) or:" << endl;
     1332            *fLog << "Set the limit to a lower value (callisto.rc: line 329): " << endl;
     1333            *fLog << "    MJPedestalY2:ExtractWinRight: 5.0           " << endl;
     1334            *fLog << "(ATTENTION, you will lose late cosmics pulses!)" << endl;
     1335            *fLog << endl;
     1336            return kFALSE;
     1337          }
     1338        //
     1339        // Set and store the new ranges
     1340        //
     1341        fExtractor->SetRange(newfirst,newlast+wshigain,
     1342                             newfirst>0?newfirst-1:newfirst,numlogainsamples-1);
    13031343      }
    13041344   
  • trunk/MagicSoft/Mars/mjobs/MJStar.cc

    r6561 r6858  
    203203    // ------------------ Setup histograms and fill tasks ----------------
    204204    MHCamEvent evt0a(0, "Cleaned", "Signal after Cleaning;;S [\\gamma]");
    205     MHCamEvent evt0b(0, "UsedPix", "Pixels marked Used;;Used [%]");
     205    MHCamEvent evt0b(0, "UsedPix", "Fraction of Events in which Pixels are used;;Fraction");
    206206    evt0b.SetThreshold(0);
    207207
  • trunk/MagicSoft/Mars/mjobs/MSequence.cc

    r6846 r6858  
    175175const TString MSequence::GetStandardPath(Bool_t raw) const
    176176{
    177     TString d = MString::Form("/data/MAGIC/Period%03d/", fPeriod);
    178     d += raw ? "rawdata/" : "rootdata/";
     177    TString d("/magic/data/");
     178    d += raw ? "rawfiles/" : "merpp/";
    179179    return d;
    180180}
     
    188188    {
    189189        d = GetStandardPath(raw);
    190         d += fNight.GetStringFmt("%Y_%m_%d");
     190        d += fNight.GetStringFmt("%Y/%m/%d");
    191191    }
    192192    else
Note: See TracChangeset for help on using the changeset viewer.