Back to home page

Project CMSSW displayed by LXR

 
 

    


File indexing completed on 2021-02-14 13:30:47

0001 #ifndef L1Trigger_TrackFindingTracklet_interface_IMATH_TrackletCalculatorDisk_h
0002 #define L1Trigger_TrackFindingTracklet_interface_IMATH_TrackletCalculatorDisk_h
0003 
0004 #include "Settings.h"
0005 #include "imath.h"
0006 
0007 //
0008 // Constants used:
0009 //   dphisector
0010 //   rmaxL6
0011 //   zmaxD5
0012 //   rmaxdisk
0013 //   kr, kphi1, kz
0014 //
0015 //   rmean[], zmean[]
0016 
0017 namespace trklet {
0018 
0019   class IMATH_TrackletCalculatorDisk {
0020   public:
0021     IMATH_TrackletCalculatorDisk(Settings const& settings, imathGlobals* globals, int i1, int i2)
0022         : settings_(settings), globals_(globals) {
0023       if (settings_.debugTracklet()) {
0024         edm::LogVerbatim("Tracklet") << "=============================================";
0025         char s[1024];
0026         snprintf(s, 1024, "IMATH Tracklet Calculator for Disk %i %i dphisector = %f", i1, i2, settings_.dphisector());
0027         edm::LogVerbatim("Tracklet") << s;
0028         snprintf(s, 1024, "rmaxL6 = %f, zmaxD5 = %f", settings_.rmax(5), settings_.zmax(4));
0029         edm::LogVerbatim("Tracklet") << s;
0030         snprintf(
0031             s, 1024, "      stub Ks: kr, kphi1, kz = %g, %g, %g", settings_.kr(), settings_.kphi1(), settings_.kz());
0032         edm::LogVerbatim("Tracklet") << s;
0033         snprintf(s,
0034                  1024,
0035                  "  tracklet Ks: krinvpars, kphi0pars, ktpars, kzpars = %g, %g, %g, %g",
0036                  settings_.kphi1() / settings_.kr() * pow(2, settings_.rinv_shift()),
0037                  settings_.kphi1() * pow(2, settings_.phi0_shift()),
0038                  settings_.kz() / settings_.kr() * pow(2, settings_.t_shift()),
0039                  settings_.kz() * pow(2, settings_.z0_shift()));
0040         edm::LogVerbatim("Tracklet") << s;
0041         snprintf(s,
0042                  1024,
0043                  "layer proj Ks: kphiproj456, kphider, kzproj, kzder = %g, %g, %g, %g",
0044                  settings_.kphi1() * pow(2, settings_.SS_phiL_shift()),
0045                  settings_.kphi1() / settings_.kr() * pow(2, settings_.SS_phiderL_shift()),
0046                  settings_.kz() * pow(2, settings_.PS_zL_shift()),
0047                  settings_.kz() / settings_.kr() * pow(2, settings_.PS_zderL_shift()));
0048         edm::LogVerbatim("Tracklet") << s;
0049         snprintf(s,
0050                  1024,
0051                  " disk proj Ks: kphiprojdisk, kphiprojderdisk, krprojdisk, krprojderdisk = %g, %g, %g, %g",
0052                  settings_.kphi1() * pow(2, settings_.SS_phiD_shift()),
0053                  settings_.kphi1() / settings_.kr() * pow(2, settings_.SS_phiderD_shift()),
0054                  settings_.kr() * pow(2, settings_.PS_rD_shift()),
0055                  settings_.kr() / settings_.kz() * pow(2, settings_.PS_rderD_shift()));
0056         edm::LogVerbatim("Tracklet") << s;
0057         edm::LogVerbatim("Tracklet") << "=============================================";
0058       }
0059 
0060       z1mean.set_fval(settings_.zmean(abs(i1) - 1));
0061       z2mean.set_fval(settings_.zmean(abs(i2) - 1));
0062 
0063       if (i2 < 0) {  //t is negative
0064         z1mean.set_fval(-settings_.zmean(abs(i1) - 1));
0065         z2mean.set_fval(-settings_.zmean(abs(i2) - 1));
0066         invt.set_mode(VarInv::mode::neg);
0067         invt.initLUT(0.);
0068       }
0069 
0070       valid_phiL_0.add_cut(&t_layer_cut);
0071       valid_phiL_1.add_cut(&t_layer_cut);
0072       valid_phiL_2.add_cut(&t_layer_cut);
0073 
0074       valid_der_phiL.add_cut(&t_layer_cut);
0075 
0076       valid_zL_0.add_cut(&t_layer_cut);
0077       valid_zL_1.add_cut(&t_layer_cut);
0078       valid_zL_2.add_cut(&t_layer_cut);
0079 
0080       valid_der_zL.add_cut(&t_layer_cut);
0081 
0082       valid_phiD_0.add_cut(&t_disk_cut_left);
0083       valid_phiD_1.add_cut(&t_disk_cut_left);
0084       valid_phiD_2.add_cut(&t_disk_cut_left);
0085 
0086       valid_der_phiD.add_cut(&t_disk_cut_left);
0087 
0088       valid_rD_0.add_cut(&t_disk_cut_left);
0089       valid_rD_1.add_cut(&t_disk_cut_left);
0090       valid_rD_2.add_cut(&t_disk_cut_left);
0091 
0092       valid_der_rD.add_cut(&t_disk_cut_left);
0093 
0094       valid_phiD_0.add_cut(&t_disk_cut_right);
0095       valid_phiD_1.add_cut(&t_disk_cut_right);
0096       valid_phiD_2.add_cut(&t_disk_cut_right);
0097 
0098       valid_der_phiD.add_cut(&t_disk_cut_right);
0099 
0100       valid_rD_0.add_cut(&t_disk_cut_right);
0101       valid_rD_1.add_cut(&t_disk_cut_right);
0102       valid_rD_2.add_cut(&t_disk_cut_right);
0103 
0104       valid_der_rD.add_cut(&t_disk_cut_right);
0105     }
0106 
0107     ~IMATH_TrackletCalculatorDisk() = default;
0108 
0109     Settings const& settings_;
0110 
0111     imathGlobals* globals_;
0112 
0113     //max values
0114     const double dz_max = 50.;
0115     const double dr_max = 20.;
0116     const double delta0_max = 0.005;
0117     const double a2_max = 3.;
0118     const double a2a_max = 0.1;
0119     const double x6a_max = 0.02;
0120     const double x6m_max = 2.;
0121     const double x8_max = 1.;
0122     const double x13_max = 300.;
0123     const double x22_max = 0.3;
0124     const double x23_max = 200.;
0125     const double deltaZ_max = 8.;
0126     const double der_phiD_max = 0.002;
0127     const double t_max = 7.9;
0128     const double t_disk_min = 1.;
0129     const double t_disk_max = 7.9;
0130     const double t_layer_max = 2.5;
0131     const double z0_max = 20.;
0132     const double z0a_max = 205.;
0133 
0134     //constants
0135     VarParam plus2{globals_, "plus2", 2., 10};
0136     VarParam plus1{globals_, "plus1", 1., 10};
0137     VarParam minus1{globals_, "minus1", -1, 10};
0138 
0139     VarParam z1mean{globals_, "z1mean", "Kz", settings_.zmax(trklet::N_DISK - 1), settings_.kz()};
0140     VarParam z2mean{globals_, "z2mean", "Kz", settings_.zmax(trklet::N_DISK - 1), settings_.kz()};
0141 
0142     //inputs
0143     VarDef r1{globals_, "r1", "Kr", settings_.rmax(trklet::N_LAYER - 1), settings_.kr()};
0144     VarDef r2{globals_, "r2", "Kr", settings_.rmax(trklet::N_LAYER - 1), settings_.kr()};
0145     VarDef z1{globals_, "z1", "Kz", settings_.dzmax(), settings_.kz()};
0146     VarDef z2{globals_, "z2", "Kz", settings_.dzmax(), settings_.kz()};
0147 
0148     VarDef phi1{globals_, "phi1", "Kphi", settings_.dphisector() / 0.75, settings_.kphi1()};
0149     VarDef phi2{globals_, "phi2", "Kphi", settings_.dphisector() / 0.75, settings_.kphi1()};
0150 
0151     VarDef rproj0{globals_, "rproj0", "Kr", settings_.rmax(trklet::N_LAYER - 1), settings_.kr()};
0152     VarDef rproj1{globals_, "rproj1", "Kr", settings_.rmax(trklet::N_LAYER - 1), settings_.kr()};
0153     VarDef rproj2{globals_, "rproj2", "Kr", settings_.rmax(trklet::N_LAYER - 1), settings_.kr()};
0154 
0155     VarDef zproj0{globals_, "zproj0", "Kz", settings_.zmax(trklet::N_DISK - 1), settings_.kz()};
0156     VarDef zproj1{globals_, "zproj1", "Kz", settings_.zmax(trklet::N_DISK - 1), settings_.kz()};
0157     VarDef zproj2{globals_, "zproj2", "Kz", settings_.zmax(trklet::N_DISK - 1), settings_.kz()};
0158 
0159     //calculations
0160 
0161     //tracklet
0162     VarAdd z1abs{globals_, "z1abs", &z1, &z1mean, settings_.zmax(trklet::N_DISK - 1)};
0163     VarAdd z2abs{globals_, "z2abs", &z2, &z2mean, settings_.zmax(trklet::N_DISK - 1)};
0164 
0165     VarSubtract dr{globals_, "dr", &r2, &r1, dr_max};
0166 
0167     //R LUT
0168     VarInv drinv{globals_, "drinv", &dr, 0, 18, 23, 0, VarInv::mode::pos};
0169 
0170     VarSubtract dphi{globals_, "dphi", &phi2, &phi1, settings_.dphisector() / 4.};
0171     VarSubtract dz{globals_, "dz", &z2abs, &z1abs, dz_max};
0172 
0173     VarMult delta0{globals_, "delta0", &dphi, &drinv, 4 * delta0_max};
0174     VarMult deltaZ{globals_, "deltaZ", &dz, &drinv, deltaZ_max};
0175     VarMult delta1{globals_, "delta1", &r1, &delta0};
0176     VarMult delta2{globals_, "delta2", &r2, &delta0};
0177     VarMult a2a{globals_, "a2a", &delta1, &delta2, 4 * a2a_max};
0178     VarNounits a2b{globals_, "a2b", &a2a};
0179     VarSubtract a2{globals_, "a2", &plus2, &a2b, 3.};
0180     VarNeg a2n{globals_, "a2n", &a2};
0181     VarShift a{globals_, "a", &a2, 1};
0182 
0183     VarAdd Rabs{globals_, "Rabs", &r1, &r2};
0184     VarTimesC R6{globals_, "R6", &Rabs, 1. / 6., 12};
0185 
0186     VarMult x4{globals_, "x4", &R6, &delta0};
0187     VarMult x6a{globals_, "x6a", &delta2, &x4, 8 * x6a_max};
0188     VarNounits x6b{globals_, "x6b", &x6a};
0189     VarAdd x6m{globals_, "x6m", &minus1, &x6b, 2.};
0190     VarMult phi0a{globals_, "phi0a", &delta1, &x6m, settings_.dphisector()};
0191 
0192     VarMult z0a{globals_, "z0a", &r1, &deltaZ, 2 * settings_.zlength()};
0193     VarMult z0b{globals_, "z0b", &z0a, &x6m, 2 * settings_.zlength()};
0194 
0195     VarAdd phi0{globals_, "phi0", &phi1, &phi0a, 2 * settings_.dphisector()};
0196     VarMult rinv{globals_, "rinv", &a2n, &delta0, 4 * settings_.maxrinv()};
0197     VarMult t{globals_, "t", &a, &deltaZ, 2 * t_max};
0198     VarAdd z0{globals_, "z0", &z1abs, &z0b, 2 * z0_max};
0199 
0200     VarAdjustK rinv_final{
0201         globals_, "rinv_final", &rinv, settings_.kphi1() / settings_.kr() * pow(2, settings_.rinv_shift())};
0202     VarAdjustK phi0_final{globals_, "phi0_final", &phi0, settings_.kphi1() * pow(2, settings_.phi0_shift())};
0203     VarAdjustK t_final{globals_, "t_final", &t, settings_.kz() / settings_.kr() * pow(2, settings_.t_shift())};
0204     VarAdjustK z0_final{globals_, "z0_final", &z0, settings_.kz() * pow(2, settings_.z0_shift())};
0205 
0206     //projection to r
0207     VarShift x2{globals_, "x2", &delta0, 1};
0208 
0209     VarMult x1_0{globals_, "x1_0", &x2, &rproj0};
0210     VarMult x1_1{globals_, "x1_1", &x2, &rproj1};
0211     VarMult x1_2{globals_, "x1_2", &x2, &rproj2};
0212 
0213     VarMult x8_0{globals_, "x8_0", &x1_0, &a2n, x8_max};
0214     VarMult x8_1{globals_, "x8_1", &x1_1, &a2n, x8_max};
0215     VarMult x8_2{globals_, "x8_2", &x1_2, &a2n, x8_max};
0216 
0217     VarMult x12_0{globals_, "x12_0", &x8_0, &x8_0};
0218     VarMult x12_1{globals_, "x12_1", &x8_1, &x8_1};
0219     VarMult x12_2{globals_, "x12_2", &x8_2, &x8_2};
0220 
0221     VarNounits x12A_0{globals_, "x12A_0", &x12_0};
0222     VarNounits x12A_1{globals_, "x12A_1", &x12_1};
0223     VarNounits x12A_2{globals_, "x12A_2", &x12_2};
0224 
0225     VarTimesC x20_0{globals_, "x20_0", &x12A_0, 1. / 6.};
0226     VarTimesC x20_1{globals_, "x20_1", &x12A_1, 1. / 6.};
0227     VarTimesC x20_2{globals_, "x20_2", &x12A_2, 1. / 6.};
0228 
0229     VarAdd x10_0{globals_, "x10_0", &plus1, &x20_0};
0230     VarAdd x10_1{globals_, "x10_1", &plus1, &x20_1};
0231     VarAdd x10_2{globals_, "x10_2", &plus1, &x20_2};
0232 
0233     VarMult x22_0{globals_, "x22_0", &x8_0, &x10_0, 2 * x22_max};
0234     VarMult x22_1{globals_, "x22_1", &x8_1, &x10_1, 2 * x22_max};
0235     VarMult x22_2{globals_, "x22_2", &x8_2, &x10_2, 2 * x22_max};
0236 
0237     VarSubtract phiL_0{globals_, "phiL_0", &phi0_final, &x22_0, -1, phi0_final.nbits() + 1};
0238     VarSubtract phiL_1{globals_, "phiL_1", &phi0_final, &x22_1, -1, phi0_final.nbits() + 1};
0239     VarSubtract phiL_2{globals_, "phiL_2", &phi0_final, &x22_2, -1, phi0_final.nbits() + 1};
0240 
0241     VarShift x3{globals_, "x3", &rinv, 1};
0242     VarNeg der_phiL{globals_, "der_phiL", &x3};
0243 
0244     VarAdjustK phiL_0_final{globals_, "phiL_0_final", &phiL_0, settings_.kphi1() * pow(2, settings_.SS_phiL_shift())};
0245     VarAdjustK phiL_1_final{globals_, "phiL_1_final", &phiL_1, settings_.kphi1() * pow(2, settings_.SS_phiL_shift())};
0246     VarAdjustK phiL_2_final{globals_, "phiL_2_final", &phiL_2, settings_.kphi1() * pow(2, settings_.SS_phiL_shift())};
0247 
0248     VarAdjustK der_phiL_final{globals_,
0249                               "der_phiL_final",
0250                               &der_phiL,
0251                               settings_.kphi1() / settings_.kr() * pow(2, settings_.SS_phiderL_shift())};
0252 
0253     VarMult x11_0{globals_, "x11_0", &rproj0, &t};
0254     VarMult x11_1{globals_, "x11_1", &rproj1, &t};
0255     VarMult x11_2{globals_, "x11_2", &rproj2, &t};
0256 
0257     VarMult x23_0{globals_, "x23_0", &x11_0, &x10_0, 4 * x23_max};
0258     VarMult x23_1{globals_, "x23_1", &x11_1, &x10_1, 4 * x23_max};
0259     VarMult x23_2{globals_, "x23_2", &x11_2, &x10_2, 4 * x23_max};
0260 
0261     VarAdd zL_0{globals_, "zL_0", &z0, &x23_0};
0262     VarAdd zL_1{globals_, "zL_1", &z0, &x23_1};
0263     VarAdd zL_2{globals_, "zL_2", &z0, &x23_2};
0264 
0265     VarAdjustK zL_0_final{globals_, "zL_0_final", &zL_0, settings_.kz() * pow(2, settings_.PS_zL_shift())};
0266     VarAdjustK zL_1_final{globals_, "zL_1_final", &zL_1, settings_.kz() * pow(2, settings_.PS_zL_shift())};
0267     VarAdjustK zL_2_final{globals_, "zL_2_final", &zL_2, settings_.kz() * pow(2, settings_.PS_zL_shift())};
0268 
0269     VarAdjustK der_zL_final{
0270         globals_, "der_zL_final", &t_final, settings_.kz() / settings_.kr() * pow(2, settings_.PS_zderL_shift())};
0271 
0272     //projection to z
0273     VarInv invt{globals_, "invt", &t_final, 0., 18, 26, 1, VarInv::mode::pos, 13};
0274 
0275     VarMult x7{globals_, "x7", &x2, &a2};
0276 
0277     VarSubtract x5_0{globals_, "x5_0", &zproj0, &z0};
0278     VarSubtract x5_1{globals_, "x5_1", &zproj1, &z0};
0279     VarSubtract x5_2{globals_, "x5_2", &zproj2, &z0};
0280 
0281     VarMult x13_0{globals_, "x13_0", &x5_0, &invt, x13_max};
0282     VarMult x13_1{globals_, "x13_1", &x5_1, &invt, x13_max};
0283     VarMult x13_2{globals_, "x13_2", &x5_2, &invt, x13_max};
0284 
0285     VarMult x25_0{globals_, "x25_0", &x13_0, &x7, settings_.dphisector()};
0286     VarMult x25_1{globals_, "x25_1", &x13_1, &x7, settings_.dphisector()};
0287     VarMult x25_2{globals_, "x25_2", &x13_2, &x7, settings_.dphisector()};
0288 
0289     VarAdd phiD_0{globals_, "phiD_0", &phi0, &x25_0, 2 * settings_.dphisector()};
0290     VarAdd phiD_1{globals_, "phiD_1", &phi0, &x25_1, 2 * settings_.dphisector()};
0291     VarAdd phiD_2{globals_, "phiD_2", &phi0, &x25_2, 2 * settings_.dphisector()};
0292 
0293     VarAdjustK phiD_0_final{globals_, "phiD_0_final", &phiD_0, settings_.kphi1() * pow(2, settings_.SS_phiD_shift())};
0294     VarAdjustK phiD_1_final{globals_, "phiD_1_final", &phiD_1, settings_.kphi1() * pow(2, settings_.SS_phiD_shift())};
0295     VarAdjustK phiD_2_final{globals_, "phiD_2_final", &phiD_2, settings_.kphi1() * pow(2, settings_.SS_phiD_shift())};
0296 
0297     VarMult der_phiD{globals_, "der_phiD", &x7, &invt, 2 * der_phiD_max};
0298 
0299     VarAdjustK der_phiD_final{globals_,
0300                               "der_phiD_final",
0301                               &der_phiD,
0302                               settings_.kphi1() / settings_.kr() * pow(2, settings_.SS_phiderD_shift())};
0303 
0304     VarMult x26_0{globals_, "x26_0", &x25_0, &x25_0};
0305     VarMult x26_1{globals_, "x26_1", &x25_1, &x25_1};
0306     VarMult x26_2{globals_, "x26_2", &x25_2, &x25_2};
0307 
0308     VarNounits x26A_0{globals_, "x26A_0", &x26_0};
0309     VarNounits x26A_1{globals_, "x26A_1", &x26_1};
0310     VarNounits x26A_2{globals_, "x26A_2", &x26_2};
0311 
0312     VarTimesC x9_0{globals_, "x9_0", &x26A_0, 1. / 6.};
0313     VarTimesC x9_1{globals_, "x9_1", &x26A_1, 1. / 6.};
0314     VarTimesC x9_2{globals_, "x9_2", &x26A_2, 1. / 6.};
0315 
0316     VarSubtract x27_0{globals_, "x27_0", &plus1, &x9_0};
0317     VarSubtract x27_1{globals_, "x27_1", &plus1, &x9_1};
0318     VarSubtract x27_2{globals_, "x27_2", &plus1, &x9_2};
0319 
0320     VarMult rD_0{globals_, "rD_0", &x13_0, &x27_0, settings_.rmaxdisk()};
0321     VarMult rD_1{globals_, "rD_1", &x13_1, &x27_1, settings_.rmaxdisk()};
0322     VarMult rD_2{globals_, "rD_2", &x13_2, &x27_2, settings_.rmaxdisk()};
0323 
0324     VarAdjustK rD_0_final{globals_, "rD_0_final", &rD_0, settings_.kr() * pow(2, settings_.PS_rD_shift())};
0325     VarAdjustK rD_1_final{globals_, "rD_1_final", &rD_1, settings_.kr() * pow(2, settings_.PS_rD_shift())};
0326     VarAdjustK rD_2_final{globals_, "rD_2_final", &rD_2, settings_.kr() * pow(2, settings_.PS_rD_shift())};
0327 
0328     VarAdjustK der_rD_final{
0329         globals_, "der_rD_final", &invt, settings_.kr() / settings_.kz() * pow(2, settings_.PS_rderD_shift())};
0330 
0331     VarCut rinv_final_cut{globals_, &rinv_final, -settings_.rinvcut(), settings_.rinvcut()};
0332     VarCut z0_final_cut{globals_, &z0_final, -settings_.z0cut(), settings_.z0cut()};
0333 
0334     VarCut z1abs_cut{globals_, &z1abs, -settings_.zmax(4), settings_.zmax(4)};
0335     VarCut z2abs_cut{globals_, &z2abs, -settings_.zmax(4), settings_.zmax(4)};
0336     VarCut dr_cut{globals_, &dr, -dr_max, dr_max};
0337     VarCut dphi_cut{globals_, &dphi, -settings_.dphisector() / 4., settings_.dphisector() / 4.};
0338     VarCut dz_cut{globals_, &dz, -dz_max, dz_max};
0339     VarCut delta0_cut{globals_, &delta0, -delta0_max, delta0_max};
0340     VarCut deltaZ_cut{globals_, &deltaZ, -deltaZ_max, deltaZ_max};
0341     VarCut a2a_cut{globals_, &a2a, -a2a_max, a2a_max};
0342     VarCut a2_cut{globals_, &a2, -a2_max, a2_max};
0343     VarCut x6a_cut{globals_, &x6a, -x6a_max, x6a_max};
0344     VarCut x6m_cut{globals_, &x6m, -x6m_max, x6m_max};
0345     VarCut phi0a_cut{globals_, &phi0a, -settings_.dphisector(), settings_.dphisector()};
0346     VarCut z0a_cut{globals_, &z0a, -z0a_max, z0a_max};
0347     VarCut phi0_cut{globals_, &phi0, -2 * settings_.dphisector(), 2 * settings_.dphisector()};
0348     VarCut rinv_cut{globals_, &rinv, -settings_.maxrinv(), settings_.maxrinv()};
0349     VarCut t_cut{globals_, &t, -t_max, t_max};
0350     VarCut z0_cut{globals_, &z0, -z0_max, z0_max};
0351     VarCut x8_0_cut{globals_, &x8_0, -x8_max, x8_max};
0352     VarCut x8_1_cut{globals_, &x8_1, -x8_max, x8_max};
0353     VarCut x8_2_cut{globals_, &x8_2, -x8_max, x8_max};
0354     VarCut x22_0_cut{globals_, &x22_0, -x22_max, x22_max};
0355     VarCut x22_1_cut{globals_, &x22_1, -x22_max, x22_max};
0356     VarCut x22_2_cut{globals_, &x22_2, -x22_max, x22_max};
0357     VarCut x23_0_cut{globals_, &x23_0, -x23_max, x23_max};
0358     VarCut x23_1_cut{globals_, &x23_1, -x23_max, x23_max};
0359     VarCut x23_2_cut{globals_, &x23_2, -x23_max, x23_max};
0360     VarCut x13_0_cut{globals_, &x13_0, -x13_max, x13_max};
0361     VarCut x13_1_cut{globals_, &x13_1, -x13_max, x13_max};
0362     VarCut x13_2_cut{globals_, &x13_2, -x13_max, x13_max};
0363     VarCut x25_0_cut{globals_, &x25_0, -settings_.dphisector(), settings_.dphisector()};
0364     VarCut x25_1_cut{globals_, &x25_1, -settings_.dphisector(), settings_.dphisector()};
0365     VarCut x25_2_cut{globals_, &x25_2, -settings_.dphisector(), settings_.dphisector()};
0366     VarCut phiD_0_cut{globals_, &phiD_0, -2 * settings_.dphisector(), 2 * settings_.dphisector()};
0367     VarCut phiD_1_cut{globals_, &phiD_1, -2 * settings_.dphisector(), 2 * settings_.dphisector()};
0368     VarCut phiD_2_cut{globals_, &phiD_2, -2 * settings_.dphisector(), 2 * settings_.dphisector()};
0369     VarCut der_phiD_cut{globals_, &der_phiD, -der_phiD_max, der_phiD_max};
0370     VarCut rD_0_cut{globals_, &rD_0, -settings_.rmaxdisk(), settings_.rmaxdisk()};
0371     VarCut rD_1_cut{globals_, &rD_1, -settings_.rmaxdisk(), settings_.rmaxdisk()};
0372     VarCut rD_2_cut{globals_, &rD_2, -settings_.rmaxdisk(), settings_.rmaxdisk()};
0373 
0374     VarCut t_disk_cut_left{globals_, &t, -t_disk_max, -t_disk_min};
0375     VarCut t_disk_cut_right{globals_, &t, t_disk_min, t_disk_max};
0376     VarCut t_layer_cut{globals_, &t, -t_layer_max, t_layer_max};
0377 
0378     // the following flags are used to apply the cuts in TrackletCalculator
0379     // and in the output Verilog
0380     VarFlag valid_trackpar{globals_, "valid_trackpar", &rinv_final, &phi0_final, &t_final, &z0_final};
0381 
0382     VarFlag valid_phiL_0{globals_, "valid_phiL_0", &phiL_0_final};
0383     VarFlag valid_phiL_1{globals_, "valid_phiL_1", &phiL_1_final};
0384     VarFlag valid_phiL_2{globals_, "valid_phiL_2", &phiL_2_final};
0385 
0386     VarFlag valid_zL_0{globals_, "valid_zL_0", &zL_0_final};
0387     VarFlag valid_zL_1{globals_, "valid_zL_1", &zL_1_final};
0388     VarFlag valid_zL_2{globals_, "valid_zL_2", &zL_2_final};
0389 
0390     VarFlag valid_der_phiL{globals_, "valid_der_phiL", &der_phiL_final};
0391     VarFlag valid_der_zL{globals_, "valid_der_zL", &der_zL_final};
0392 
0393     VarFlag valid_phiD_0{globals_, "valid_phiD_0", &phiD_0_final};
0394     VarFlag valid_phiD_1{globals_, "valid_phiD_1", &phiD_1_final};
0395     VarFlag valid_phiD_2{globals_, "valid_phiD_2", &phiD_2_final};
0396 
0397     VarFlag valid_rD_0{globals_, "valid_rD_0", &rD_0_final};
0398     VarFlag valid_rD_1{globals_, "valid_rD_1", &rD_1_final};
0399     VarFlag valid_rD_2{globals_, "valid_rD_2", &rD_2_final};
0400 
0401     VarFlag valid_der_phiD{globals_, "valid_der_phiD", &der_phiD_final};
0402     VarFlag valid_der_rD{globals_, "valid_der_rD", &der_rD_final};
0403   };
0404 };  // namespace trklet
0405 
0406 #endif