Changeset 2106 for trunk/MagicSoft/Mars
- Timestamp:
- 05/09/03 13:34:33 (22 years ago)
- Location:
- trunk/MagicSoft/Mars
- Files:
-
- 6 edited
Legend:
- Unmodified
- Added
- Removed
-
trunk/MagicSoft/Mars/Changelog
r2105 r2106 13 13 - do not underline if eNoColors is set 14 14 - fixed abug in Output() (last character missing when flushed) 15 - same when flushing to the GUI 15 16 16 17 * mbase/MLogManip.cc: … … 38 39 - deleted the fCalcPixNum variable (not used). 39 40 41 * macros/star.C, macros/starct1.C: 42 - updated 43 44 * mhist/MBinning.cc: 45 - fixed SetBinningCos 46 47 * mhist/MHSigmaTheta.[h,cc]: 48 - in setting of binnings changes npix+1 to npix 49 (SetEdges takes the number of _bins_ as argument) 50 - fixed titles (LaTeX style) 51 - added default binning (may have to be changed for Magic) 52 - removed obsolete destructor 53 - removed default canvas size of 900x900 54 - temporarily removed SetLogy() for first pad. I'm searching 55 for a solution to put it in again when using the status display 40 56 41 57 -
trunk/MagicSoft/Mars/mbase/MLog.cc
r2104 r2106 266 266 267 267 // for the gui remove trailing characters ('\n' or '\0') 268 fBase[ len-1]='\0';268 fBase[flushed ? len : len-1]='\0'; 269 269 270 270 // add new text to line storage -
trunk/MagicSoft/Mars/mfileio/MReadTree.cc
r2100 r2106 240 240 SetBit(kChainWasChanged); 241 241 242 *fLog << warn << "WARNING: No files '" << fname << "'added to " << GetDescriptor() << endl;242 *fLog << warn << "WARNING: '" << fname << "' not added to " << GetDescriptor() << endl; 243 243 244 244 return numfiles; -
trunk/MagicSoft/Mars/mhist/MBinning.cc
r1668 r2106 108 108 fEdges.Set(nbins+1); 109 109 for (int i=0; i<=nbins; i++) 110 fEdges[i] = (acos(binsize*i) + ld)*kRad2Deg;110 fEdges[i] = acos(cos(ld)-binsize*i)*kRad2Deg; 111 111 112 112 fType = kIsCosinic; -
trunk/MagicSoft/Mars/mhist/MHSigmaTheta.cc
r2090 r2106 65 65 // 66 66 MHSigmaTheta::MHSigmaTheta(const char *name, const char *title) 67 : fSigmaTheta(), fSigmaPixTheta()68 67 { 69 68 fName = name ? name : "MHSigmaTheta"; … … 72 71 fSigmaTheta.SetDirectory(NULL); 73 72 fSigmaTheta.SetName("2D-ThetaSigmabar"); 74 fSigmaTheta.SetTitle("2D: Sigmabar, \\Theta");73 fSigmaTheta.SetTitle("2D: \\bar{\\sigma}, \\Theta"); 75 74 fSigmaTheta.SetXTitle("\\Theta [\\circ]"); 76 fSigmaTheta.SetYTitle(" Sigmabar");75 fSigmaTheta.SetYTitle("\\bar{\\sigma}"); 77 76 78 77 fSigmaPixTheta.SetDirectory(NULL); 79 78 fSigmaPixTheta.SetName("3D-ThetaPixSigma"); 80 fSigmaPixTheta.SetTitle("3D : \\Theta, Pixel Id, Sigma");79 fSigmaPixTheta.SetTitle("3D: \\Theta, Pixel Id, \\sigma"); 81 80 fSigmaPixTheta.SetXTitle("\\Theta [\\circ]"); 82 81 fSigmaPixTheta.SetYTitle("Pixel Id"); 83 fSigmaPixTheta.SetZTitle(" Sigma");82 fSigmaPixTheta.SetZTitle("\\sigma"); 84 83 85 84 fDiffPixTheta.SetDirectory(NULL); 86 85 fDiffPixTheta.SetName("3D-ThetaPixDiff"); 87 fDiffPixTheta.SetTitle("3D : \\Theta, Pixel Id, Sigma^2-Sigmabar^2");86 fDiffPixTheta.SetTitle("3D: \\Theta, Pixel Id, {\\sigma}^{2}-\\bar{\\sigma}^{2}"); 88 87 fDiffPixTheta.SetXTitle("\\Theta [\\circ]"); 89 88 fDiffPixTheta.SetYTitle("Pixel Id"); 90 fDiffPixTheta.SetZTitle("Sigma^2-Sigmabar^2"); 91 } 92 // -------------------------------------------------------------------------- 93 // 94 // Default Destructor 95 // 96 MHSigmaTheta::~MHSigmaTheta() 97 { 98 89 fDiffPixTheta.SetZTitle("{\\sigma}^{2}-\\bar{\\sigma}^{2}"); 90 91 // Set default binning 92 // FIXME: Maybe ist's necessary to adapt the value to the 93 // Magic default values 94 MBinning binsb; 95 MBinning binst; 96 MBinning binsd; 97 binsd.SetEdges(100, -5, 20); 98 binsb.SetEdges(100, 0, 5); 99 binst.SetEdgesCos(10, 0, 90); 100 101 MBinning binspix("BinningPixel"); 102 binspix.SetEdges(577, -0.5, 577.5); 103 104 SetBinning(&fSigmaTheta, &binst, &binsb); 105 SetBinning(&fSigmaPixTheta, &binst, &binspix, &binsb); 106 SetBinning(&fDiffPixTheta, &binst, &binspix, &binsd); 99 107 } 100 108 … … 105 113 Bool_t MHSigmaTheta::SetupFill(const MParList *plist) 106 114 { 107 108 fMcEvt = (MMcEvt*)plist->FindObject("MMcEvt"); 109 if (!fMcEvt) 110 { 111 *fLog << err << "MMcEvt not found... aborting." << endl; 112 return kFALSE; 113 } 114 115 fPed = (MPedestalCam*)plist->FindObject("MPedestalCam"); 116 if (!fPed) 117 { 118 *fLog << err << "MPedestalCam not found... aborting." << endl; 119 return kFALSE; 120 } 121 122 fCam = (MGeomCam*)plist->FindObject("MGeomCam"); 123 if (!fCam) 124 { 125 *fLog << err << "MGeomCam not found (no geometry information available)... aborting." << endl; 126 return kFALSE; 127 } 128 129 fEvt = (MCerPhotEvt*)plist->FindObject("MCerPhotEvt"); 130 if (!fEvt) 131 { 132 *fLog << err << "MCerPhotEvt not found... aborting." << endl; 133 return kFALSE; 134 } 135 136 fSigmabar = (MSigmabar*)plist->FindObject("MSigmabar"); 137 if (!fSigmabar) 138 { 139 *fLog << err << "MSigmabar not found... aborting." << endl; 140 return kFALSE; 141 } 142 143 // Get Theta Binning 144 MBinning* binstheta = (MBinning*)plist->FindObject("BinningTheta"); 145 if (!binstheta) 146 { 147 *fLog << err << "BinningTheta [MBinning] not found... aborting." << endl; 148 return kFALSE; 149 } 150 151 // Get Sigmabar binning 152 MBinning* binssigma = (MBinning*)plist->FindObject("BinningSigmabar"); 153 if (!binssigma) 154 { 155 *fLog << err << "BinningSigmabar [MBinning] not found... aborting." << endl; 156 return kFALSE; 157 } 158 159 // Get binning for (sigma^2-sigmabar^2) 160 MBinning* binsdiff = (MBinning*)plist->FindObject("BinningDiffsigma2"); 161 if (!binsdiff) 162 { 163 *fLog << err << "BinningDiffsigma2 [MBinning] not found... aborting." << endl; 164 return kFALSE; 165 } 166 167 168 // Set binnings in histograms 169 SetBinning(&fSigmaTheta, binstheta, binssigma); 170 171 // Get binning for pixel number 172 const UInt_t npix = fPed->GetSize(); 173 174 MBinning binspix("BinningPixel"); 175 binspix.SetEdges(npix+1, -0.5, 0.5+npix ); 176 177 SetBinning(&fSigmaPixTheta, binstheta, &binspix, binssigma); 178 SetBinning(&fDiffPixTheta, binstheta, &binspix, binsdiff); 179 180 return kTRUE; 115 fMcEvt = (MMcEvt*)plist->FindObject("MMcEvt"); 116 if (!fMcEvt) 117 { 118 *fLog << err << "MMcEvt not found... aborting." << endl; 119 return kFALSE; 120 } 121 122 fPed = (MPedestalCam*)plist->FindObject("MPedestalCam"); 123 if (!fPed) 124 { 125 *fLog << err << "MPedestalCam not found... aborting." << endl; 126 return kFALSE; 127 } 128 129 fCam = (MGeomCam*)plist->FindObject("MGeomCam"); 130 if (!fCam) 131 { 132 *fLog << err << "MGeomCam not found (no geometry information available)... aborting." << endl; 133 return kFALSE; 134 } 135 136 fEvt = (MCerPhotEvt*)plist->FindObject("MCerPhotEvt"); 137 if (!fEvt) 138 { 139 *fLog << err << "MCerPhotEvt not found... aborting." << endl; 140 return kFALSE; 141 } 142 143 fSigmabar = (MSigmabar*)plist->FindObject("MSigmabar"); 144 if (!fSigmabar) 145 { 146 *fLog << err << "MSigmabar not found... aborting." << endl; 147 return kFALSE; 148 } 149 150 // Get Theta Binning 151 MBinning* binstheta = (MBinning*)plist->FindObject("BinningTheta", "MBinning"); 152 if (!binstheta) 153 { 154 *fLog << warn << "Object 'BinningTheta' [MBinning] not found... no binning applied." << endl; 155 return kTRUE; 156 } 157 158 // Get Sigmabar binning 159 MBinning* binssigma = (MBinning*)plist->FindObject("BinningSigmabar", "MBinning"); 160 if (!binssigma) 161 *fLog << warn << "Object 'BinningSigmabar' [MBinning] not found... no binning applied." << endl; 162 163 // Get binning for (sigma^2-sigmabar^2) 164 MBinning* binsdiff = (MBinning*)plist->FindObject("BinningDiffsigma2", "MBinning"); 165 if (!binsdiff) 166 *fLog << warn << "Object 'BinningDiffsigma2' [MBinning] not found... no binning applied." << endl; 167 168 //FIXME: Missing: Apply new binning to only one axis! 169 170 // Get binning for pixel number 171 const UInt_t npix = fPed->GetSize(); 172 173 MBinning binspix("BinningPixel"); 174 binspix.SetEdges(npix, -0.5, 0.5+npix); 175 176 // Set binnings in histograms 177 if (binssigma) 178 { 179 SetBinning(&fSigmaTheta, binstheta, binssigma); 180 SetBinning(&fSigmaPixTheta, binstheta, &binspix, binssigma); 181 } 182 183 if (binsdiff) 184 SetBinning(&fDiffPixTheta, binstheta, &binspix, binsdiff); 185 186 return kTRUE; 181 187 } 182 188 … … 221 227 void MHSigmaTheta::Draw(Option_t *opt) 222 228 { 223 TVirtualPad *pad = gPad ? gPad : MakeDefCanvas(this , 900, 900);229 TVirtualPad *pad = gPad ? gPad : MakeDefCanvas(this); 224 230 pad->SetBorderMode(0); 225 231 … … 233 239 pad->cd(1); 234 240 gPad->SetBorderMode(0); 235 gPad->SetLogy();241 // gPad->SetLogy(); 236 242 h = fSigmaTheta.ProjectionX("ProjX-Theta", -1, 9999, "E"); 237 243 h->SetDirectory(NULL); -
trunk/MagicSoft/Mars/mhist/MHSigmaTheta.h
r2049 r2106 40 40 public: 41 41 MHSigmaTheta(const char *name=NULL, const char *title=NULL); 42 ~MHSigmaTheta();43 42 44 43 Bool_t SetupFill(const MParList *plist);
Note:
See TracChangeset
for help on using the changeset viewer.