00001
00002
00003
00004
00005
00006
00007
00008
00009
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");
00028
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,
00044 16,
00045 2,
00046 3,
00047 3,
00048 4,
00049 90,
00050 0,
00051 0);
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