Changeset 1172 for trunk/MagicSoft/Mars/manalysis/MMcPedestalNSBAdd.cc
- Timestamp:
- 01/14/02 17:34:02 (23 years ago)
- File:
-
- 1 edited
Legend:
- Unmodified
- Added
- Removed
-
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.