280 likes | 415 Views
Status of ND280 Software at UVic. Maj 2006, ND280 Software Workshop, Triumf. Contents. Installation Analysis Example As an independent package As a CMT program Some code examples Trial to use reconstruction. Installation. http://hepweb.phys.uvic.ca/~hansen/T2K/ND280SOFT/install.html.
E N D
Status of ND280 Software at UVic Maj 2006, ND280 Software Workshop, Triumf
Contents • Installation • Analysis Example • As an independent package • As a CMT program • Some code examples • Trial to use reconstruction
Installation http://hepweb.phys.uvic.ca/~hansen/T2K/ND280SOFT/install.html • ND280Soft is installed at UVic • followed these steps • ND280Soft can be run from any “fate” account • following these steps http://hepweb.phys.uvic.ca/~hansen/T2K/ND280SOFT/run.html
How to Install http://hepweb.phys.uvic.ca/~hansen/T2K/ND280SOFT/install.html#cmt • Install CMT and source the setup file • Connect with the repository jnurep@jnusrv01.kek.jp • Set variables, check out, configure and compile http://hepweb.phys.uvic.ca/~hansen/T2K/ND280SOFT/install.html#cvs http://hepweb.phys.uvic.ca/~hansen/T2K/ND280SOFT/install.html#checkout
Analysis Example • An analysis example reads in a .root file from the ND280 software and does some analysis • Have been done in two ways • as an “independent” program • Makefile taking care of the link to the ND280 software • as a cmt package (“correct” way) • requirement file taking care of the dependencies
The Independent Program • A program that use the ND280 software • Makefile (see next slide) /home/chansen/ANALYSIS on neut03
Makefile /home/chansen/ANALYSIS on neut03 • Links in ND280 and ROOT in the program
How to create a CMT Package • Follow these steps on e.g. a neut account • source /home/trt2kmgr/ND280Soft/setup_user.csh • then go to a directory where you want the package • Write your own analysis package in /src • can be both header (.hxx) and source (.cxx) files • see example later /home/chansen/analysisExample/v1r0/src on neut03
How to create a CMT Package • Make a directory for an application • Write an application with main() /home/chansen/analysisExample/v1r0/app on neut03
How to create a CMT Package • Go to cmt directory and edit requirements
How to create a CMT Package • Source the setup file and compile • Run the executable
Code Examples • An analysis example reads in a .root file from the ND280 software and does some analysis • Same code has been used for both the Makefile and requirements file approach • The code consists of • AnalysisExample .hxx and .cxx • Parameters .hxx and .cxx (to read in management) • management (to give run parameters to the program) • runAnalysisExample /home/chansen/analysisExample/v1r0/src on neut03
Management • A management file controls the run /home/chansen/analysisExample/v1r0/Management on neut03
Header • Public function • Loop • over all events • Private functions: • Read in parameters • from management • Initiate Histograms • Fill the Tree • from .root file • Cut each events • Draw Histograms • to eps, jpg or C
Fill the Tree • The Fill Tree function • Connects a root file • Reads the tree into memory • Set the address to where events goes; m_event
Loop • Do some analysis for each event
Dump Event • Use dump-event.exe to see what’s in a .root • In this .root file and in this event.0000.0000 there are no hits or fits but there is a TG4TrajectoryContainer here: truth/G4Trajectories
Trajectories • Make histograms of trajectory’s energies • Get this event’s trajectories in a container • Loop over trajectories using std::iterator • Fill histograms
Primary Particles • Make histograms of primary particles’ energies • Get this event’s primary vertex in a container • Get this event’s primary particles in a container • Loop over trajectories using std::iterator • Fill histograms
Links http://ale.physics.sunysb.edu/~mcgrew/t2k/nd280Doc/v1r0/dox/index.html • Some useful links for using the software • ND280 software • Root • Standard Template Library http://root.cern.ch/root/htmldoc/ClassIndex.html http://www.sgi.com/tech/stl http://en.wikipedia.org/wiki/Standard_Template_Library
A Trial to Start with Reconstruction • Start to use some Reconstruction Software • There is no tpcRecon yet • Tried to use ecalRecon • Checked out oaRecon and ecalRecon to fate • Added use ecalRecon * to requirements • Not trivial to use this software ...
Dump Event with Hits • Use dump-event.exe to see what’s in a .root • In this .root file there are THitContainers here: hits/fgd, hits/ecal, hits/mrd and hits/tpc
A Trial to Start with Reconstruction • Get this event’s hit selection • Make an algorithm result from the hits • Define and initialize the TECALDelaunayCluster
A Trial to Start with Reconstruction • Cluster together the hits with the algorithm TECALDelaunayCluster • The result comes out as an TAlgorithmResult • Get the fitted tracks in a container
A Trial to Start with Reconstruction • Loop over the fitted “oaTracks” • Fill the momentum in a histogram
TOATrack • Fitted tracks • would we need a class for fitted tracks that looks more like a “helix” class?
More info Analysis Run Installation Recon Conclusions and Future Work • ND280Soft installed at UVic • ND280Soft can be run from all fate accounts • An analysis example • Independent program with Makefile • CMT package with requirements file • Need to understand better how to use reconstruction • More info here: http://hepweb.phys.uvic.ca/~hansen/T2K/ND280SOFT/install.html http://hepweb.phys.uvic.ca/~hansen/T2K/ND280SOFT/run.html /home/chansen/ANALYSIS on neut03 /home/chansen/analysisExample on neut03