Merge branch 'devel_vignesh' of https://fsunuc.physics.fsu.edu/git/rtang/ANASEN_analysis into devel_vignesh

This commit is contained in:
Vignesh Sitaraman 2026-04-27 13:57:54 -04:00
commit fc09dc9258
4 changed files with 42 additions and 2 deletions

View File

@ -5,11 +5,20 @@
#define MAXMULTI 1000 #define MAXMULTI 1000
class Det
{
class Det class Det
{ {
public: public:
Det() : multi(0) { Clear(); } Det() : multi(0) { Clear(); }
Det() : multi(0) { Clear(); }
unsigned short multi; // max 65535
unsigned short id[MAXMULTI];
unsigned short ch[MAXMULTI];
unsigned short e[MAXMULTI];
unsigned long long t[MAXMULTI];
unsigned long long tf[MAXMULTI];
unsigned short multi; // max 65535 unsigned short multi; // max 65535
unsigned short id[MAXMULTI]; unsigned short id[MAXMULTI];
unsigned short ch[MAXMULTI]; unsigned short ch[MAXMULTI];
@ -17,16 +26,24 @@ public:
unsigned long long t[MAXMULTI]; unsigned long long t[MAXMULTI];
unsigned long long tf[MAXMULTI]; unsigned long long tf[MAXMULTI];
unsigned short sn[MAXMULTI];
unsigned short digiCh[MAXMULTI];
unsigned short sn[MAXMULTI]; unsigned short sn[MAXMULTI];
unsigned short digiCh[MAXMULTI]; unsigned short digiCh[MAXMULTI];
unsigned short index[MAXMULTI]; // id * nCh + ch;
bool used[MAXMULTI];
unsigned short index[MAXMULTI]; // id * nCh + ch; unsigned short index[MAXMULTI]; // id * nCh + ch;
bool used[MAXMULTI]; bool used[MAXMULTI];
void Clear()
{
void Clear() void Clear()
{ {
multi = 0; multi = 0;
for (int i = 0; i < MAXMULTI; i++) for (int i = 0; i < MAXMULTI; i++)
{
for (int i = 0; i < MAXMULTI; i++)
{ {
id[i] = 0; id[i] = 0;
ch[i] = 0; ch[i] = 0;
@ -37,9 +54,18 @@ public:
sn[i] = 0; sn[i] = 0;
digiCh[i] = 0; digiCh[i] = 0;
used[i] = false; used[i] = false;
e[i] = 0;
t[i] = 0;
tf[i] = 0;
index[i] = 0;
sn[i] = 0;
digiCh[i] = 0;
used[i] = false;
} }
} }
void Print()
{
void Print() void Print()
{ {
printf("=============================== multi : %u\n", multi); printf("=============================== multi : %u\n", multi);
@ -49,12 +75,19 @@ public:
} }
} }
void SetDetDimension(unsigned short maxID, unsigned maxCh)
{
void SetDetDimension(unsigned short maxID, unsigned maxCh) void SetDetDimension(unsigned short maxID, unsigned maxCh)
{ {
nID = maxID; nID = maxID;
nCh = maxCh; nCh = maxCh;
} }
void CalIndex()
{
for (int i = 0; i < multi; i++)
{
index[i] = id[i] * nCh + ch[i];
void CalIndex() void CalIndex()
{ {
for (int i = 0; i < multi; i++) for (int i = 0; i < multi; i++)
@ -69,3 +102,4 @@ private:
}; };
#endif #endif
#endif

View File

@ -124,10 +124,13 @@ int main(int argc, char **argv)
pc.multi = 0; pc.multi = 0;
misc.multi = 0; misc.multi = 0;
sx3.Clear();
sx3.Clear(); sx3.Clear();
qqq.Clear(); qqq.Clear();
pc.Clear(); pc.Clear();
misc.Clear(); misc.Clear();
pc.Clear();
misc.Clear();
for (unsigned int i = 0; i < multi; i++) for (unsigned int i = 0; i < multi; i++)
{ {

View File

@ -0,0 +1,2 @@
1
13 1.0

View File

@ -4,7 +4,8 @@ import sys
# 1. FIX: Manually load the Garfield library if it's not in the ROOT namespace # 1. FIX: Manually load the Garfield library if it's not in the ROOT namespace
# Update this path to your actual installation location # Update this path to your actual installation location
garfield_lib_path = "/home/vs19g/garfieldpp/install/lib/libGarfield.so" # garfield_lib_path = "/home/vs19g/garfieldpp/install/lib/libGarfield.so" #panguin path
garfield_lib_path = "/home/vsitaraman/garfieldpp/install/lib/libGarfield.so" #laptop path
if os.path.exists(garfield_lib_path): if os.path.exists(garfield_lib_path):
ROOT.gSystem.Load(garfield_lib_path) ROOT.gSystem.Load(garfield_lib_path)
@ -48,7 +49,7 @@ fm = ROOT.Garfield.ComponentElmer()
fm.Initialise("wires2d/mesh.header", fm.Initialise("wires2d/mesh.header",
"wires2d/mesh.elements", "wires2d/mesh.elements",
"wires2d/mesh.nodes", "wires2d/mesh.nodes",
"wires2d/dielectrics.dat", "dielectrics.dat", # Dielectrics (leave as empty string)
"wires2d/elstatics.result", "wires2d/elstatics.result",
"mm") "mm")