Main Page | Modules | Namespace List | Class Hierarchy | Alphabetical List | Class List | Directories | File List | Namespace Members | Class Members | File Members | Related Pages

CDTrackerOptions.cxx

Go to the documentation of this file.
00001 
00002 
00003 // Program name: CDTrackerOptions.cxx
00004 //
00005 // Package: CalDetTracker
00006 //
00007 // Purpose: 
00008 //
00009 // Contact: Chris Smith, Ryan Nichol, Leo Jenner or Jeff Hartnell
00011 
00012 #include <cstdlib>
00013 #include <iostream>
00014 
00015 #include "CalDetTracker/CDTrackerOptions.h"
00016 
00017 using std::cout;
00018 using std::endl;
00019 using std::string;
00020 
00021 ClassImp(CDTrackerOptions)
00022   
00023 //......................................................................
00024 
00025 CDTrackerOptions::CDTrackerOptions()
00026 {
00027   this->SetTrackerOptions("beam");//default changed by jjh 02/Jul/04 
00028   //this->SetTrackerOptions(0.,16,2,2,2,4,90.,0.,0.);//default was this
00029 }
00030   
00031 //......................................................................
00032 
00033 CDTrackerOptions::CDTrackerOptions(string s)
00034 {
00035   this->SetTrackerOptions(s);   
00036 }
00037 
00038 //......................................................................
00039 
00040 void CDTrackerOptions::SetTrackerOptions(string s)
00041 {
00042   if(s=="beam" || s=="BEAM" || s=="Beam") {
00043     this->SetTrackerOptions(0,//fthresh
00044                             16,//fminhit
00045                             2,//facceptance
00046                             3,//fhits_per_plane
00047                             3,//fmax_hot_planes
00048                             4,//ftrk_len_cut
00049                             90,//fangle_limit
00050                             0,//fmin_angle
00051                             0);//fmin_vert_angle
00052     this->SetCosmic(false);
00053   }
00054   else if(s=="cosmic" || s=="COSMIC" || s=="Cosmic") {
00055     this->SetTrackerOptions(0,
00056                             16,
00057                             8,
00058                             4,
00059                             3,
00060                             4,
00061                             90,
00062                             0,
00063                             20);
00064     this->SetCosmic(true);
00065   }
00066   else{
00067     cout<<"You tried to configure the CDTrackerOptions but the";
00068     cout<<" command was not recognised, exiting here..."<<endl;
00069     exit(0);
00070   }
00071 }
00072 
00073 //......................................................................
00074 
00075 void CDTrackerOptions::SetTrackerOptions(float thresh,
00076                                          int minhit,
00077                                          int acceptance,
00078                                          int hits_per_plane,
00079                                          int max_hot_planes,
00080                                          int trk_len_cut,
00081                                          float angle_limit,
00082                                          float min_angle,
00083                                          float min_vert_angle){    
00084   fthresh=thresh;
00085   fminhit=minhit;
00086   facceptance=acceptance;
00087   fhits_per_plane=hits_per_plane;
00088   fmax_hot_planes=max_hot_planes;
00089   ftrk_len_cut=trk_len_cut;
00090   fangle_limit = angle_limit;
00091   fmin_angle = min_angle;
00092   fmin_vert_angle=min_vert_angle;
00093   
00094 }
00095 
00096 //......................................................................

Generated on Mon Feb 15 11:06:31 2010 for loon by  doxygen 1.3.9.1