Changeset 2935 for trunk/MagicSoft/Mars
- Timestamp:
- 01/28/04 09:34:31 (21 years ago)
- Location:
- trunk/MagicSoft/Mars
- Files:
-
- 3 edited
Legend:
- Unmodified
- Added
- Removed
-
trunk/MagicSoft/Mars/Changelog
r2934 r2935 4 4 5 5 -*-*- END OF LINE -*-*- 6 2004/01/28: Sebastian Raducci 7 * manalysis/MArrivalTime.[h,cc]: 8 - removed all the code relative to the cluster evaluation 6 9 7 10 2004/01/27: Markus Gaug -
trunk/MagicSoft/Mars/manalysis/MArrivalTime.cc
r2917 r2935 45 45 using namespace std; 46 46 47 #warning Commented out all usage of fPixelCehcked - THIS WILL CRASH YOUR PROGRAM!48 47 49 48 // -------------------------------------------------------------------------- … … 79 78 fData[i] = t; 80 79 } 81 82 // ------------------------------------------------------------------------- 83 // 84 // Finds the clusters with similar Arrival Time 85 // 86 // PRELIMINARY!! For now the Arrival Time is not the one calculated with 87 // the splines, but it's the Max Slice Idx 88 // 89 // TEST!! This method is used only for test. Do not use it until 90 // it becomes stable 91 // 92 void MArrivalTime::EvalClusters(const MRawEvtData &evt, const MGeomCam &geom) 93 { 94 const Int_t n = geom.GetNumPixels(); 95 96 fData2.Set(n); 97 fData3.Set(n); 98 fData4.Set(n); 99 fData5.Set(n); 100 101 fData2.Reset(-1); 102 fData3.Reset(-1); 103 fData4.Reset(-1); 104 fData5.Reset(-1); 105 106 MRawEvtPixelIter pixel((MRawEvtData*)&evt); 107 108 // Array that says if a pixel has been already checked or not 109 110 // for (Int_t i = 0; i < n; i++) 111 // fPixelChecked[i] = kFALSE; 112 113 // This fakeData array will be subsituted with the fData Array. 114 fakeData.Set(n); 115 fakeData.Reset(); 116 117 while ( pixel.Next() ) 118 { 119 fakeData[pixel.GetPixelId()]=pixel.GetIdxMaxHiLoGainSample(); 120 } 121 // End of fakeData preparation 122 *fLog << warn << "fin qui bene" << endl; 123 // Max dimension of cluster 124 Short_t dimCluster; 125 126 while ( pixel.Next() ) 127 { 128 /* 129 if (!fPixelChecked[pixel.GetPixelId()]) 130 { 131 dimCluster = 0; 132 fCluster.Set(n); 133 fCluster.Reset(-1); 134 fCluster[dimCluster]=pixel.GetPixelId(); 135 dimCluster++; 136 137 CheckNeighbours(evt,geom, 138 pixel.GetPixelId(), &dimCluster); 139 140 if (dimCluster > 4) 141 { 142 for (Int_t i = 0; i < dimCluster; i++) 143 fData5[fCluster[i]]=fakeData[fCluster[i]]; 144 } 145 if (dimCluster > 3) 146 { 147 for (Int_t i = 0; i < dimCluster; i++) 148 fData4[fCluster[i]]=fakeData[fCluster[i]]; 149 } 150 if (dimCluster > 2) 151 { 152 for (Int_t i = 0; i < dimCluster; i++) 153 fData3[fCluster[i]]=fakeData[fCluster[i]]; 154 } 155 if (dimCluster > 1) 156 { 157 for (Int_t i = 0; i < dimCluster; i++) 158 fData2[fCluster[i]]=fakeData[fCluster[i]]; 159 } 160 } */ 161 } 162 163 } 164 165 // -------------------------------------------------------------------------- 166 // 167 // Function to check the nearest neighbour pixels arrivaltime 168 // 169 void MArrivalTime::CheckNeighbours(const MRawEvtData &evt, const MGeomCam &geom, 170 Short_t idx, Short_t *dimCluster) 171 { 172 Byte_t numNeighbors=geom[idx].GetNumNeighbors(); 173 //fPixelChecked[idx] = kTRUE; 174 175 for (Byte_t i=0x00; i < numNeighbors; i++) 176 { 177 178 /* 179 if (!fPixelChecked[geom[idx].GetNeighbor(i)] && 180 fakeData[idx] == fakeData[geom[idx].GetNeighbor(i)]) 181 { 182 fCluster[*dimCluster]=geom[idx].GetNeighbor(i); 183 *dimCluster++; 184 CheckNeighbours(evt, geom, 185 geom[idx].GetNeighbor(i), dimCluster); 186 } 187 */ 188 } 189 } 80 190 81 // -------------------------------------------------------------------------- 191 82 // … … 203 94 val = fData[idx]; 204 95 break; 205 case 2:206 val = fData2[idx];207 break;208 case 3:209 val = fData3[idx];210 break;211 case 4:212 val = fData4[idx];213 break;214 case 5:215 val = fData5[idx];216 break;217 96 } 218 97 -
trunk/MagicSoft/Mars/manalysis/MArrivalTime.h
r2911 r2935 19 19 private: 20 20 TArrayF fData; // Stores the arrival times 21 22 TArrayF fData2; // Clusters with at most 2 pix23 TArrayF fData3; // Clusters with at most 3 pix24 TArrayF fData4; // Clusters with at most 4 pix25 TArrayF fData5; // Clusters with at most 5 pix26 27 //Bool_t *fPixelChecked; // For each pixel says if it's already been checked28 TArrayS fCluster; // Idxs of the pixels in the current cluster29 TArrayS fakeData; //Test purpose30 21 31 22 public: … … 37 28 void InitSize(Int_t i); 38 29 UInt_t GetNumPixels() const { return fData.GetSize(); } 39 40 void EvalClusters(const MRawEvtData &evt, const MGeomCam &geom);41 void CheckNeighbours(const MRawEvtData &evt, const MGeomCam &geom,42 Short_t idx, Short_t *dimCluster);43 30 44 31 void SetTime(const Int_t i, const Float_t time);
Note:
See TracChangeset
for help on using the changeset viewer.