Skip to content

eobrien2502/FLOWER

 
 

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

73 Commits
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

FLOWER: soFtware for LOW-Energy Reconstruction

An energy reconstruction script for low-energy events that works with (hk-)BONSAI and other low-energy reconstruction tools - it just requires a positional vertex.

Compiling

Make sure the following are sourced

  • WCSim ($WCSIMDIR set)

Then

export FLOWERDIR=/path/to/FLOWER
make

Running the WCSim/BONSAI script bundled here

Make sure the following are sourced

  • WCSim ($WCSIMDIR set)
  • BONSAI ($BONSAIDIR set)
  • FLOWER ($FLOWERDIR set)

Then

export PATH=$FLOWERDIR/rootflower:$PATH
export FLOWERDATADIR=/path/to/writable/directory/ #e.g. $FLOWERDIR/data/
rootflower -b -q flower_with_bonsai.C+'("/path/to/wcsim/file.root",1,"SuperK")'

Note that $FLOWERDATADIR is used to store information that takes a while to calculate, and that only needs to be done once per geometry (e.g. the nearest neighbours of each PMT). If $FLOWERDATADIR is not set, or set to a directory that doesn't exist, $FLOWERDIR/data/ will be used instead

Running in other code

  • Construct a class member, giving it a detectorname (it sets default values and determines the exact energy correction factors) and detector geometry
WCSimFlower(const char * detectorname, WCSimRootGeom * geom, int verbose);
  • Override default values of parameters with these methods
void SetDarkRate(double darkrate);
void SetNPMTs   (int npmts);
void SetNWorkingPMTs(int nworkingpmts);
void SetNeighbourDistance(double neighbourdistance);
void SetShortDuration(double shortduration);
void SetLongDuration(double longduration);
void SetTopBottomDistance(double hi, double lo);
  • Every event/trigger, send it a list of hit times, hit tube IDs, and reconstructed vertex position (x,y,z)
double GetEnergy(std::vector<float> times, std::vector<int> tubeIds, float * vertex);

About

Energy reconstruction for (hk-)BONSAI

Resources

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published

Languages

  • C++ 56.0%
  • C 39.2%
  • Makefile 4.6%
  • Shell 0.2%