Skip to content

Instantly share code, notes, and snippets.

@lucasgautheron
Last active May 23, 2016 18:15
Show Gist options
  • Save lucasgautheron/0a9201e384783f35dbf8350e0092d7a9 to your computer and use it in GitHub Desktop.
Save lucasgautheron/0a9201e384783f35dbf8350e0092d7a9 to your computer and use it in GitHub Desktop.
void mass() {
TH1F *h1= new TH1F("masse"," masse", 100,0,150) ;
FILE *fp = fopen ("mass.txt", "r");
float inv_mass = 0;
while (fscanf(fp, "%e", &inv_mass) > 0)
{
printf("m = %.3f\n", inv_mass);
h1->Fill(inv_mass);
}
h1-> Draw();
}
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment