Changeset 4669
- Timestamp:
- 08/17/04 23:31:30 (20 years ago)
- Location:
- trunk/MagicSoft/Mars
- Files:
-
- 4 added
- 10 edited
Legend:
- Unmodified
- Added
- Removed
-
trunk/MagicSoft/Mars/Changelog
r4663 r4669 22 22 23 23 2004/08/17: Markus Gaug 24 25 * msignal/MExtractBlindPixel.[h,cc] 26 - remove fModified which is taken care of in MJCalibration by the 27 correct initialization 28 29 * mcalib/MCalibrationChargeBlindCam.[h,cc] 30 - now a base class for different types of blind pixels cams. 31 - moved fBlindPixels away from pointer, analogue to MGeomCam 32 33 * mcalib/MHCalibrationChargeBlindCam.[h,cc] 34 - updated to new call to GetNumBlindPixels() 35 36 * mcalib/Makefile 37 * mcalib/CalibLinkDef.h 38 * mcalib/MCalibrationChargeBlindCamOneOldStyle.[h,cc] 39 * mcalib/MCalibrationChargeBlindCamTwoNewStye.[h,cc] 40 - new classes deriving from and intializing 41 MCalibrationChargeBlindCam 42 43 * mcalib/MCalibrationChargeBlindPix.[h,cc] 44 - derive from MCalibrationPix instead of MCalibrationChargePix 45 - create possibility to intialize QE's, etc. from outside 46 - fix default to previous behaviour such that old code can still 47 run on old files without changes 24 48 25 49 * macros/calibration.C -
trunk/MagicSoft/Mars/mcalib/CalibLinkDef.h
r4649 r4669 23 23 #pragma link C++ class MCalibrationChargeCam+; 24 24 #pragma link C++ class MCalibrationChargePix+; 25 #pragma link C++ class MCalibrationChargeBlindCamOneOldStyle+; 26 #pragma link C++ class MCalibrationChargeBlindCamTwoNewStyle+; 25 27 #pragma link C++ class MCalibrationChargeBlindCam+; 26 28 #pragma link C++ class MCalibrationChargeBlindPix+; -
trunk/MagicSoft/Mars/mcalib/MCalibrationChargeBlindCam.cc
r4401 r4669 27 27 // MCalibrationChargeBlindCam 28 28 // 29 // Base class for Blind Pixels Calibration results. 29 // Base class for Blind Pixels Calibration results. Derived classes intialize 30 // the actual values of the MCalibrationBlindPix's. 30 31 // 31 32 // Contains TClonesArrays for the following objects: … … 36 37 // - InitSize() 37 38 // 39 // See also: MCalibrationChargeBlindCamOneOldStyle 40 // 38 41 ///////////////////////////////////////////////////////////////////////////// 39 42 #include "MCalibrationChargeBlindCam.h" … … 41 44 42 45 #include "MCalibrationCam.h" 43 #include "MCalibrationPix.h" 44 45 #include "MLog.h" 46 #include "MLogManip.h" 47 48 #include <TClonesArray.h> 46 #include "MParContainer.h" 49 47 50 48 ClassImp(MCalibrationChargeBlindCam); … … 54 52 // 55 53 // Default constructor. 56 //57 // Set the following pointer to NULL:58 // - fBlindPixels59 54 // 60 55 // Initializes: … … 68 63 // has to be performed in order to get the dimension correctly. 69 64 // 70 MCalibrationChargeBlindCam::MCalibrationChargeBlindCam( const char *name, const char *title)71 : f PulserColor(MCalibrationCam::kNONE),72 f BlindPixels(NULL),73 f Valid(kFALSE)65 MCalibrationChargeBlindCam::MCalibrationChargeBlindCam(UInt_t nblind,const char *name, const char *title) 66 : fNumBlindPixels(nblind), 67 fPulserColor(MCalibrationCam::kNONE), 68 fBlindPixels(nblind) 74 69 { 70 75 71 fName = name ? name : "MCalibrationChargeBlindCam"; 76 fTitle = title ? title : "C ontainer for the Calibration Information of the blind pixels in thecamera";72 fTitle = title ? title : "Calibration Information of blinded pixels in camera"; 77 73 78 fBlindPixels = new TClonesArray("MCalibrationChargeBlindPix",1); 74 // 75 // make sure that the destructor delete all contained objects 76 // 77 fBlindPixels.SetOwner(); 78 79 for (UInt_t i=0; i<nblind; i++) 80 fBlindPixels[i] = new MCalibrationChargeBlindPix; 81 79 82 } 80 83 81 // --------------------------------------------------------------------------82 //83 // Deletes the following TClonesArray's of MCalibrationPix containers (if exist):84 // - fBlindPixels85 //86 MCalibrationChargeBlindCam::~MCalibrationChargeBlindCam()87 {88 89 //90 // delete fBlindPixels should delete all Objects stored inside91 //92 delete fBlindPixels;93 94 }95 84 96 85 // -------------------------------------- … … 100 89 void MCalibrationChargeBlindCam::Clear(Option_t *o) 101 90 { 102 103 fBlindPixels->ForEach(TObject, Clear)(); 104 105 return; 91 fBlindPixels.ForEach(TObject, Clear)(); 106 92 } 107 93 108 94 // ----------------------------------------------------- 109 95 // 110 // own copy function to do the initialization correctly96 // copy 'constructor' 111 97 // 112 98 void MCalibrationChargeBlindCam::Copy(TObject& object) const 113 99 { 114 100 101 MParContainer::Copy(object); 102 115 103 MCalibrationChargeBlindCam &calib = (MCalibrationChargeBlindCam&)object; 116 117 MParContainer::Copy(calib); 118 119 calib.fPulserColor = fPulserColor; 120 121 const Int_t n3 = GetSize(); 122 if (n3 != 0) 104 calib.fPulserColor = fPulserColor; 105 calib.fNumBlindPixels = fNumBlindPixels; 106 107 for (UInt_t i=0; i<fNumBlindPixels; i++) 123 108 { 124 calib.InitSize(n3); 125 for (int i=0; i<n3; i++) 126 (*this)[i].Copy(calib[i]); 109 calib.fBlindPixels[i] = new MCalibrationChargeBlindPix; 110 (*this)[i].Copy(calib[i]); 127 111 } 128 129 112 } 130 131 // -------------------------------------------------------------------132 //133 // Calls TClonesArray::ExpandCreate() for fBlindPixels134 //135 void MCalibrationChargeBlindCam::InitSize(const UInt_t i)136 {137 fBlindPixels->ExpandCreate(i);138 }139 140 113 141 114 // -------------------------------------------------------------------------- … … 145 118 MCalibrationChargeBlindPix &MCalibrationChargeBlindCam::operator[](UInt_t i) 146 119 { 147 return *static_cast<MCalibrationChargeBlindPix*>(fBlindPixels ->UncheckedAt(i));120 return *static_cast<MCalibrationChargeBlindPix*>(fBlindPixels.UncheckedAt(i)); 148 121 } 149 122 … … 154 127 const MCalibrationChargeBlindPix &MCalibrationChargeBlindCam::operator[](UInt_t i) const 155 128 { 156 return *static_cast<MCalibrationChargeBlindPix*>(fBlindPixels ->UncheckedAt(i));129 return *static_cast<MCalibrationChargeBlindPix*>(fBlindPixels.UncheckedAt(i)); 157 130 } 131 158 132 159 133 // -------------------------------------------------------------------------- 160 134 // 161 // Returns the current size of the TClonesArray fBlindPixels 162 // independently if the MCalibrationChargeBlindPix is filled with values or not. 163 // 164 const Int_t MCalibrationChargeBlindCam::GetSize() const 165 { 166 return fBlindPixels->GetEntriesFast(); 167 } 168 169 // -------------------------------------------------------------------------- 170 // 171 // Print first the results of the pixels 172 // and then the ones which are not FitValid 135 // Print the results of the blind pixels 173 136 // 174 137 void MCalibrationChargeBlindCam::Print(Option_t *o) const 175 138 { 176 139 177 *fLog << all << GetDescriptor() << ":" << endl; 178 int id = 0; 179 180 *fLog << all << "Calibrated Blind pixels:" << endl; 181 *fLog << all << endl; 182 183 TIter Next(fBlindPixels); 184 MCalibrationChargeBlindPix *pix; 185 while ((pix=(MCalibrationChargeBlindPix*)Next())) 186 { 187 188 if (pix->IsSinglePheFitOK()) 189 { 190 191 *fLog << all 192 << Form("%s%3i","BlindPixel: ",pix->GetPixId()) 193 << Form("%s%4.2f%s%4.2f"," Lambda: ",pix->GetLambda(),"+-",pix->GetLambdaErr()) 194 << Form("%s%4.2f%s%4.2f"," Mu0: ",pix->GetMu0(),"+-",pix->GetMu0Err()) 195 << Form("%s%4.2f%s%4.2f"," Mu1: ",pix->GetMu1(),"+-",pix->GetMu1Err()) 196 << Form("%s%4.2f%s%4.2f"," Sigma0: ",pix->GetSigma0(),"+-",pix->GetSigma0Err()) 197 << Form("%s%4.2f%s%4.2f"," Sigma1: ",pix->GetSigma1(),"+-",pix->GetSigma1Err()) 198 << endl; 199 *fLog << all 200 << " Pedestal Fit OK? :" << pix->IsPedestalFitOK() 201 << Form("%s%4.2f%s%4.2f"," Lambda (Check): " ,pix->GetLambdaCheck(),"+-",pix->GetLambdaCheckErr()) << endl; 202 *fLog << all 203 << " Flux available? :" << pix->IsFluxInsidePlexiglassAvailable() 204 << Form("%s%4.2f%s%4.2f"," Flux: " ,pix->GetFluxInsidePlexiglass(),"+-",pix->GetFluxInsidePlexiglassErr()) 205 << endl; 206 id++; 207 } 208 } 209 *fLog << all << id << " blind pixels OK" << endl; 210 id = 0; 211 212 TIter Next2(fBlindPixels); 213 while ((pix=(MCalibrationChargeBlindPix*)Next2())) 214 { 215 216 if (!pix->IsSinglePheFitOK()) 217 { 218 219 *fLog << all 220 << Form("%s%3i","BlindPixel: ",pix->GetPixId()) 221 << Form("%s%4.2f%s%4.2f"," Lambda: ",pix->GetLambda(),"+-",pix->GetLambdaErr()) 222 << Form("%s%4.2f%s%4.2f"," Mu0: ",pix->GetMu0(),"+-",pix->GetMu0Err()) 223 << Form("%s%4.2f%s%4.2f"," Mu1: ",pix->GetMu1(),"+-",pix->GetMu1Err()) 224 << Form("%s%4.2f%s%4.2f"," Sigma0: ",pix->GetSigma0(),"+-",pix->GetSigma0Err()) 225 << Form("%s%4.2f%s%4.2f"," Sigma1: ",pix->GetSigma1(),"+-",pix->GetSigma1Err()) 226 << endl; 227 *fLog << all 228 << " Pedestal Fit OK? :" << pix->IsPedestalFitOK() 229 << Form("%s%4.2f%s%4.2f"," Lambda (Check): " ,pix->GetLambdaCheck(),"+-",pix->GetLambdaCheckErr()) << endl; 230 *fLog << all 231 << " Flux available? :" << pix->IsFluxInsidePlexiglassAvailable() 232 << Form("%s%4.2f%s%4.2f"," Flux: " ,pix->GetFluxInsidePlexiglass(),"+-",pix->GetFluxInsidePlexiglassErr()) 233 << endl; 234 id++; 235 } 236 } 237 *fLog << all << id << " blind pixels NOT OK" << endl; 238 140 fBlindPixels.Print(); 239 141 } -
trunk/MagicSoft/Mars/mcalib/MCalibrationChargeBlindCam.h
r4401 r4669 1 1 #ifndef MARS_MCalibrationChargeBlindCam 2 2 #define MARS_MCalibrationChargeBlindCam 3 4 #ifndef MARS_MParContainer 5 #include "MParContainer.h" 6 #endif 7 8 #ifndef ROOT_TObjArray 9 #include <TObjArray.h> 10 #endif 3 11 4 12 #ifndef MARS_MCalibrationCam … … 7 15 8 16 class MCalibrationChargeBlindPix; 9 class TClonesArray;10 17 class MCalibrationChargeBlindCam : public MParContainer 11 18 { 12 19 private: 13 20 21 UInt_t fNumBlindPixels; // Number of blind pixels 22 14 23 MCalibrationCam::PulserColor_t fPulserColor; // Colour of the pulsed LEDs 15 24 16 TClonesArray *fBlindPixels; //-> Array of MCalibrationChargeBlindPix 17 18 Bool_t fValid; 25 TObjArray fBlindPixels; // Array of MCalibrationChargeBlindPix 19 26 20 27 public: 21 MCalibrationChargeBlindCam(const char *name=NULL, const char *title=NULL); 22 ~MCalibrationChargeBlindCam();28 29 MCalibrationChargeBlindCam(UInt_t nblind=0,const char *name=NULL, const char *title=NULL); 23 30 24 31 void Clear ( Option_t *o="" ); 25 32 void Copy ( TObject& obj ) const; 26 33 27 34 // Getters 28 const Int_t GetSize() const;29 constMCalibrationCam::PulserColor_t GetColor() const { return fPulserColor; }35 UInt_t GetNumBlindPixels() const { return fNumBlindPixels; } 36 MCalibrationCam::PulserColor_t GetColor() const { return fPulserColor; } 30 37 31 38 MCalibrationChargeBlindPix &operator[] ( UInt_t i ); 32 39 const MCalibrationChargeBlindPix &operator[] ( UInt_t i ) const; 33 40 34 Bool_t IsValid() const { return fValid; }35 36 41 // Setters 37 42 void SetColor ( const MCalibrationCam::PulserColor_t col ) { fPulserColor = col; } 38 void SetValid () { fValid = kTRUE; }39 43 40 // Inits41 void InitSize( const UInt_t i);42 43 44 // Prints 44 45 void Print(Option_t *o="") const; 45 46 46 ClassDef(MCalibrationChargeBlindCam, 1) // Container Blind Pixel Calibration Results Camera47 ClassDef(MCalibrationChargeBlindCam, 2) // Container Blind Pixel Calibration Results Camera 47 48 }; 48 49 -
trunk/MagicSoft/Mars/mcalib/MCalibrationChargeBlindPix.h
r4230 r4669 6 6 #endif 7 7 8 #ifndef MARS_MCalibration ChargePix9 #include "MCalibration ChargePix.h"8 #ifndef MARS_MCalibrationPix 9 #include "MCalibrationPix.h" 10 10 #endif 11 11 12 class MCalibrationChargeBlindPix : public MCalibration ChargePix12 class MCalibrationChargeBlindPix : public MCalibrationPix 13 13 { 14 14 private: 15 15 16 static const Float_t gkBlindPixelArea; //! The Blind Pixel area in mm^2 17 static const Float_t gkBlindPixelAttGreen; //! Attenuation Filter at 520 nm 18 static const Float_t gkBlindPixelAttBlue ; //! Attenuation Filter at 460 nm 19 static const Float_t gkBlindPixelAttUV ; //! Attenuation Filter at 370 nm 20 static const Float_t gkBlindPixelAttCT1 ; //! Attenuation Filter at 370 nm 21 static const Float_t gkBlindPixelQEUnCoatedGreen; //! Quantum Efficiency at 520 nm 22 static const Float_t gkBlindPixelQEUnCoatedBlue ; //! Quantum Efficiency at 460 nm 23 static const Float_t gkBlindPixelQEUnCoatedUV ; //! Quantum Efficiency at 370 nm 24 static const Float_t gkBlindPixelQEUnCoatedCT1 ; //! Quantum Efficiency at 370 nm 25 static const Float_t gkBlindPixelQEUnCoatedGreenErr; //! Uncertainty QEUnCoated at 520 nm 26 static const Float_t gkBlindPixelQEUnCoatedBlueErr ; //! Uncertainty QEUnCoated at 460 nm 27 static const Float_t gkBlindPixelQEUnCoatedUVErr ; //! Uncertainty QEUnCoated at 370 nm 28 static const Float_t gkBlindPixelQEUnCoatedCT1Err ; //! Uncertainty QEUnCoated at 370 nmu 29 static const Float_t gkBlindPixelQECoatedGreen; //! Quantum Efficiency at 520 nm 30 static const Float_t gkBlindPixelQECoatedBlue ; //! Quantum Efficiency at 460 nm 31 static const Float_t gkBlindPixelQECoatedUV ; //! Quantum Efficiency at 370 nm 32 static const Float_t gkBlindPixelQECoatedCT1 ; //! Quantum Efficiency at 370 nm 33 static const Float_t gkBlindPixelQECoatedGreenErr; //! Uncertainty QECoated at 520 nm 34 static const Float_t gkBlindPixelQECoatedBlueErr ; //! Uncertainty QECoated at 460 nm 35 static const Float_t gkBlindPixelQECoatedUVErr ; //! Uncertainty QECoated at 370 nm 36 static const Float_t gkBlindPixelQECoatedCT1Err ; //! Uncertainty QECoated at 370 nmu 37 static const Float_t gkBlindPixelCollectionEff; //! Collection Efficiency 38 static const Float_t gkBlindPixelCollectionEffErr; //! Uncertainty Collection Efficiency 16 static const Float_t fgArea; //! The Blind Pixel area in mm^2 17 static const Float_t fgAttGreen; //! Attenuation Filter at 520 nm 18 static const Float_t fgAttBlue ; //! Attenuation Filter at 460 nm 19 static const Float_t fgAttUV ; //! Attenuation Filter at 370 nm 20 static const Float_t fgAttCT1 ; //! Attenuation Filter at 370 nm 21 static const Float_t fgAttErr; //! Error Att. Filter at all w.l. 22 static const Float_t fgQEGreen; //! Quantum Efficiency at 520 nm 23 static const Float_t fgQEBlue ; //! Quantum Efficiency at 460 nm 24 static const Float_t fgQEUV ; //! Quantum Efficiency at 370 nm 25 static const Float_t fgQECT1 ; //! Quantum Efficiency at 370 nm 26 static const Float_t fgQEErrGreen; //! Uncertainty QEUnCoated at 520 nm 27 static const Float_t fgQEErrBlue; //! Uncertainty QEUnCoated at 460 nm 28 static const Float_t fgQEErrUV ; //! Uncertainty QEUnCoated at 370 nm 29 static const Float_t fgQEErrCT1 ; //! Uncertainty QEUnCoated at 370 nmu 30 static const Float_t fgCollEffGreen; //! Collecttion Efficiency 31 static const Float_t fgCollEffBlue; //! Collecttion Efficiency 32 static const Float_t fgCollEffUV; //! Collecttion Efficiency 33 static const Float_t fgCollEffCT1; //! Collecttion Efficiency 34 static const Float_t fgCollEffErr; //! Uncertainty Collection Efficiency 39 35 40 Float_t fLambda; // Mean Poisson fit 41 Float_t fLambdaCheck; // Mean Pedestal Check (Gauss) fit 42 Float_t fLambdaCheckErr; // Error mean pedestal Check fit 43 Float_t fLambdaVar; // Variance lambda Poisson fit 44 Float_t fFluxInsidePlexiglass; // Number photons in INNER PIXEL inside the plexiglass 45 Float_t fFluxInsidePlexiglassVar; // Variance number of photons in INNER PIXEL 46 Float_t fMu0; // Position pedestal peak 47 Float_t fMu0Err; // Error pos. pedestal-peak 48 Float_t fMu1; // Position first photo-electron peak 49 Float_t fMu1Err; // Error pos. first photo-electon peak 50 Float_t fSigma0; // Width pedestal peak 51 Float_t fSigma0Err; // Error width pedestal peak 52 Float_t fSigma1; // Width first photo-electron peak 53 Float_t fSigma1Err; // Error width first photo-electron peak 36 Float_t fArea; // Blind Pixel Area 37 TArrayF fAtt; // Attenuation filter (per color) 38 TArrayF fAttErr; // Error attnuation filter (per color) 39 TArrayF fQE; // Quantum eff. (per color) 40 TArrayF fQEErr; // Error Quantum eff. (per color) 41 TArrayF fCollEff; // Coll eff. (per color) 42 TArrayF fCollEffErr; // Error coll. eff. (per color) 43 44 Float_t fLambda; // Mean Poisson fit 45 Float_t fLambdaCheck; // Mean Pedestal Check (Gauss) fit 46 Float_t fLambdaCheckErr; // Error mean pedestal Check fit 47 Float_t fLambdaVar; // Variance lambda Poisson fit 48 Float_t fFluxInsidePlexiglass; // Number photons in INNER PIXEL inside the plexiglass 49 Float_t fFluxInsidePlexiglassVar; // Variance number of photons in INNER PIXEL 50 Float_t fMu0; // Position pedestal peak 51 Float_t fMu0Err; // Error pos. pedestal-peak 52 Float_t fMu1; // Position first photo-electron peak 53 Float_t fMu1Err; // Error pos. first photo-electon peak 54 Float_t fSigma0; // Width pedestal peak 55 Float_t fSigma0Err; // Error width pedestal peak 56 Float_t fSigma1; // Width first photo-electron peak 57 Float_t fSigma1Err; // Error width first photo-electron peak 54 58 55 59 enum { kOscillating, kPedestalFitOK, kSinglePheFitOK, kChargeFitValid, 56 kFluxInsidePlexiglassAvailable , kCoated };60 kFluxInsidePlexiglassAvailable }; // Possible validity flags 57 61 58 MCalibrationCam::PulserColor_t fColor; 62 MCalibrationCam::PulserColor_t fColor; // Colour of the used pulser light 59 63 60 const Float_t GetBlindPixelQEGreen() const; 61 const Float_t GetBlindPixelQEBlue () const; 62 const Float_t GetBlindPixelQEUV () const; 63 const Float_t GetBlindPixelQECT1 () const; 64 65 const Float_t GetBlindPixelQEGreenRelVar () const; 66 const Float_t GetBlindPixelQEBlueRelVar () const; 67 const Float_t GetBlindPixelQEUVRelVar () const; 68 const Float_t GetBlindPixelQECT1RelVar () const; 69 const Float_t GetBlindPixelCollectionEffRelVar () const; 70 71 public: 64 public: 72 65 73 66 MCalibrationChargeBlindPix(const char *name=NULL, const char *title=NULL); 74 ~MCalibrationChargeBlindPix() {}75 67 76 68 Bool_t CalcFluxInsidePlexiglass(); … … 78 70 79 71 // Getters 80 MCalibrationCam::PulserColor_t GetColor () const { return fColor; } 81 Float_t GetLambda () const { return fLambda; } 82 Float_t GetLambdaErr () const; 83 Float_t GetLambdaRelVar () const; 84 Float_t GetLambdaCheck () const { return fLambdaCheck; } 85 Float_t GetLambdaCheckErr () const { return fLambdaCheckErr; } 86 Float_t GetFluxInsidePlexiglass () const { return fFluxInsidePlexiglass; } 87 Float_t GetFluxInsidePlexiglassErr () const; 88 Float_t GetFluxInsidePlexiglassRelVar () const; 89 Float_t GetMu0 () const { return fMu0; } 90 Float_t GetMu0Err () const { return fMu0Err; } 91 Float_t GetMu1 () const { return fMu1; } 92 Float_t GetMu1Err () const { return fMu1Err; } 93 Float_t GetSigma0 () const { return fSigma0; } 94 Float_t GetSigma0Err () const { return fSigma0Err; } 95 Float_t GetSigma1 () const { return fSigma1; } 96 Float_t GetSigma1Err () const { return fSigma1Err; } 72 const Float_t GetAtt () const; 73 const Float_t GetAttRelVar () const; 74 const Float_t GetQE () const; 75 const Float_t GetQERelVar () const; 76 const Float_t GetCollEff () const; 77 const Float_t GetCollEffRelVar() const; 97 78 98 Bool_t IsCoated () const; 99 Bool_t IsOscillating () const; 100 Bool_t IsChargeFitValid () const; 101 Bool_t IsPedestalFitOK () const; 102 Bool_t IsSinglePheFitOK () const; 103 Bool_t IsFluxInsidePlexiglassAvailable () const; 79 const MCalibrationCam::PulserColor_t GetColor () const { return fColor; } 80 const Float_t GetLambda () const { return fLambda; } 81 const Float_t GetLambdaErr () const; 82 const Float_t GetLambdaRelVar () const; 83 const Float_t GetLambdaCheck () const { return fLambdaCheck; } 84 const Float_t GetLambdaCheckErr () const { return fLambdaCheckErr; } 85 const Float_t GetFluxInsidePlexiglass () const { return fFluxInsidePlexiglass; } 86 const Float_t GetFluxInsidePlexiglassErr () const; 87 const Float_t GetFluxInsidePlexiglassRelVar () const; 88 const Float_t GetMu0 () const { return fMu0; } 89 const Float_t GetMu0Err () const { return fMu0Err; } 90 const Float_t GetMu1 () const { return fMu1; } 91 const Float_t GetMu1Err () const { return fMu1Err; } 92 const Float_t GetSigma0 () const { return fSigma0; } 93 const Float_t GetSigma0Err () const { return fSigma0Err; } 94 const Float_t GetSigma1 () const { return fSigma1; } 95 const Float_t GetSigma1Err () const { return fSigma1Err; } 96 97 const Bool_t IsOscillating () const; 98 const Bool_t IsChargeFitValid () const; 99 const Bool_t IsPedestalFitOK () const; 100 const Bool_t IsSinglePheFitOK () const; 101 const Bool_t IsFluxInsidePlexiglassAvailable () const; 102 103 void Print(Option_t *opt=NULL) const; 104 104 105 105 // Setters 106 void SetArea ( Float_t f ) { fArea = f; } 107 void SetAtt ( Float_t f, const MCalibrationCam::PulserColor_t col ) { fAtt [col] = f; } 108 void SetAttErr ( Float_t f, const MCalibrationCam::PulserColor_t col ) { fAttErr [col] = f; } 109 void SetQE ( Float_t f, const MCalibrationCam::PulserColor_t col ) { fQE [col] = f; } 110 void SetQEErr ( Float_t f, const MCalibrationCam::PulserColor_t col ) { fQEErr [col] = f; } 111 void SetCollEff ( Float_t f, const MCalibrationCam::PulserColor_t col ) { fCollEff [col] = f; } 112 void SetCollEffErr( Float_t f, const MCalibrationCam::PulserColor_t col ) { fCollEffErr[col] = f; } 113 106 114 void SetColor ( const MCalibrationCam::PulserColor_t color ) { fColor = color; } 107 115 void SetLambda ( const Float_t f ) { fLambda = f; } … … 118 126 void SetSigma1Err ( const Float_t f ) { fSigma1Err = f; } 119 127 120 void SetCoated ( const Bool_t b=kTRUE );121 128 void SetOscillating ( const Bool_t b=kTRUE ); 122 129 void SetChargeFitValid ( const Bool_t b=kTRUE ); … … 125 132 void SetFluxInsidePlexiglassAvailable( const Bool_t b=kTRUE); 126 133 127 ClassDef(MCalibrationChargeBlindPix, 2) // Container Charge Calibration Results Blind Pixel134 ClassDef(MCalibrationChargeBlindPix, 3) // Container Charge Calibration Results Blind Pixel 128 135 }; 129 136 130 137 #endif 131 132 133 134 -
trunk/MagicSoft/Mars/mcalib/MHCalibrationChargeBlindCam.cc
r4602 r4669 189 189 if (!fCam) 190 190 { 191 *fLog << err << "Cannot find nor create MCalibrationChargeBlindCam ... abort." << endl; 192 return kFALSE; 193 } 194 195 fCam->InitSize(nblindpixels); 191 *fLog << err << "Cannot find nor create MCalibrationChargeBlindCam ... abort." << endl; 192 return kFALSE; 193 } 194 195 if (fCam->GetNumBlindPixels() != nblindpixels) 196 { 197 *fLog << err << "Size mismatch in MCalibrationChargeBlindCam ... abort." << endl; 198 *fLog << err << "Size of MCalibrationChargeBlindCam: " << fCam->GetNumBlindPixels() 199 << "Size of MExtractedSignalBlindPixel: " << nblindpixels << endl; 200 return kFALSE; 201 } 202 196 203 197 204 const Int_t samples = fSignal->GetNumFADCSamples(); -
trunk/MagicSoft/Mars/mcalib/MHCalibrationChargeBlindPix.cc
r4641 r4669 484 484 } 485 485 486 fBlindPix->SetValid(kTRUE);487 488 486 fMeanPedestal = fSignal->GetPed(); 489 487 fMeanPedestalErr = fSignal->GetPedErr(); … … 499 497 500 498 FitPedestal(); 499 500 fBlindPix->SetValid(kTRUE); 501 501 502 502 if (FitSinglePhe()) -
trunk/MagicSoft/Mars/mcalib/Makefile
r4649 r4669 48 48 MCalibrationChargeCam.cc \ 49 49 MCalibrationChargePix.cc \ 50 MCalibrationChargeBlindCamOneOldStyle.cc \ 51 MCalibrationChargeBlindCamTwoNewStyle.cc \ 50 52 MCalibrationChargeBlindCam.cc \ 51 53 MCalibrationChargeBlindPix.cc \ -
trunk/MagicSoft/Mars/msignal/MExtractBlindPixel.cc
r4606 r4669 70 70 using namespace std; 71 71 72 const Int_t MExtractBlindPixel::fgNumBlindPixels = 2;73 const UInt_t MExtractBlindPixel::fgBlindPixelIds[3] = { 559, 560, 561 };74 72 const UInt_t MExtractBlindPixel::fgBlindPixelIdx = 559; 75 73 const Byte_t MExtractBlindPixel::fgHiGainFirst = 10; … … 140 138 // 141 139 // Initializes: 142 // - fModified to kFALSE143 140 // - fBlindPixelIdx to 0 144 141 // - fExtractionType to 0 … … 155 152 { 156 153 157 fModified = kFALSE;158 154 fExtractionType = 0; 159 155 … … 244 240 delete [] fHiGainSecondDeriv; 245 241 246 if (fModified) 247 { 248 for (Int_t i=0;i<fNumBlindPixels;i++) 249 { 250 SetBlindPixelIdx(fgBlindPixelIds[i],i); 251 fBlindPixel->SetBlindPixelIdx(fgBlindPixelIds[i],i); 252 } 253 } 254 else 255 fBlindPixel->SetBlindPixelIdx(fBlindPixelIdx.At(0)); 242 for (Int_t i=0;i<fNumBlindPixels;i++) 243 fBlindPixel->SetBlindPixelIdx(fBlindPixelIdx.At(i),i); 256 244 257 245 fBlindPixel->SetExtractionType(fExtractionType); -
trunk/MagicSoft/Mars/msignal/MExtractBlindPixel.h
r4605 r4669 15 15 private: 16 16 17 static const Int_t fgNumBlindPixels; //! Default number of blind pixels after modification run18 static const UInt_t fgBlindPixelIds[3]; //! Default blind pixel indices after modification run19 17 static const UInt_t fgBlindPixelIdx; //! Default blind pixels index before modification run 20 18 static const Byte_t fgHiGainFirst; //! Default First FADC slice Hi-Gain Signal (currently set to: 10 ) … … 38 36 Int_t fNSBFilterLimit; // Limit of sum of FADC slices for filter part 39 37 40 Bool_t fModified; // Is the run taken after the modifications?41 38 Byte_t fExtractionType; // What extraction type has been chosen? 42 43 39 Int_t fNumBlindPixels; // Current number of blind pixels 44 40 … … 73 69 void SetExtractionType( const ExtractionType_t typ=kAmplitude ); 74 70 void SetNSBFilterLimit( const Int_t lim=fgNSBFilterLimit ) { fNSBFilterLimit = lim; } 75 void SetModified ( const Bool_t b=kTRUE) { fModified = b; }76 71 77 void SetNumBlindPixels( const Int_t num= fgNumBlindPixels) { fNumBlindPixels = num; }72 void SetNumBlindPixels( const Int_t num=1 ) { fNumBlindPixels = num; } 78 73 79 74 void SetRange ( const Byte_t hifirst=0, const Byte_t hilast=0,
Note:
See TracChangeset
for help on using the changeset viewer.