Changeset 1172 for trunk/MagicSoft/Mars/manalysis
- Timestamp:
- 01/14/02 17:34:02 (23 years ago)
- Location:
- trunk/MagicSoft/Mars/manalysis
- Files:
-
- 2 edited
Legend:
- Unmodified
- Added
- Removed
-
trunk/MagicSoft/Mars/manalysis/MMcPedestalCopy.cc
r1131 r1172 26 26 // // 27 27 // MMcPedestalCopy // 28 // // 28 29 // This task looks for the ìnformation about FADC pedestals in // 29 30 // MMcFadcHeader and translates it to the pedestal values in // … … 64 65 } 65 66 67 // -------------------------------------------------------------------------- 68 // 69 // Check for the run type. Return kTRUE if it is a MC run or if there 70 // is no MC run header (old camera files) kFALSE in case of a different 71 // run type 72 // 66 73 Bool_t MMcPedestalCopy::CheckRunType(MParList *pList) const 67 74 { … … 76 83 } 77 84 85 // -------------------------------------------------------------------------- 86 // 87 // Check runtype and search for MPedestalCam and MMcFadcHeader. 88 // If the runtype check fails the task is removed from the task list. 89 // 78 90 Bool_t MMcPedestalCopy::PreProcess(MParList *pList) 79 91 { … … 99 111 } 100 112 113 // -------------------------------------------------------------------------- 114 // 115 // Check for the runtype. (not yet: If the check fails the eventloop is 116 // stopped.) 117 // Initialize the size of MPedestalCam to the number of pixels from 118 // MMcFadcHeader. 119 // 101 120 Bool_t MMcPedestalCopy::ReInit(MParList *pList) 102 121 { -
trunk/MagicSoft/Mars/manalysis/MMcPedestalNSBAdd.cc
r1132 r1172 33 33 // MPedestalCam the NSB contribution. // 34 34 // The number of photons from the diffuse NSB follows a poisson // 35 // distribution with expected mean value X, then its standard de sviation//35 // distribution with expected mean value X, then its standard deviation // 36 36 // is sqrt(X). // 37 37 // X is the number of phe per ns so we have to convert in FADC counts per // … … 85 85 } 86 86 87 // -------------------------------------------------------------------------- 88 // 89 // Check for the run type. Return kTRUE if it is a MC run or if there 90 // is no MC run header (old camera files) kFALSE in case of a different 91 // run type 92 // 87 93 Bool_t MMcPedestalNSBAdd::CheckRunType(MParList *pList) const 88 94 { … … 141 147 142 148 return kTRUE; 149 } 150 151 Float_t MMcPedestalNSBAdd::GetDnsb(MParList *pList) const 152 { 153 MMcRunHeader *mcrunheader = (MMcRunHeader*)pList->FindObject("MMcRunHeader"); 154 if (!mcrunheader && fDnsbPixel < 0 ) 155 { 156 *fLog << err << dbginf << "Using the default argument of MMcPedestalNSB::MMcPedestalNSB() "; 157 *fLog << "only allowed if MMcRunHeader is available... aborting." << endl; 158 return -1; 159 } 160 161 if (!mcrunheader) 162 return fDnsbPixel; 163 164 if (fDnsbPixel >= 0 && fDnsbPixel != mcrunheader->GetNumPheFromDNSB()) 165 { 166 *fLog << warn << dbginf << "The MC file has been generated with diffuse nsb " << mcrunheader->GetNumPheFromDNSB(); 167 *fLog <<" but you set up the diffuse NSB to " << fDnsbPixel << endl; 168 169 return fDnsbPixel; 170 } 171 172 return mcrunheader->GetNumPheFromDNSB(); 143 173 } 144 174 … … 158 188 // - MPedestalCam 159 189 // 160 Float_t MMcPedestalNSBAdd::GetDnsb(MParList *pList) const161 {162 MMcRunHeader *mcrunheader = (MMcRunHeader*)pList->FindObject("MMcRunHeader");163 if (!mcrunheader && fDnsbPixel < 0 )164 {165 *fLog << err << dbginf << "Using the default argument of MMcPedestalNSB::MMcPedestalNSB() ";166 *fLog << "only allowed if MMcRunHeader is available... aborting." << endl;167 return -1;168 }169 170 if (!mcrunheader)171 return fDnsbPixel;172 173 if (fDnsbPixel >= 0 && fDnsbPixel != mcrunheader->GetNumPheFromDNSB())174 {175 *fLog << warn << dbginf << "The MC file has been generated with diffuse nsb " << mcrunheader->GetNumPheFromDNSB();176 *fLog <<" but you set up the diffuse NSB to " << fDnsbPixel << endl;177 178 return fDnsbPixel;179 }180 181 return mcrunheader->GetNumPheFromDNSB();182 }183 184 190 Bool_t MMcPedestalNSBAdd::ReInit(MParList *pList) 185 191 {
Note:
See TracChangeset
for help on using the changeset viewer.