StEEmcDisplayMaker

02/01/07

  1. Displays points and their association with SMD clusters
  2. Clusters belonging to points are color coded
  3. Clusters which are unassociated with points appear in hatched greyscale
  4. Code runs on data generated by cluster and point makers.
  5. Other makers (such as pi0 maker) may be accessed to select events.
  6. Events are saved to a TTree, and may be viewed offline.
  7. Event classes may be selected from the TTree to view.

How to run it:

Wait for tonight's autobuild to be performed! don't try this until Feb. 2nd!

  1. Create a directory to work in and cd into it
        $ mkdir EEmcDisplay
        $ cd EEmcDisplay
        $ mkdir out
    
    
  2. Next, checkout the macros from CVS which will generate the TTree and allow you to view events
        $ cvs checkout StRoot/StEEmcPool/StEEmcDisplayMaker/macros
        $ cp StRoot/StEEmcPool/StEEmcDisplayMaker/macros/* .
    
    
  3. Next, we want to run the code on some data from 2005
        $ star-submit-template -template example.xml -entities output=`pwd`/out
    
    

    You can edit the file and change the run number if you'd like. If you change to the 2006 data, you'll need to make changes to makeEEmcDisplay.C.


  4. Monitor the progress of the job by typing in
        $ bpeek -f
    
    
  5. When the code is done running, you will be rewarded with a (large) root file sitting in the "out" directory. To view the file, type
        $ root viewEEmcDisplay.C'("out/5DCB13062023014061741DEDFE276038_0.root")'
    
    

    Note that the name of the root file will be different than what's written above.

How to view events:

If everything has gone right to this point, you should be rewarded with the following message:
available commands
---------------------------------------------------------------------------------------------
list_events()         -- to get a list of events available for display
list_events(Char_t *) -- list events which satisfy some set of cuts

load_event(Int_t)     -- loads specified event
load_next()           -- loads the next event in the event list
show_event()          -- displays towers and points for the current event
show_sector(Int_t)    -- zooms in on specified sector and shows smd strips/clusters
print(Char_t*)        -- eg print(".gif"), print(".ps"), print(".root"), etc...

help()                -- show this message

There is also a warning issued that claims that the StreamerInfo for StEEmcDisplay is out of date. This is a harmless.

The first thing you should do is list_events(). This will display a list of all events in the TTree. To load the 6th event, simply call load_event(5) -- yes, we count from 0 in c++. Alternatively, you can simply type in load_next() to load the next event in the event list. Here is an example session.

   root.exe [1]  load_event(0); // load_next() does the same thing
   root.exe [2]  show_event();


It looks like something intersting is going on in sector 10. To zoom in on that sector and show the SMD response, we issue the command

   root.exe [3]  show_sector(10); 

(Yes, I count sectors from 1 and events from zero. Consistency is highly overrated.)




How to select a class of events:

The data is stored in a TTree, so it is possible to select a class of events which satisfy a set of cuts. For instance, type in

list_events("nPoints>1")

and you will see a listing of all events which have more than one point reconstruced in the endcap. Now, if you call load_next(), the next event in the current event list (i.e. the list of events which satisfies your cuts) will be loaded.

How to view the pre/postshower layers:

Simply type show_layer("all"), or show_layer("pre1") or "pre2" or "post".

How to modify the code to select different classes of events:

Right not, the TTree gets rather large: 46 MB for 292 events. It is saving events which satisfy the EEMC HT2 trigger from 2005. You can change which triggers get selected by changing/adding the line

    mEEdisplay->addTrigger(96261);

in the makeEEmcDisplay.C macro. You can add a second trigger by adding a second call to addTrigger(with your id).

For anything else, you will need to checkout the display maker and add cuts to the events which get saved. To check out the code, you'll need to do

   $ cvs checkout StRoot/StEEmcPool/StEEmcDisplayMaker/

and edit the file StRoot/StEEmcPool/StEEmcDisplayMaker/StEEmcDisplayMaker.cxx. There is an example of how to select events which have photon pairs which reconstruct to the pi0 and eta mass. Other makers could be referenced here as well. Simply add your cuts, then recompile the code:

    $ cons

If you're using the .xml template provided, be sure to delete mypackage.*, then you can submit your job.

How do I perform fits to the SMD histograms?

   root.exe [23] c=new TCanvas("c");
   root.exe [24] smdu->Fit("gaus","R","",93.0,113.0);
   root.exe [25] smdv->Fit("gaus","R","",107.0,127.0);

How do I run the code on a Monte Carlo file?

First you will need to edit makeEEmcDisplay.C. Uncomment the "#define MONTE_CARLO" line, and remove the "mEEdisplay->addTrigger()" line. Now you are ready to run on your Monte Carlo file. For example:

   $ root4star -q -b makeEEmcDisplay.C'(-1,"path_to_mudst.root","path_to_output.root")'

Then you can view the output file as above.

How do I do anything else...