Skip to content

Commit

Permalink
Start updating buildmaster for FPF
Browse files Browse the repository at this point in the history
  • Loading branch information
Radonirinaunimi committed Jul 3, 2023
1 parent 7391c9c commit fd5bfeb
Show file tree
Hide file tree
Showing 15 changed files with 186 additions and 249 deletions.
68 changes: 34 additions & 34 deletions buildmaster/filters/FPF.cc
Original file line number Diff line number Diff line change
@@ -1,13 +1,15 @@
#include "FPF.h"

void FASERVBARFilter::ReadData()
// FASERV2 EXPERIMENTS //
// Read & Dump data for FASERV2 NU INCLUSIVE
void FASERV2NUINCLUSIVEFilter::ReadData()
{
// Opening files
fstream f1;

stringstream datafile("");
datafile << dataPath() << "rawdata/"
<< fSetName << "/fluctuated_data.dat";
<< fSetName << "/FASERv2_inclusive_nu_El_fluctuated.txt";
f1.open(datafile.str().c_str(), ios::in);

if (f1.fail()) {
Expand All @@ -16,8 +18,6 @@ void FASERVBARFilter::ReadData()
}

// Starting filter


string line;
for (int i = 0; i < fNData; i++)
{
Expand All @@ -27,26 +27,28 @@ void FASERVBARFilter::ReadData()
lstream >> fKin1[i]; // x
lstream >> fKin3[i]; // y
lstream >> fKin2[i]; // Q2
lstream >> fData[i];
fStat[i] = 0.; // implement the statistical uncertainties as if they were uncorrelated sys
lstream >> fSys[i][0].add;
lstream >> fData[i]; // central values

// Extract uncertainty values
lstream >> fStat[i]; // statistical uncertainties
lstream >> fSys[i][0].add; // systematic uncertainties
fSys[i][0].mult = fSys[i][0].add/fData[i]*1e2;
fSys[i][0].type = ADD;
fSys[i][0].name = "UNCORR";

}

f1.close();
}

void FASERVFilter::ReadData()
// Read & Dump data for FASERV2 NUB INCLUSIVE
void FASERV2NBINCLUSIVEFilter::ReadData()
{
// Opening files
fstream f1;

stringstream datafile("");
datafile << dataPath() << "rawdata/"
<< fSetName << "/fluctuated_data.dat";
<< fSetName << "/FASERv2_inclusive_nub_El_fluctuated.txt";
f1.open(datafile.str().c_str(), ios::in);

if (f1.fail()) {
Expand All @@ -55,8 +57,6 @@ void FASERVFilter::ReadData()
}

// Starting filter


string line;
for (int i = 0; i < fNData; i++)
{
Expand All @@ -66,27 +66,28 @@ void FASERVFilter::ReadData()
lstream >> fKin1[i]; // x
lstream >> fKin3[i]; // y
lstream >> fKin2[i]; // Q2
lstream >> fData[i];
fStat[i] = 0.; // implement the statistical uncertainties as if they were uncorrelated sys
lstream >> fSys[i][0].add;
lstream >> fData[i]; // central values

// Extract uncertainty values
lstream >> fStat[i]; // statistical uncertainties
lstream >> fSys[i][0].add; // systematic uncertainties
fSys[i][0].mult = fSys[i][0].add/fData[i]*1e2;
fSys[i][0].type = ADD;
fSys[i][0].name = "UNCORR";

}

f1.close();
}


void FASERVBAR2Filter::ReadData()
// Read & Dump data for FASERV2 NU CHARM
void FASERV2NUCHARMFilter::ReadData()
{
// Opening files
fstream f1;

stringstream datafile("");
datafile << dataPath() << "rawdata/"
<< fSetName << "/fluctuated_data.dat";
<< fSetName << "/FASERv2_charm_nu_El_fluctuated.txt";
f1.open(datafile.str().c_str(), ios::in);

if (f1.fail()) {
Expand All @@ -95,8 +96,6 @@ void FASERVBAR2Filter::ReadData()
}

// Starting filter


string line;
for (int i = 0; i < fNData; i++)
{
Expand All @@ -106,26 +105,28 @@ void FASERVBAR2Filter::ReadData()
lstream >> fKin1[i]; // x
lstream >> fKin3[i]; // y
lstream >> fKin2[i]; // Q2
lstream >> fData[i];
fStat[i] = 0.; // implement the statistical uncertainties as if they were uncorrelated sys
lstream >> fSys[i][0].add;
lstream >> fData[i]; // central values

// Extract uncertainty values
lstream >> fStat[i]; // statistical uncertainties
lstream >> fSys[i][0].add; // systematic uncertainties
fSys[i][0].mult = fSys[i][0].add/fData[i]*1e2;
fSys[i][0].type = ADD;
fSys[i][0].name = "UNCORR";

}

f1.close();
}

