Cosmics in HitDisplay or VP1
From ATLAS-TRIUMF
[edit] Cosmics in HitDisplay or VP1
This page supercedes my old pages on Muons in HitDisplay and Cosmic Muons in HitDisplay.
I first ran on the rel_3 bugfix Nightly kit of May 30 (i686-slc4-gcc34-opt). Currently I am running on the rel_4 bugfix Nightly kit of July 26, which should be almost identical to 13.0.20.
I followed the instructions for running RecExCommission from the wiki. There are two complications when not running at CERN. One is the database. The one in the kit works fine for simulated data, but for real data you need to copy the sqlite200 directory off afs, and in particular the COMP200.db database (about 378 MB). You can create an sqlite200 subdirectory in your RecExCommission/run directory. When you run with simulated data, you want a link there so that sqlite200/ALLP200.db points to the ALLP200.db that was shipped with the kit <path-to-kit>/DBRelease/current/sqlite200/ALLP200.db (or to a more recent version off afs), but when you run on real data, you want sqlite200/ALLP200.db to point to the COMP200.db database that you copied.
The other annoyance is all the files in the LArDataArea. These are all over the place on afs and castor. The easiest way to get a complete list is to run your job on lxplus first, and see what afs and castor files it is pulling in. Then you copy all of those files to some place on your local machine that you define in your job options as LArDataArea = "/home/myhome/mylarplace", and you create a PoolFileCatalog in your RecExCommission run directory and put all of those files into it with pool_insertFileToCatalog. In principle, it is possible to subscribe to the dataset with DQ2, but my DQ2 has been a bit flaky lately. That may be easier!
Then you need to copy a few real and simulated cosmics files to your machine.
Then, to run HepVis (or VP1 if you have checked out all the VP1 packages), you can add near the beginning of your RecExCommission_topOptions.py:
doHepVisDisplay = True doVP1 = False
and for HepVis you can just add in the inner detector "internal flags for each subsistem":
if doHepVisDisplay:
InDetCosmicFlags.doHepVisDisplay = True
while for VP1 you should add (just before the summary of time spent):
#-------------
# Visualize
#-------------
if doVP1:
from VP1Algs.VP1AlgsConf import VP1Alg
theApp.TopAlg += [ "VP1Alg" ]
VP1Alg.InitiallyLoadedVP1Files = [ ]
VP1Alg.OutputLevel = DEBUG
This works for me, and I can see lots of calorimeter stuff with HepVis. I have tried events from the simulated file dig.root and the real M3 cosmic runs 10815, 10825 and 11000.
Here is an image with the brand-new Calo plugin for VP1.
With more recent versions of VP1, where the "Cocktail" channel has Ed's TrackSystem as well as Vakho's improved Calo, I got these images of events in run 12284:
- Image:Vp1 3dcocktail run12284 evt8.png Track reconstructed in TRT, but very ugly if same threshold used for LAr (especially HEC) and Tiles...
- Image:Vp1 3dcocktail run12284 evt8 2.png Same event, but with higher threshold for LAr; alignment of the track with the Tile hits in the r-z plane is pretty mediocre.
- Image:Vp1 3dcocktail run12284 evt8 3.png Same event; notice that the track does point the right way in the r-phi plane, and lines up with the Tile hits (red-orange)
- Image:Vp1 3dcocktail run12284 evt8 4.png More of the same.
- Image:Vp1 3dcocktail run12284 evt21.png Different event, this time with a MuonBoy track as well as the TRT track. Note that the muon track lines up nicely with the Tile hits in the r-z plane.
- Image:Vp1 3dcocktail run12284 evt21 2.png Same event, but better LAr threshold so not swamped by small LAr hits.
- Image:Vp1 3dcocktail run12284 evt21 3.png Same event; notice that the muon track does not line up with the Tile hits in r-phi nearly so well as the TRT track does.
- Image:Vp1 3dcocktail run12284 evt21 4.png Same event again; r-z view.
This all makes sense, since the RPC PRDs are not being reconstructed yet, even where they are present in this run, so we don't expect to have any phi info for the muon track. Likewise, the TRT does not have any z-information and expects to get it from the silicon (which was not present in this run).
[edit] Running on ESDs
In recent nightlies (e.g. rel_1 from Monday August 6) I have got "vp1 -detdescr=ATLAS-CSC-00-00-00 LFN:M3r12288.Cosmic.ESD.pool.root" to work directly from the command line without demanding databases or any of the problems I had earlier. This is much simpler; the only limitation is that if muons were not reconstructed at the Tier 0, you won't see them here, and if the LAr used sub-optimal calibrations, that's what you get. And it crashes after five or six events...
--Isabel 15:21, 30 July 2007 (PDT)

