- Timestamp:
- 10/29/01 13:22:33 (23 years ago)
- Location:
- trunk/MagicSoft/Mars
- Files:
-
- 7 edited
Legend:
- Unmodified
- Added
- Removed
-
trunk/MagicSoft/Mars/Changelog
r1004 r1007 88 88 manalysis/MPedCalcPedRun.cc, manalysis/MPedestalCam.cc, 89 89 mbase/MClone.cc, mbase/MPrint.cc, mbase/MTime.h, 90 mbase/MWriteAsciiFile.cc, mgui/MGeomCam.cc, 91 mhist/MHFadcCam.cc, mhist/MHMcRate.cc, 92 mmc/MMcTrig.cxx, mmontecarlo/MMcThresholdCalc.cc, 93 mmontecarlo/MMcTriggerRateCalc.cc, 94 mraw/MRawCrateArray.cc, mraw/MRawEvtData.cc, 95 mraw/MRawEvtHeader.cc, mraw/MRawFileRead.cc: 90 mbase/MWriteAsciiFile.cc, mgui/MGeomCam.cc, mhist/MHFadcCam.cc, 91 mhist/MHMcRate.cc, mmc/MMcTrig.cxx, mraw/MRawCrateArray.cc, 92 mraw/MRawEvtData.cc, mraw/MRawEvtHeader.cc, mraw/MRawFileRead.cc: 96 93 - changed fName, fTitle from pointer to static object 97 94 95 * mmontecarlo/MMcThresholdCalc.[h,cc], 96 mmontecarlo/MMcTriggerRateCalc.[h,cc], 97 mmontecarlo/MMcCollectionAreaCalc.[h,cc]: 98 - changed fName, fTitle from pointer to static object 99 - changed to use auto enabling scheme 100 98 101 * mraw/MRawFileWrite.cc: 99 102 - changed fName, fTitle from pointer to static object -
trunk/MagicSoft/Mars/macros/collarea.C
r988 r1007 25 25 void collarea(char *filename = "data/camera.root") 26 26 { 27 // FIXME: Harald, you should tell the people what the result of28 // this macro really is.29 30 27 // 31 28 // first we have to create our empty lists … … 42 39 // 43 40 MReadTree reader("Events", filename); 44 reader.UseLeaf("fImpact"); 45 reader.UseLeaf("fEnergy"); 46 reader.UseLeaf("fNumFirstLevel"); 41 MMcCollectionAreaCalc effi; 42 47 43 tasklist.AddToList(&reader); 48 49 MMcCollectionAreaCalc effi;50 44 tasklist.AddToList(&effi); 51 52 MTask task;53 tasklist.AddToList(&task);54 45 55 46 // -
trunk/MagicSoft/Mars/mmontecarlo/MMcCollectionAreaCalc.cc
r1005 r1007 44 44 fTitle = title ? title : "Task to calculate the collection area"; 45 45 46 fObjName = input ? input : "MMcTrig"; 46 if (input) 47 { 48 fObjName = input; 49 AddToBranchList(Form("%s.fNumFirstLevel", input)); 50 } 51 else 52 { 53 fObjName = "MMcTrig"; 54 AddToBranchList("fNumFirstLevel"); 55 } 56 57 AddToBranchList("fEnergy"); 58 AddToBranchList("fImpact"); 47 59 } 48 60 … … 74 86 Bool_t MMcCollectionAreaCalc::Process() 75 87 { 76 const Float_t energy = log10(fMcEvt->GetEnergy());88 const Float_t energy = fMcEvt->GetEnergy(); 77 89 const Float_t impact = fMcEvt->GetImpact()/100.; 78 90 -
trunk/MagicSoft/Mars/mmontecarlo/MMcThresholdCalc.cc
r1004 r1007 67 67 MMcThresholdCalc::MMcThresholdCalc(const Int_t dim, const char* name, 68 68 const char* title) 69 : f Dimension(dim), fMcTrig(NULL), fEnergy(NULL)69 : fMcTrig(NULL), fEnergy(NULL) 70 70 { 71 71 fName = name ? name : "MMcThresholdCalc"; 72 72 fTitle = title ? title : "Task to calculate the energy threshold from Monte Carlo"; 73 74 fFirst = dim>0 ? 1 : -dim; 75 fLast = dim>0 ? dim : -dim; 76 77 fNum = fLast-fFirst+1; 78 79 AddToBranchList("fEnergy"); 80 AddToBranchList("MMcTrig", "fNumFirstLevel", fFirst, fLast); 73 81 } 74 82 … … 103 111 } 104 112 105 UInt_t from = fDimension>0 ? 1 : -fDimension; 106 UInt_t to = fDimension>0 ? fDimension : -fDimension; 113 UInt_t num; 107 114 108 fNum = to-from+1; 109 110 Int_t num; 111 112 fMcTrig = new TObjArray(pList->FindObjectList("MMcTrig", from, to)); 115 fMcTrig = new TObjArray(pList->FindObjectList("MMcTrig", fFirst, fLast)); 113 116 num = fMcTrig->GetEntriesFast(); 114 117 if (num != fNum) … … 119 122 } 120 123 121 fEnergy = new TObjArray(pList->FindCreateObjList("MHMcEnergy", f rom, to));124 fEnergy = new TObjArray(pList->FindCreateObjList("MHMcEnergy", fFirst, fLast)); 122 125 num = fMcTrig->GetEntriesFast(); 123 126 if (num != fNum) … … 143 146 const Float_t reciproc = 1./energy; 144 147 145 for ( Int_t i=0; i<fNum; i++)148 for (UInt_t i=0; i<fNum; i++) 146 149 if (GetTrig(i)->GetFirstLevel()>0) 147 150 GetHEnergy(i)->Fill(lg10, reciproc); … … 157 160 Bool_t MMcThresholdCalc::PostProcess() 158 161 { 159 for ( Int_t i=0; i<fNum; i++)162 for (UInt_t i=0; i<fNum; i++) 160 163 { 161 164 MHMcEnergy &hist = *GetHEnergy(i); -
trunk/MagicSoft/Mars/mmontecarlo/MMcThresholdCalc.h
r984 r1007 24 24 { 25 25 private: 26 Int_t fDimension; 27 Int_t fNum; 26 UInt_t fFirst; 27 UInt_t fLast; 28 29 UInt_t fNum; 28 30 29 31 const MMcEvt *fMcEvt; // Container with Monte Carlo information -
trunk/MagicSoft/Mars/mmontecarlo/MMcTriggerRateCalc.cc
r1004 r1007 47 47 fMcRate = NULL; 48 48 49 fDimension = dim;50 51 49 for (int i=0;i<10;i++) 52 50 fTrigger[i] = dim&&trigbg ? trigbg[i] : 0; … … 56 54 57 55 fPartId=part; 56 57 58 fFirst = dim>0 ? 1 : -dim; 59 fLast = dim>0 ? dim : -dim; 60 61 fNum = fLast-fFirst+1; 62 63 AddToBranchList("fImpact"); 64 AddToBranchList("fEnergy"); 65 AddToBranchList("fPhi"); 66 AddToBranchList("fTheta"); 67 AddToBranchList("fPhotElfromShower"); 68 AddToBranchList("MMcTrig", "fNumFirstLevel", fFirst, fLast); 58 69 } 59 70 … … 124 135 } 125 136 126 UInt_t from = fDimension>0 ? 1 : -fDimension; 127 UInt_t to = fDimension>0 ? fDimension : -fDimension; 128 129 fNum = to-from+1; 130 131 Int_t num; 132 133 fMcTrig = new TObjArray(pList->FindObjectList("MMcTrig", from, to)); 137 UInt_t num; 138 139 fMcTrig = new TObjArray(pList->FindObjectList("MMcTrig", fFirst, fLast)); 134 140 num = fMcTrig->GetEntriesFast(); 135 141 if (num != fNum) … … 140 146 } 141 147 142 fMcRate = new TObjArray(pList->FindObjectList("MHMcRate", f rom, to));148 fMcRate = new TObjArray(pList->FindObjectList("MHMcRate", fFirst, fLast)); 143 149 num = fMcRate->GetEntriesFast(); 144 150 if (num != fNum) … … 149 155 } 150 156 151 for ( int i=0; i<fNum; i++)157 for (UInt_t i=0; i<fNum; i++) 152 158 { 153 159 MHMcRate &rate = *GetRate(i); … … 191 197 // Counting number of triggers 192 198 // 193 for ( int i=0; i<fNum; i++)199 for (UInt_t i=0; i<fNum; i++) 194 200 { 195 201 fTrigger[i] += GetTrig(i)->GetFirstLevel(); … … 210 216 // Computing trigger rate 211 217 // 212 for ( int i=0; i<fNum; i++)218 for (UInt_t i=0; i<fNum; i++) 213 219 GetRate(i)->CalcRate(fTrigger[i], fAnalShow, fShowers); 214 220 -
trunk/MagicSoft/Mars/mmontecarlo/MMcTriggerRateCalc.h
r988 r1007 25 25 TObjArray *fMcTrig; 26 26 27 Int_t fDimension; // Information about the trigger conditions28 // in the root file to be read.29 Int_t fNum; // decoded dimension27 UInt_t fNum; // decoded dimension 28 UInt_t fFirst; 29 UInt_t fLast; 30 30 31 31 Float_t fTrigger[10]; // Number of triggered showers
Note:
See TracChangeset
for help on using the changeset viewer.