Changeset 7365
- Timestamp:
- 09/26/05 19:17:18 (19 years ago)
- Location:
- trunk/MagicSoft/Mars
- Files:
-
- 7 edited
Legend:
- Unmodified
- Added
- Removed
-
trunk/MagicSoft/Mars/Changelog
r7363 r7365 18 18 19 19 -*-*- END OF LINE -*-*- 20 21 2005/09/26 Markus Meyer 22 23 * mmuon/MMuonSearchPar.cc/.h: 24 - Mean arrival time of core Pixels is calculated 25 26 * mmuon/MHSingleMuon.cc/.h: 27 - new histogram fHistTime (TH1), which contents difference 28 of the arrival time between Mean arrival time of the core 29 pixels and every pixel in the margin around the circle. 30 The histogram is fitted by an gaussian distribution. 31 - fHistPhi is now a TProfile 32 - fHistPhi is only filled with pixels with an arrival time 33 of < 2 sigma difference to the fitted mean value 34 35 * mmuon/MMuonSetup.cc: 36 - fThresholdArcPhi is changed to 5 phe 37 38 * mmuon/MHMuonPar.cc: 39 - for the reference values to MC, the integral over the mean 40 values of the different radius bins is taken again 41 42 20 43 21 44 2005/09/22 Daniela Dorner -
trunk/MagicSoft/Mars/mmuon/MHMuonPar.cc
r7253 r7365 258 258 const Int_t bin2 = p.GetXaxis()->FindFixBin(b); 259 259 260 return Integral(p, bin1, bin2); 260 // return Integral(p, bin1, bin2); 261 return p.Integral(bin1, bin2); 261 262 } 262 263 … … 265 266 if (TString(opt)==TString("pad4")) 266 267 { 267 const TString txt = Form("\\Sigma_{%.2f\\circ}^{%.2f\\circ} = %3.1fm", 268 fgIntegralLoLim, fgIntegralUpLim, Integral(fHistBroad)*1000); 268 const TString txt = Form("\\Sigma_{%.2f\\circ}^{%.2f\\circ} = %.3f", 269 fgIntegralLoLim, fgIntegralUpLim, Integral(fHistBroad)); 270 // fgIntegralLoLim, fgIntegralUpLim, Integral(fHistBroad)*1000); 269 271 270 272 TLatex text(0.55, 0.93, txt); -
trunk/MagicSoft/Mars/mmuon/MHSingleMuon.cc
r7225 r7365 127 127 fHistWidth.UseCurrentStyle(); 128 128 129 fHistTime.SetName("HistTime"); 130 fHistTime.SetTitle("HistTime"); 131 fHistTime.SetXTitle("timing difference"); 132 fHistTime.SetYTitle("number of pixels"); 133 fHistTime.SetDirectory(NULL); 134 fHistTime.SetFillStyle(4000); 135 fHistTime.UseCurrentStyle(); 136 129 137 MBinning bins; 130 138 bins.SetEdges(20, -180, 180); … … 133 141 bins.SetEdges(28, 0.3, 1.7); 134 142 bins.Apply(fHistWidth); 143 144 bins.SetEdges(100, -10, 10); 145 bins.Apply(fHistTime); 135 146 } 136 147 … … 169 180 ApplyBinning(*plist, "ArcPhi", &fHistPhi); 170 181 ApplyBinning(*plist, "MuonWidth", &fHistWidth); 182 ApplyBinning(*plist, "MuonTime", &fHistTime); 171 183 172 184 return kTRUE; … … 182 194 fHistPhi.Reset(); 183 195 fHistWidth.Reset(); 196 fHistTime.Reset(); 184 197 185 198 const Int_t entries = fSignalCam->GetNumPixels(); … … 202 215 if (dist < fMuonSearchPar->GetRadius() + fMargin && 203 216 dist > fMuonSearchPar->GetRadius() - fMargin) 204 fHistPhi.Fill(TMath::ATan2(dx, dy)*TMath::RadToDeg(), pix.GetNumPhotons()); 205 217 { 218 fHistTime.Fill(pix.GetArrivalTime()-fMuonSearchPar->GetTime()); 219 } 206 220 // use only the inner pixles. FIXME: This is geometry dependent 207 221 if(i>397) … … 210 224 fHistWidth.Fill(dist*fGeomCam->GetConvMm2Deg(), pix.GetNumPhotons()); 211 225 } 212 226 // Setup the function and perform the fit 227 TF1 g1("g1", "gaus", -10, 10); 228 229 // Choose starting values as accurate as possible 230 g1.SetParameter(0, fHistTime.GetMaximum()); 231 g1.SetParameter(1, 0); 232 g1.SetParameter(2, 0.3); 233 g1.SetParLimits(1, -0.5, 0.5); 234 g1.SetParLimits(2, 0, 1); 235 // options : N do not store the function, do not draw 236 // I use integral of function in bin rather than value at bin center 237 // R use the range specified in the function range 238 // Q quiet mode 239 fHistTime.Fit(&g1, "QNRB"); 240 241 // Double_t err; 242 Double_t mean, meanerr, sig, sigerr; 243 gMinuit->GetParameter(2, sig, sigerr); // get the sigma value 244 gMinuit->GetParameter(1, mean, meanerr); // get the sigma value 245 246 for (Int_t i=0; i<entries; i++) 247 { 248 const MSignalPix &pix = (*fSignalCam)[i]; 249 const MGeomPix &gpix = (*fGeomCam)[i]; 250 251 const Float_t dx = gpix.GetX() - cenx; 252 const Float_t dy = gpix.GetY() - ceny; 253 254 const Float_t dist = TMath::Hypot(dx, dy); 255 256 // if the signal is not near the estimated circle, it is ignored. 257 if (dist < fMuonSearchPar->GetRadius() + fMargin && 258 dist > fMuonSearchPar->GetRadius() - fMargin) 259 { 260 if(TMath::Abs(pix.GetArrivalTime()-(fMuonSearchPar->GetTime()+mean))<2*sig) 261 fHistPhi.Fill(TMath::ATan2(dx, dy)*TMath::RadToDeg(), pix.GetNumPhotons()); 262 } 263 } 213 264 // error estimation (temporaly) 214 265 // The error is estimated from the signal. In order to do so, we have to … … 244 295 // below the threshold is found, kFALSE is returned. 245 296 // 246 Bool_t MHSingleMuon::FindRangeAboveThreshold(const T H1&h, Float_t thres, Int_t &first, Int_t &last) const297 Bool_t MHSingleMuon::FindRangeAboveThreshold(const TProfile &h, Float_t thres, Int_t &first, Int_t &last) const 247 298 { 248 299 const Int_t n = h.GetNbinsX(); … … 362 413 // R use the range specified in the function range 363 414 // Q quiet mode 364 fHistWidth.Fit(&f1, "QR0"); 415 // fHistWidth.Fit(&f1, "QRO"); 416 fHistWidth.Fit(&f1, "QRN"); 365 417 366 418 chi = f1.GetChisquare()/f1.GetNDF(); … … 477 529 gPad->SetBorderMode(0); 478 530 fHistWidth.Draw(); 479 480 } 531 } -
trunk/MagicSoft/Mars/mmuon/MHSingleMuon.h
r7225 r7365 24 24 Double_t fMargin; //! 25 25 26 T H1FfHistPhi; // Histogram of photon distribution along the arc.26 TProfile fHistPhi; // Histogram of photon distribution along the arc. 27 27 TProfile fHistWidth; // Histogram of radial photon distribution of the arc. 28 TH1F fHistTime; // Histogram of arrival time distribution along the arc. 28 29 29 Bool_t FindRangeAboveThreshold(const T H1&h, Float_t thres, Int_t &first, Int_t &last) const;30 Bool_t FindRangeAboveThreshold(const TProfile &h, Float_t thres, Int_t &first, Int_t &last) const; 30 31 31 32 public: … … 38 39 Bool_t CalcWidth(Double_t, Double_t &, Double_t &); 39 40 40 const TH1F &GetHistPhi() const { return fHistPhi; } 41 const TProfile &GetHistPhi() const { return fHistPhi; } 42 const TH1F &GetHistTime() const { return fHistTime; } 41 43 const TProfile &GetHistWidth() const { return fHistWidth; } 42 44 -
trunk/MagicSoft/Mars/mmuon/MMuonSearchPar.cc
r7176 r7365 89 89 fCenterX = 0; 90 90 fCenterY = 0; 91 fTime = 0; 91 92 } 92 93 … … 150 151 151 152 Int_t p=0; 153 Int_t q=0; 154 155 Float_t fTime2=0; 156 152 157 for (int i=0; i<n; i++) 153 158 { 154 159 const MSignalPix &pix = evt[i]; 160 155 161 if (pix.IsPixelUsed()) 156 162 { … … 160 166 fY[p] = geom[i].GetY(); 161 167 p++; 168 169 //timing 170 if(pix.IsPixelCore()) 171 { 172 fTime += pix.GetArrivalTime(); 173 fTime2 += pix.GetArrivalTime()*pix.GetArrivalTime(); 174 q++; 175 } 162 176 } 163 177 } 178 fTime = fTime/q; 179 fTime2 = fTime2/q; 180 fTimeRms = TMath::Sqrt(fTime2-(fTime*fTime)); 181 164 182 fSignal.Set(p); 165 183 -
trunk/MagicSoft/Mars/mmuon/MMuonSearchPar.h
r7134 r7365 21 21 Float_t fCenterX; // An estimated center position in X of the muon ring [mm] 22 22 Float_t fCenterY; // An estimated center position in Y of the muon ring [mm] 23 Float_t fTime; 24 Float_t fTimeRms; 23 25 24 26 MArrayF fSignal; //! Temporary storage for signal … … 40 42 Float_t GetCenterX() const { return fCenterX; } 41 43 Float_t GetCenterY() const { return fCenterY; } 44 Float_t GetTime() const { return fTime; } 45 Float_t GetTimeRms() const { return fTimeRms; } 42 46 43 47 // MMuonSearchPar -
trunk/MagicSoft/Mars/mmuon/MMuonSetup.cc
r7225 r7365 49 49 // 50 50 MMuonSetup::MMuonSetup(const char *name, const char *title) 51 : fMargin(0.2), fThresholdArcPhi( 30), fThresholdArcWidth(2)51 : fMargin(0.2), fThresholdArcPhi(5), fThresholdArcWidth(2) 52 52 { 53 53 fName = name ? name : "MMuonSetup";
Note:
See TracChangeset
for help on using the changeset viewer.