Changeset 2550 for trunk/MagicSoft/Mars/mhist
- Timestamp:
- 11/21/03 17:01:15 (22 years ago)
- Location:
- trunk/MagicSoft/Mars/mhist
- Files:
-
- 5 edited
Legend:
- Unmodified
- Added
- Removed
-
trunk/MagicSoft/Mars/mhist/MHCamEvent.cc
r2490 r2550 54 54 // 55 55 MHCamEvent::MHCamEvent(const char *name, const char *title) 56 : fSum(NULL), f Evt(NULL), fType(0)56 : fSum(NULL), fRms(NULL), fEvt(NULL), fType(0) 57 57 { 58 58 // … … 71 71 if (fSum) 72 72 delete fSum; 73 if (fRms) 74 delete fRms; 73 75 } 74 76 … … 99 101 if (fSum) 100 102 delete (fSum); 103 if (fRms) 104 delete (fRms); 101 105 102 106 const TString name = fNameEvt.IsNull() ? fName : fNameEvt; … … 105 109 fSum->SetYTitle("a.u."); 106 110 fSum->SetBit(MHCamera::kProfile); 111 112 fRms = new MHCamera(*cam, name+";rms", fTitle); 113 fRms->SetYTitle("a.u."); 107 114 return kTRUE; 108 115 } … … 131 138 Bool_t MHCamEvent::Finalize() 132 139 { 133 fSum->ResetBit(MHCamera::kProfile); 134 if (fSum->GetEntries()>0) 135 fSum->Scale(1./fSum->GetEntries()); 140 fRms->AddCamContent(*fSum, 1); 136 141 return kTRUE; 137 142 } 138 143 144 // -------------------------------------------------------------------------- 145 // 146 // Take the mean of the sum histogram and print all pixel indices 147 // which are above sum+s*rms 148 // 139 149 void MHCamEvent::PrintOutliers(Float_t s) const 140 150 { … … 156 166 // -------------------------------------------------------------------------- 157 167 // 158 // Return fSum .168 // Return fSum for "sum" and fRms for "rms" 159 169 // 160 170 TH1 *MHCamEvent::GetHistByName(const TString name) 161 171 { 162 return fSum; 172 // name.ToLower(); 173 174 if (name=="sum") 175 return fSum; 176 if (name=="rms") 177 return fRms; 178 179 return NULL; 163 180 } 164 181 … … 171 188 172 189 pad->cd(1); 190 gPad->SetBorderMode(0); 191 fSum->Draw("EPhist"); 192 193 pad->cd(2); 194 gPad->SetBorderMode(0); 195 gPad->Divide(2, 1); 196 pad = gPad; 197 198 pad->cd(1); 199 gPad->SetBorderMode(0); 173 200 fSum->Draw(); 174 201 175 202 pad->cd(2); 176 203 gPad->SetBorderMode(0); 177 f Sum->Draw("EPhist");178 } 204 fRms->Draw(); 205 } -
trunk/MagicSoft/Mars/mhist/MHCamEvent.h
r2416 r2550 13 13 private: 14 14 MHCamera *fSum; // storing the sum 15 MHCamera *fRms; // storing the rms 15 16 MCamEvent *fEvt; //! the current event 16 17 -
trunk/MagicSoft/Mars/mhist/MHCamera.cc
r2490 r2550 1131 1131 cout << "Software Pixel Index: " << idx << endl; 1132 1132 cout << "Hardware Pixel Id: " << idx+1 << endl; 1133 cout << "Contents: " << GetBinContent(idx+1) << " <"; 1134 cout << (IsUsed(idx)?"on":"off"); 1135 cout << ">" << endl; 1133 cout << "Contents: " << GetBinContent(idx+1); 1134 if (GetBinError(idx+1)>0) 1135 cout << " +/- " << GetBinError(idx+1); 1136 cout << " <" << (IsUsed(idx)?"on":"off") << ">" << endl; 1136 1137 1137 1138 if (fNotify && fNotify->GetSize()>0) -
trunk/MagicSoft/Mars/mhist/MHTriggerLvl0.cc
r2490 r2550 111 111 112 112 fSum = new MHCamera(*cam, name+";avg", fTitle); 113 fSum->SetYTitle("%"); 113 fSum->SetBit(MHCamera::kProfile); 114 fSum->SetYTitle("% [1]"); 114 115 115 116 return kTRUE; … … 140 141 Bool_t MHTriggerLvl0::Finalize() 141 142 { 142 if (fSum->GetEntries()>0)143 fSum->Scale(100./fSum->GetEntries());143 // if (fSum->GetEntries()>0) 144 // fSum->Scale(100); 144 145 return kTRUE; 145 146 } 146 147 147 void MHTriggerLvl0::PrintOutl ayers(Float_t s) const148 void MHTriggerLvl0::PrintOutliers(Float_t s) const 148 149 { 149 150 const Double_t mean = fSum->GetMean(); -
trunk/MagicSoft/Mars/mhist/MHTriggerLvl0.h
r2416 r2550 36 36 void Draw(Option_t * =""); 37 37 38 void PrintOutl ayers(Float_t s) const;38 void PrintOutliers(Float_t s) const; 39 39 40 40 ClassDef(MHTriggerLvl0, 1) // Histogram to count how often a pixel is above threshold
Note:
See TracChangeset
for help on using the changeset viewer.