28
1 Status of ND280 Software at UVic Maj 2006, ND280 Software Workshop, Triumf Christian Hansen UVic

Status of ND280 Software at UVic

Embed Size (px)

DESCRIPTION

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. - PowerPoint PPT Presentation

Citation preview

Page 1: Status of ND280 Software at UVic

1

Status of ND280 Software at UVic

Maj 2006, ND280 Software Workshop, Triumf

Christian HansenUVic

Page 2: Status of ND280 Software at UVic

2

• Installation

• Analysis Example– As an independent package– As a CMT program– Some code examples

• Trial to use reconstruction

Contents

Page 3: Status of ND280 Software at UVic

3

• ND280Soft is installed at UVic

– followed these steps

• ND280Soft can be run from any “fate” account– following these steps

Installation

http://hepweb.phys.uvic.ca/~hansen/T2K/ND280SOFT/install.html

http://hepweb.phys.uvic.ca/~hansen/T2K/ND280SOFT/run.html

Page 4: Status of ND280 Software at UVic

4

• Install CMT and source the setup file

• Connect with the repository [email protected]

• Set variables, check out, configure and compile

How to Install

http://hepweb.phys.uvic.ca/~hansen/T2K/ND280SOFT/install.html#cmt

http://hepweb.phys.uvic.ca/~hansen/T2K/ND280SOFT/install.html#cvs

http://hepweb.phys.uvic.ca/~hansen/T2K/ND280SOFT/install.html#checkout

Page 5: Status of ND280 Software at UVic

5

• 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

Analysis Example

Page 6: Status of ND280 Software at UVic

6

• A program that use the ND280 software – Makefile (see next slide)

The Independent Program

/home/chansen/ANALYSIS on neut03

Page 7: Status of ND280 Software at UVic

7

• Links in ND280 and ROOT in the program

Makefile

/home/chansen/ANALYSIS on neut03

Page 8: Status of ND280 Software at UVic

8

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

Page 9: Status of ND280 Software at UVic

9

How to create a CMT Package • Make a directory for an application

• Write an application with main()

/home/chansen/analysisExample/v1r0/app on neut03

Page 10: Status of ND280 Software at UVic

10

How to create a CMT Package • Go to cmt directory and edit requirements

Page 11: Status of ND280 Software at UVic

11

How to create a CMT Package • Source the setup file and compile

• Run the executable

Page 12: Status of ND280 Software at UVic

12

• 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

Code Examples

/home/chansen/analysisExample/v1r0/src on neut03

Page 13: Status of ND280 Software at UVic

13

• A management file controls the run

Management

/ho

me/

chan

sen

/an

alys

isE

xam

ple

/v1r

0/M

anag

emen

t o

n n

eut0

3

Page 14: Status of ND280 Software at UVic

14

• 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

Header

Page 15: Status of ND280 Software at UVic

15

• The Fill Tree function

– Connects a root file– Reads the tree into memory– Set the address to where events goes; m_event

Fill the Tree

Page 16: Status of ND280 Software at UVic

16

• Do some analysis for each event

Loop

Page 17: Status of ND280 Software at UVic

17

• 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

Dump Event

Page 18: Status of ND280 Software at UVic

18

• Make histograms of trajectory’s energies

– Get this event’s trajectories in a container– Loop over trajectories using std::iterator– Fill histograms

Trajectories

Page 19: Status of ND280 Software at UVic

19

• 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

Primary Particles

Page 20: Status of ND280 Software at UVic

20

Histograms

Page 21: Status of ND280 Software at UVic

21

• Some useful links for using the software

– ND280 software

– Root

– Standard Template Library

Links

http://ale.physics.sunysb.edu/~mcgrew/t2k/nd280Doc/v1r0/dox/index.html

http://root.cern.ch/root/htmldoc/ClassIndex.html

http://www.sgi.com/tech/stl

http://en.wikipedia.org/wiki/Standard_Template_Library

Page 22: Status of ND280 Software at UVic

22

• 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 ...

A Trial to Start with Reconstruction

Page 23: Status of ND280 Software at UVic

23

• 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

Dump Event with Hits

Page 24: Status of ND280 Software at UVic

24

• Get this event’s hit selection

• Make an algorithm result from the hits

• Define and initialize the TECALDelaunayCluster

A Trial to Start with Reconstruction

Page 25: Status of ND280 Software at UVic

25

• 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

Page 26: Status of ND280 Software at UVic

26

• Loop over the fitted “oaTracks”

• Fill the momentum in a histogram

A Trial to Start with Reconstruction

Page 27: Status of ND280 Software at UVic

27

• Fitted tracks

– would we need a class for fitted tracks that looks more like a “helix” class?

TOATrack

Page 28: Status of ND280 Software at UVic

28

Conclusions and Future Work

• More info here:More info

Analysis• An analysis example

– Independent program with Makefile– CMT package with requirements file

Run • ND280Soft can be run from all fate accounts

Installation • ND280Soft installed at UVic

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

Recon • Need to understand better how to use reconstruction

/home/chansen/analysisExample on neut03