Changeset 1557 for trunk/MagicSoft/Mars/manalysis
- Timestamp:
- 10/29/02 13:58:25 (22 years ago)
- Location:
- trunk/MagicSoft/Mars/manalysis
- Files:
-
- 2 added
- 2 deleted
- 5 edited
Legend:
- Unmodified
- Added
- Removed
-
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 \
Note:
See TracChangeset
for help on using the changeset viewer.