// constructor ReadMLP( std::vector<std::string>& theInputVars ) : IClassifierReader(), fClassName( "ReadMLP" ), fNvars( 5 ), fIsNormalised( false ) { // the training input variables const char* inputVars[] = { "f_Z1mass", "f_Z2mass", "f_pt4l", "f_massjj", "f_deltajj" }; // sanity checks if (theInputVars.size() <= 0) { std::cout << "Problem in class \"" << fClassName << "\": empty input vector" << std::endl; fStatusIsClean = false; } if (theInputVars.size() != fNvars) { std::cout << "Problem in class \"" << fClassName << "\": mismatch in number of input values: " << theInputVars.size() << " != " << fNvars << std::endl; fStatusIsClean = false; } // validate input variables for (size_t ivar = 0; ivar < theInputVars.size(); ivar++) { if (theInputVars[ivar] != inputVars[ivar]) { std::cout << "Problem in class \"" << fClassName << "\": mismatch in input variable names" << std::endl << " for variable [" << ivar << "]: " << theInputVars[ivar].c_str() << " != " << inputVars[ivar] << std::endl; fStatusIsClean = false; } } // initialize min and max vectors (for normalisation) fVmin[0] = -1; fVmax[0] = 1; fVmin[1] = -1; fVmax[1] = 1; fVmin[2] = -1; fVmax[2] = 1; fVmin[3] = -1; fVmax[3] = 1; fVmin[4] = -1; fVmax[4] = 1; // initialize input variable types fType[0] = 'F'; fType[1] = 'F'; fType[2] = 'F'; fType[3] = 'F'; fType[4] = 'F'; // initialize constants Initialize(); // initialize transformation InitTransform(); }
Tracter::BSAPITransform::BSAPITransform(Component<float>* iInput, const char* iObjectName) { mObjectName = iObjectName; inputdim = iInput->Frame().size; Connect(iInput, 1); mInput = iInput; mInputID = NULL; InitTransform(); InitOutBuffer(); LastFrameProcess=0; }
Tracter::BSAPITransform::BSAPITransform(Component<float>* iInput, Component<float>* iInputID, const char* iObjectName) { mObjectName = iObjectName; inputdim = iInput->Frame().size; Connect(iInput, 1); Connect(iInputID, 1); mInput = iInput; mInputID = iInputID; const char* xformdir = GetEnv("MACRODIR", ""); mInputID_macroname_full = new char[strlen(xformdir) + sizeof(float)]; //Dir length + filename strcpy(mInputID_macroname_full,xformdir); InitTransform(); InitOutBuffer(); LastFrameProcess=0; }
// constructor ReadMLP_ANN_N2_NC800( std::vector<std::string>& theInputVars ) : IClassifierReader(), fClassName( "ReadMLP_ANN_N2_NC800" ), fNvars( 11 ), fIsNormalised( false ) { // the training input variables const char* inputVars[] = { "Jet1Pt", "LepPt", "LepChg", "LepEta", "Met", "mt", "HT20", "NbLoose30", "Njet", "JetHBpt", "DrJetHBLep" }; // sanity checks if (theInputVars.size() <= 0) { std::cout << "Problem in class \"" << fClassName << "\": empty input vector" << std::endl; fStatusIsClean = false; } if (theInputVars.size() != fNvars) { std::cout << "Problem in class \"" << fClassName << "\": mismatch in number of input values: " << theInputVars.size() << " != " << fNvars << std::endl; fStatusIsClean = false; } // validate input variables for (size_t ivar = 0; ivar < theInputVars.size(); ivar++) { if (theInputVars[ivar] != inputVars[ivar]) { std::cout << "Problem in class \"" << fClassName << "\": mismatch in input variable names" << std::endl << " for variable [" << ivar << "]: " << theInputVars[ivar].c_str() << " != " << inputVars[ivar] << std::endl; fStatusIsClean = false; } } // initialize min and max vectors (for normalisation) fVmin[0] = -1; fVmax[0] = 1; fVmin[1] = -1; fVmax[1] = 0.99999988079071; fVmin[2] = -1; fVmax[2] = 1; fVmin[3] = -1; fVmax[3] = 1; fVmin[4] = -1; fVmax[4] = 1; fVmin[5] = -1; fVmax[5] = 1; fVmin[6] = -1; fVmax[6] = 1; fVmin[7] = -1; fVmax[7] = 1; fVmin[8] = -1; fVmax[8] = 1; fVmin[9] = -1; fVmax[9] = 1; fVmin[10] = -1; fVmax[10] = 1; // initialize input variable types fType[0] = 'F'; fType[1] = 'F'; fType[2] = 'F'; fType[3] = 'F'; fType[4] = 'F'; fType[5] = 'F'; fType[6] = 'F'; fType[7] = 'F'; fType[8] = 'F'; fType[9] = 'F'; fType[10] = 'F'; // initialize constants Initialize(); // initialize transformation InitTransform(); }
// constructor ReadMLP( std::vector<std::string>& theInputVars ) : IClassifierReader(), fClassName( "ReadMLP" ), fNvars( 11 ), fIsNormalised( false ) { // the training input variables const char* inputVars[] = { "dR_l1l2", "dR_b1b2", "dR_bl", "dR_l1l2b1b2", "MINdR_bl", "dphi_l1l2b1b2", "mass_l1l2", "mass_b1b2", "mass_trans", "MT2", "pt_b1b2" }; // sanity checks if (theInputVars.size() <= 0) { std::cout << "Problem in class \"" << fClassName << "\": empty input vector" << std::endl; fStatusIsClean = false; } if (theInputVars.size() != fNvars) { std::cout << "Problem in class \"" << fClassName << "\": mismatch in number of input values: " << theInputVars.size() << " != " << fNvars << std::endl; fStatusIsClean = false; } // validate input variables for (size_t ivar = 0; ivar < theInputVars.size(); ivar++) { if (theInputVars[ivar] != inputVars[ivar]) { std::cout << "Problem in class \"" << fClassName << "\": mismatch in input variable names" << std::endl << " for variable [" << ivar << "]: " << theInputVars[ivar].c_str() << " != " << inputVars[ivar] << std::endl; fStatusIsClean = false; } } // initialize min and max vectors (for normalisation) fVmin[0] = -1; fVmax[0] = 1; fVmin[1] = -1; fVmax[1] = 1; fVmin[2] = -1; fVmax[2] = 1; fVmin[3] = -1; fVmax[3] = 1; fVmin[4] = -1; fVmax[4] = 1; fVmin[5] = -1; fVmax[5] = 1; fVmin[6] = -1; fVmax[6] = 0.99999988079071; fVmin[7] = -1; fVmax[7] = 1; fVmin[8] = -1; fVmax[8] = 0.99999988079071; fVmin[9] = -1; fVmax[9] = 1; fVmin[10] = -1; fVmax[10] = 1; // initialize input variable types fType[0] = 'F'; fType[1] = 'F'; fType[2] = 'F'; fType[3] = 'F'; fType[4] = 'F'; fType[5] = 'F'; fType[6] = 'F'; fType[7] = 'F'; fType[8] = 'F'; fType[9] = 'F'; fType[10] = 'F'; // initialize constants Initialize(); // initialize transformation InitTransform(); }