What is Chi**2?

What does Chi**2 mean?

#include<cstdio>
#include<string>
#include <fstream>
#include <sstream>
#include <iostream>
#include <math.h>
#include <iomanip>
        
 #include "RooAbsReal.h"
 #include "RooFit.h"
 #include "RooRealVar.h"
 #include "TMath.h"
using namespace std;
if(point!=0){
      Double_t chisq = 0;
      Double_t  Chi = (point>ave) ? normal1:normal2;
      chisq += Chi**2;
      Nbin++;
      }

ERRO:

error: indirection requires pointer operand ('int' invalid)
      chisq += Chi**2;

Hi,
This is no correct C++ code. The meaning there is power of 2, you should write the code as
chisq += Chi*Chi;

Lorenzo

1 Like

thanku, I modified Chi** to Chi*Chi

This topic was automatically closed 14 days after the last reply. New replies are no longer allowed.