00001
00002
00003
00004
00005
00006
00007
00008
00009
00010
00011
00012
00013
00014
00015 #include "L1TriggerConfig/DTTPGConfig/interface/DTConfigBti.h"
00016
00017
00018
00019
00020 #include <cstdlib>
00021 #include <string>
00022 #include <iostream>
00023 #include <fstream>
00024 #include <stdio.h>
00025 #include <stdlib.h>
00026 #include <math.h>
00027 #include <iomanip>
00028
00029
00030
00031
00032
00033
00034
00035
00036 DTConfigBti::DTConfigBti(const edm::ParameterSet& ps) {
00037
00038 setDefaults(ps);
00039
00040 }
00041
00042
00043
00044
00045 DTConfigBti::~DTConfigBti() {}
00046
00047
00048
00049
00050
00051 void
00052 DTConfigBti::setDefaults(const edm::ParameterSet& ps) {
00053
00054
00055 m_debug = ps.getUntrackedParameter<int>("Debug");
00056
00057
00058 m_kcut = ps.getParameter<int>("KMAX");
00059
00060
00061 m_kacctheta = ps.getParameter<int>("KACCTHETA");
00062
00063
00064 m_xon = ps.getParameter<bool>("XON");
00065
00066 m_lts = ps.getParameter<int>("LTS");
00067 m_set = ps.getParameter<int>("SET");
00068
00069 m_ac1 = ps.getParameter<int>("AC1");
00070 m_ac2 = ps.getParameter<int>("AC2");
00071 m_ach = ps.getParameter<int>("ACH");
00072 m_acl = ps.getParameter<int>("ACL");
00073
00074 m_ron = ps.getParameter<bool>("RON");
00075
00076
00077 for(int p=0; p<32; p++)
00078 {
00079 std::string label = "PTMS";
00080 char patt0 = (p/10)+'0';
00081 char patt1 = (p%10)+'0';
00082 if ( patt0 != '0' )
00083 label = label + patt0;
00084 label = label + patt1;
00085
00086 m_pattmask.set(p,ps.getParameter<int>(label));
00087 }
00088
00089
00090 for(int w=0; w<9; w++)
00091 {
00092 std::string label = "WEN";
00093 char wname = w+'0';
00094 label = label + wname;
00095
00096 m_wiremask.set(w,ps.getParameter<int>(label));
00097 }
00098
00099
00100 m_ll = ps.getParameter<int>("LL");
00101 m_lh = ps.getParameter<int>("LH");
00102 m_cl = ps.getParameter<int>("CL");
00103 m_ch = ps.getParameter<int>("CH");
00104 m_rl = ps.getParameter<int>("RL");
00105 m_rh = ps.getParameter<int>("RH");
00106
00107 m_4st3 = ps.getParameter<int>("ST43");
00108
00109 m_4re3 = ps.getParameter<int>("RE43");
00110
00111 m_dead = ps.getParameter<int>("DEAD");
00112 }
00113
00114 void
00115 DTConfigBti::print() const {
00116 std::cout << "******************************************************************************" << std::endl;
00117 std::cout << "* DTTrigger configuration : BTI chips *" << std::endl;
00118 std::cout << "******************************************************************************" << std::endl;
00119 std::cout << "* *" << std::endl;
00120 std::cout << "Debug flag : " << debug() << std::endl;
00121 std::cout << "Max K param accepted : " << KCut() << std::endl;
00122 std::cout << "BTI angular acceptance in theta view : " << KAccTheta() << std::endl;
00123 std::cout << "Time indep. K equation suppression (XON) : " << XON() << std::endl;
00124 std::cout << "LTS for low trigger suppression : " << LTS() << std::endl;
00125 std::cout << "SET for low trigger suppression : " << SET() << std::endl;
00126 std::cout << "pattern acceptance AC1, AC2, ACH, ACL : " <<
00127 AccPattAC1() << ", " << AccPattAC2() << " , " << AccPattACH() << ", " << AccPattACL() << std::endl;
00128 std::cout << "redundant patterns flag RON : " << RONflag() << std::endl;
00129 std::cout << "pattern masks : ";
00130 for(int p=0; p<32; p++)
00131 std::cout << PTMSflag(p) << " ";
00132 std::cout << std::endl;
00133
00134 std::cout << "wire masks : ";
00135 for(int w=1; w<=9; w++)
00136 std::cout << WENflag(w) << " ";
00137 std::cout << std::endl;
00138
00139 std::cout << "angular window limits for traco : " << LL() << ", " << LH() << ", "
00140 << CL() << ", " << CH() << ", " << RL() << ", " << RH() << std::endl;
00141 std::cout << "drift velocity parameter 4ST3 : " << ST43() << std::endl;
00142 std::cout << "drift velocity parameter 4RE3 : " << RE43() << std::endl;
00143 std::cout << "DEAD parameter : " << DEADpar() << std::endl;
00144
00145 std::cout << "******************************************************************************" << std::endl;
00146
00147 }