Changeset 5047 for trunk/MagicSoft
- Timestamp:
- 09/15/04 22:28:41 (20 years ago)
- Location:
- trunk/MagicSoft/Mars
- Files:
-
- 4 deleted
- 13 edited
Legend:
- Unmodified
- Added
- Removed
-
trunk/MagicSoft/Mars/mcalib/CalibLinkDef.h
r4986 r5047 17 17 #pragma link C++ class MCalibrationIntensityQECam+; 18 18 #pragma link C++ class MCalibrationIntensityRelTimeCam+; 19 #pragma link C++ class MCalibrationIntensityTestCam+; 19 20 #pragma link C++ class MCalibrationCam+; 20 21 #pragma link C++ class MCalibrationPix+; … … 36 37 #pragma link C++ class MCalibrationBlindCamOneOldStyle+; 37 38 #pragma link C++ class MCalibrationBlindCamTwoNewStyle+; 38 #pragma link C++ class MCalibrationChargeBlindCamOneOldStyle+;39 #pragma link C++ class MCalibrationChargeBlindCamTwoNewStyle+;40 39 #pragma link C++ class MCalibrationChargeBlindCam+; 41 40 #pragma link C++ class MCalibrationChargeBlindPix+; -
trunk/MagicSoft/Mars/mcalib/MCalibrationCam.cc
r5043 r5047 115 115 // -------------------------------------------------------------------------- 116 116 // 117 // Deletes the following TO bjArray's of MCalibrationPix containers (if exist):117 // Deletes the following TOrdCollection's of MCalibrationPix containers (if exist): 118 118 // - fPixels 119 119 // - fAverageAreas 120 120 // - fAverageSectors 121 121 // 122 // Deletes the following TO bjArray's of MBadPixelsPix containers (if exist):122 // Deletes the following TOrdCollection's of MBadPixelsPix containers (if exist): 123 123 // - fAverageBadAreas 124 124 // - fAverageBadSectors … … 149 149 // -------------------------------------- 150 150 // 151 // Calls the ForEach macro for the TO bjArrayfPixels with the argument Clear()151 // Calls the ForEach macro for the TOrdCollection fPixels with the argument Clear() 152 152 // 153 153 // Loops over the fAverageAreas, calling the function Clear() for … … 221 221 // ------------------------------------------------------------------- 222 222 // 223 // Initialize the objects inside the TOrdCollection using the 224 // virtual function Add(). 225 // 226 // 227 // InitSize can only increase the size, but not shrink. 228 // 229 // It can be called more than one time. New Containers are 230 // added only from the current size to the argument i. 223 231 // 224 232 void MCalibrationCam::InitSize(const UInt_t i) … … 230 238 return; 231 239 232 // Pixels->Expand(i);233 234 240 if (i>save) 235 241 Add(save,i); … … 257 263 // ------------------------------------------------------------------- 258 264 // 259 // Calls TObjArray::ExpandCreate() for:265 // Initialize the objects inside the TOrdCollections 260 266 // - fAverageAreas 261 267 // - fAverageBadAreas 268 // using the virtual function Add(). 269 // 270 // InitSize can only increase the size, but not shrink. 271 // 272 // It can be called more than one time. New Containers are 273 // added only from the current size to the argument i. 262 274 // 263 275 void MCalibrationCam::InitAverageAreas(const UInt_t i) … … 269 281 return; 270 282 271 //fAverageAreas->Expand(i);272 //fAverageBadAreas->Expand(i);273 274 283 fNumUnsuitable.Set(i); 275 284 fNumUnreliable.Set(i); … … 292 301 // ------------------------------------------------------------------- 293 302 // 294 // Calls TObjArray::ExpandCreate() for:303 // Initialize the objects inside the TOrdCollections 295 304 // - fAverageSectors 296 305 // - fAverageBadSectors 306 // using the virtual function Add(). 307 // 308 // InitSize can only increase the size, but not shrink. 309 // 310 // It can be called more than one time. New Containers are 311 // added only from the current size to the argument i. 297 312 // 298 313 void MCalibrationCam::InitAverageSectors(const UInt_t i) … … 304 319 return; 305 320 306 //fAverageSectors->Expand(i);307 //fAverageBadSectors->Expand(i);308 309 321 if (i < save) 310 322 return; … … 399 411 // -------------------------------------------------------------------------- 400 412 // 401 // Returns the current size of the TO bjArrayfAverageAreas413 // Returns the current size of the TOrdCollection fAverageAreas 402 414 // independently if the MCalibrationPix is filled with values or not. 403 415 // … … 409 421 // -------------------------------------------------------------------------- 410 422 // 411 // Returns the current size of the TO bjArrayfAverageSectors423 // Returns the current size of the TOrdCollection fAverageSectors 412 424 // independently if the MCalibrationPix is filled with values or not. 413 425 // … … 438 450 // -------------------------------------------------------------------------- 439 451 // 440 // Returns the current size of the TO bjArrayfPixels452 // Returns the current size of the TOrdCollection fPixels 441 453 // independently if the MCalibrationPix is filled with values or not. 442 454 // -
trunk/MagicSoft/Mars/mcalib/MCalibrationChargeCam.cc
r5045 r5047 81 81 ///////////////////////////////////////////////////////////////////////////// 82 82 #include "MCalibrationChargeCam.h" 83 #include "MCalibrationChargePix.h" 83 84 84 85 #include <TOrdCollection.h> … … 96 97 #include "MCalibrationQEPix.h" 97 98 98 #include "MCalibrationChargePix.h"99 99 #include "MCalibrationChargeBlindPix.h" 100 100 #include "MCalibrationChargePINDiode.h" … … 165 165 */ 166 166 167 167 // ------------------------------------------------------------------- 168 // 169 // Add MCalibrationChargePix's in the ranges from - to to fPixels 170 // 168 171 void MCalibrationChargeCam::Add(const UInt_t a, const UInt_t b) 169 172 { … … 172 175 } 173 176 174 177 // ------------------------------------------------------------------- 178 // 179 // Add MCalibrationChargePix's in the ranges from - to to fAverageAreas 180 // 175 181 void MCalibrationChargeCam::AddArea(const UInt_t a, const UInt_t b) 176 182 { … … 179 185 } 180 186 187 // ------------------------------------------------------------------- 188 // 189 // Add MCalibrationChargePix's in the ranges from - to to fAverageSectors 190 // 181 191 void MCalibrationChargeCam::AddSector(const UInt_t a, const UInt_t b) 182 192 { … … 583 593 } 584 594 585 // --------------------------------------------------------------------------586 //587 // Calls MCalibrationChargePix::DrawClone()588 //589 void MCalibrationChargeCam::DrawPixelContent(Int_t idx) const590 {591 MCalibrationChargePix &pix = (MCalibrationChargePix&)(*this)[idx];592 pix.DrawClone();593 }594 595 595 596 596 -
trunk/MagicSoft/Mars/mcalib/MCalibrationChargeCam.h
r5045 r5047 4 4 #ifndef MARS_MCalibrationCam 5 5 #include "MCalibrationCam.h" 6 #endif7 8 #ifndef ROOT_TArrayI9 #include <TArrayI.h>10 6 #endif 11 7 … … 36 32 void Clear ( Option_t *o="" ); 37 33 38 // Draws39 void DrawPixelContent(Int_t num) const;40 41 34 // Getters 42 35 Bool_t GetConversionFactorFFactor( Int_t ipx, Float_t &mean, Float_t &err, Float_t &ffactor ); -
trunk/MagicSoft/Mars/mcalib/MCalibrationQECam.cc
r5043 r5047 103 103 } 104 104 105 // ------------------------------------------------------------------- 106 // 107 // Add MCalibrationQEPix's in the ranges from - to to fPixels 108 // 105 109 void MCalibrationQECam::Add(const UInt_t a, const UInt_t b) 106 110 { … … 109 113 } 110 114 115 // ------------------------------------------------------------------- 116 // 117 // Add MCalibrationQEPix's in the ranges from - to to fAverageAreas 118 // 111 119 void MCalibrationQECam::AddArea(const UInt_t a, const UInt_t b) 112 120 { … … 115 123 } 116 124 125 // ------------------------------------------------------------------- 126 // 127 // Add MCalibrationQEPix's in the ranges from - to to fAverageSectors 128 // 117 129 void MCalibrationQECam::AddSector(const UInt_t a, const UInt_t b) 118 130 { … … 163 175 164 176 qecam.fFlags = fFlags; 165 166 177 qecam.fCorningBlues = fCorningBlues; 167 178 qecam.fCorningReds = fCorningReds; 168 179 169 }170 171 172 // --------------------------------------------------------------------------173 //174 // Not yet implemented175 //176 void MCalibrationQECam::DrawPixelContent(Int_t idx) const177 {178 return;179 180 } 180 181 -
trunk/MagicSoft/Mars/mcalib/MCalibrationQECam.h
r5018 r5047 33 33 protected: 34 34 35 MArrayD fCorningBlues; // !Corning blues of the pixels (if available)36 MArrayD fCorningReds; // !Corning reds of the pixels (if available)35 MArrayD fCorningBlues; // Corning blues of the pixels (if available) 36 MArrayD fCorningReds; //o Corning reds of the pixels (if available) 37 37 38 38 public: … … 44 44 45 45 // Others 46 void DrawPixelContent( Int_t num ) const;47 46 Bool_t GetPixelContent ( Double_t &val, Int_t idx, const MGeomCam &cam, Int_t type=0 ) const; 48 47 -
trunk/MagicSoft/Mars/mcalib/MCalibrationRelTimeCam.cc
r5043 r5047 261 261 } 262 262 263 // --------------------------------------------------------------------------264 //265 // Calls MCalibrationPix::DrawClone()266 //267 void MCalibrationRelTimeCam::DrawPixelContent(Int_t idx) const268 {269 (*this)[idx].DrawClone();270 }271 -
trunk/MagicSoft/Mars/mcalib/MCalibrationRelTimeCam.h
r5019 r5047 23 23 // Others 24 24 Bool_t GetPixelContent(Double_t &val, Int_t idx, const MGeomCam &cam, Int_t type=0) const; 25 void DrawPixelContent(Int_t num) const;26 25 27 26 ClassDef(MCalibrationRelTimeCam, 2) // Container Rel. Arrival Time Calibration Results Camera -
trunk/MagicSoft/Mars/mcalib/MCalibrationTestCam.cc
r4986 r5047 29 29 // same calibration run (see MHCalibrationTestCam and MHCalibrationTestPix). 30 30 // 31 // Contains TClonesArrays for the following objects:32 // - fPixels: Array of classes derived from MCalibrationTestPix, one entry33 // per pixel.34 // - fAverageAreas: Array of classes derived from MCalibrationTestPix, one entry35 // per pixel AREA.36 // - fAverageSectors: Array of classes derived from MCalibrationTestPix, one entry37 // per camera SECTOR.38 //39 // Averaged values over one whole area index (e.g. inner or outer pixels for40 // the MAGIC camera), can be retrieved via:41 // MCalibrationTestPix &avpix = fTestCam->GetAverageArea(i)42 //43 // Averaged values over one whole camera sector can be retrieved via:44 // MCalibrationTestPix &avpix = fTestCam->GetAverageSector(i)45 //46 31 // See also: MCalibrationTestPix, MCalibrationTestCalc, MCalibrationQECam 47 32 // MHCalibrationTestPix, MHCalibrationTestCam … … 51 36 #include "MCalibrationTestPix.h" 52 37 53 #include <T ClonesArray.h>38 #include <TOrdCollection.h> 54 39 55 40 #include "MLog.h" … … 89 74 fTitle = title ? title : "Storage container for the Calibration Test Information in the camera"; 90 75 91 fPixels = new TClonesArray("MCalibrationTestPix",1);92 fAverageAreas = new TClonesArray("MCalibrationTestPix",1);93 fAverageSectors = new TClonesArray("MCalibrationTestPix",1);94 95 76 Clear(); 96 }97 98 // --------------------------------------------------------------------------99 //100 // Deletes the following TClonesArray's of MCalibrationPix containers (if exist):101 // - fPixels102 // - fAverageAreas103 // - fAverageSectors104 //105 MCalibrationTestCam::~MCalibrationTestCam()106 {107 108 delete fPixels;109 delete fAverageAreas;110 delete fAverageSectors;111 112 77 } 113 78 … … 123 88 fNumUninterpolatedInMaxCluster = 0; 124 89 125 { fPixels ->ForEach(TObject, Clear)(); }126 { fAverageAreas ->ForEach(TObject, Clear)(); }127 { fAverageSectors->ForEach(TObject, Clear)(); }128 129 90 return; 130 91 } … … 132 93 // ------------------------------------------------------------------- 133 94 // 134 // Calls TClonesArray::ExpandCreate() for fPixels 135 // 136 void MCalibrationTestCam::InitSize(const UInt_t i) 137 { 138 fPixels->ExpandCreate(i); 95 // Add MCalibrationTestPix's in the ranges from - to to fPixels 96 // 97 void MCalibrationTestCam::Add(const UInt_t a, const UInt_t b) 98 { 99 for (UInt_t i=a; i<b; i++) 100 fPixels->AddAt(new MCalibrationTestPix,i); 139 101 } 140 102 141 103 // ------------------------------------------------------------------- 142 104 // 143 // Calls TClonesArray::ExpandCreate() for: 144 // - fAverageAreas 145 // 146 void MCalibrationTestCam::InitAverageAreas(const UInt_t i) 147 { 148 149 fAverageAreas->ExpandCreate(i); 150 151 for (UInt_t j=0; j<i; j++) 152 GetAverageArea(j).SetPixId(j); 153 154 fNumUninterpolated.Set(i); 105 // Add MCalibrationTestPix's in the ranges from - to to fAverageAreas 106 // 107 void MCalibrationTestCam::AddArea(const UInt_t a, const UInt_t b) 108 { 109 for (UInt_t i=a; i<b; i++) 110 fAverageAreas->AddAt(new MCalibrationTestPix,i); 155 111 } 156 112 157 113 // ------------------------------------------------------------------- 158 114 // 159 // Calls TClonesArray::ExpandCreate() for: 160 // - fAverageSectors 161 // 162 void MCalibrationTestCam::InitAverageSectors(const UInt_t i) 163 { 164 165 fAverageSectors->ExpandCreate(i); 166 167 for (UInt_t j=0; j<i; j++) 168 GetAverageSector(j).SetPixId(j); 169 170 } 171 172 // ------------------------------------------------------------------- 173 // 174 // Calls: 175 // - InitSize() 176 // - InitAverageAreas() 177 // - InitAverageSectors() 178 // 179 void MCalibrationTestCam::Init(const MGeomCam &geom) 180 { 181 182 InitSize (geom.GetNumPixels() ); 183 InitAverageAreas (geom.GetNumAreas() ); 184 InitAverageSectors(geom.GetNumSectors()); 185 } 186 187 // -------------------------------------------------------------------------- 188 // 189 // Returns the current size of the TClonesArray fAverageAreas 190 // independently if the MCalibrationPix is filled with values or not. 191 // 192 const Int_t MCalibrationTestCam::GetAverageAreas() const 193 { 194 return fAverageAreas->GetEntriesFast(); 195 } 196 197 // -------------------------------------------------------------------------- 198 // 199 // Returns the current size of the TClonesArray fAverageSectors 200 // independently if the MCalibrationPix is filled with values or not. 201 // 202 const Int_t MCalibrationTestCam::GetAverageSectors() const 203 { 204 return fAverageSectors->GetEntriesFast(); 205 } 206 207 208 // -------------------------------------------------------------------------- 209 // 210 // Get i-th pixel (pixel number) 211 // 212 MCalibrationTestPix &MCalibrationTestCam::operator[](UInt_t i) 213 { 214 return *static_cast<MCalibrationTestPix*>(fPixels->UncheckedAt(i)); 215 } 216 217 // -------------------------------------------------------------------------- 218 // 219 // Get i-th pixel (pixel number) 220 // 221 const MCalibrationTestPix &MCalibrationTestCam::operator[](UInt_t i) const 222 { 223 return *static_cast<MCalibrationTestPix*>(fPixels->UncheckedAt(i)); 224 } 225 226 // -------------------------------------------------------------------------- 227 // 228 // Returns the current size of the TClonesArray fPixels 229 // independently if the MCalibrationTestPix is filled with values or not. 230 // 231 const Int_t MCalibrationTestCam::GetSize() const 232 { 233 return fPixels->GetEntriesFast(); 234 } 235 236 // -------------------------------------------------------------------------- 237 // 238 // Get i-th average pixel (area number) 239 // 240 MCalibrationTestPix &MCalibrationTestCam::GetAverageArea(UInt_t i) 241 { 242 return *static_cast<MCalibrationTestPix*>(fAverageAreas->UncheckedAt(i)); 243 } 244 245 // -------------------------------------------------------------------------- 246 // 247 // Get i-th average pixel (area number) 248 // 249 const MCalibrationTestPix &MCalibrationTestCam::GetAverageArea(UInt_t i) const 250 { 251 return *static_cast<MCalibrationTestPix*>(fAverageAreas->UncheckedAt(i)); 252 } 253 254 // -------------------------------------------------------------------------- 255 // 256 // Get i-th average pixel (sector number) 257 // 258 MCalibrationTestPix &MCalibrationTestCam::GetAverageSector(UInt_t i) 259 { 260 return *static_cast<MCalibrationTestPix*>(fAverageSectors->UncheckedAt(i)); 261 } 262 263 // -------------------------------------------------------------------------- 264 // 265 // Get i-th average pixel (sector number) 266 // 267 const MCalibrationTestPix &MCalibrationTestCam::GetAverageSector(UInt_t i) const 268 { 269 return *static_cast<MCalibrationTestPix*>(fAverageSectors->UncheckedAt(i)); 270 } 115 // Add MCalibrationTestPix's in the ranges from - to to fAverageSectors 116 // 117 void MCalibrationTestCam::AddSector(const UInt_t a, const UInt_t b) 118 { 119 for (UInt_t i=a; i<b; i++) 120 fAverageSectors->AddAt(new MCalibrationTestPix,i); 121 } 122 271 123 272 124 // -------------------------------------------------------------------------- -
trunk/MagicSoft/Mars/mcalib/MCalibrationTestCam.h
r4882 r5047 2 2 #define MARS_MCalibrationTestCam 3 3 4 #ifndef MARS_MParContainer 5 #include "MParContainer.h" 6 #endif 7 8 #ifndef MARS_MCamEvent 9 #include "MCamEvent.h" 4 #ifndef MARS_MCalibrationCam 5 #include "MCalibrationCam.h" 10 6 #endif 11 7 … … 14 10 #endif 15 11 16 class TClonesArray; 17 class MCalibrationTestPix; 18 19 class MCalibrationTestCam : public MParContainer, public MCamEvent 12 class MCalibrationTestCam : public MCalibrationCam 20 13 { 21 14 private: … … 24 17 Int_t fNumUninterpolatedInMaxCluster; // Number of not interpolateable pixels in biggest cluster 25 18 26 TClonesArray *fPixels; //-> Array of MCalibrationTestPix, one per pixel27 TClonesArray *fAverageAreas; //-> Array of MCalibrationTestPix, one per pixel area28 TClonesArray *fAverageSectors; //-> Array of MCalibrationTestPix, one per camera sector19 void Add(const UInt_t a, const UInt_t b); 20 void AddArea(const UInt_t a, const UInt_t b); 21 void AddSector(const UInt_t a, const UInt_t b); 29 22 30 23 public: 31 24 32 25 MCalibrationTestCam(const char *name=NULL, const char *title=NULL); 33 ~MCalibrationTestCam();34 26 35 void Clear ( Option_t *o="");27 void Clear (Option_t *o=""); 36 28 37 // Getters38 const Int_t GetAverageAreas () const;39 MCalibrationTestPix &GetAverageArea ( UInt_t i );40 const MCalibrationTestPix &GetAverageArea ( UInt_t i ) const;41 MCalibrationTestPix &GetAverageSector ( UInt_t i );42 const Int_t GetAverageSectors () const;43 const MCalibrationTestPix &GetAverageSector ( UInt_t i ) const;44 29 const Int_t GetNumUninterpolated ( Int_t aidx ) const { 45 30 return fNumUninterpolated[aidx]; } … … 48 33 Bool_t GetPixelContent ( Double_t &val, Int_t idx, 49 34 const MGeomCam &cam, Int_t type=0) const; 50 const Int_t GetSize () const;51 52 MCalibrationTestPix &operator[] ( UInt_t i );53 const MCalibrationTestPix &operator[] ( UInt_t i ) const;54 55 // Inits56 void Init ( const MGeomCam &geom );57 void InitSize ( const UInt_t i );58 void InitAverageAreas ( const UInt_t i );59 void InitAverageSectors ( const UInt_t i );60 35 61 36 // Prints 62 void Print ( Option_t *o="") const;37 void Print (Option_t *o="") const; 63 38 64 39 // Setters -
trunk/MagicSoft/Mars/mcalib/Makefile
r4986 r5047 41 41 MCalibrationIntensityQECam.cc \ 42 42 MCalibrationIntensityRelTimeCam.cc \ 43 MCalibrationIntensityTestCam.cc \ 43 44 MCalibrationCam.cc \ 44 45 MCalibrationPix.cc \ … … 60 61 MCalibrationBlindCamOneOldStyle.cc \ 61 62 MCalibrationBlindCamTwoNewStyle.cc \ 62 MCalibrationChargeBlindCamOneOldStyle.cc \63 MCalibrationChargeBlindCamTwoNewStyle.cc \64 63 MCalibrationChargeBlindCam.cc \ 65 64 MCalibrationChargeBlindPix.cc \ -
trunk/MagicSoft/Mars/mhcalib/MHCalibrationChargeBlindCam.cc
r4986 r5047 323 323 *fLog << endl; 324 324 325 MCalibrationBlindCam *blindcam = fIntensBlind ? fIntensBlind->GetCam() : fBlindCam; 326 325 327 for (Int_t i=0; i<fHiGainArray->GetSize(); i++) 326 328 { … … 346 348 } 347 349 348 MCalibrationBlindPix &pix = fIntensCam 349 ? (MCalibrationBlindPix&)(*fIntensCam)[i] 350 : (MCalibrationBlindPix&)(*fCam)[i]; 350 MCalibrationBlindPix &pix = (MCalibrationBlindPix&)(*blindcam)[i]; 351 351 352 352 FitBlindPixel(hist,pix); -
trunk/MagicSoft/Mars/mhcalib/MHCalibrationChargeBlindCam.h
r4986 r5047 26 26 Axis_t fSPheCut; // Signal value upon which event considered as single-phe 27 27 28 MRawEvtData *fRawEvt; 28 MRawEvtData *fRawEvt; //! Raw event data 29 29 30 30 public: … … 32 32 enum FitFunc_t { kEPoisson4, kEPoisson5, 33 33 kEPoisson6, kEPoisson7, 34 kEPolya, kEMichele }; // Possible fit functions types (see MHCalibrationChargeBlindPix)34 kEPolya, kEMichele }; // Possible fit functions types (see MHCalibrationChargeBlindPix) 35 35 36 static const FitFunc_t fgFitFunc = kEPoisson4; 36 static const FitFunc_t fgFitFunc = kEPoisson4; //! Default for fFitFunc 37 37 38 38 private: 39 39 40 FitFunc_t fFitFunc; // The actual fit function type40 FitFunc_t fFitFunc; // The actual fit function type 41 41 42 42 Bool_t SetupHists (const MParList *pList ); … … 58 58 // Draw 59 59 void Draw(Option_t *opt=""); 60 void SetFitFunc( const FitFunc_t func=fgFitFunc ) { fFitFunc = func; }61 void SetSPheCut( const Axis_t a=fgSPheCut ) { fSPheCut = a;}60 void SetFitFunc( const FitFunc_t func=fgFitFunc ) { fFitFunc = func; } 61 void SetSPheCut( const Axis_t a =fgSPheCut ) { fSPheCut = a; } 62 62 63 63 ClassDef(MHCalibrationChargeBlindCam, 1) // Histogram class for Blind Pixel Calibration
Note:
See TracChangeset
for help on using the changeset viewer.