Changeset 2209 for trunk/MagicSoft/Mars/manalysis
- Timestamp:
- 06/23/03 12:09:05 (22 years ago)
- Location:
- trunk/MagicSoft/Mars/manalysis
- Files:
-
- 3 edited
Legend:
- Unmodified
- Added
- Removed
-
trunk/MagicSoft/Mars/manalysis/MSigmabar.cc
r2173 r2209 145 145 } 146 146 147 const MGeomPix &gpix = geom[id]; 148 const MPedestalPix &pix = ped[id]; 147 const MGeomPix &gpix = geom[id]; 149 148 150 149 Int_t sector = (Int_t)(atan2(gpix.GetY(),gpix.GetX())*6 / (TMath::Pi()*2)); … … 153 152 154 153 // count only those pixels which have a sigma != 0.0 155 const Float_t sigma = p ix.GetMeanRms();154 const Float_t sigma = ped[id].GetMeanRms(); 156 155 157 156 if ( sigma <= 0 ) -
trunk/MagicSoft/Mars/manalysis/MSigmabarCalc.cc
r2173 r2209 65 65 } 66 66 67 MSigmabarCalc::~MSigmabarCalc()68 {69 // nothing special yet.70 }71 72 67 // -------------------------------------------------------------------------- 73 68 // … … 75 70 // if not create one and add them to the list 76 71 // 77 Bool_t MSigmabarCalc::PreProcess(MParList *pList)72 Int_t MSigmabarCalc::PreProcess(MParList *pList) 78 73 { 79 74 fCam = (MGeomCam*)pList->FindObject("MGeomCam"); … … 91 86 } 92 87 93 fSig = (MSigmabar*)pList->FindCreateObj("MSigmabar");94 if (!fSig)95 {96 *fLog << err << "MSigmabar not found... aborting." << endl;97 return kFALSE;98 }99 100 fSigParam = (MSigmabarParam*)pList->FindCreateObj("MSigmabarParam");101 if (!fSigParam)102 {103 *fLog << err << "MSigmabarParam not found... aborting." << endl;104 return kFALSE;105 }106 107 88 fRun = (MRawRunHeader*)pList->FindObject("MRawRunHeader"); 108 89 if (!fRun) … … 111 92 return kFALSE; 112 93 } 113 94 114 95 // This is needed for determining min/max Theta 115 96 fMcEvt = (MMcEvt*)pList->FindObject("MMcEvt"); 116 97 if (!fMcEvt) 117 { 118 *fLog << err << "MMcEvt not found... aborting." << endl; 119 return kFALSE; 120 } 98 { 99 *fLog << warn << "MMcEvt not found... aborting." << endl; 100 fThetaMin = 0; 101 fThetaMax = 90; 102 } 121 103 122 104 fEvt = (MCerPhotEvt*)pList->FindObject("MCerPhotEvt"); … … 126 108 return kFALSE; 127 109 } 110 111 fSig = (MSigmabar*)pList->FindCreateObj("MSigmabar"); 112 if (!fSig) 113 return kFALSE; 114 115 fSigParam = (MSigmabarParam*)pList->FindCreateObj("MSigmabarParam"); 116 if (!fSigParam) 117 return kFALSE; 118 128 119 129 120 return kTRUE; … … 137 128 // values. Preliminary. 138 129 // 139 Bool_t MSigmabarCalc::Process()130 Int_t MSigmabarCalc::Process() 140 131 { 141 132 const Double_t rc = fSig->Calc(*fCam, *fPed, *fEvt); 142 133 143 fSigmabarMax = TMath::Max(rc, fSigmabarMax); 144 fSigmabarMin = TMath::Min(rc, fSigmabarMin); 134 if (rc>fSigmabarMax) fSigmabarMax=rc; 135 if (rc<fSigmabarMin) fSigmabarMin=rc; 136 137 if (!fMcEvt) 138 return kTRUE; 145 139 146 140 const Double_t theta = fMcEvt->GetTelescopeTheta()*kRad2Deg; 147 141 148 fThetaMax = TMath::Max(theta, fThetaMax);149 fThetaMin = TMath::Min(theta, fThetaMin);142 if (theta>fSigmabarMax) fSigmabarMax=theta; 143 if (theta<fSigmabarMax) fSigmabarMin=theta; 150 144 151 145 return kTRUE; … … 169 163 void MSigmabarCalc::Reset() 170 164 { 171 fThetaMin = 200; // there must be a function which gives me the hightest 172 fThetaMax = 0; // value allowed for a certain type! 173 fSigmabarMin = 200; 165 if (!fMcEvt) 166 return; 167 168 fThetaMin = FLT_MAX; 169 fThetaMax = 0; 170 fSigmabarMin = FLT_MAX; 174 171 fSigmabarMax = 0; 175 172 } -
trunk/MagicSoft/Mars/manalysis/MSigmabarCalc.h
r1951 r2209 48 48 void Reset(); 49 49 50 Int_t PreProcess(MParList *pList); 51 Int_t Process(); 52 53 Bool_t ReInit(MParList *pList); 54 50 55 public: 51 56 MSigmabarCalc(const char *name=NULL, const char *title=NULL); 52 ~MSigmabarCalc();53 54 Bool_t PreProcess(MParList *pList);55 Bool_t ReInit(MParList *pList);56 Bool_t Process();57 57 58 58 ClassDef(MSigmabarCalc, 0) // task for calculating sigmabar
Note:
See TracChangeset
for help on using the changeset viewer.