Commit 32eda42a authored by Adrien Matta's avatar Adrien Matta
Browse files

* Fixing SPEG compilation

parent d155a0c8
Pipeline #123429 passed with stages
in 6 minutes and 24 seconds
......@@ -355,12 +355,15 @@ void TBigRIPSPlasticPhysics::InitializeRootInputRaw(){
///////////////////////////////////////////////////////////////////////////
void TBigRIPSPlasticPhysics::InitializeRootInputPhysics(){
TChain* inputChain = RootInput::getInstance()->GetChain() ;
inputChain->SetBranchStatus( "BigRIPSPlastic" , true );
inputChain->SetBranchAddress( "BigRIPSPlastic" , &m_EventPhysics );
}
///////////////////////////////////////////////////////////////////////////
void TBigRIPSPlasticPhysics::InitializeRootOutput(){
TTree* outputTree = RootOutput::getInstance()->GetTree();
outputTree->Branch( "Plastic" , "TBigRIPSPlasticPhysics" , &m_EventPhysics );
outputTree->Branch( "BigRIPSPlastic" , "TBigRIPSPlasticPhysics" , &m_EventPhysics );
}
////////////////////////////////////////////////////////////////////////////////
......
......@@ -31,7 +31,7 @@
class TSpegCHIOData : public TObject {
private:
vector<UShort_t> fSpeg_CHIO_Energy;
std::vector<UShort_t> fSpeg_CHIO_Energy;
public:
TSpegCHIOData();
......
......@@ -32,72 +32,72 @@
class TSpegDCData : public TObject {
private:
// Strips for CDM 11
vector<UShort_t> fSpeg_DC_Strip11_DetNbr;
vector<UShort_t> fSpeg_DC_Strip11_StripNbr;
vector<UShort_t> fSpeg_DC_Strip11_Energy;
std::vector<UShort_t> fSpeg_DC_Strip11_DetNbr;
std::vector<UShort_t> fSpeg_DC_Strip11_StripNbr;
std::vector<UShort_t> fSpeg_DC_Strip11_Energy;
// Strips for CDM 12
vector<UShort_t> fSpeg_DC_Strip12_DetNbr;
vector<UShort_t> fSpeg_DC_Strip12_StripNbr;
vector<UShort_t> fSpeg_DC_Strip12_Energy;
std::vector<UShort_t> fSpeg_DC_Strip12_DetNbr;
std::vector<UShort_t> fSpeg_DC_Strip12_StripNbr;
std::vector<UShort_t> fSpeg_DC_Strip12_Energy;
// Strips for CDM 21
vector<UShort_t> fSpeg_DC_Strip21_DetNbr;
vector<UShort_t> fSpeg_DC_Strip21_StripNbr;
vector<UShort_t> fSpeg_DC_Strip21_Energy;
std::vector<UShort_t> fSpeg_DC_Strip21_DetNbr;
std::vector<UShort_t> fSpeg_DC_Strip21_StripNbr;
std::vector<UShort_t> fSpeg_DC_Strip21_Energy;
// Strips for CDM 22
vector<UShort_t> fSpeg_DC_Strip22_DetNbr;
vector<UShort_t> fSpeg_DC_Strip22_StripNbr;
vector<UShort_t> fSpeg_DC_Strip22_Energy;
std::vector<UShort_t> fSpeg_DC_Strip22_DetNbr;
std::vector<UShort_t> fSpeg_DC_Strip22_StripNbr;
std::vector<UShort_t> fSpeg_DC_Strip22_Energy;
// EFil11
vector<UShort_t> fSpeg_DC_Efil11_DetNbr;
vector<UShort_t> fSpeg_DC_Efil11_Energy;
std::vector<UShort_t> fSpeg_DC_Efil11_DetNbr;
std::vector<UShort_t> fSpeg_DC_Efil11_Energy;
// EFil12
vector<UShort_t> fSpeg_DC_Efil12_DetNbr;
vector<UShort_t> fSpeg_DC_Efil12_Energy;
std::vector<UShort_t> fSpeg_DC_Efil12_DetNbr;
std::vector<UShort_t> fSpeg_DC_Efil12_Energy;
// EFil21
vector<UShort_t> fSpeg_DC_Efil21_DetNbr;
vector<UShort_t> fSpeg_DC_Efil21_Energy;
std::vector<UShort_t> fSpeg_DC_Efil21_DetNbr;
std::vector<UShort_t> fSpeg_DC_Efil21_Energy;
// EFil22
vector<UShort_t> fSpeg_DC_Efil22_DetNbr;
vector<UShort_t> fSpeg_DC_Efil22_Energy;
std::vector<UShort_t> fSpeg_DC_Efil22_DetNbr;
std::vector<UShort_t> fSpeg_DC_Efil22_Energy;
// Tplfil11
vector<UShort_t> fSpeg_DC_Tplfil11_DetNbr;
vector<UShort_t> fSpeg_DC_Tplfil11_Time;
std::vector<UShort_t> fSpeg_DC_Tplfil11_DetNbr;
std::vector<UShort_t> fSpeg_DC_Tplfil11_Time;
// Tplfil12
vector<UShort_t> fSpeg_DC_Tplfil12_DetNbr;
vector<UShort_t> fSpeg_DC_Tplfil12_Time;
std::vector<UShort_t> fSpeg_DC_Tplfil12_DetNbr;
std::vector<UShort_t> fSpeg_DC_Tplfil12_Time;
// Tplfil21
vector<UShort_t> fSpeg_DC_Tplfil21_DetNbr;
vector<UShort_t> fSpeg_DC_Tplfil21_Time;
std::vector<UShort_t> fSpeg_DC_Tplfil21_DetNbr;
std::vector<UShort_t> fSpeg_DC_Tplfil21_Time;
// Tplfil22
vector<UShort_t> fSpeg_DC_Tplfil22_DetNbr;
vector<UShort_t> fSpeg_DC_Tplfil22_Time;
std::vector<UShort_t> fSpeg_DC_Tplfil22_DetNbr;
std::vector<UShort_t> fSpeg_DC_Tplfil22_Time;
// TEMPS fil11
vector<UShort_t> fSpeg_DC_Tfil11_DetNbr;
vector<UShort_t> fSpeg_DC_Tfil11_Time;
std::vector<UShort_t> fSpeg_DC_Tfil11_DetNbr;
std::vector<UShort_t> fSpeg_DC_Tfil11_Time;
// TEMPS fil12
vector<UShort_t> fSpeg_DC_Tfil12_DetNbr;
vector<UShort_t> fSpeg_DC_Tfil12_Time;
std::vector<UShort_t> fSpeg_DC_Tfil12_DetNbr;
std::vector<UShort_t> fSpeg_DC_Tfil12_Time;
// TEMPS fil21
vector<UShort_t> fSpeg_DC_Tfil21_DetNbr;
vector<UShort_t> fSpeg_DC_Tfil21_Time;
std::vector<UShort_t> fSpeg_DC_Tfil21_DetNbr;
std::vector<UShort_t> fSpeg_DC_Tfil21_Time;
// TEMPS fill22
vector<UShort_t> fSpeg_DC_Tfil22_DetNbr;
vector<UShort_t> fSpeg_DC_Tfil22_Time;
std::vector<UShort_t> fSpeg_DC_Tfil22_DetNbr;
std::vector<UShort_t> fSpeg_DC_Tfil22_Time;
public:
TSpegDCData();
......
......@@ -21,14 +21,14 @@
* *
* *
*****************************************************************************/
// STL
#include <vector>
#include <string>
#include <iostream>
#include <cmath>
#include <stdlib.h>
#include <limits>
using namespace std ;
// ROOT
#include "TObject.h"
......@@ -43,279 +43,279 @@ using namespace std ;
#include "NPCalibrationManager.h"
class TSpegPhysics : public TObject, public NPL::VDetector{
public: // Constructor and Destructor
TSpegPhysics();
~TSpegPhysics();
public: // Constructor and Destructor
TSpegPhysics();
~TSpegPhysics();
public:
void Clear();
void Clear(const Option_t*) {};
public: // Main Data
std::vector <double> Q_S11;
std::vector <double> Q_S12;
std::vector <double> Q_S21;
std::vector <double> Q_S22;
std::vector <std::vector<double> > Charge;//!
std::vector <int> Strip_S11;
std::vector <int> Strip_S12;
std::vector <int> Strip_S21;
std::vector <int> Strip_S22;
std::vector <std::vector <int> > Strip;//!
std::vector<double> M_over_Q;
std::vector<double> Z;
std::vector<double> X_FocalPlan;
std::vector<double> Y_FocalPlan;
std::vector<double> Theta_FocalPlan;
std::vector<double> Phi_FocalPlan;
double Time_Plastic_Right;
double Time_Plastic_Left;
double xfoc_cor_thetafoc;//!
double xfoc_cor_phifoc;//!
double thetafoc_cor;//!
double phifoc_cor;//!
double xfoc_calibrated;//!
double tfoc_calibrated;//!
double phifoc_calibrated;//!
public :
//Variables for the first token which have parameters for trajectory calculation for Drift Chamber of SPEG
int nax;//!
int nbx;//!
int ichix;//!
int nfx;//!
int nmesx;//!
double fax;//!
double zax;//!
double fbx;//!
double zbx;//!
double fchix;//!
double anfocx;//!
double zfocx;//!
double ffx;//!
double zfx;//!
double tanfox;//!
std::vector <double> Vector_zx;//!
std::vector <int> Vector_nievcx;//!
std::vector <double> Vector_sigx;//!
std::vector <double> Vector_x0f;//!
std::vector <double> Vector_etalx;//!
std::vector <int> Vector_iedevx;//!
std::vector <double> Vector_zdevx;//!
std::vector <double> Vector_fdevx;//!
std::vector <double> Vector_sigx2;//!
//Variables for the second token which have parameters for trajectory calculation for Drift Chamber of SPEG
int nay;//!
int nby;//!
int ichiy;//!
int nfy;//!
int nmesy;//!
double fay;//!
double zay;//!
double fby;//!
double zby;//!
double fchiy;//!
double anfocy;//!
double zfocy;//!
double ffy;//!
double zfy;//!
double tanfoy;//!
std::vector <std::string> Vector_nomy;//!
std::vector <double> Vector_zy;//!
std::vector <int> Vector_nievcy;//!
std::vector <double> Vector_sigy;//!
std::vector <double> Vector_y0f;//!
std::vector <double> Vector_etaly;//!
std::vector <int> Vector_iedevy;//!
std::vector <double> Vector_zdevy;//!
std::vector <double> Vector_fdevy;//!
std::vector <double> Vector_sigy2;//!
//Variables for the third token (Correction for the channel normalisation (COG Methode))
double alpha[4];//!
//Correction value
double tema;//!
double temb;//!
double tcora;//!
double tcorb;//!
double cmsurqa;//!
double cmsurqb;//!
double za;//!
double zb;//!
public:
void Clear();
void Clear(const Option_t*) {};
public: // Main Data
vector <double> Q_S11;
vector <double> Q_S12;
vector <double> Q_S21;
vector <double> Q_S22;
vector <vector<double> > Charge;//!
vector <int> Strip_S11;
vector <int> Strip_S12;
vector <int> Strip_S21;
vector <int> Strip_S22;
vector <vector <int> > Strip;//!
vector<double> M_over_Q;
vector<double> Z;
vector<double> X_FocalPlan;
vector<double> Y_FocalPlan;
vector<double> Theta_FocalPlan;
vector<double> Phi_FocalPlan;
double Time_Plastic_Right;
double Time_Plastic_Left;
double xfoc_cor_thetafoc;//!
double xfoc_cor_phifoc;//!
double thetafoc_cor;//!
double phifoc_cor;//!
double xfoc_calibrated;//!
double tfoc_calibrated;//!
double phifoc_calibrated;//!
//Declaration of some variables
double seuil_haut;//!
double pas;//!
double a1_1;//!
double x11;//!
double x12;//!
double x21;//!
double x22;//!
double xPL;//!
double y11;//!
double y12;//!
double y21;//!
double y22;//!
double z;//!
double x_c;//!
double x3cg[4];//!
double xg[4];//!
double xsh[4];//!
double Tab_xij[4];//!
double Tab_yij[4];//!
double qmax[4];//!
int imax[4];//!
double SPEG_CHIO_anode;
double phia1;//!
double phib1;//!
double sigmaphi1;//!
double sigmay1;//!
double phi1;//!
double xa;//!
double xb;//!
double theta2;//!
double delta2;//!
double x1;//!
double x2;//!
double xt;//!
double yt;//!
double xfoc;//!
double yfoc;//!
double tfoc;//!
double phifoc;//!
double Khi2;
double bx11;//!
double bx12;//!
double bx21;//!
double bx22;//!
double det;//!
double ax11;//!
double ax12;//!
double ax21;//!
double ax22;//!
double by11;//!
double by12;//!
double by21;//!
double by22;//!
double ay11;//!
double ay12;//!
double ay21;//!
double ay22;//!
double SPEG_PLASTIC_tplg;//!
double SPEG_PLASTIC_tpld;//!
double q_c;//!
double q_r;//!
double q_l;//!
int i_c;//!
int i_l;//!
int i_r;//!
double temp;//!
double cosih;//!
double a3;//!
double temp2;//!
double sinuh;//!
double temp3;//!
double a2;//!
double b1;//!
double b2;//!
double ax;//!
double bx;//!
double dx;//!
double ay;//!
double by;//!
double dy;//!
double tem;//!
double tcor;//!
double cmsurq;//!
double param_theta;//!
double param_phi;//!
int degree_of_calibration_angle_with_Brho;//!
int degree_of_correction_angle_with_Brho;//!
std::vector <double> cor_xfoc_thetafoc;//!
std::vector <double> cor_xfoc_phifoc;//!
std::vector <double> cor_theta;//!
std::vector <double> cor_phi;//!
std::vector <double> correction_theta_with_Brho;//!
std::vector <double> correction_phi_with_Brho;//!
std::vector <double> cal_theta;//!
std::vector <double> cal_phi;//!
std::vector <double> calibration_theta_with_Brho;//!
std::vector <double> calibration_phi_with_Brho;//!
std::vector <double> Vector_x;//!
std::vector <double> Vector_y;//!
public :
//Variables for the first token which have parameters for trajectory calculation for Drift Chamber of SPEG
int nax;//!
int nbx;//!
int ichix;//!
int nfx;//!
int nmesx;//!
double fax;//!
double zax;//!
double fbx;//!
double zbx;//!
double fchix;//!
double anfocx;//!
double zfocx;//!
double ffx;//!
double zfx;//!
double tanfox;//!
vector <double> Vector_zx;//!
vector <int> Vector_nievcx;//!
vector <double> Vector_sigx;//!
vector <double> Vector_x0f;//!
vector <double> Vector_etalx;//!
vector <int> Vector_iedevx;//!
vector <double> Vector_zdevx;//!
vector <double> Vector_fdevx;//!
vector <double> Vector_sigx2;//!
public: // inherrited from VDetector
// Read stream at ConfigFile to pick-up parameters of detector (Position,...) using Token
void ReadConfiguration(std::string Path);
//Variables for the second token which have parameters for trajectory calculation for Drift Chamber of SPEG
int nay;//!
int nby;//!
int ichiy;//!
int nfy;//!
int nmesy;//!
double fay;//!
double zay;//!
double fby;//!
double zby;//!
double fchiy;//!
double anfocy;//!
double zfocy;//!
double ffy;//!
double zfy;//!
double tanfoy;//!
vector <string> Vector_nomy;//!
vector <double> Vector_zy;//!
vector <int> Vector_nievcy;//!
vector <double> Vector_sigy;//!
vector <double> Vector_y0f;//!
vector <double> Vector_etaly;//!
vector <int> Vector_iedevy;//!
vector <double> Vector_zdevy;//!
vector <double> Vector_fdevy;//!
vector <double> Vector_sigy2;//!
//Variables for the third token (Correction for the channel normalisation (COG Methode))
double alpha[4];//!
//Correction value
double tema;//!
double temb;//!
double tcora;//!
double tcorb;//!
double cmsurqa;//!
double cmsurqb;//!
double za;//!
double zb;//!
// Add Parameter to the CalibrationManger
void AddParameterToCalibrationManager();
//Declaration of some variables
double seuil_haut;//!
double pas;//!
double a1_1;//!
double x11;//!
double x12;//!
double x21;//!
double x22;//!
double xPL;//!
double y11;//!
double y12;//!
double y21;//!
double y22;//!
double z;//!
double x_c;//!
double x3cg[4];//!
double xg[4];//!
double xsh[4];//!
double Tab_xij[4];//!
double Tab_yij[4];//!
double qmax[4];//!
int imax[4];//!
double SPEG_CHIO_anode;
double phia1;//!
double phib1;//!
double sigmaphi1;//!
double sigmay1;//!
double phi1;//!
double xa;//!
double xb;//!
double theta2;//!
double delta2;//!
double x1;//!
double x2;//!
double xt;//!
double yt;//!
double xfoc;//!
double yfoc;//!
double tfoc;//!
double phifoc;//!
double Khi2;
double bx11;//!
double bx12;//!
double bx21;//!
double bx22;//!
double det;//!
double ax11;//!
double ax12;//!
double ax21;//!
double ax22;//!
double by11;//!
double by12;//!
double by21;//!
double by22;//!
double ay11;//!
double ay12;//!
double ay21;//!
double ay22;//!
double SPEG_PLASTIC_tplg;//!
double SPEG_PLASTIC_tpld;//!
double q_c;//!
double q_r;//!
double q_l;//!
int i_c;//!
int i_l;//!
int i_r;//!
double temp;//!
double cosih;//!
double a3;//!
double temp2;//!
double sinuh;//!
double temp3;//!
double a2;//!
double b1;//!
double b2;//!
double ax;//!
double bx;//!
double dx;//!
double ay;//!
double by;//!
double dy;//!
double tem;//!
double tcor;//!
double cmsurq;//!
double param_theta;//!
double param_phi;//!
int degree_of_calibration_angle_with_Brho;//!
int degree_of_correction_angle_with_Brho;//!
vector <double> cor_xfoc_thetafoc;//!
vector <double> cor_xfoc_phifoc;//!
vector <double> cor_theta;//!
vector <double> cor_phi;//!
vector <double> correction_theta_with_Brho;//!
vector <double> correction_phi_with_Brho;//!
vector <double> cal_theta;//!
vector <double> cal_phi;//!
vector <double> calibration_theta_with_Brho;//!
vector <double> calibration_phi_with_Brho;//!
vector <double> Vector_x;//!
vector <double> Vector_y;//!
// Activated associated Branches and link it to the private member DetectorData address
// In this method mother Branches (Detector) AND daughter leaf (fDetector_parameter) have to be activated
void InitializeRootInputRaw() ;
public: // inherrited from VDetector
// Read stream at ConfigFile to pick-up parameters of detector (Position,...) using Token
void ReadConfiguration(string Path);
// Activated associated Branches and link it to the private member DetectorPhysics address
// In this method mother Branches (Detector) AND daughter leaf (parameter) have to be activated
void InitializeRootInputPhysics() ;
// Add Parameter to the CalibrationManger
void AddParameterToCalibrationManager();
// Create associated branches and associated private member DetectorPhysics address
void InitializeRootOutput();
// Activated associated Branches and link it to the private member DetectorData address
// In this method mother Branches (Detector) AND daughter leaf (fDetector_parameter) have to be activated
void InitializeRootInputRaw() ;
// Activated associated Branches and link it to the private member DetectorPhysics address
// In this method mother Branches (Detector) AND daughter leaf (parameter) have to be activated
void InitializeRootInputPhysics() ;
// This method is called at each event read from the Input Tree. Aime is to build treat Raw dat in order to extract physical parameter.
void BuildPhysicalEvent();
// Create associated branches and associated private member DetectorPhysics address
void InitializeRootOutput();
// This method is called at each event read from the Input Tree. Aime is to build treat Raw dat in order to extract physical parameter.
void BuildPhysicalEvent();
// Same as above, but only the simplest event and/or simple method are used (low multiplicity, faster algorythm but less efficient ...).
// This method aimed to be used for analysis performed during experiment, when speed is requiered.
// NB: This method can eventually be the same as BuildPhysicalEvent.
void BuildSimplePhysicalEvent();