put stuffs in the Armory folder
This commit is contained in:
parent
caff146185
commit
e470221c6c
1
.gitignore
vendored
1
.gitignore
vendored
|
@ -5,3 +5,4 @@ EventBuilder*
|
||||||
*.root
|
*.root
|
||||||
|
|
||||||
Mapper
|
Mapper
|
||||||
|
anasenMS
|
|
@ -6,7 +6,7 @@
|
||||||
#include <TFile.h>
|
#include <TFile.h>
|
||||||
#include <TSelector.h>
|
#include <TSelector.h>
|
||||||
|
|
||||||
#include "ClassDet.h"
|
#include "Armory/ClassDet.h"
|
||||||
|
|
||||||
class Analyzer : public TSelector {
|
class Analyzer : public TSelector {
|
||||||
public :
|
public :
|
||||||
|
|
|
@ -48,7 +48,7 @@ public:
|
||||||
double CalSp2(int a, int z); // this is for (a,z) nucleus removal
|
double CalSp2(int a, int z); // this is for (a,z) nucleus removal
|
||||||
|
|
||||||
double CalBeta(double T){
|
double CalBeta(double T){
|
||||||
double Etot = Mass + T;
|
// double Etot = Mass + T;
|
||||||
double gamma = 1 + T/Mass;
|
double gamma = 1 + T/Mass;
|
||||||
double beta = sqrt(1 - 1 / gamma / gamma ) ;
|
double beta = sqrt(1 - 1 / gamma / gamma ) ;
|
||||||
return beta;
|
return beta;
|
||||||
|
@ -115,17 +115,17 @@ private:
|
||||||
|
|
||||||
};
|
};
|
||||||
|
|
||||||
void Isotope::SetIso(int a, int z){
|
inline void Isotope::SetIso(int a, int z){
|
||||||
this->A = a;
|
this->A = a;
|
||||||
this->Z = z;
|
this->Z = z;
|
||||||
FindMassByAZ(a,z);
|
FindMassByAZ(a,z);
|
||||||
}
|
}
|
||||||
|
|
||||||
void Isotope::SetIsoByName(string name){
|
inline void Isotope::SetIsoByName(string name){
|
||||||
FindMassByName(name);
|
FindMassByName(name);
|
||||||
}
|
}
|
||||||
|
|
||||||
void Isotope::FindMassByAZ(int A, int Z){
|
inline void Isotope::FindMassByAZ(int A, int Z){
|
||||||
string line;
|
string line;
|
||||||
int lineNum=0;
|
int lineNum=0;
|
||||||
int list_A, list_Z;
|
int list_A, list_Z;
|
||||||
|
@ -190,7 +190,7 @@ void Isotope::FindMassByAZ(int A, int Z){
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
void Isotope::FindMassByName(string name){
|
inline void Isotope::FindMassByName(string name){
|
||||||
|
|
||||||
// done seperate the Mass number and the name
|
// done seperate the Mass number and the name
|
||||||
if( name == "n" ) {
|
if( name == "n" ) {
|
||||||
|
@ -302,7 +302,7 @@ void Isotope::FindMassByName(string name){
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
double Isotope::CalSp(int Np, int Nn){
|
inline double Isotope::CalSp(int Np, int Nn){
|
||||||
Isotope nucleusD(A - Np - Nn, Z - Np);
|
Isotope nucleusD(A - Np - Nn, Z - Np);
|
||||||
|
|
||||||
if( nucleusD.Mass != -404){
|
if( nucleusD.Mass != -404){
|
||||||
|
@ -312,7 +312,7 @@ double Isotope::CalSp(int Np, int Nn){
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
double Isotope::CalSp2(int a, int z){
|
inline double Isotope::CalSp2(int a, int z){
|
||||||
Isotope nucleusD(A - a , Z - z);
|
Isotope nucleusD(A - a , Z - z);
|
||||||
Isotope nucleusS(a,z);
|
Isotope nucleusS(a,z);
|
||||||
|
|
||||||
|
@ -323,7 +323,7 @@ double Isotope::CalSp2(int a, int z){
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
int Isotope::TwoJ(int nShell){
|
inline int Isotope::TwoJ(int nShell){
|
||||||
|
|
||||||
switch(nShell){
|
switch(nShell){
|
||||||
case 0: return 1; break; // 0s1/2
|
case 0: return 1; break; // 0s1/2
|
||||||
|
@ -360,7 +360,7 @@ int Isotope::TwoJ(int nShell){
|
||||||
return 0;
|
return 0;
|
||||||
}
|
}
|
||||||
|
|
||||||
string Isotope::Orbital(int nShell){
|
inline string Isotope::Orbital(int nShell){
|
||||||
|
|
||||||
switch(nShell){
|
switch(nShell){
|
||||||
case 0: return "0s1 "; break; //
|
case 0: return "0s1 "; break; //
|
||||||
|
@ -397,14 +397,14 @@ string Isotope::Orbital(int nShell){
|
||||||
return "nan";
|
return "nan";
|
||||||
}
|
}
|
||||||
|
|
||||||
void Isotope::ListShell(){
|
inline void Isotope::ListShell(){
|
||||||
|
|
||||||
if( Mass < 0 ) return;
|
if( Mass < 0 ) return;
|
||||||
|
|
||||||
int n = A-Z;
|
int n = A-Z;
|
||||||
int p = Z;
|
int p = Z;
|
||||||
|
|
||||||
int k = min(n,p);
|
int k = std::min(n,p);
|
||||||
int nMagic = 0;
|
int nMagic = 0;
|
||||||
for( int i = 0; i < 7; i++){
|
for( int i = 0; i < 7; i++){
|
||||||
if( magic(i) < k && k <= magic(i+1) ){
|
if( magic(i) < k && k <= magic(i+1) ){
|
||||||
|
@ -422,7 +422,7 @@ void Isotope::ListShell(){
|
||||||
|
|
||||||
printf("------------------ Core:%3s, inner Core:%3s \n", (core2.Name).c_str(), (core1.Name).c_str());
|
printf("------------------ Core:%3s, inner Core:%3s \n", (core2.Name).c_str(), (core1.Name).c_str());
|
||||||
printf(" || ");
|
printf(" || ");
|
||||||
int t = max(n,p);
|
int t = std::max(n,p);
|
||||||
int nShell = 0;
|
int nShell = 0;
|
||||||
do{
|
do{
|
||||||
int occ = TwoJ(nShell)+1;
|
int occ = TwoJ(nShell)+1;
|
||||||
|
@ -495,8 +495,7 @@ void Isotope::ListShell(){
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
|
inline void Isotope::Print(){
|
||||||
void Isotope::Print(){
|
|
||||||
|
|
||||||
if (Mass > 0){
|
if (Mass > 0){
|
||||||
|
|
|
@ -10,7 +10,7 @@ COPTS = -fPIC -DLINUX -g -O0 -Wall -std=c++17 -lpthread
|
||||||
|
|
||||||
ROOTLIBS = `root-config --cflags --glibs`
|
ROOTLIBS = `root-config --cflags --glibs`
|
||||||
|
|
||||||
ALL = Mapper
|
ALL = Mapper AnasenMS
|
||||||
|
|
||||||
#########################################################################
|
#########################################################################
|
||||||
|
|
||||||
|
@ -19,6 +19,10 @@ all : $(ALL)
|
||||||
clean :
|
clean :
|
||||||
/bin/rm -f $(OBJS) $(ALL)
|
/bin/rm -f $(OBJS) $(ALL)
|
||||||
|
|
||||||
Mapper : Mapper.cpp mapping.h ClassDet.h
|
Mapper : Mapper.cpp ../mapping.h ClassDet.h
|
||||||
@echo "--------- making Mapper"
|
@echo "--------- making Mapper"
|
||||||
$(CC) $(COPTS) -o Mapper Mapper.cpp $(ROOTLIBS)
|
$(CC) $(COPTS) -o Mapper Mapper.cpp $(ROOTLIBS)
|
||||||
|
|
||||||
|
AnasenMS : ClassAnasen.h anasenMS.cpp Isotope.h constant.h
|
||||||
|
@echo "--------- making ANASEN Monte Carlo"
|
||||||
|
$(CC) $(COPTS) -o anasenMS anasenMS.cpp $(ROOTLIBS)
|
|
@ -7,7 +7,7 @@
|
||||||
#include <TMath.h>
|
#include <TMath.h>
|
||||||
#include <TBenchmark.h>
|
#include <TBenchmark.h>
|
||||||
|
|
||||||
#include "mapping.h"
|
#include "../mapping.h"
|
||||||
#include "ClassDet.h"
|
#include "ClassDet.h"
|
||||||
|
|
||||||
//===============================
|
//===============================
|
|
@ -14,9 +14,14 @@
|
||||||
// find out the CalTrack and the real track
|
// find out the CalTrack and the real track
|
||||||
// find out the Q-value uncertaintly
|
// find out the Q-value uncertaintly
|
||||||
|
|
||||||
void anasenMS(){
|
int main(int argc, char **argv){
|
||||||
|
|
||||||
const int numEvent = 100000;
|
printf("=========================================\n");
|
||||||
|
printf("=== ANASEN Monte Carlo ===\n");
|
||||||
|
printf("=========================================\n");
|
||||||
|
|
||||||
|
int numEvent = 1000000;
|
||||||
|
if( argc >= 2 ) numEvent = atoi(argv[1]);
|
||||||
|
|
||||||
//Reaction
|
//Reaction
|
||||||
TransferReaction transfer;
|
TransferReaction transfer;
|
||||||
|
@ -219,4 +224,6 @@ void anasenMS(){
|
||||||
|
|
||||||
printf("=============== done. saved as %s. count(hit==1) : %d\n", saveFileName.Data(), count);
|
printf("=============== done. saved as %s. count(hit==1) : %d\n", saveFileName.Data(), count);
|
||||||
|
|
||||||
|
return 0;
|
||||||
|
|
||||||
}
|
}
|
Loading…
Reference in New Issue
Block a user