void FASERV2Filter::ReadData()
// Read & Dump data for FASERV2 NUB CHARM
void FASERV2NBCHARMFilter::ReadData()
{
// Opening files
fstream f1;

stringstream datafile("");
datafile << dataPath() << "rawdata/"
<< fSetName << "/fluctuated_data.dat";
<< fSetName << "/FASERv2_charm_nub_El_fluctuated.txt";
f1.open(datafile.str().c_str(), ios::in);

if (f1.fail()) {
Expand All @@ -134,8 +135,6 @@ void FASERV2Filter::ReadData()
}

// Starting filter


string line;
for (int i = 0; i < fNData; i++)
{
Expand All @@ -145,14 +144,15 @@ void FASERV2Filter::ReadData()
lstream >> fKin1[i]; // x
lstream >> fKin3[i]; // y
lstream >> fKin2[i]; // Q2
lstream >> fData[i];
fStat[i] = 0.; // implement the statistical uncertainties as if they were uncorrelated sys
lstream >> fSys[i][0].add;
lstream >> fData[i]; // central values

// Extract uncertainty values
lstream >> fStat[i]; // statistical uncertainties
lstream >> fSys[i][0].add; // systematic uncertainties
fSys[i][0].mult = fSys[i][0].add/fData[i]*1e2;
fSys[i][0].type = ADD;
fSys[i][0].name = "UNCORR";

}

f1.close();
}
}
30 changes: 18 additions & 12 deletions buildmaster/inc/FPF.h
Original file line number Diff line number Diff line change
@@ -1,38 +1,44 @@
// FPF-related Data
#pragma once

#include "buildmaster_utils.h"

class FASERVBARFilter: public CommonData
// FASERV2 EXPERIMENTS //
// Filter for Inlusive NU productions @ FASERV2
class FASERV2NUINCLUSIVEFilter: public CommonData
{
public: FASERVBARFilter():
CommonData("FASERVBAR") { ReadData(); }
public: FASERV2NUINCLUSIVEFilter():
CommonData("FASERV2NU_DSIGMA_INCLUSIVE") { ReadData(); }

private:
void ReadData();
};

class FASERVFilter: public CommonData
// Filter for Inlusive NUB productions @ FASERV2
class FASERV2NBINCLUSIVEFilter: public CommonData
{
public: FASERVFilter():
CommonData("FASERV") { ReadData(); }
public: FASERV2NBINCLUSIVEFilter():
CommonData("FASERV2NB_DSIGMA_INCLUSIVE") { ReadData(); }

private:
void ReadData();
};

class FASERVBAR2Filter: public CommonData
// Filter for Charm NU productions @ FASERV2
class FASERV2NUCHARMFilter: public CommonData
{
public: FASERVBAR2Filter():
CommonData("FASERVBAR2") { ReadData(); }
public: FASERV2NUCHARMFilter():
CommonData("FASERV2NU_DSIGMA_CHARM") { ReadData(); }

private:
void ReadData();
};

class FASERV2Filter: public CommonData
// Filter for Charm NUB productions @ FASERV2
class FASERV2NBCHARMFilter: public CommonData
{
public: FASERV2Filter():
CommonData("FASERV2") { ReadData(); }
public: FASERV2NBCHARMFilter():
CommonData("FASERV2NB_DSIGMA_CHARM") { ReadData(); }

private:
void ReadData();
Expand Down
4 changes: 4 additions & 0 deletions buildmaster/meta/FASERV2NB_DSIGMA_CHARM.yaml
Original file line number Diff line number Diff line change
@@ -0,0 +1,4 @@
ndata: 17
nsys: 1
setname: "FASERV2NB_DSIGMA_CHARM"
proctype: "DIS_SNB_C"
4 changes: 4 additions & 0 deletions buildmaster/meta/FASERV2NB_DSIGMA_INCLUSIVE.yaml
Original file line number Diff line number Diff line change
@@ -0,0 +1,4 @@
ndata: 30
nsys: 1
setname: "FASERV2NB_DSIGMA_INCLUSIVE"
proctype: "DIS_SNB"
4 changes: 4 additions & 0 deletions buildmaster/meta/FASERV2NU_DSIGMA_CHARM.yaml
Original file line number Diff line number Diff line change
@@ -0,0 +1,4 @@
ndata: 29
nsys: 1
setname: "FASERV2NU_DSIGMA_CHARM"
proctype: "DIS_SNU_C"
4 changes: 4 additions & 0 deletions buildmaster/meta/FASERV2NU_DSIGMA_INCLUSIVE.yaml
Original file line number Diff line number Diff line change
@@ -0,0 +1,4 @@
ndata: 38
nsys: 1
setname: "FASERV2NU_DSIGMA_INCLUSIVE"
proctype: "DIS_SNU"
47 changes: 0 additions & 47 deletions buildmaster/rawdata/FASERV/fluctuated_data.dat

This file was deleted.

Loading

0 comments on commit fd5bfeb

Please sign in to comment.