prepare anasen monte carlo simulation

This commit is contained in:
Ryan Tang 2024-01-31 20:11:36 -05:00
parent a20f3d46e8
commit be1b918078
5 changed files with 45 additions and 6 deletions

View File

@ -11,6 +11,19 @@
"cStandard": "c17", "cStandard": "c17",
"cppStandard": "gnu++17", "cppStandard": "gnu++17",
"intelliSenseMode": "linux-gcc-x64" "intelliSenseMode": "linux-gcc-x64"
},
{
"name": "Ryan",
"includePath": [
"${workspaceFolder}/**",
"/home/ryan/Downloads/root_build/**",
"/home/ryan/Downloads/root_build/include"
],
"defines": [],
"compilerPath": "/usr/bin/gcc",
"cStandard": "c17",
"cppStandard": "gnu++17",
"intelliSenseMode": "linux-gcc-x64"
} }
], ],
"version": 4 "version": 4

View File

@ -77,6 +77,7 @@
"typeinfo": "cpp", "typeinfo": "cpp",
"variant": "cpp", "variant": "cpp",
"bitset": "cpp", "bitset": "cpp",
"forward_list": "cpp" "forward_list": "cpp",
"anasenMS.C": "cpp"
} }
} }

View File

@ -433,9 +433,11 @@ inline void ANASEN::DrawTrack(TVector3 pos, TVector3 direction){
startPos->SetLineColor(kBlack); startPos->SetLineColor(kBlack);
worldBox->AddNode(startPos, 3, new TGeoCombiTrans( pos.X(), pos.Y(), pos.Z(), new TGeoRotation("rotA", 0, 0, 0.))); worldBox->AddNode(startPos, 3, new TGeoCombiTrans( pos.X(), pos.Y(), pos.Z(), new TGeoRotation("rotA", 0, 0, 0.)));
if( sx3.id >= 0 ){
TGeoVolume * hit = geom->MakeSphere("hitpos", 0, 0, 3); TGeoVolume * hit = geom->MakeSphere("hitpos", 0, 0, 3);
hit->SetLineColor(kRed); hit->SetLineColor(kRed);
worldBox->AddNode(hit, 2, new TGeoCombiTrans( sx3.hitPos.X(), sx3.hitPos.Y(), sx3.hitPos.Z(), new TGeoRotation("rotA", 0, 0, 0.))); worldBox->AddNode(hit, 2, new TGeoCombiTrans( sx3.hitPos.X(), sx3.hitPos.Y(), sx3.hitPos.Z(), new TGeoRotation("rotA", 0, 0, 0.)));
}
geom->CloseGeometry(); geom->CloseGeometry();
geom->SetVisLevel(4); geom->SetVisLevel(4);

23
anasenMS.C Normal file
View File

@ -0,0 +1,23 @@
#include "ClassAnasen.h"
#include "TRandom.h"
#include "TH1.h"
#include "TH2.h"
#include "TStyle.h"
#include "TCanvas.h"
//======== Gerneate light particle based on reaction
// find out the CalTrack and the real track
// find out the Q-value uncertaintly
void anasenMS(){
//Reaction
}

View File

@ -257,7 +257,7 @@ void script(TString fileName = "", int maxEvent = -1){
haha->CalTrack(sx3.hitPos, wireID.first, wireID.second, true); haha->CalTrack(sx3.hitPos, wireID.first, wireID.second, true);
haha->DrawDeducedTrack(sx3.hitPos, wireID.first, wireID.second); //haha->DrawDeducedTrack(sx3.hitPos, wireID.first, wireID.second);
// haha->DrawTrack(pos, dir); // haha->DrawTrack(pos, dir);