Changeset 2446
- Timestamp:
- 10/30/03 18:12:46 (21 years ago)
- Location:
- trunk/MagicSoft/Mars
- Files:
-
- 4 edited
Legend:
- Unmodified
- Added
- Removed
-
trunk/MagicSoft/Mars/Changelog
r2445 r2446 1 1 -*-*- END OF LINE -*-*- 2 2003/10/30: Antonio Stamerra 3 4 * manalysis/MMcTriggerLvl2.[h,cc] 5 - Added method CalcTriggerPattern to check which x-NN compact 6 pattern the event satisfies. The variable member fTriggerPattern 7 contains the number x (x=3,4,5,6,7). 8 - Inline function GetTriggerPattern added. 9 10 * manalysis/MMcTriggerLvl2Calc.cc 11 - Added call to the MMcTriggerLvl2::CalcTriggerPattern in Process(). 12 2 13 3 14 2003/10/30: Thomas Bretz -
trunk/MagicSoft/Mars/manalysis/MMcTriggerLvl2.cc
r2365 r2446 69 69 // the standard spiral counting 70 70 // (Note: Pixels start to count from 1 instead of 0) 71 // 72 // This correspondence is valid only for MAGIC-like geometries! 71 73 // 72 74 const Int_t MMcTriggerLvl2::gsPixelsInCell[36][19] = { … … 123 125 // Default constructor 124 126 // 125 MMcTriggerLvl2::MMcTriggerLvl2(const char *name, const char *title) 127 MMcTriggerLvl2::MMcTriggerLvl2(const char *name, const char *title):fCompactNN(2),fTriggerPattern(0) 126 128 { 127 129 fName = name ? name : ClassName(); … … 138 140 // create a new camera 139 141 SetNewCamera(new MGeomCamMagic); 142 140 143 } 141 144 … … 181 184 } 182 185 *fLog << endl; 183 } 186 } 184 187 } 185 188 else if (str.Contains("cell", TString::kIgnoreCase)) … … 201 204 *fLog << " - PseudoSize = " << fPseudoSize << endl; 202 205 *fLog << " - BiggerCellSize = " << fSizeBiggerCell << endl; 206 *fLog << " - TriggerPattern = " << fTriggerPattern << endl; 203 207 } 204 208 … … 755 759 756 760 757 void MMcTriggerLvl2::CalcEnergy(MMcEvt *fMcEvt) 761 // -------------------------------------------------------------------------- 762 // 763 // The Energy has to be given by this class to the Energy-PSSize correlation 764 // histogram (MHMcTriggerLvl2) 765 // 766 void MMcTriggerLvl2::GetEnergy(MMcEvt *fMcEvt) 758 767 { 759 768 const MMcEvt &h = *(MMcEvt *)fMcEvt; … … 762 771 763 772 764 773 // -------------------------------------------------------------------------- 774 // 775 // Looks for a x-NN compact pattern in the whole camera 776 // We have x-NN compact pattern when a triggered pix has 777 // x-1 triggered neighbor pixels. 778 // The variable fTriggerPattern = x is computed 779 // (x= 3,4,5,6,7) 780 // 781 // x=3 * * 782 // * * 783 // x=4 * * 784 // * 785 // * * 786 // x=5 * * * 787 // * 788 // x=6 * * * 789 // * * 790 // * * 791 // x=7 * * * 792 // * * 793 // 794 void MMcTriggerLvl2::CalcTriggerPattern(MGeomCam *geom) 795 { 796 fTriggerPattern=0; //initialize 797 798 for(UInt_t pixid=0;pixid<397;pixid++) 799 { 800 // Look if the pixel is fired, otherwise continue 801 if (!fFiredPixel[pixid]) 802 continue; 803 804 const MGeomPix &pix=(*geom)[pixid]; 805 806 // Look for x-NN compact pattern 807 // If a x-NN pattern exists then a pixel must have 808 // at least x-1 adjacent neighbors (look at patterns) 809 // For each triggered pixel the number of adjacent triggered pixels is counted. 810 // 811 int j=1; 812 for (int i=0;i<pix.GetNumNeighbors();i++) 813 if (fFiredPixel[pix.GetNeighbor(i)]==1) j++; 814 815 if (j > fTriggerPattern) 816 fTriggerPattern=j; 817 818 if (fTriggerPattern==7) 819 break; // the 7-NN (max) pattern was found: exit 820 821 } // next pixel 822 } 823 -
trunk/MagicSoft/Mars/manalysis/MMcTriggerLvl2.h
r2365 r2446 39 39 Double_t fEnergy; // Energy of the shower 40 40 41 Int_t fTriggerPattern; // x-NN compact trigger pattern; 41 42 42 43 MMcTrig *fMcTrig; … … 74 75 void CalcCompactPixels(MGeomCam *fCam); 75 76 76 void CalcEnergy(MMcEvt *fMcEvt = NULL);77 void GetEnergy(MMcEvt *fMcEvt = NULL); 77 78 78 79 Double_t GetEnergy() const {return fEnergy;} 80 81 void CalcTriggerPattern(MGeomCam *fCam); 82 Int_t GetTriggerPattern() const {return fTriggerPattern;} 79 83 80 84 -
trunk/MagicSoft/Mars/manalysis/MMcTriggerLvl2Calc.cc
r2365 r2446 95 95 return kFALSE; 96 96 } 97 97 // Check if fCam is a Magic geometry: only MGeomCamMagic geometry and 98 // geometries with 577 pixels are now accepted by MMcTriggerLvl2 99 if (fCam->GetNumPixels()!= 577) 100 { 101 *fLog << dbginf << "MGeomCam has a wrong geometry; only MAGIC geometry (577 pixels) is accepted by now... aborting" <<endl; 102 return kFALSE; 103 } 98 104 fMMcTriggerLvl2 = (MMcTriggerLvl2*)pList->FindObject("MMcTriggerLvl2"); 99 105 if (!fMMcTriggerLvl2) … … 132 138 Int_t MMcTriggerLvl2Calc::Process() 133 139 { 134 fMMcTriggerLvl2-> CalcEnergy(fMcEvt);140 fMMcTriggerLvl2->GetEnergy(fMcEvt); 135 141 136 142 fMMcTriggerLvl2->SetLv1(fMcTrig); … … 139 145 140 146 fMMcTriggerLvl2->Calc(); 147 148 fMMcTriggerLvl2->CalcTriggerPattern(fCam); 141 149 142 150 return kTRUE;
Note:
See TracChangeset
for help on using the changeset viewer.