Changeset 3199 for trunk


Ignore:
Timestamp:
02/16/04 15:37:25 (21 years ago)
Author:
tbretz
Message:
*** empty log message ***
Location:
trunk/MagicSoft/Mars
Files:
7 edited

Legend:

Unmodified
Added
Removed
  • trunk/MagicSoft/Mars/Changelog

    r3196 r3199  
    3030
    3131
     32
    3233 2004/02/16: Thomas Bretz
    3334
     
    9798     - fixed usage of logging stream output levels
    9899
     100   * manalysis/MPedCalcPedRun.[h,cc]:
     101     - removed obsolete fSignals
     102
     103     - removed obsolete fNumPixels
     104
     105   * manalysis/MPedestalCam.h:
     106     - added '->' to fArray
     107
     108   * mfileio/MWriteRootFile.cc:
     109     - changed some output to make debugging easier
     110
     111   * mjobs/MJCalibration.cc:
     112     - fixed a bug in drawing
     113
     114   * mjobs/MJExtractSignal.cc:
     115     - removed MPedestalCam from MWriteRootFile output.
     116       When creating the branch it crashes - reason unknown I'll
     117       investigate further
     118
     119
    99120
    100121 2004/02/16: Markus Gaug
     
    115136     - changed function GetNumPixels to GetSize
    116137
    117    * macros/bootcampstandardanalysis.C
    118    * macros/pedphotcalc.C
     138   * macros/bootcampstandardanalysis.C, macros/pedphotcalc.C
    119139     - included cosmics rejection which was in MCalibrationCalc before
     140
    120141
    121142
  • trunk/MagicSoft/Mars/manalysis/MPedCalcPedRun.cc

    r3039 r3199  
    108108//
    109109MPedCalcPedRun::MPedCalcPedRun(const char *name, const char *title)
    110     : fRawEvt(NULL), fPedestals(NULL), fSignals(NULL)
     110    : fRawEvt(NULL), fPedestals(NULL)
    111111{
    112112    fName  = name  ? name  : "MPedCalcPedRun";
     
    121121void MPedCalcPedRun::Clear(const Option_t *o)
    122122{
    123 
    124   fNumHiGainSamples = 0;
    125   fNumPixels        = 0;
    126   fNumSamplesTot    = 0;
    127  
    128   fRawEvt    = NULL;
    129   fPedestals = NULL;
    130   fSignals   = NULL;
    131 
    132   return;
    133  
     123    fNumHiGainSamples = 0;
     124    fNumSamplesTot    = 0;
     125
     126    fRawEvt    = NULL;
     127    fPedestals = NULL;
    134128}
    135129
     
    148142Int_t MPedCalcPedRun::PreProcess( MParList *pList )
    149143{
     144    Clear();
     145
    150146    fRawEvt = (MRawEvtData*)pList->FindObject("MRawEvtData");
    151147    if (!fRawEvt)
     
    159155        return kFALSE;
    160156
    161     fSignals = (MExtractedSignalCam*)pList->FindObject("MExtractedSignalCam");
    162 
    163     fNumSamplesTot=0;
    164 
    165157    return kTRUE;
    166158}
     
    186178            return kTRUE;
    187179
    188     fNumPixels = fPedestals->GetSize();
    189 
    190     if(fSumx.GetSize()==0)
    191       {
    192         fSumx.Set(fNumPixels);
    193         fSumx2.Set(fNumPixels);
     180    Int_t n = fPedestals->GetSize();
     181
     182    if (fSumx.GetSize()==0)
     183    {
     184        fSumx.Set(n);
     185        fSumx2.Set(n);
    194186
    195187        fSumx.Reset();
    196188        fSumx2.Reset();
    197       }
     189    }
    198190
    199191    // Calculate an even number for the hi gain samples to avoid
  • trunk/MagicSoft/Mars/manalysis/MPedCalcPedRun.h

    r3190 r3199  
    11#ifndef MARS_MPedCalcPedRun
    22#define MARS_MPedCalcPedRun
    3 
    4 /////////////////////////////////////////////////////////////////////////////
    5 //                                                                         //
    6 // MPedCalcPedRun                                                          //
    7 //                                                                         //
    8 // Evaluate the pedestals from pedestal runs                               //
    9 //                                                                         //
    10 /////////////////////////////////////////////////////////////////////////////
    113
    124#ifndef MARS_MTask
     
    146#endif
    157
     8#ifndef ROOT_TArrayF
    169#include <TArrayF.h>
     10#endif
    1711
    1812class MRawEvtData;
    1913class MPedestalCam;
    20 class MExtractedSignalCam;
    2114
    2215class MPedCalcPedRun : public MTask
    2316{
    24     Byte_t   fNumHiGainSamples;
    25     UShort_t fNumPixels;
    26     UInt_t   fNumSamplesTot;
     17    Byte_t fNumHiGainSamples;
     18    UInt_t fNumSamplesTot;
    2719
    28     MRawEvtData         *fRawEvt;     // raw event data (time slices)
    29     MPedestalCam        *fPedestals;  // Pedestals of all pixels in the camera
    30     MExtractedSignalCam *fSignals;    // Signals of all pixels in the camera   
     20    MRawEvtData  *fRawEvt;     // raw event data (time slices)
     21    MPedestalCam *fPedestals;  // Pedestals of all pixels in the camera
    3122
    3223    TArrayF fSumx;   // sum of values
  • trunk/MagicSoft/Mars/manalysis/MPedestalCam.h

    r3190 r3199  
    1313class MGeomCam;
    1414class MPedestalPix;
     15
    1516class MPedestalCam : public MCamEvent, public MParContainer
    1617{
    1718private:
     19    TClonesArray *fArray;  //-> FIXME: Change TClonesArray away from a pointer?
     20    UInt_t fTotalEntries;  // Total number of times, the Process was executed (to estimate the error of pedestal)
    1821
    19   TClonesArray *fArray;  // FIXME: Change TClonesArray away from a pointer?
    20   UInt_t fTotalEntries;  // Total number of times, the Process was executed (to estimate the error of pedestal)
    21  
    2222public:
    23   MPedestalCam(const char *name=NULL, const char *title=NULL);
    24   ~MPedestalCam();
    25  
    26   void Clear(Option_t *o="");
    27  
    28   void InitSize(const UInt_t i);
    29  
    30   MPedestalPix &operator[](Int_t i);
    31   const MPedestalPix &operator[](Int_t i) const;
     23    MPedestalCam(const char *name=NULL, const char *title=NULL);
     24    ~MPedestalCam();
    3225
    33   // Setters
    34   void SetTotalEntries(const UInt_t n)    { fTotalEntries = n; }
     26    void Clear(Option_t *o="");
    3527
    36   // Getters
    37   UInt_t GetSize()                          const;
    38   UInt_t GetTotalEntries()                  const { return fTotalEntries; }
     28    void InitSize(const UInt_t i);
    3929
    40   Float_t GetPedestalMin(const MGeomCam *cam) const;
    41   Float_t GetPedestalMax(const MGeomCam *cam) const;
    42  
    43   void Print(Option_t *o="") const;
    44  
    45   Bool_t GetPixelContent(Double_t &val, Int_t idx, const MGeomCam &cam, Int_t type=0) const;
    46   void DrawPixelContent(Int_t idx) const;
    47  
    48   ClassDef(MPedestalCam, 1)     // Storage Container for all pedestal information of the camera
     30    MPedestalPix &operator[](Int_t i);
     31    const MPedestalPix &operator[](Int_t i) const;
     32
     33    // Setters
     34    void SetTotalEntries(const ULong_t n) { fTotalEntries = n; }
     35
     36    // Getters
     37    Int_t   GetSize()         const;
     38    ULong_t GetTotalEntries() const { return fTotalEntries; }
     39
     40    Float_t GetPedestalMin(const MGeomCam *cam) const;
     41    Float_t GetPedestalMax(const MGeomCam *cam) const;
     42
     43    void Print(Option_t *o="") const;
     44
     45    Bool_t GetPixelContent(Double_t &val, Int_t idx, const MGeomCam &cam, Int_t type=0) const;
     46    void DrawPixelContent(Int_t idx) const;
     47
     48    ClassDef(MPedestalCam, 1)   // Storage Container for all pedestal information of the camera
    4949};
    5050
    5151#endif
    52 
  • trunk/MagicSoft/Mars/mfileio/MWriteRootFile.cc

    r2604 r3199  
    357357        // The containers should be written in Splitlevel=1
    358358        //
     359        *fLog << inf << "Creating Branch " << cname << " of " << cont->ClassName() << "... " << flush;
     360
    359361        TString branchname(cname);
    360362        branchname.Append(".");
     
    366368        if (!branch)
    367369        {
     370            *fLog << endl;
    368371            *fLog << err << "Unable to create branch '" << cname << "'." << endl;
    369372            return kFALSE;
    370373        }
    371374
     375        *fLog << "done." << endl;
     376
    372377        //
    373378        // Tell the entry also which branch belongs to it (this is necessary
     
    375380        //
    376381        entry->SetBranch(branch);
    377         *fLog << inf << "Created Branch " << cname << " of " << cont->ClassName() << "." << endl;
    378382    }
    379383    return kTRUE;
  • trunk/MagicSoft/Mars/mjobs/MJCalibration.cc

    r3143 r3199  
    204204
    205205    // Create histograms to display
    206     MHCamera disp1  (geomcam, "Cal;Charge",         "Fitted Mean Charges");
    207     MHCamera disp2  (geomcam, "Cal;SigmaCharge",    "Sigma of Fitted Charges");
    208     MHCamera disp3  (geomcam, "Cal;FitProb",        "Probability of Fit");
    209     MHCamera disp4  (geomcam, "Cal;RSigma",         "Reduced Sigmas");
    210     MHCamera disp5  (geomcam, "Cal;RSigma/Charge",  "Reduced Sigma per Charge");
    211     MHCamera disp6  (geomcam, "Cal;FFactorPhe",     "Nr. of Phe's (F-Factor Method)");
    212     MHCamera disp7  (geomcam, "Cal;FFactorConv",    "Conversion Factor (F-Factor Method)");
    213     MHCamera disp8  (geomcam, "Cal;FFactorFFactor", "Total F-Factor (F-Factor Method)");
    214     MHCamera disp9  (geomcam, "Cal;BlindPixPh",     "Photon flux inside plexiglass (Blind Pixel Method)");
    215     MHCamera disp10 (geomcam, "Cal;BlindPixConv",   "Conversion Factor (Blind Pixel Method)");
    216     MHCamera disp11 (geomcam, "Cal;BlindPixFFactor","Total F-Factor (Blind Pixel Method)");
    217     MHCamera disp12 (geomcam, "Cal;PINDiodePh",     "Photons flux outside plexiglass (PIN Diode Method)");
    218     MHCamera disp13 (geomcam, "Cal;PINDiodeConv",   "Conversion Factor (PIN Diode Method)");
    219     MHCamera disp14 (geomcam, "Cal;PINDiodeFFactor","Total F-Factor (PIN Diode Method)");
    220     MHCamera disp15 (geomcam, "Cal;Excluded",       "Pixels previously excluded");
    221     MHCamera disp16 (geomcam, "Cal;NotFitted",      "Pixels that could not be fitted");
    222     MHCamera disp17 (geomcam, "Cal;NotFitValid",    "Pixels with not valid fit results");
    223     MHCamera disp18 (geomcam, "Cal;Oscillation",    "Oscillating Pixels");
    224     MHCamera disp19 (geomcam, "Cal;Saturation",     "Pixels with saturated Hi Gain");
    225 
     206    MHCamera disp1 (geomcam, "Cal;Charge",         "Fitted Mean Charges");
     207    MHCamera disp2 (geomcam, "Cal;SigmaCharge",    "Sigma of Fitted Charges");
     208    MHCamera disp3 (geomcam, "Cal;FitProb",        "Probability of Fit");
     209    MHCamera disp4 (geomcam, "Cal;RSigma",         "Reduced Sigmas");
     210    MHCamera disp5 (geomcam, "Cal;RSigma/Charge",  "Reduced Sigma per Charge");
     211    MHCamera disp6 (geomcam, "Cal;FFactorPhe",     "Nr. of Phe's (F-Factor Method)");
     212    MHCamera disp7 (geomcam, "Cal;FFactorConv",    "Conversion Factor (F-Factor Method)");
     213    MHCamera disp8 (geomcam, "Cal;FFactorFFactor", "Total F-Factor (F-Factor Method)");
     214    MHCamera disp9 (geomcam, "Cal;BlindPixPh",     "Photon flux inside plexiglass (Blind Pixel Method)");
     215    MHCamera disp10(geomcam, "Cal;BlindPixConv",   "Conversion Factor (Blind Pixel Method)");
     216    MHCamera disp11(geomcam, "Cal;BlindPixFFactor","Total F-Factor (Blind Pixel Method)");
     217    MHCamera disp12(geomcam, "Cal;PINDiodePh",     "Photons flux outside plexiglass (PIN Diode Method)");
     218    MHCamera disp13(geomcam, "Cal;PINDiodeConv",   "Conversion Factor (PIN Diode Method)");
     219    MHCamera disp14(geomcam, "Cal;PINDiodeFFactor","Total F-Factor (PIN Diode Method)");
     220    MHCamera disp15(geomcam, "Cal;Excluded",       "Pixels previously excluded");
     221    MHCamera disp16(geomcam, "Cal;NotFitted",      "Pixels that could not be fitted");
     222    MHCamera disp17(geomcam, "Cal;NotFitValid",    "Pixels with not valid fit results");
     223    MHCamera disp18(geomcam, "Cal;Oscillation",    "Oscillating Pixels");
     224    MHCamera disp19(geomcam, "Cal;Saturation",     "Pixels with saturated Hi Gain");
    226225
    227226    // Fitted charge means and sigmas
     
    272271    disp19.SetCamContent(fCalibrationCam,31);
    273272
    274 
    275     disp1.SetYTitle("Charge [FADC units]");
    276     disp2.SetYTitle("\\sigma_{Charge} [FADC units]");
    277     disp3.SetYTitle("P_{Charge} [1]");
    278 
    279     disp4.SetYTitle("\\sqrt{\\sigma^{2}_{Charge} - RMS^{2}_{Ped}} [FADC Counts]");
    280     disp5.SetYTitle("Reduced Sigma / Mean Charge [1]");
    281 
    282     disp6.SetYTitle("Nr. Photo-Electrons [1]");
    283     disp7.SetYTitle("Conversion Factor [PhE/FADC Count]");
    284     disp8.SetYTitle("\\sqrt{N_{PhE}}*\\sigma_{Charge}/\\mu_{Charge} [1]");
    285 
    286     disp9.SetYTitle("Photon flux [ph/mm^2]");
    287     disp10.SetYTitle("Conversion Factor [Phot/FADC Count]");
    288     disp11.SetYTitle("\\sqrt{N_{Ph}}*\\sigma_{Charge}/\\mu_{Charge} [1]");
    289 
    290     disp12.SetYTitle("Photon flux [ph/mm^2]");
    291     disp13.SetYTitle("Conversion Factor [Phot/FADC Count]");
    292     disp14.SetYTitle("\\sqrt{N_{Ph}}*\\sigma_{Charge}/\\mu_{Charge} [1]");
     273    disp1.SetYTitle("Q [FADC units]");
     274    disp2.SetYTitle("\\sigma_{Q} [FADC units]");
     275    disp3.SetYTitle("P_{Q} [1]");
     276
     277    disp4.SetYTitle("\\sqrt{\\sigma^{2}_{Q} - RMS^{2}_{Ped}} [FADC Counts]");
     278    disp5.SetYTitle("Red.Sigma/<Q> [1]");
     279
     280    disp6.SetYTitle("PhE [#]");
     281    disp7.SetYTitle("Conv.Factor [PhE/FADC units]");
     282    disp8.SetYTitle("\\sqrt{N_{PhE}}*\\sigma_{Q}/\\mu_{Q} [1]");
     283
     284    disp9.SetYTitle("Phot.flux [ph/mm^{2}]");
     285    disp10.SetYTitle("Conv.Factor [Phot/FADC Count]");
     286    disp11.SetYTitle("\\sqrt{N_{Ph}}*\\sigma_{Q}/\\mu_{Q} [1]");
     287
     288    disp12.SetYTitle("Phot.flux [ph/mm^{2}]");
     289    disp13.SetYTitle("Conv.Factor [Phot/FADC Count]");
     290    disp14.SetYTitle("\\sqrt{N_{Ph}}*\\sigma_{Q}/\\mu_{Q} [1]");
    293291
    294292    disp15.SetYTitle("[1]");
     
    357355    c8.Divide(1,3);
    358356
    359     CamDraw(c8, 1, 4, disp19, 0);
    360 
     357    CamDraw(c8, 1, 1, disp19, 0);
    361358}
    362359
     
    495492    // when the calibration hardware-trigger is working)
    496493    //
    497     MFCosmics            cosmics;
    498     MContinue            cont(&cosmics);
     494    MFCosmics cosmics;
     495    MContinue cont(&cosmics);
    499496
    500497    //
  • trunk/MagicSoft/Mars/mjobs/MJExtractSignal.cc

    r3069 r3199  
    298298    *fLog << endl;
    299299
     300    // Setup Lists
     301    MParList plist;
     302    plist.AddToList(&pedcam);
     303
     304    MTaskList tlist;
     305    plist.AddToList(&tlist);
     306
     307    // Setup Parameters
     308
     309    // Make sure, that at least an empty MBadPixelsCam is available
     310    // This is necessary for input which don't contain a MBadPixelsCam
     311    MBadPixelsCam badcam;
     312    plist.AddToList(&badcam);
     313
     314    // Setup Task-lists
    300315    MReadMarsFile read("Events");
    301316    read.DisableAutoScheme();
    302317    static_cast<MRead&>(read).AddFiles(*fRuns);
    303318
    304     // Setup Tasklist
    305     MParList plist;
    306     plist.AddToList(&pedcam);
    307 
    308     MTaskList tlist;
    309     plist.AddToList(&tlist);
    310 
    311319    MGeomApply      apply; // Only necessary to craete geometry
    312320    MBadPixelsMerge merge(&fBadPixels);
     
    320328    write.AddContainer("MExtractedSignalCam", "Events");
    321329    write.AddContainer("MTime",               "Events");
     330    // FIXME: CRAHSES! write.AddContainer("MPedestalCam",        "RunHeaders");
    322331    write.AddContainer("MRawRunHeader",       "RunHeaders");
    323     write.AddContainer("MPedestalCam",        "RunHeaders");
    324332    write.AddContainer("MBadPixelsCam",       "RunHeaders");
    325333
Note: See TracChangeset for help on using the changeset viewer.