Skip to content
Snippets Groups Projects
Commit 201cb463 authored by matta's avatar matta
Browse files

explicit merge of '182b85d1faa07e503eac370728501aa6a2d1cbde'

              and 'dc0f8ae1232dbbda8cd28620a453b84b908c9f67'
        to branch 'NPTool.dev'
parents 0a63c999 77d98f60
No related branches found
No related tags found
No related merge requests found
Showing
with 1439 additions and 670 deletions
......@@ -7,8 +7,8 @@
%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
GeneralTarget
%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
%Target
THICKNESS= 1
Target
THICKNESS= 0.001
RADIUS= 45
MATERIAL= CD2
ANGLE= 45
......@@ -16,7 +16,7 @@ GeneralTarget
Y= 0
Z= 0
CryoTarget
%CryoTarget
THICKNESS= 3
RADIUS= 45
TEMPERATURE= 26
......@@ -86,15 +86,15 @@ CSI= 1
VIS= all
%%%%%%% Telescope 6 %%%%%%%
%M2Telescope
%X1_Y1= 155.77 50.23 8.18
%X1_Y128= 155.77 -50.23 8.18
%X128_Y1= 133.17 50.23 -89.7
%X128_Y128= 133.17 -50.23 -89.7
%SI= 1
%SILI= 1
%CSI= 0
%VIS= all
%% Alternate Telescope 6 %%
X1_Y1= 155.77 50.23 8.18
X1_Y128= 155.77 -50.23 8.18
X128_Y1= 133.17 50.23 -89.7
X128_Y128= 133.17 -50.23 -89.7
SI= 1
SILI= 1
CSI= 0
VIS= all
% Alternate Telescope 6 %%
M2Telescope
THETA= -130
PHI= 0
......@@ -115,77 +115,89 @@ SILI= 1
CSI= 0
VIS= all
%%%%%%%%%%%%%%%%%%%%
%%%%%%% Telescope 8 %%%%%%%
M2Telescope
X1_Y1= 27.07 50.23 -154.49
X1_Y128= 116.58 50.23 -108.88
X128_Y1= 27.07 -50.23 -154.49
X128_Y128= 116.58 -50.23 -108.88
SI= 1
SILI= 1
CSI= 0
VIS= all
%%%%%%%%%%%%%%%%%%%%%
AddThinSi
%%%%%%%%% Det 1 %%%%%%%%
%%%%%%%%%% Det 1 %%%%%%%%
ThinSi
A= 17.61 9.85 104.11
B= 64.48 9.85 85.31
C= 58.66 56.29 70.79
D= 11.79 56.29 89.69
%%%%%%%%% Det 2 %%%%%%%%
%
%%%%%%%%%% Det 2 %%%%%%%%
ThinSi
A= -11.79 56.29 89.59
B= -58.66 56.29 70.79
C= -64.48 9.85 85.31
D= -17.61 9.85 104.11
%%%%%%%%% Det 3 %%%%%%%%
%
%%%%%%%%%% Det 3 %%%%%%%%
ThinSi
A= -17.61 -9.85 104.11
B= -64.48 -9.85 85.31
C= -58.66 -56.29 70.79
D= -11.79 -56.29 89.59
%%%%%%%%% Det 4 %%%%%%%%
%
%%%%%%%%%% Det 4 %%%%%%%%
ThinSi
A= 11.79 -56.29 89.59
B= 58.66 -56.29 70.79
C= 64.48 -9.85 85.31
D= 17.61 -9.85 104.11
%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
ScintillatorPlastic
%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
Plastic
X= 0
Y= -15
Z= 318
Shape= Square
Height= 70
Width= 40
Thickness= 20
Scintillator= BC400
LeadThickness= 0
%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
Plastic
X= 0
Y= -15
Z= 343
Thickness= 30
Shape= Square
Height= 70
Width= 40
Scintillator= BC400
LeadThickness= 2
%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
%
%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
%%ScintillatorPlastic
%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
%Plastic
THETA= 0
PHI= 0
R= 318
Thickness= 20
Radius= 20
Scintillator= BC400
LeadThickness= 0
%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
% X= 0
% Y= -15
% Z= 318
% Shape= Square
% Height= 70
% Width= 40
% Thickness= 20
% Scintillator= BC400
% LeadThickness= 0
%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
%Plastic
THETA= 0
PHI= 0
R= 343
Thickness= 30
Radius= 20
Scintillator= BC400
LeadThickness= 2
%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
% X= 0
% Y= -15
% Z= 343
% Thickness= 30
% Shape= Square
% Height= 70
% Width= 40
% Scintillator= BC400
% LeadThickness= 2
%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
%%Plastic
% THETA= 0
% PHI= 0
% R= 318
% Thickness= 20
% Radius= 20
% Scintillator= BC400
% LeadThickness= 0
%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
%%Plastic
% THETA= 0
% PHI= 0
% R= 343
% Thickness= 30
% Radius= 20
% Scintillator= BC400
% LeadThickness= 2
%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
......@@ -10,10 +10,10 @@ TransfertToResonance
ExcitationEnergy= 1.0
BeamEnergy= 550
BeamEnergySpread= 0
SigmaThetaX= 0.6921330164
SigmaPhiY= 0.963142053
SigmaX= 6.232
SigmaY= 9.069
SigmaThetaX= 0.01
SigmaPhiY= 0.01
SigmaX= 0.01
SigmaY= 0.01
ResonanceWidth= 0
ResonanceDecayZ= 2
ResonanceDecayA= 8
......
ConfigMust2
MAX_STRIP_MULTIPLICITY 1
STRIP_ENERGY_MATCHING_TOLERANCE 10
MUST2 DISABLE_ALL MM4
......@@ -35,6 +35,7 @@
#include "TMust2Physics.h"
#include "TSSSDPhysics.h"
#include "TPlasticPhysics.h"
#include "NPOptionManager.h"
// Use CLHEP System of unit and Physical Constant
#include "CLHEP/Units/GlobalSystemOfUnits.h"
......
#include "ObjectManager.hh"
using namespace std;
int main(int argc,char** argv)
{
if(argc!=4)
{
cout <<
"you need to specify both a Reaction file and a Detector file such as : Analysis myReaction.reaction myDetector.detector runToRead.run"
<< endl;
return 0;
}
string detectorfileName = argv[1] ;
string calibrationfileName = argv[2] ;
string runToReadfileName = argv[3] ;
NPOptionManager* myOptionManager = NPOptionManager::getInstance(argc,argv) ;
string detectorfileName = myOptionManager->GetDetectorFilePath() ;
string calibrationfileName = myOptionManager->GetCalibrationFilePath() ;
string runToReadfileName = myOptionManager->GetRunToReadFilePath() ;
// First of All instantiate RootInput and Output
// Detector will be attached later
RootInput:: getInstance(runToReadfileName) ;
RootOutput::getInstance("Analysis/10HeRiken_AnalyzedData", "AnalyzedTree") ;
RootOutput::getInstance("Analysis/10HeRiken_AnalyzedData", "AnalyzedTree") ;
// Instantiate some Reaction
NPL::Reaction* He10Reaction = new Reaction ;
......@@ -78,37 +70,8 @@ int main(int argc,char** argv)
// Get Detector Pointer:
TMust2Physics* M2 = (TMust2Physics*) myDetector -> m_Detector["MUST2"] ;
TPlasticPhysics* Pl = (TPlasticPhysics*) myDetector -> m_Detector["Plastic"] ;
TSSSDPhysics* ThinSi = (TSSSDPhysics*) myDetector -> m_Detector["SSSD"] ;
RootOutput::getInstance()->GetList()->Add(myHist1D);
TCutG *cut3He_MUST2 = new TCutG("Cut3HeMUST2",11);
cut3He_MUST2->SetPoint(0,-1.49426,24.2781);
cut3He_MUST2->SetPoint(1,15.3161,14.3151);
cut3He_MUST2->SetPoint(2,47.069,7.6732);
cut3He_MUST2->SetPoint(3,110.575,4.35222);
cut3He_MUST2->SetPoint(4,308.563,2.25477);
cut3He_MUST2->SetPoint(5,310.431,1.20604);
cut3He_MUST2->SetPoint(6,232.917,1.11864);
cut3He_MUST2->SetPoint(7,89.0948,2.42955);
cut3He_MUST2->SetPoint(8,32.1264,6.71186);
cut3He_MUST2->SetPoint(9,1.30747,11.9555);
cut3He_MUST2->SetPoint(10,-1.49426,24.2781);
TCutG *cut3He_M2_SSSD = new TCutG("Cut3HeM2SSSD",11);
cut3He_M2_SSSD->SetPoint(0,7.44252,1.45432);
cut3He_M2_SSSD->SetPoint(1,40.6322,0.684984);
cut3He_M2_SSSD->SetPoint(2,95.9483,0.406912);
cut3He_M2_SSSD->SetPoint(3,218.649,0.216896);
cut3He_M2_SSSD->SetPoint(4,362.471,0.101033);
cut3He_M2_SSSD->SetPoint(5,355.431,0.0315148);
cut3He_M2_SSSD->SetPoint(6,100.977,0.0315148);
cut3He_M2_SSSD->SetPoint(7,25.546,0.314221);
cut3He_M2_SSSD->SetPoint(8,3.41954,0.995498);
cut3He_M2_SSSD->SetPoint(9,3.41954,1.40797);
cut3He_M2_SSSD->SetPoint(10,7.44252,1.45432);
// TPlasticPhysics* Pl = (TPlasticPhysics*) myDetector -> m_Detector["Plastic"] ;
// TSSSDPhysics* ThinSi = (TSSSDPhysics*) myDetector -> m_Detector["SSSD"] ;
cout << " ///////// Starting Analysis ///////// "<< endl << endl ;
int i ,N=Chain -> GetEntries();
......@@ -183,35 +146,35 @@ RootOutput::getInstance()->GetList()->Add(myHist1D);
{
ELab[hit] = M2 -> Si_E[hit] ;
ELab[hit]= He3StripAl.EvaluateInitialEnergy( ELab[hit] , // Energy of the detected particle
0.4*micrometer , // Target Thickness at 0 degree
ThetaMM2Surface );
// ELab[hit]= He3StripAl.EvaluateInitialEnergy( ELab[hit] , // Energy of the detected particle
// 0.4*micrometer , // Target Thickness at 0 degree
// ThetaMM2Surface );
if(ThinSi -> Energy.size() > 0)
{
ELab[hit]= He3StripAl.EvaluateInitialEnergy( ELab[hit] , // Energy of the detected particle
0.4*micrometer , // Target Thickness at 0 degree
ThetaMM2Surface );
ELab[hit] += ThinSi-> Energy[hit];
ELab[hit]= He3StripAl.EvaluateInitialEnergy( ELab[hit] , // Energy of the detected particle
0.4*micrometer , // Target Thickness at 0 degree
ThetaMM2Surface );
}
ELab[hit]= He3TargetWind.EvaluateInitialEnergy( ELab[hit] , // Energy of the detected particle
0*micrometer , // Target Thickness at 0 degree
ThetaN );
ELab[hit]= He3TargetGaz.EvaluateInitialEnergy( ELab[hit] , // Energy of the detected particle
3*micrometer , // Target Thickness at 0 degree
ThetaN );
// if(ThinSi -> Energy.size() > 0)
// {
//// ELab[hit]= He3StripAl.EvaluateInitialEnergy( ELab[hit] , // Energy of the detected particle
//// 0.4*micrometer , // Target Thickness at 0 degree
//// ThetaMM2Surface );
//// ELab[hit] += ThinSi-> Energy[hit];
//// ELab[hit]= He3StripAl.EvaluateInitialEnergy( ELab[hit] , // Energy of the detected particle
//// 0.4*micrometer , // Target Thickness at 0 degree
//// ThetaMM2Surface );
// }
//// ELab[hit]= He3TargetWind.EvaluateInitialEnergy( ELab[hit] , // Energy of the detected particle
//// 0*micrometer , // Target Thickness at 0 degree
//// ThetaN );
////
//// ELab[hit]= He3TargetGaz.EvaluateInitialEnergy( ELab[hit] , // Energy of the detected particle
//// 3*micrometer , // Target Thickness at 0 degree
//// ThetaN );
//
ThetaCM[hit] = He10Reaction -> EnergyLabToThetaCM( ELab[hit] ) /deg ;
ExcitationEnergy[hit] = He10Reaction -> ReconstructRelativistic( ELab[hit] , ThetaLab[hit] ) ;
if(ThinSi -> Energy.size() > 0 )
if(cut3He_M2_SSSD->IsInside(ThinSi -> Energy[hit], M2 -> Si_E[hit]) )
myHist1D->Fill(ExcitationEnergy[hit],EventWeight);
// if(ThinSi -> Energy.size() > 0 )
// if(cut3He_M2_SSSD->IsInside(ThinSi -> Energy[hit], M2 -> Si_E[hit]) )
// myHist1D->Fill(ExcitationEnergy[hit],EventWeight);
X[hit] = HitDirection . X();
Y[hit] = HitDirection . Y();
......@@ -223,43 +186,43 @@ RootOutput::getInstance()->GetList()->Add(myHist1D);
ELab[hit]= M2 ->CsI_E[hit] ;
ELab[hit]= He3TargetWind.EvaluateInitialEnergy( ELab[hit] , // Energy of the detected particle
3*micrometer , // Target Thickness at 0 degree
ThetaMM2Surface );
ELab[hit]= He3StripAl.EvaluateInitialEnergy( ELab[hit] , // Energy of the detected particle
0.4*micrometer , // Target Thickness at 0 degree
ThetaMM2Surface );
// ELab[hit]= He3TargetWind.EvaluateInitialEnergy( ELab[hit] , // Energy of the detected particle
// 3*micrometer , // Target Thickness at 0 degree
// ThetaMM2Surface );
//
// ELab[hit]= He3StripAl.EvaluateInitialEnergy( ELab[hit] , // Energy of the detected particle
// 0.4*micrometer , // Target Thickness at 0 degree
// ThetaMM2Surface );
ELab[hit]+= M2 ->Si_E[hit];
ELab[hit]= He3StripAl.EvaluateInitialEnergy( ELab[hit] , // Energy of the detected particle
0.4*micrometer , // Target Thickness at 0 degree
ThetaMM2Surface );
// ELab[hit]= He3StripAl.EvaluateInitialEnergy( ELab[hit] , // Energy of the detected particle
// 0.4*micrometer , // Target Thickness at 0 degree
// ThetaMM2Surface );
if(ThinSi -> Energy.size() > 0)
{
ELab[hit]= He3StripAl.EvaluateInitialEnergy( ELab[hit] , // Energy of the detected particle
0.4*micrometer , // Target Thickness at 0 degree
ThetaMM2Surface );
ELab[hit] += ThinSi-> Energy[hit];
ELab[hit]= He3StripAl.EvaluateInitialEnergy( ELab[hit] , // Energy of the detected particle
0.4*micrometer , // Target Thickness at 0 degree
ThetaMM2Surface );
}
ELab[hit]= He3TargetWind.EvaluateInitialEnergy( ELab[hit] , // Energy of the detected particle
0*micrometer , // Target Thickness at 0 degree
ThetaN );
ELab[hit]= He3TargetGaz.EvaluateInitialEnergy( ELab[hit] , // Energy of the detected particle
3*micrometer , // Target Thickness at 0 degree
ThetaN );
// if(ThinSi -> Energy.size() > 0)
// {
//// ELab[hit]= He3StripAl.EvaluateInitialEnergy( ELab[hit] , // Energy of the detected particle
//// 0.4*micrometer , // Target Thickness at 0 degree
//// ThetaMM2Surface );
//// ELab[hit] += ThinSi-> Energy[hit];
//// ELab[hit]= He3StripAl.EvaluateInitialEnergy( ELab[hit] , // Energy of the detected particle
//// 0.4*micrometer , // Target Thickness at 0 degree
//// ThetaMM2Surface );
// }
//
//// ELab[hit]= He3TargetWind.EvaluateInitialEnergy( ELab[hit] , // Energy of the detected particle
//// 0*micrometer , // Target Thickness at 0 degree
//// ThetaN );
////
//// ELab[hit]= He3TargetGaz.EvaluateInitialEnergy( ELab[hit] , // Energy of the detected particle
//// 3*micrometer , // Target Thickness at 0 degree
//// ThetaN );
////
ThetaCM[hit]= He10Reaction -> EnergyLabToThetaCM( ELab[hit] ) /deg ;
ExcitationEnergy[hit] = He10Reaction -> ReconstructRelativistic( ELab[hit], ThetaLab[hit]) ;
if( cut3He_MUST2->IsInside(M2 -> Si_E[hit], M2 -> CsI_E[hit]) )
myHist1D->Fill(ExcitationEnergy[hit],EventWeight);
//
// if( cut3He_MUST2->IsInside(M2 -> Si_E[hit], M2 -> CsI_E[hit]) )
// myHist1D->Fill(ExcitationEnergy[hit],EventWeight);
X[hit] = HitDirection . X();
Y[hit] = HitDirection . Y();
......
......@@ -7,6 +7,7 @@
// NPA
#include "DetectorManager.h"
#include "NPOptionManager.h"
#include "GaspardTracker.h"
// STL C++
......
......@@ -7,6 +7,7 @@
// NPA
#include "DetectorManager.h"
#include "NPOptionManager.h"
#include "Paris.h"
#include "Shield.h"
......
......@@ -6,19 +6,12 @@ using namespace std;
int main(int argc,char** argv)
{
// test if number of arguments is correct
if (argc != 4) {
cout <<
"you need to specify both a Reaction file and a Detector file such as : Analysis myReaction.reaction myDetector.detector runToRead.run"
<< endl;
return 0;
}
// get arguments
string reactionfileName = argv[1];
string detectorfileName = argv[2];
string runToReadfileName = argv[3];
NPOptionManager* myOptionManager = NPOptionManager::getInstance(argc,argv) ;
string detectorfileName = myOptionManager->GetDetectorFilePath() ;
string reactionfileName = myOptionManager->GetCalibrationFilePath() ;
string runToReadfileName = myOptionManager->GetRunToReadFilePath() ;
// Instantiate RootInput and RootOutput singleton classes
RootInput:: getInstance(runToReadfileName);
RootOutput::getInstance("Analysis/Paris_AnalyzedData", "AnalyzedTree");
......
......@@ -7,6 +7,7 @@
// NPA
#include "DetectorManager.h"
#include "NPOptionManager.h"
// STL C++
#include <iostream>
......
......@@ -4,18 +4,12 @@ using namespace std;
int main(int argc,char** argv)
{
if(argc!=4)
{
cout <<
"you need to specify both a Reaction file and a Detector file such as : Analysis myReaction.reaction myDetector.detector runToRead.run"
<< endl;
return 0;
}
string reactionfileName = argv[1] ;
string detectorfileName = argv[2] ;
string runToReadfileName = argv[3] ;
NPOptionManager* myOptionManager = NPOptionManager::getInstance(argc,argv) ;
string detectorfileName = myOptionManager->GetDetectorFilePath() ;
string reactionfileName = myOptionManager->GetCalibrationFilePath() ;
string calibrationfileName = myOptionManager->GetCalibrationFilePath() ;
string runToReadfileName = myOptionManager->GetRunToReadFilePath() ;
// First of All instantiate RootInput and Output
// Detector will be attached later
......@@ -30,6 +24,9 @@ int main(int argc,char** argv)
NPA::DetectorManager* myDetector = new DetectorManager ;
myDetector -> ReadConfigurationFile(detectorfileName) ;
// Instantiate the Calibration Manger using a file
CalibrationManager* myCalibration = CalibrationManager::getInstance(calibrationfileName) ;
// Get the formed Chained Tree and Treat it
TChain* Chain = RootInput:: getInstance() -> GetChain() ;
int i;
......
......@@ -7,6 +7,7 @@
// NPA
#include "DetectorManager.h"
#include "NPOptionManager.h"
// STL C++
#include <iostream>
......
......@@ -4,21 +4,12 @@ using namespace std;
int main(int argc,char** argv)
{
if(argc!=5)
{
cout <<
"you need to specify both a Reaction file and a Detector file such as : "<< endl;
cout <<
"Analysis myReaction.reaction myDetector.detector runToRead.run" << endl;
return 0;
}
string reactionfileName = argv[1] ;
string detectorfileName = argv[2] ;
string calibrationfileName = argv[3] ;
string runToTreatFileName = argv[4] ;
NPOptionManager* myOptionManager = NPOptionManager::getInstance(argc,argv) ;
string detectorfileName = myOptionManager->GetDetectorFilePath() ;
string reactionfileName = myOptionManager->GetCalibrationFilePath() ;
string calibrationfileName = myOptionManager->GetCalibrationFilePath() ;
string runToTreatFileName = myOptionManager->GetRunToReadFilePath() ;
/////////////////////////////////////////////////////////////////////////////////////////////////////
// First of All instantiate RootInput and Output
// Detector will be attached later
......
......@@ -288,6 +288,7 @@ TMust2PhysicsDict.cxx: TMust2Physics.h
# dependances
TMust2Data.o: TMust2Data.cxx TMust2Data.h
TMust2DataDict.o: TMust2DataDict.cxx TMust2DataDict.h
TMust2Physics.o: TMust2Physics.cxx TMust2Physics.h
#######################################
......
This diff is collapsed.
......@@ -18,8 +18,8 @@
* *
*---------------------------------------------------------------------------*
* Comment: *
* Only multiplicity one and multiplicity 2 are down. *
* Improvment needed *
* *
* *
* *
*****************************************************************************/
// STL
......@@ -64,12 +64,19 @@ class TMust2Physics : public TObject, public NPA::VDetector
// Telescope
vector<int> TelescopeNumber ;
// Si X
vector<double> Si_E ;
vector<double> Si_T ;
vector<int> Si_X ;
vector<int> Si_Y ;
// Si
vector<double> Si_E ;//max of Si_EX and Si_EY
vector<double> Si_T ;//min of Si_TX and Si_TY
vector<int> Si_X ;
vector<int> Si_Y ;
// Use for checking purpose
vector<double> Si_EX ;
vector<double> Si_TX ;
vector<double> Si_EY ;
vector<double> Si_TY ;
vector<int> TelescopeNumber_X ;
vector<int> TelescopeNumber_Y ;
// Si(Li)
vector<double> SiLi_E ;
vector<double> SiLi_T ;
......@@ -106,7 +113,6 @@ class TMust2Physics : public TObject, public NPA::VDetector
// 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.
......@@ -114,23 +120,46 @@ class TMust2Physics : public TObject, public NPA::VDetector
// Those two method all to clear the Event Physics or Data
void ClearEventPhysics() {Clear();}
void ClearEventData() {EventData->Clear();}
void ClearEventData() {EventData->Clear();}
public: // Specific to MUST2 Array
// Clear The PreTeated object
void ClearPreTreatedData() {PreTreatedData->Clear();}
// Remove bad channel, calibrate the data and apply threshold
void PreTreat();
// Return false if the channel is disabled by user
// Frist argument is either "X","Y","SiLi","CsI"
bool IsValidChannel(string DetectorType, int telescope , int channel);
// Initialize the standard parameter for analysis
// ie: all channel enable, maximum multiplicity for strip = number of telescope
void InitializeStandardParameter();
// Read the user configuration file; if no file found, load standard one
void ReadAnalysisConfig();
// Add a Telescope using Corner Coordinate information
void AddTelescope( TVector3 C_X1_Y1 ,
TVector3 C_X128_Y1 ,
TVector3 C_X1_Y128 ,
TVector3 C_X128_Y128 );
void AddTelescope( TVector3 C_X1_Y1 ,
TVector3 C_X128_Y1 ,
TVector3 C_X1_Y128 ,
TVector3 C_X128_Y128 );
// Add a Telescope using R Theta Phi of Si center information
void AddTelescope( double theta ,
double phi ,
double distance ,
double beta_u ,
double beta_v ,
double beta_w );
void AddTelescope( double theta ,
double phi ,
double distance ,
double beta_u ,
double beta_v ,
double beta_w );
// Use for reading Calibration Run, very simple methods; only apply calibration, no condition
void ReadCalibrationRun();
// Use to access the strip position
double GetStripPositionX( int N , int X , int Y ) { return StripPositionX[N-1][X-1][Y-1] ; };
double GetStripPositionY( int N , int X , int Y ) { return StripPositionY[N-1][X-1][Y-1] ; };
double GetStripPositionZ( int N , int X , int Y ) { return StripPositionZ[N-1][X-1][Y-1] ; };
......@@ -143,14 +172,28 @@ class TMust2Physics : public TObject, public NPA::VDetector
double GetEnergyDeposit(int i) { return TotalEnergy[i] ;};
TVector3 GetPositionOfInteraction(int i) ;
TVector3 GetTelescopeNormal(int i) ;
TVector3 GetTelescopeNormal(int i) ;
private: // Parameter used in the analysis
// Event over this value after pre-treatment are not treated / avoid long treatment time on spurious event
int m_MaximumStripMultiplicityAllowed ;//!
// Give the allowance in percent of the difference in energy between X and Y
double m_StripEnergyMatchingTolerance ; //!
private: // Root Input and Output tree classes
TMust2Data* EventData ;//!
TMust2Data* PreTreatedData ;//!
TMust2Physics* EventPhysics ;//!
private: // Map of activated channel
map< int, vector<bool> > XChannelStatus ;//!
map< int, vector<bool> > YChannelStatus ;//!
map< int, vector<bool> > SiLiChannelStatus ;//!
map< int, vector<bool> > CsIChannelStatus ;//!
private: // Spatial Position of Strip Calculated on bases of detector position
int NumberOfTelescope ;//!
......@@ -164,12 +207,12 @@ class TMust2Physics : public TObject, public NPA::VDetector
namespace LOCAL
{
// Threshold
const double Si_X_E_Threshold = 0 ; const double Si_X_T_Threshold = 0 ;
const double Si_Y_E_Threshold = 0 ; const double Si_Y_T_Threshold = 0 ;
const double SiLi_E_Threshold = 0 ; const double SiLi_T_Threshold = 0 ;
const double CsI_E_Threshold = 0 ; const double CsI_T_Threshold = 0 ;
// Threshold
const double Si_X_E_Threshold = 0 ;
const double Si_Y_E_Threshold = 0 ;
const double SiLi_E_Threshold = 0 ;
const double CsI_E_Threshold = 0 ;
// tranform an integer to a string
string itoa(int value);
// DSSD
......
......@@ -41,6 +41,7 @@ ROOTLIBS := $(shell $(ROOTCONFIG) --libs)
ROOTGLIBS := $(shell $(ROOTCONFIG) --glibs)
HASTHREAD := $(shell $(ROOTCONFIG) --has-thread)
ROOTDICTTYPE := $(shell $(ROOTCONFIG) --dicttype)
NOSTUBS := $(shell $(ROOTCONFIG) --nostubs)
ROOTCINT := rootcint
ifeq ($(ARCH),linux)
......@@ -267,41 +268,189 @@ GLIBS = $(ROOTGLIBS) $(SYSLIBS)
INCLUDE = -I$(CLHEP_BASE_DIR)/include
#------------------------------------------------------------------------------
SHARELIB = SharedLib
FILLINC = FillIncludeDir
FILLLIB = FillLibraryDir
LIBLIST = liblistfile
SHARELIB = CalibManager Vdetec InputOutputRoot InitCond InterCoord \
Must2All GaspardData AnnularS1Data PlasticData DummyDetectorData SSSDData\
Reaction EnergyLoss ParisData ShieldData
all: $(FILLINC) $(SHARELIB) $(FILLLIB) $(LIBLIST)
all: $(SHARELIB)
rm -f ./include/*Dict.h
#------------------------------------------------------------------------------
############### fillinclib ##############
FillIncludeDir:
./scripts/fillincdir.sh
############### Calibration ##############
FillLibraryDir:
./scripts/filllibdir.sh
## CalibrationManager ##
CalibManager:
make -C ./CalibrationManager
cp ./CalibrationManager/*.so ./lib ; cp ./CalibrationManager/*.h ./include
ifeq ($(ARCH),macosx)
./scripts/filllibmacdir.sh
cd lib; ln -sf libCalibrationManager.so libCalibrationManager.dylib
endif
############### liblist ##############
liblistfile:
./scripts/buildliblist.sh
############### Detector ##############
############### sharedlib ##############
SharedLib:
./scripts/makefile.sh
## VDetector ##
Vdetec:
cp ./VDetector/*.h ./include
make -C ./VDetector
cp ./VDetector/*.so ./lib
ifeq ($(ARCH),macosx)
cd lib; ln -sf libVDetector.so libVDetector.dylib
endif
## MUST2 ##
Must2All:
make -C ./MUST2
cp ./MUST2/*.so ./lib ; cp ./MUST2/*.h ./include
ifeq ($(ARCH),macosx)
cd lib; ln -sf libMust2Data.so libMust2Data.dylib
cd lib; ln -sf libMust2Physics.so libMust2Physics.dylib
endif
## SSSD ##
SSSDData:
make -C ./SSSD
cp ./SSSD/*.so ./lib ; cp ./SSSD/*.h ./include
ifeq ($(ARCH),macosx)
cd lib; ln -sf libSSSDData.so libSSSDData.dylib
cd lib; ln -sf libSSSDPhysics.so libSSSDPhysics.dylib
endif
## AnnularS1 ##
AnnularS1Data:
make -C ./AnnularS1
cp ./AnnularS1/*.so ./lib ; cp ./AnnularS1/*.h ./include
ifeq ($(ARCH),macosx)
cd lib; ln -sf libAnnularS1Data.so libAnnularS1Data.dylib
endif
## Gaspard ##
GaspardData:
make -C ./GASPARD
cp ./GASPARD/*.so ./lib ; cp ./GASPARD/*.h ./include
ifeq ($(ARCH),macosx)
cd lib; ln -sf libGaspardData.so libGaspardData.dylib
cd lib; ln -sf libGaspardPhysics.so libGaspardPhysics.dylib
endif
## Plastic ##
PlasticData:
make -C ./Plastic
cp ./Plastic/*.so ./lib ; cp ./Plastic/*.h ./include
ifeq ($(ARCH),macosx)
cd lib; ln -sf libPlasticData.so libPlasticData.dylib
cd lib; ln -sf libPlasticPhysics.so libPlasticPhysics.dylib
endif
## DUMMY Detector ##
DummyDetectorData:
make -C ./DummyDetector
cp ./DummyDetector/*.so ./lib ; cp ./DummyDetector/*.h ./include
ifeq ($(ARCH),macosx)
cd lib; ln -sf libDummyDetectorData.so libDummyDetectorData.dylib
endif
## Paris Detector ##
ParisData:
make -C ./Paris
cp ./Paris/*.so ./lib ; cp ./Paris/*.h ./include
ifeq ($(ARCH),macosx)
cd lib; ln -sf libParisData.so libParisData.dylib
cd lib; ln -sf libParisPhysics.so libParisPhysics.dylib
endif
## Paris Shield Detector ##
ShieldData:
make -C ./Shield
cp ./Shield/*.so ./lib ; cp ./Shield/*.h ./include
ifeq ($(ARCH),macosx)
cd lib; ln -sf libShieldData.so libShieldData.dylib
cd lib; ln -sf libShieldPhysics.so libShieldPhysics.dylib
endif
############# Simulation ##############
## InitialConditions ##
InitCond:
make -C ./InitialConditions
cp ./InitialConditions/*.so ./lib ; cp ./InitialConditions/*.h ./include
ifeq ($(ARCH),macosx)
cd lib; ln -sf libInitialConditions.so libInititalConditions.dylib
endif
## InteractionCoordinates ##
InterCoord:
make -C ./InteractionCoordinates
cp ./InteractionCoordinates/*.so ./lib ; cp ./InteractionCoordinates/*.h ./include
ifeq ($(ARCH),macosx)
cd lib; ln -sf libInteractionCoordinates.so libInteractionCoordinates.dylib
endif
############# I/O Root File ############
InputOutputRoot:
make -C ./IORoot
cp ./IORoot/*.so ./lib ; cp ./IORoot/*.h ./include
ifeq ($(ARCH),macosx)
cd lib; ln -sf libIORoot.so libIORoot.dylib
endif
############# Various Tools ############
## Reaction ##
Reaction:
make libReaction.so -C ./Tools
cp ./Tools/*.so ./lib ; cp ./Tools/*.h ./include
ifeq ($(ARCH),macosx)
cd lib; ln -sf libReaction.so libReaction.dylib
endif
EnergyLoss:
make libEnergyLoss.so -C ./Tools
cp ./Tools/*.so ./lib ; cp ./Tools/*.h ./include
ifeq ($(ARCH),macosx)
cd lib; ln -sf libEnergyLoss.so libEnergyLoss.dylib
endif
#######################################
############# Clean and More ##########
clean:
./scripts/makefile.sh clean
make clean -C ./Tools
make clean -C ./IORoot
make clean -C ./VDetector
make clean -C ./CalibrationManager
make clean -C ./MUST2
make clean -C ./SSSD
make clean -C ./AnnularS1
make clean -C ./GASPARD
make clean -C ./InteractionCoordinates
make clean -C ./InitialConditions
make clean -C ./DummyDetector
make clean -C ./Plastic
make clean -C ./Paris
make clean -C ./Shield
distclean:
rm -f ./lib/*
rm -f ./lib/*.so
ifeq ($(ARCH),macosx)
rm -f ./lib/*.dylib
endif
rm -f ./include/*.h
rm -f liblist
./scripts/makefile.sh distclean
make distclean -C ./Tools
make distclean -C ./IORoot
make distclean -C ./VDetector
make distclean -C ./CalibrationManager
make distclean -C ./MUST2
make distclean -C ./SSSD
make distclean -C ./AnnularS1
make distclean -C ./GASPARD
make distclean -C ./InteractionCoordinates
make distclean -C ./InitialConditions
make distclean -C ./DummyDetector
make distclean -C ./Plastic
make distclean -C ./Paris
make distclean -C ./Shield
.SUFFIXES: .$(SrcSuf)
###
......
This diff is collapsed.
......@@ -33,60 +33,90 @@ using namespace std ;
#include "../include/VDetector.h"
#include "../include/CalibrationManager.h"
class TSSSDPhysics : public TObject, public NPA::VDetector
{
public: // Constructor and Destructor
TSSSDPhysics();
~TSSSDPhysics();
public: // Calibrated Data
public: // Constructor and Destructor
TSSSDPhysics();
~TSSSDPhysics();
vector<UShort_t> DetectorNumber ;
vector<UShort_t> StripNumber ;
vector<Double_t> Energy ;
vector<Double_t> Time ;
public: // Calibrated Data
vector<UShort_t> DetectorNumber;
vector<UShort_t> StripNumber;
vector<Double_t> Energy;
vector<Double_t> Time;
public: // inherrited from VDetector
// Read stream at ConfigFile to pick-up parameters of detector (Position,...) using Token
void ReadConfiguration(string) ;
public: // inherrited from VDetector
// Read stream at ConfigFile to pick-up parameters of detector (Position,...) using Token
void ReadConfiguration(string);
// Add Parameter to the CalibrationManger
void AddParameterToCalibrationManager() ;
// Add Parameter to the CalibrationManger
void AddParameterToCalibrationManager();
// 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 InitializeRootInput() ;
// 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 InitializeRootInput();
// Create associated branches and associated private member DetectorPhysics address
void InitializeRootOutput();
// 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();
// 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();
// Those two method all to clear the Event Physics or Data
void ClearEventPhysics() {Clear();}
void ClearEventData() {EventData->Clear();}
public: // Specific to SSSD
// Clear The PreTeated object
void ClearPreTreatedData() {PreTreatedData->Clear();}
// 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() ;
// Those two method all to clear the Event Physics or Data
void ClearEventPhysics() {Clear();}
void ClearEventData() {EventData->Clear();}
private: // Data not writted in the tree
int NumberOfDetector ;//!
TSSSDData* EventData ;//!
TSSSDPhysics* EventPhysics ;//!
void Clear();
void Clear(const Option_t*) {};
// Remove bad channel, calibrate the data and apply threshold
void PreTreat();
// Initialize the standard parameter for analysis
// ie: all channel enable, maximum multiplicity for strip = number of telescope
void InitializeStandardParameter();
// Read the user configuration file; if no file found, load standard one
void ReadAnalysisConfig();
private: // Data not written in the tree
int NumberOfDetector; //!
TSSSDData* EventData; //!
TSSSDData* PreTreatedData; //!
TSSSDPhysics* EventPhysics; //!
double m_E_Threshold; //!
double m_Pedestal_Threshold; //!
private: // Map of activated Channel
map< int, vector<bool> > ChannelStatus;//!
public: // Return True if the channel is activated
// bool IsValidChannel(int DetectorNbr, int StripNbr) ;
void Clear();
void Clear(const Option_t*) {};
ClassDef(TSSSDPhysics,1) // SSSDPhysics structure
ClassDef(TSSSDPhysics,1) // SSSDPhysics structure
};
namespace LOCAL
{
double fSi_E( TSSSDData* EventData , int i );
double fSi_T( TSSSDData* EventData , int i );
}
#endif
......@@ -267,7 +267,7 @@ GLIBS = $(ROOTGLIBS) $(SYSLIBS)
INCLUDE = -I$(CLHEP_BASE_DIR)/include
#------------------------------------------------------------------------------
SHARELIB = libReaction.so libEnergyLoss.so
SHARELIB = libReaction.so libEnergyLoss.so libTagManager.so libOptionManager.so
all: $(SHARELIB)
#------------------------------------------------------------------------------
......@@ -281,10 +281,23 @@ libReaction.so: NPReaction.o NPNucleus.o
libEnergyLoss.so: NPEnergyLoss.o
$(LD) $(SOFLAGS) $^ $(OutPutOpt) $@
## TAGManager ##
libTagManager.so: NPTagManager.o NPTagManagerDict.o
$(LD) $(SOFLAGS) $^ $(OutPutOpt) $@
NPTagManagerDict.cxx: NPTagManager.h
rootcint -f $@ -c $^
## OptionManager ##
libOptionManager.so: NPOptionManager.o
$(LD) $(SOFLAGS) $^ $(OutPutOpt) $@
# dependances
NPReaction.o:NPReaction.cxx NPReaction.h
NPNucleus.o: NPNucleus.cxx NPNucleus.h
NPEnergyLoss.o:NPEnergyLoss.cxx NPEnergyLoss.h
NPTagManager.o:NPTagManager.cxx NPTagManager.h
NPOptionManager.o:NPOptionManager.cxx NPOptionManager.h
#######################################
############# Clean and More ##########
......
......@@ -64,20 +64,28 @@ EnergyLoss::EnergyLoss(string Path , string Source, int NumberOfSlice=100 , int
fNumberOfMass = NumberOfMass ;
string globalPath = getenv("NPTOOL");
Path = globalPath + "/Inputs/EnergyLoss/" + Path;
string StandardPath = globalPath + "/Inputs/EnergyLoss/" + Path;
cout << "///////////////////////////////// " << endl ;
cout << "Initialising an EnergyLoss object " << endl ;
ifstream TableFile ;
TableFile.open(Path.c_str()) ;
TableFile.open(StandardPath.c_str()) ;
// Opening dE/dX file
if(!TableFile) cout << "ERROR: TABLE FILE NOT FOUND" << endl;
if(TableFile.is_open()) cout << "Reading Energy Loss File: " << Path << endl ;
// In case the file is not found in the standard path, the programm try to interpret the file name as an absolute or relative file path.
else
{
TableFile.open( Path.c_str() );
if(TableFile.is_open()) { cout << "Reading Energy Loss File: " << Path << endl ;}
else { cout << "ERROR: TABLE FILE NOT FOUND" << endl; return; }
}
if (Source == "G4Table")
{
cout << "Reading Energy Loss File: " << Path << endl ;
// Reading Data
double energy, total;
string dummy;
......@@ -230,25 +238,53 @@ double EnergyLoss::Slow( double Energy , // Energy of the detected particle
double Angle ) // Particle Angle
const
{
TargetThickness = TargetThickness / cos(Angle) ;
double SliceThickness = TargetThickness / (double)fNumberOfSlice ;
Interpolator* s = new Interpolator( fEnergy , fdEdX_Total ) ;
// // Lise file are given in MeV/u
// // For SRIM and geant4 file fNumberOfMass = 1 whatever is the nucleus, file are given in MeV
// Energy = Energy / (double) fNumberOfMass ;
//
// if (Angle > halfpi) Angle = pi-Angle ;
//
// TargetThickness = TargetThickness / cos(Angle) ;
// double SliceThickness = TargetThickness / (double)fNumberOfSlice ;
//
// //Interpolator* s = new Interpolator( fEnergy , fdEdX_Total ) ;
//
//// double InitialEnergy = Energy ;
//// //double slow = 0. ;
//
// for (int i = 0; i < fNumberOfSlice ; i++)
// {
// // double de = s->Eval(Energy) * SliceThickness;
// double de = fInter->Eval(Energy) * SliceThickness ;
// // slow += de ;
// Energy -= de/fNumberOfMass ;
// // If ion do not cross the target
//// if (Energy < 0) {slow = InitialEnergy; break;}
// if (Energy < 0) {Energy=0; break;}
// }
//
// // delete s ;
// return slow ;
// Lise file are given in MeV/u
// For SRIM and geant4 file fNumberOfMass = 1 whatever is the nucleus, file are given in MeV
Energy = Energy / (double) fNumberOfMass ;
if (Angle > halfpi) Angle = pi-Angle ;
TargetThickness = TargetThickness / ( cos(Angle) ) ;
double InitialEnergy = Energy ;
double slow = 0. ;
double SliceThickness = TargetThickness / (double)fNumberOfSlice ;
for (int i = 0; i < fNumberOfSlice ; i++)
{
double de = s->Eval(Energy) * SliceThickness;
slow += de ;
Energy -= de ;
// If ion do not cross the target
if (Energy < 0) {slow = InitialEnergy; break;}
double de = fInter->Eval(Energy) * SliceThickness ;
Energy -= de/fNumberOfMass ;
if(Energy<0) {Energy=0;break;}
}
delete s ;
return slow ;
return (Energy*fNumberOfMass) ;
}
//....oooOO0OOooo........oooOO0OOooo........oooOO0OOooo........oooOO0OOooo......
double EnergyLoss::EvaluateInitialEnergy( double Energy , // Energy of the detected particle
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment