MICE Analysis Code Makeover Chris Rogers 14th September 2004.

Post on 20-Jan-2016

214 views 0 download

Transcript of MICE Analysis Code Makeover Chris Rogers 14th September 2004.

MICE Analysis CodeMakeover

Chris Rogers14th September 2004

Analysis Code updates

Highlights:• Common interface with reconstruction and

simulation output for future development• Statistical Weighting for events• Emittance Calculations in trace space, phase

space• User interface via rubbish text file• Tested

Class Diagram

Interface

AnalysisPlane.hh, AnaEvent.hh• Some dodgy hacks atm• Talks to Rec.out and Sim.out - should be

VirtualRec.dat• Tell AnalysisPlane what sort of plane you want in

constructor. AnalysisPlane goes and gets the data, stores in a vector of AnaEvents

• Then use GetEventKinematics(eventNumber) to access data.

• Too slow in big files

Weighting 1

• Weights stored in class TrackStore– TrackStore is used for all AnalysisPlanes

• Weights set by class virtual class Weight– Two children, Distribution and Cut do the real

work– Weight talks to AnalysisPlane, TrackStore

Weighting 2

• Cut applies a statistical weight of 1 or 0– Cut based on criteria such as does the event exist? Does

the event have a pos./mom. outside a certain range

• Distribution attempts to impose a Gaussian probability distn at some plane– So tells certain particles they are worth more than

others

– Builds a 6D histogram and then applies weights based on the bin weights

Emittance Calculation

• Works as before

• Updated to use AnalysisPlanes

User Interface

• Dodgy hack• Don’t expect to keep it beyond the design iteration• Implemented directly in main()• Use file “AnalysisParams.dat” - enter the cut(s)

and distribution(s) you want to apply, then plane(s) you want to calculate over, then specify what numbers you want to calculate

Future development - wish list• Open to further suggestions:2. Weight can call on variable sigma and mean.3. Error handling; Serious reinforcement of code - use unsigned int in NDHist, etc4. Check against code guidelines + fix. How do I do Doxygen comments?5. Distribution gives a normalised distribution, normalised against Sum(weights) before

Dist acts. At the moment it is not normalised to anything.6. Analysis Plane readout with Weights etc. Communications with ICOOL/ecalc9f?7. Distribution reads in an entire 6D covariance matrix, not just variances (sigmas)7a. Check that Distribution does actually use sigma8. Make NDCovMatrix::getNDEmittance work more nicely9. Examine test coverage and add new tests as required10. Take run management away from main()?11. Make AnalysisPlanes quicker.12. AnaParams has Sim.out and Rec.out hard coded. This is very bad!13. Calculate other numbers - beta functions etc.14. Single particle emittance15. Holzer emittance16. EM Potential?