Automated Detection And Quantification Of Pain Using Electroencephalography