Changeset 1460 for trunk/MagicSoft
- Timestamp:
- 07/31/02 11:27:21 (22 years ago)
- Location:
- trunk/MagicSoft/Mars
- Files:
-
- 6 edited
Legend:
- Unmodified
- Added
- Removed
-
trunk/MagicSoft/Mars/Changelog
r1457 r1460 1 1 -*-*- END -*-*- 2 3 2002/07/31: Thomas Bretz 4 5 * mgeom/MGeomPix.[h,cc]: 6 - added bits to flag pixel sin the two most outer rings 7 - added IsInOutermostRing and IsInOuterRing member function 8 - added CheckOuterRing mebmber function 9 - set the bit for the most outer ring in the member function to 10 initialize the next neighbors. 11 12 * mgeom/MGeomCam.[h,cc]: 13 - added InitOuterRing to initialize the bits for the secendmost 14 outer ring 15 16 * mgeom/MGeomCamMagic.cc: 17 - Call InitOuterRing 18 19 * manalysis/MHillasExt.[h,cc]: 20 - removed AsciiRead member function 21 - reset fConc/fConc1 to -1 instead of 0 22 - replaced float by Float_t 23 - replaced Float_t for m3x/y, dzx and dzy by Double_t 24 - replaced maxpixx and maxpixy by maxpixid 25 - added somew new calculations (still in comments) 26 - scaled nphot by the ratio of the area of the current pixel to 27 the pixel with id zero to make a fair comparison in the maxpix 28 findinng 29 30 * manalysis/MSrcPosCam.[h,cc]: 31 - removed AsciiRead/Write member function 32 33 2 34 3 35 2002/07/29: Thomas Bretz -
trunk/MagicSoft/Mars/NEWS
r1438 r1460 27 27 changed. 28 28 29 30 29 - Implemented generalized event-matrices (one row per event) 31 30 (MHMatrix) … … 56 55 57 56 - Added fCosDeltaAlpha to MHillasSrc 57 58 - The numbers of photons used to calculate fConc and fConc1 in 59 MHillasExt are now scaled with the pixel size, so that one get 60 a four times smaller value for the bigger pixels in the outer ring. 58 61 59 62 -
trunk/MagicSoft/Mars/manalysis/MHillasExt.cc
r1222 r1460 72 72 MHillas::Reset(); 73 73 74 fConc = 0;75 fConc1 = 0;76 fAsym = 0;77 fM3Long = 0;78 fM3Trans = 0;74 fConc = -1; 75 fConc1 = -1; 76 fAsym = 0; 77 fM3Long = 0; 78 fM3Trans = 0; 79 79 } 80 80 … … 107 107 // -------------------------------------------- 108 108 // 109 // loop to get third moments along ellipse axes and two max pixels 110 // 111 float m3x = 0; 112 float m3y = 0; 113 114 float maxpix1 = 0; // [#phot] 115 float maxpix2 = 0; // [#phot] 116 117 float maxpixx = 0; // [mm] 118 float maxpixy = 0; // [mm] 109 // loop to get third moments along ellipse axes and two max pixels 110 // 111 // For the moments double precision is used to make sure, that 112 // the complex matrix multiplication and sum is evaluated correctly. 113 // 114 Double_t m3x = 0; 115 Double_t m3y = 0; 116 117 Float_t maxpix1 = 0; // [#phot] 118 Float_t maxpix2 = 0; // [#phot] 119 120 Int_t maxpixid = 0; 119 121 120 122 const UInt_t npixevt = evt.GetNumPixels(); 123 124 const Float_t A0 = geom[0].GetA(); 121 125 122 126 for (UInt_t i=0; i<npixevt; i++) … … 127 131 128 132 const MGeomPix &gpix = geom[pix.GetPixId()]; 129 const float dx = gpix.GetX() - GetMeanX();// [mm]130 const float dy = gpix.GetY() - GetMeanY();// [mm]131 132 const float nphot = pix.GetNumPhotons();// [1]133 134 const float dzx = GetCosDelta()*dx + GetSinDelta()*dy;// [mm]135 const float dzy = -GetSinDelta()*dx + GetCosDelta()*dy;// [mm]133 const Double_t dx = gpix.GetX() - GetMeanX(); // [mm] 134 const Double_t dy = gpix.GetY() - GetMeanY(); // [mm] 135 136 Double_t nphot = pix.GetNumPhotons(); // [1] 137 138 const Double_t dzx = GetCosDelta()*dx + GetSinDelta()*dy; // [mm] 139 const Double_t dzy = -GetSinDelta()*dx + GetCosDelta()*dy; // [mm] 136 140 137 141 m3x += nphot * dzx*dzx*dzx; // [mm^3] 138 142 m3y += nphot * dzy*dzy*dzy; // [mm^3] 139 143 144 /* 145 // 146 // count number of photons in pixels at the edge of the camera 147 // 148 if (gpix.IsInOutermostRing()) 149 edgepix1 += nphot; 150 if (gpix.IsInOuterRing()) 151 edgepix2 += nphot; 152 */ 153 154 // 155 // Now we are working on absolute values of nphot, which 156 // must take pixel size into account 157 // 158 const Double_t r = A0/gpix.GetA(); 159 nphot *= r; 160 140 161 if (nphot>maxpix1) 141 162 { 142 maxpix2 = maxpix1; 143 maxpix1 = nphot; // [1] 144 maxpixx = dx + GetMeanX(); // [mm] 145 maxpixy = dy + GetMeanY(); // [mm] 163 maxpix2 = maxpix1; 164 maxpix1 = nphot; // [1] 165 maxpixid = pix.GetPixId(); 146 166 continue; // [1] 147 167 } … … 149 169 if (nphot>maxpix2) 150 170 maxpix2 = nphot; // [1] 171 172 /* 173 // 174 // get sums for calculating fAsymna 175 // the outer pixels are 4 times as big (in area) 176 // as the inner pixels ! 177 // 178 const Double_t dummy = pow(nphot, na)/r; 179 180 sna += dummy; 181 xna += dzx*dummy; 182 183 sna1 += sna/nphot; 184 xna1 += xna/nphot; 185 186 // 187 // forward-backward asymmetry 188 // 189 fb += dzx<0 ? -nphot: nphot; 190 */ 151 191 } 152 192 153 fAsym = (GetMeanX()-maxpixx)*GetCosDelta() + (GetMeanY()-maxpixy)*GetSinDelta(); // [mm] 193 const MGeomPix &maxpix = geom[maxpixid]; 194 195 fAsym = 196 (GetMeanX()*2-maxpix.GetX())*GetCosDelta() + 197 (GetMeanY()*2-maxpix.GetY())*GetSinDelta(); // [mm] 198 154 199 fConc = (maxpix1+maxpix2)/GetSize(); // [ratio] 155 200 fConc1 = maxpix1/GetSize(); // [ratio] 156 201 202 /* 203 204 // 205 // power na for calculating fAsymna; 206 // the value 1.5 was suggested by Thomas Schweizer 207 // 208 Double_t na = 1.5; 209 210 fLeakage1 = edgepix1 / GetSize(); 211 fLeakage2 = edgepix2 / GetSize(); 212 fAsym0 = fb / GetSize(); 213 214 fAsymna = na * (sna*xna1 - sna1*xna) / (sna*sna); 215 */ 216 157 217 // 158 218 // Third moments along axes get normalized … … 161 221 m3y /= GetSize(); 162 222 163 fM3Long = m3x<0 ? -pow(-m3x, 1./3) : pow(m3x, 1./3); // [mm]164 fM3Trans = m3y<0 ? -pow(-m3y, 1./3) : pow(m3y, 1./3); // [mm]223 fM3Long = m3x<0 ? -pow(-m3x, 1./3) : pow(m3x, 1./3); // [mm] 224 fM3Trans = m3y<0 ? -pow(-m3y, 1./3) : pow(m3y, 1./3); // [mm] 165 225 166 226 SetReadyToSave(); … … 169 229 } 170 230 231 /* 171 232 // ------------------------------------------------------------------------- 172 233 // … … 181 242 fin >> fM3Trans; 182 243 } 183 244 */ 184 245 // ------------------------------------------------------------------------- 185 246 /* -
trunk/MagicSoft/Mars/manalysis/MHillasExt.h
r1222 r1460 34 34 void Print(Option_t *opt=NULL) const; 35 35 36 void AsciiRead(ifstream &fin);36 //void AsciiRead(ifstream &fin); 37 37 //void AsciiWrite(ofstream &fout) const; 38 38 -
trunk/MagicSoft/Mars/manalysis/MSrcPosCam.cc
r1211 r1460 61 61 } 62 62 63 /* 63 64 // ----------------------------------------------------------------------- 64 65 // … … 79 80 fout << fX << " " << fY; 80 81 } 82 */ -
trunk/MagicSoft/Mars/manalysis/MSrcPosCam.h
r1203 r1460 26 26 void Print(Option_t *opt=NULL) const; 27 27 28 void AsciiRead(ifstream &fin);29 void AsciiWrite(ofstream &fout) const;28 //void AsciiRead(ifstream &fin); 29 //void AsciiWrite(ofstream &fout) const; 30 30 31 31 ClassDef(MSrcPosCam, 1) // container to store source position in the camera plain
Note:
See TracChangeset
for help on using the changeset viewer.