put stuffs in the Armory folder

This commit is contained in:
Ryan Tang 2024-02-01 19:02:30 -05:00
parent caff146185
commit e470221c6c
12 changed files with 32 additions and 21 deletions

1
.gitignore vendored
View File

@ -5,3 +5,4 @@ EventBuilder*
*.root
Mapper
anasenMS

View File

@ -6,7 +6,7 @@
#include <TFile.h>
#include <TSelector.h>
#include "ClassDet.h"
#include "Armory/ClassDet.h"
class Analyzer : public TSelector {
public :

View File

@ -48,7 +48,7 @@ public:
double CalSp2(int a, int z); // this is for (a,z) nucleus removal
double CalBeta(double T){
double Etot = Mass + T;
// double Etot = Mass + T;
double gamma = 1 + T/Mass;
double beta = sqrt(1 - 1 / gamma / gamma ) ;
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->Z = z;
FindMassByAZ(a,z);
}
void Isotope::SetIsoByName(string name){
inline void Isotope::SetIsoByName(string name){
FindMassByName(name);
}
void Isotope::FindMassByAZ(int A, int Z){
inline void Isotope::FindMassByAZ(int A, int Z){
string line;
int lineNum=0;
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
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);
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 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){
case 0: return 1; break; // 0s1/2
@ -360,7 +360,7 @@ int Isotope::TwoJ(int nShell){
return 0;
}
string Isotope::Orbital(int nShell){
inline string Isotope::Orbital(int nShell){
switch(nShell){
case 0: return "0s1 "; break; //
@ -397,14 +397,14 @@ string Isotope::Orbital(int nShell){
return "nan";
}
void Isotope::ListShell(){
inline void Isotope::ListShell(){
if( Mass < 0 ) return;
int n = A-Z;
int p = Z;
int k = min(n,p);
int k = std::min(n,p);
int nMagic = 0;
for( int i = 0; i < 7; i++){
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(" || ");
int t = max(n,p);
int t = std::max(n,p);
int nShell = 0;
do{
int occ = TwoJ(nShell)+1;
@ -495,8 +495,7 @@ void Isotope::ListShell(){
}
void Isotope::Print(){
inline void Isotope::Print(){
if (Mass > 0){

View File

@ -10,7 +10,7 @@ COPTS = -fPIC -DLINUX -g -O0 -Wall -std=c++17 -lpthread
ROOTLIBS = `root-config --cflags --glibs`
ALL = Mapper
ALL = Mapper AnasenMS
#########################################################################
@ -19,6 +19,10 @@ all : $(ALL)
clean :
/bin/rm -f $(OBJS) $(ALL)
Mapper : Mapper.cpp mapping.h ClassDet.h
Mapper : Mapper.cpp ../mapping.h ClassDet.h
@echo "--------- making Mapper"
$(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)

View File

@ -7,7 +7,7 @@
#include <TMath.h>
#include <TBenchmark.h>
#include "mapping.h"
#include "../mapping.h"
#include "ClassDet.h"
//===============================

View File

@ -14,9 +14,14 @@
// find out the CalTrack and the real track
// 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
TransferReaction transfer;
@ -219,4 +224,6 @@ void anasenMS(){
printf("=============== done. saved as %s. count(hit==1) : %d\n", saveFileName.Data(), count);
return 0;
}