Changeset 1961 for trunk/MagicSoft/Mars/mhist
- Timestamp:
- 04/17/03 08:03:48 (22 years ago)
- Location:
- trunk/MagicSoft/Mars/mhist
- Files:
-
- 2 edited
Legend:
- Unmodified
- Added
- Removed
-
trunk/MagicSoft/Mars/mhist/MHSigmaTheta.cc
r1956 r1961 27 27 // MHSigmaTheta (extension of Robert's MHSigmabarTheta) // 28 28 // // 29 // calculates - the 2D-histogram sigmabar vs. Theta, and // 29 // calculates - the 1D-histogram ID of blind pixels 30 // - the 1D-histogram no.of pixels in MCerPhotEvt, and // 31 // - the 2D-histogram sigmabar vs. Theta, and // 30 32 // - the 3D-histogram sigma, pixel no., Theta // 31 33 // - the 3D-histogram (sigma^2-sigmabar^2), pixel no., Theta // … … 68 70 fName = name ? name : "MHSigmaTheta"; 69 71 fTitle = title ? title : "2D histogram sigmabar vs. Theta"; 72 73 fNpix.SetDirectory(NULL); 74 fNpix.SetName("1D-Npix"); 75 fNpix.SetTitle("1D : no.of used pixels in MCerPhotEvt"); 76 fNpix.SetXTitle("no. of used pixels in MCerPhotEvt"); 77 fNpix.SetYTitle("Counts"); 78 79 fBlindId.SetDirectory(NULL); 80 fBlindId.SetName("1D-BlindId"); 81 fBlindId.SetTitle("1D : Id of blind pixel"); 82 fBlindId.SetXTitle("Id of blind pixel"); 83 fBlindId.SetYTitle("Counts"); 70 84 71 85 fSigmaTheta.SetDirectory(NULL); … … 164 178 165 179 MBinning binspix("BinningPixel"); 166 binspix.SetEdges(npix, -0.5, -0.5+npix ); 167 180 binspix.SetEdges(npix+1, -0.5, 0.5+npix ); 181 182 SetBinning(&fNpix, &binspix); 183 SetBinning(&fBlindId, &binspix); 168 184 SetBinning(&fSigmaPixTheta, binstheta, &binspix, binssigma); 169 185 SetBinning(&fDiffPixTheta, binstheta, &binspix, binsdiff); … … 183 199 Double_t mySig = fSigmabar->Calc(*fCam, *fPed, *fEvt); 184 200 201 //*fLog << "MHSigmaTheta::Fill; theta, mySig = " << theta << ", " 202 // << mySig << endl; 203 185 204 fSigmaTheta.Fill(theta, mySig); 186 205 187 206 const UInt_t npix = fEvt->GetNumPixels(); 207 208 Int_t npixused=0; 188 209 for (UInt_t i=0; i<npix; i++) 189 210 { 190 211 MCerPhotPix cerpix = fEvt->operator[](i); 191 212 if (!cerpix.IsPixelUsed()) 213 { 214 fBlindId.Fill( cerpix.GetPixId() ); 192 215 continue; 193 194 /* 216 } 217 npixused++; 218 219 /* 195 220 if (cerpix.GetNumPhotons() == 0) 196 221 continue; 197 */222 */ 198 223 199 224 const Int_t id = cerpix.GetPixId(); … … 203 228 const Double_t area = fCam->GetPixRatio(id); 204 229 230 205 231 fSigmaPixTheta.Fill(theta, (Double_t)id, sigma); 206 232 207 233 const Double_t diff = sigma*sigma/area - mySig*mySig; 208 234 fDiffPixTheta.Fill(theta, (Double_t)id, diff); 235 236 //*fLog << "theta, id, sigma, diff, area = " << theta << ", " << id 237 // << ", " 238 // << sigma << ", " << diff << ", " << area << endl; 209 239 } 240 fNpix.Fill(npixused); 210 241 211 242 return kTRUE; … … 277 308 l->SetBit(kCanDelete);; 278 309 310 //c.cd(8); 311 //((TH2*)&fDiffPixTheta)->DrawCopy(opt); 312 279 313 c.cd(8); 280 ((TH 2*)&fDiffPixTheta)->DrawCopy(opt);314 ((TH1*)&fBlindId)->DrawCopy(opt); 281 315 282 316 … … 306 340 k->SetBit(kCanDelete);; 307 341 342 //c.cd(9); 343 //((TH2*)&fSigmaPixTheta)->DrawCopy(opt); 344 308 345 c.cd(9); 309 ((TH 2*)&fSigmaPixTheta)->DrawCopy(opt);346 ((TH1*)&fNpix)->DrawCopy(opt); 310 347 311 348 //-------------------------------------------------------------------- -
trunk/MagicSoft/Mars/mhist/MHSigmaTheta.h
r1951 r1961 32 32 MMcEvt *fMcEvt; //! 33 33 34 TH2D fSigmaTheta; // 2D-distribution sigmabar versus Theta; sigmabar is the average pedestasl sigma in an event 34 TH1D fNpix; // 1D-distribution no.of pixels in MCerPhotEvt; 35 TH1D fBlindId; // 1D-distribution Id of blind pixel; 36 TH2D fSigmaTheta; // 2D-distribution sigmabar versus Theta; 37 // sigmabar is the average pedestasl sigma in an event 35 38 TH3D fSigmaPixTheta; // 3D-distr.:Theta, pixel, pedestal sigma 36 39 TH3D fDiffPixTheta; // 3D-distr.:Theta, pixel, sigma^2-sigmabar^2
Note:
See TracChangeset
for help on using the changeset viewer.