#include <VtxFinderAna.h>
Inheritance diagram for VtxFinderAna:

Public Member Functions | |
| VtxFinderAna (VtxFinderData &vf) | |
| virtual | ~VtxFinderAna () |
| void | Analyze (int evtn, NtpStRecord *srobj, RecRecordImp< RecCandHeader > *srobj2) |
| void | Analyze (int evtn, RecRecordImp< RecCandHeader > *srobj) |
| void | FindClosest (NtpSREvent *event, RecRecordImp< RecCandHeader > *srobj) |
| Int_t | InsideNearFiducial (Float_t x, Float_t y, Float_t z) |
| Int_t | InsideFarFiducial (Float_t x, Float_t y, Float_t z) |
Private Attributes | |
| VtxFinderData & | fVtxData |
| NtpVtxFinder * | vtxf |
|
|
Definition at line 32 of file VtxFinderAna.cxx. 00032 : 00033 fVtxData(vf) 00034 { 00035 }
|
|
|
Definition at line 37 of file VtxFinderAna.cxx. 00038 {
00039 }
|
|
||||||||||||
|
Implements NueAnaBase. Definition at line 41 of file VtxFinderAna.cxx. References Analyze(), and vtxf. 00042 {
00043 if(srobj==0){
00044 return;
00045 }
00046
00047 NtpStRecord *st = dynamic_cast<NtpStRecord *>(srobj);
00048 vtxf = new NtpVtxFinder(event, st);
00049
00050 Analyze(event,st, srobj);
00051 delete vtxf;
00052 }
|
|
||||||||||||||||
|
||||||||||||
|
Definition at line 152 of file VtxFinderAna.cxx. References fVtxData, SntpHelpers::GetStrip(), SntpHelpers::GetStripIndex(), ANtpDefaultValue::IsDefault(), VtxFinderData::mcVtxU, VtxFinderData::mcVtxV, VtxFinderData::mcVtxZ, MSG, NtpSREvent::nstrip, NtpSRStrip::planeview, NtpSRStrip::tpos, VtxFinderData::vfBestError, VtxFinderData::vfBestErrU, VtxFinderData::vfBestErrV, VtxFinderData::vfBestErrZ, VtxFinderData::vfBestU, VtxFinderData::vfBestV, VtxFinderData::vfBestX, VtxFinderData::vfBestY, VtxFinderData::vfBestZ, VtxFinderData::vfRelError, VtxFinderData::vfRelErrU, VtxFinderData::vfRelErrV, VtxFinderData::vfRelErrZ, VtxFinderData::vfVtxU, VtxFinderData::vfVtxV, VtxFinderData::vfVtxZ, and NtpSRStrip::z. Referenced by Analyze(). 00154 {
00155 Double_t dist = 100000.0;
00156 fVtxData.vfBestU = ANtpDefaultValue::kFloat;
00157 fVtxData.vfBestV = ANtpDefaultValue::kFloat;
00158 fVtxData.vfBestZ = ANtpDefaultValue::kFloat;
00159
00160 for(int i=0;i<event->nstrip;i++){
00161 Int_t index = SntpHelpers::GetStripIndex(i,event);
00162 NtpSRStrip *strip = SntpHelpers::GetStrip(index,srobj);
00163 Double_t zpos = strip->z;
00164 Float_t dZ = TMath::Abs(zpos - fVtxData.mcVtxZ);
00165 if(dZ < dist){
00166 fVtxData.vfBestZ = zpos;
00167 dist = dZ;
00168 }
00169 }
00170
00171 Float_t utemp = 100000.0;
00172 Float_t vtemp = utemp;
00173 for(int i=0;i<event->nstrip;i++){
00174 Int_t index = SntpHelpers::GetStripIndex(i,event);
00175 NtpSRStrip *strip = SntpHelpers::GetStrip(index,srobj);
00176
00177
00178 if(TMath::Abs(fVtxData.vfBestZ - strip->z) < 0.25){
00179 Double_t tpos = strip->tpos;
00180
00181 if(strip->planeview==PlaneView::kU){
00182 Float_t dU = TMath::Abs(tpos - fVtxData.mcVtxU);
00183 if(dU < utemp){
00184 fVtxData.vfBestU = tpos;
00185 utemp = dU;
00186 }
00187 } else if(strip->planeview==PlaneView::kV){
00188 Float_t dV = TMath::Abs(tpos - fVtxData.mcVtxV);
00189 MSG("VtxFinderAna", Msg::kVerbose)<<"V problem: "
00190 <<"dV = "<<dV<<" tpos = "<<tpos
00191 <<" vtemp = "<<vtemp<<" mc.vtxY = "
00192 <<fVtxData.mcVtxV<<endl;
00193 if(dV < vtemp){
00194 fVtxData.vfBestV = tpos;
00195 vtemp = dV;
00196 }
00197 }
00198 }
00199 }
00200
00201 Float_t dU = TMath::Abs(fVtxData.vfBestU - fVtxData.mcVtxU);
00202 Float_t dV = TMath::Abs(fVtxData.vfBestV - fVtxData.mcVtxV);
00203 Float_t dZ = TMath::Abs(fVtxData.vfBestZ - fVtxData.mcVtxZ);
00204
00205 fVtxData.vfBestErrU = dU;
00206 fVtxData.vfBestErrV = dV;
00207 fVtxData.vfBestErrZ = dZ;
00208
00209 dist = TMath::Sqrt(dZ*dZ + dU*dU + dV*dV);
00210 fVtxData.vfBestError = dist;
00211
00212
00213 dU = TMath::Abs(fVtxData.vfBestU - fVtxData.vfVtxU);
00214 dV = TMath::Abs(fVtxData.vfBestV - fVtxData.vfVtxV);
00215 dZ = TMath::Abs(fVtxData.vfBestZ - fVtxData.vfVtxZ);
00216
00217 fVtxData.vfRelErrU = dU;
00218 fVtxData.vfRelErrV = dV;
00219 fVtxData.vfRelErrZ = dZ;
00220 fVtxData.vfRelError = TMath::Sqrt(dZ*dZ + dU*dU + dV*dV);
00221
00222
00223 Float_t u = fVtxData.vfBestU;
00224 Float_t v = fVtxData.vfBestV;
00225
00226 if(ANtpDefVal::IsDefault(fVtxData.vfBestU) ||
00227 ANtpDefVal::IsDefault(fVtxData.vfBestV) ||
00228 ANtpDefVal::IsDefault(fVtxData.vfBestZ) )
00229 {
00230 fVtxData.vfBestU = ANtpDefaultValue::kFloat;
00231 fVtxData.vfBestV = ANtpDefaultValue::kFloat;
00232 fVtxData.vfBestZ = ANtpDefaultValue::kFloat;
00233 fVtxData.vfBestError = ANtpDefaultValue::kFloat;
00234 return;
00235 }
00236
00237 fVtxData.vfBestX = (sqrt(2.0)/2.0)*(u-v);
00238 fVtxData.vfBestY = (sqrt(2.0)/2.0)*(u+v);
00239 }
|
|
||||||||||||||||
|
Definition at line 241 of file VtxFinderAna.cxx. Referenced by Analyze(). 00242 {
00243 Float_t SuperModule1Beg = 0.35;
00244 Float_t SuperModule2Beg = 16.20;
00245 Float_t SuperModule1End = 14.57;
00246 Float_t SuperModule2End = 29.62;
00247
00248 Float_t radialInner = 0.40;
00249 Float_t radialOuter = 3.87;
00250 Bool_t zContained = false;
00251 Bool_t xyContained = false;
00252
00253 Float_t r = TMath::Sqrt(x*x + y*y);
00254
00255 if( (z >= SuperModule1Beg && z <=SuperModule1End) ||
00256 (z >= SuperModule2Beg && z <=SuperModule2End) )
00257 zContained = true;
00258
00259 if( r >= radialInner && r <= radialOuter)
00260 xyContained = true;
00261
00262 Int_t retVal = 0;
00263 if(zContained && xyContained) retVal = 1;
00264 if(!zContained) retVal = -1;
00265 if(!xyContained) retVal -= 2;
00266
00267 return retVal; // 1 contained, -1 out of bounds z
00268 // -2 oob xy, -3 oob both
00269 }
|
|
||||||||||||||||
|
Definition at line 271 of file VtxFinderAna.cxx. Referenced by Analyze(). 00272 {
00273 Float_t SuperModule1Beg = 0.40;
00274 Float_t SuperModule1End = 6.50;
00275
00276 Float_t radialInner = 0;
00277 Float_t radialOuter = 1;
00278 Float_t xCenter = 1.4885;
00279 Float_t yCenter = 0.1397;
00280 Bool_t zContained = false;
00281 Bool_t xyContained = false;
00282
00283 Float_t r = TMath::Sqrt((x-xCenter)*(x-xCenter) + (y-yCenter)*(y-yCenter));
00284 if( z >= SuperModule1Beg && z <=SuperModule1End)
00285 zContained = true;
00286
00287 if( r >= radialInner && r <= radialOuter)
00288 xyContained = true;
00289
00290 Int_t retVal = 0;
00291 if(zContained && xyContained) retVal = 1;
00292 if(!zContained) retVal = -1;
00293 if(!xyContained) retVal -= 2;
00294
00295 return retVal;
00296 }
|
|
|
Definition at line 30 of file VtxFinderAna.h. Referenced by Analyze(), and FindClosest(). |
|
|
Definition at line 31 of file VtxFinderAna.h. Referenced by Analyze(). |
1.3.9.1