void nnTest(void){
  
  gROOT->Reset();
  gStyle->SetPalette(1);
  gROOT->SetStyle("Plain"); 
  gStyle->SetOptStat(0); 
  char *s = new char[1];
  
  int nBinsX   = 100;
  double xLow  = 0.0;
  double xHigh = 1.0;
  int nBinsY   = 100;
  double yLow  = 0.0;
  double yHigh = 1.0;
  
  TH2D *hX2vsX1NodeA = new TH2D("hX2VsX1NodeA","",nBinsX,xLow,xHigh,nBinsY,yLow,yHigh);
  TH2D *hX2vsX1NodeB = new TH2D("hX2VsX1NodeB","",nBinsX,xLow,xHigh,nBinsY,yLow,yHigh);
  TH2D *hX2vsX1NodeC = new TH2D("hX2VsX1NodeC","",nBinsX,xLow,xHigh,nBinsY,yLow,yHigh);
  
  
  // TH1D *h1 = new TH1D("h1","",1,0,1)
  // h1->Draw()
  
  for(int i = 0; i < nBinsX; ++i)
    {
      for(int j = 0; j < nBinsY; ++j)
	{
	  double x1 = hX2vsX1NodeA->GetXaxis()->GetBinCenter(i);
	  double x2 = hX2vsX1NodeA->GetYaxis()->GetBinCenter(j);
	  
	  //NODE A
	  double yA = 0;
	  double w1A = 1;
	  double w2A = 1;
	  double thetaA = .5;
	  double a1 = x1 * w1A + x2 * w2A;
	  double rhoA = .1;
	  //if(a1 > thetaA) 
	  //  {
	  yA = 1/(1+exp(-1*(a1-thetaA)/rhoA));
	  //  }
	  
	  hX2vsX1NodeA->SetBinContent(i, j, yA);
	  
	  //NODE B
	  double yB = 0;
          double w1B = 1.2;
          double w2B = .7;
          double thetaB = .7;
	  double a2 = x1 * w1B +x2 * w2B;
	  double rhoB = .2;
	  //if(a2 > thetaB)
	  //{
	  yB = 1/(1+exp(-1*(a2-thetaB)/rhoB)) +1;
	  //}
	  
          hX2vsX1NodeB->SetBinContent(i, j, yB);
	  
          //NODE C                                                                                                 
          double yC = 0;
	  if(a2 > thetaB || a1 <= thetaA)
	    {
	      yC = 1;
	    }
	  
	  //NODE B
	  //double yC = 0;
          //double w1C = 0.5;
          //double w2C = 0.5;
          //double thetaC = 0.5;
	  //double a3 = yA * w1C + yB * w2C;
	  //if (a3 > thetaC) yC = 1.0;
	  
          hX2vsX1NodeC->SetBinContent(i, j, yC);
	  
	}
    }
  
  
  
  hX2VsX1NodeA->Draw("colz");
  
//c1->Clear();
//c1->Divide(2,2);
//c1->cd(1);
//hX2VsX1NodeA->Draw("colz");
//c1->cd(2);
//hX2VsX1NodeB->Draw("colz");
//c1->cd(3);
//hX2VsX1NodeC->Draw("colz");
  
  
}
