- Timestamp:
- 10/29/02 13:58:25 (22 years ago)
- Location:
- trunk/MagicSoft/Mars
- Files:
-
- 4 added
- 4 deleted
- 10 edited
Legend:
- Unmodified
- Added
- Removed
-
trunk/MagicSoft/Mars/Changelog
r1556 r1557 1 1 -*-*- END -*-*- 2 2002/10/29: Thomas Bretz 3 4 * manalysis/MHadroness.[h,cc]: 5 - renamed to MHadronness 6 7 * mhist/MHHadroness.[h,cc]: 8 - renamed to MHHadronness 9 - small changes to the graphical and text output 10 11 * manalysis/Makefile, manalysis/AnalysisLinkDef.h, macros/multidimdist.C, 12 manalysis/MMultiDimDistCalc.[h,cc], macros/comprob.C, 13 mhist/Makefile, mhist/HistLinkDef.h: 14 - changed Hadroness to Hadronness 15 16 * manalysis/MCerPhotAnal.cc: 17 - small changes to the code layout 18 19 2 20 3 21 2002/10/24: Thomas Bretz -
trunk/MagicSoft/Mars/macros/comprob.C
r1410 r1557 113 113 114 114 // fill probabilities (hadroness) into histogram 115 MFillH fill2("MHHadron ess");115 MFillH fill2("MHHadronness"); 116 116 tlist2.AddToList(&fill2); 117 117 … … 124 124 // the console window 125 125 // 126 plist.FindObject("MHHadron ess")->DrawClone();127 plist.FindObject("MHHadron ess")->Print();126 plist.FindObject("MHHadronness")->DrawClone(); 127 plist.FindObject("MHHadronness")->Print(); 128 128 } 129 129 -
trunk/MagicSoft/Mars/macros/multidimdist.C
r1554 r1557 48 48 // CalEvents: Calibration Events 49 49 // 50 MReadMarsFile read("Events", "~/Mars/star 2.root");50 MReadMarsFile read("Events", "~/Mars/star.root"); 51 51 read.DisableAutoScheme(); 52 52 tlist.AddToList(&read); … … 107 107 plist.Replace(&tlist2); 108 108 109 MReadMarsFile read2("Events", "~/Mars/star2.root"); 109 MReadMarsFile read2("Events", "~/Mars/star.root"); 110 // read2.AddFile("~/Mars/star2.root"); 110 111 read2.DisableAutoScheme(); 111 112 tlist2.AddToList(&read2); … … 116 117 tlist2.AddToList(&calc); 117 118 118 MFillH fillh("MHHadron ess");119 MFillH fillh("MHHadronness"); 119 120 120 121 /* … … 134 135 tlist2.PrintStatistics(); 135 136 136 plist.FindObject("MHHadron ess")->DrawClone();137 plist.FindObject("MHHadron ess")->Print();137 plist.FindObject("MHHadronness")->DrawClone(); 138 plist.FindObject("MHHadronness")->Print(); 138 139 } -
trunk/MagicSoft/Mars/manalysis/AnalysisLinkDef.h
r1546 r1557 21 21 #pragma link C++ class MMcPedestalNSBAdd+; 22 22 23 #pragma link C++ class MHadron ess+;23 #pragma link C++ class MHadronness+; 24 24 25 25 #pragma link C++ class MCompProbCalc+; -
trunk/MagicSoft/Mars/manalysis/MCerPhotAnal.cc
r1396 r1557 123 123 124 124 while (pixel.Next()) 125 125 { 126 126 Byte_t *ptr = pixel.GetHiGainSamples(); 127 127 const Byte_t *end = ptr + fRawEvt->GetNumHiGainSamples(); … … 134 134 Int_t slicelocal=0; 135 135 136 Float_t nphot;137 Float_t pedes, sigmaped; 138 139 do 140 { 141 sumlocal = 0; 142 for(Int_t i = 0; i<5;i++)143 sumlocal+=*(ptr+i); 144 if (sumpeak < sumlocal){ 145 slice=slicelocal;146 sumpeak = sumlocal; 147 } 148 136 do 137 { 138 sumlocal = 0; 139 for (Int_t i = 0; i<5;i++) 140 sumlocal += *(ptr+i); 141 142 if (sumpeak < sumlocal) 143 { 144 slice=slicelocal; 145 sumpeak = sumlocal; 146 } 147 148 slicelocal++; 149 149 sum += *ptr; 150 } 151 while (++ptr != limit); 152 153 do sum += *ptr; 154 while (++ptr != end); 155 156 pedes = (Float_t)(sum-sumpeak)/(fRawEvt->GetNumHiGainSamples()-5); 157 nphot=(Float_t)sumpeak - 5.0*pedes; 158 sigmaped=0; 159 sumlocal=0; 160 slicelocal=0; 150 } while (++ptr != limit); 151 152 do sum += *ptr; 153 while (++ptr != end); 154 155 Float_t pedes = (Float_t)(sum-sumpeak)/(fRawEvt->GetNumHiGainSamples()-5); 156 Float_t nphot = (Float_t)sumpeak - 5.0*pedes; 157 158 Float_t sigmaped=0; 159 160 slicelocal=0; 161 sumlocal = 0; 161 162 162 163 ptr = pixel.GetHiGainSamples(); 163 do { 164 if (slicelocal==slice) 165 ptr+=4; 166 else{ 167 sumlocal=*ptr; 168 sigmaped+=((Float_t)sumlocal-pedes)*((Float_t)sumlocal-pedes); 169 } 170 slicelocal++; 164 do 165 { 166 if (slicelocal==slice) 167 ptr += 4; 168 else 169 { 170 sumlocal = *ptr; 171 172 const Float_t d = (Float_t)sumlocal-pedes; 173 sigmaped += d*d; 174 } 175 slicelocal++; 171 176 } 172 while(++ptr != end); 173 sigmaped/=(fRawEvt->GetNumHiGainSamples()-5); 174 sigmaped=sqrt(sumlocal); 177 while (++ptr != end); 178 179 sigmaped /= (fRawEvt->GetNumHiGainSamples()-5); 180 sigmaped = sqrt(sumlocal); 175 181 176 182 const UInt_t pixid = pixel.GetPixelId(); … … 188 194 189 195 fCerPhotEvt->AddPixel(pixid, nphot, sigmaped/2.236); 190 ped.SetPedestal(pedes, sigmaped);196 ped.SetPedestal(pedes, sigmaped); 191 197 ped.SetPedestalRms(sigmaped/sqrt(fRawEvt->GetNumHiGainSamples()-5), 192 198 sigmaped/sqrt(2*(fRawEvt->GetNumHiGainSamples()-5))); -
trunk/MagicSoft/Mars/manalysis/MMultiDimDistCalc.cc
r1489 r1557 54 54 #include "MDataArray.h" 55 55 56 #include "MHadron ess.h"56 #include "MHadronness.h" 57 57 58 58 ClassImp(MMultiDimDistCalc); … … 149 149 } 150 150 151 fHadron ess = (MHadroness*)plist->FindCreateObj("MHadroness");152 if (!fHadron ess)151 fHadronness = (MHadronness*)plist->FindCreateObj("MHadronness"); 152 if (!fHadronness) 153 153 return kFALSE; 154 154 … … 200 200 Double_t dh = fMHadrons->CalcDist(event, numh); 201 201 202 //fHadron ess->SetHadroness(dg/(dg+dh));203 fHadron ess->SetHadroness(exp(-dh/dg));202 //fHadronness->SetHadronness(dg/(dg+dh)); 203 fHadronness->SetHadronness(exp(-dh/dg)); 204 204 205 205 return kTRUE; -
trunk/MagicSoft/Mars/manalysis/MMultiDimDistCalc.h
r1489 r1557 8 8 class MHMatrix; 9 9 class MParList; 10 class MHadroness;11 10 class MDataArray; 11 class MHadronness; 12 12 13 13 class MMultiDimDistCalc : public MTask 14 14 { 15 15 private: 16 Int_t fNum; // number of distances used for an avarage17 Bool_t fUseKernel; // Flag whether kernel method should be used16 Int_t fNum; // number of distances used for an avarage 17 Bool_t fUseKernel; // Flag whether kernel method should be used 18 18 19 MHMatrix *fMGammas; //! Gammas describing matrix20 MHMatrix *fMHadrons; //! Hadrons (non gammas) describing matrix19 MHMatrix *fMGammas; //! Gammas describing matrix 20 MHMatrix *fMHadrons; //! Hadrons (non gammas) describing matrix 21 21 22 MHadron ess *fHadroness; //! Output container for calculated hadroness22 MHadronness *fHadronness; //! Output container for calculated hadroness 23 23 24 MDataArray *fData; //! Used to store the MDataChains to get the event values24 MDataArray *fData; //! Used to store the MDataChains to get the event values 25 25 26 26 void StreamPrimitive(ofstream &out) const; -
trunk/MagicSoft/Mars/manalysis/Makefile
r1547 r1557 39 39 MSrcPosCam.cc \ 40 40 MCameraSmooth.cc \ 41 MHadron ess.cc \41 MHadronness.cc \ 42 42 MMatrixLoop.cc \ 43 43 MCompProbCalc.cc \ -
trunk/MagicSoft/Mars/mhist/HistLinkDef.h
r1427 r1557 34 34 35 35 #pragma link C++ class MHCompProb+; 36 #pragma link C++ class MHHadron ess+;36 #pragma link C++ class MHHadronness+; 37 37 38 38 #pragma link C++ class MHMcRate+; -
trunk/MagicSoft/Mars/mhist/Makefile
r1439 r1557 49 49 MHTimeDiffTheta.cc \ 50 50 MHCompProb.cc \ 51 MHHadron ess.cc \51 MHHadronness.cc \ 52 52 MHMcEnergy.cc \ 53 53 MHMcEfficiency.cc \
Note:
See TracChangeset
for help on using the changeset viewer.