################################ TestBeam Data Analysis: ################################ Setting up the data analysis should be fairly straightforward. check out the following packages: cmt co -r LArTools-00-07-06 LArCalorimeter/LArTools cmt co -r LArFCALTBCnv-00-04-03 LArCalorimeter/LArCnv/LArFCALTBCnv cmt co -r LArFCALTBAna-00-03-11 LArCalorimeter/LArTestBeam/LArFCALTBAna cmt co -r CaloRec-02-11-18 Calorimeter/CaloRec - slight tweaks to CBNTAA_CaloCell and CBNTAA_CaloCluster for compatability cmt co -r LArCellRec-02-12-08 LArCalorimeter/LArCellRec - scale cell energies back to ADC cmt co -r TBRec-00-02-06-02 TestBeam/TBRec run the setup.sh script in LArFCALTBAna/scripts. This should update the above packages and compile them, etc. In Athena, run the noisemaker, reconstructData, and reconstructRandom joboptions. The merger step is a little different, as certain packages write data out in different formats compared to release 13. run the TB03_ROOT_MERGER. This should create a merged file that has a CaloCluster tree. then run TB03_BeamInstrumentsTopo, which adds the BeamInstruments and TopoTrees to the merged file. Then run the Beamcleaning and Timing programs as normal. To compile TB03_BeamInstrumentsTopo, just run gmake. It takes as input the reconstructed data filename and the merged filename, and should run without any problems. ################################ MC: ################################ check out the following packages: LArCalorimeter/LArROD-02-14-10 LArCalorimeter/LArCnv/LArFCALTBCnv-00-04-03 LArCalorimeter/LArTestBeam/LArFCALTBAna-00-03-08 LArCalorimeter/LArGeoModel/LArGeoFcal-00-00-34 LArCalorimeter/LArGeoModel/LArGeoH62003Algs-00-00-23 LArCalorimeter/LArG4/LArG4FCAL-00-00-34 Calorimeter/CaloConditions-00-01-50 Simulation/G4Atlas/G4AtlasApps-00-03-08 LArCalorimeter/LArDigitization/LArDigitization-03-07-02 In LArFCalTBAna, unpack the MCCode.tar file. Run MCCode/setup_FCALTB03MC.sh . This should make all the required changes. Once this has been done, compile everything (cd to the package's cmt directory: cmt config ; source setup.sh ; gmake ) Database update ################ the Database directory in MCCode.tar contains another tar file (courtesy of Hong) which updates the Athena database. These updates include the correct ADC2MEV values for each gain/channel, and "better" values for the default noise. To use this update, simply extract Fcal_TB2003_2.tar in the directory you will be running athena from. At this point the Monte Carlo may be run using the default noise and physicslist. There are joboptions in MCCode/joboptions for running the G4 simulation, digitization and reconstruction. Noise from data ################ The Noise directory in MCCode contains a program that will take data from the random runs and produce text files containing information about the noise in each channel. This text file can then be read by the LArRawChannelBuilder in order to generate noise for the MC. Correlations between channels are included, so the text files tend to be around 15MB. In order to compile this program the GNU Scientific Library (GSL) must be installed, as it is required for some matrix computations. It can be downloaded from ftp://ftp.gnu.org/gnu/gsl/gsl-1.14.tar.gz . Detailed installation instructions are in the "INSTALL" file. By default the library installs to the /usr/local/ directory, but to install to /data/gsl/ (for example) run "configure --prefix=/data/gsl ; make ; make install". With GSL installed, the noise program can be compiled and run. It can be placed anywhere, and is independent of athena. Edit line 54 of GetNoise.cxx so that randomfilenamebase refers to the location of the reco_random testbeam root files. Noise.cxx specifies the ranges of run numbers that will be used to generate a given text file. All the (good) 4L and 4H runs are there at present, but it should be straightforward to add in run numbers for other beamspots. Lines 35 and 36 of the Makefile should be modified to point to the directories where the headers and libraries of the GSL are installed (e.g. /data/gsl/lib, /data/gsl/inc). You will also need to make sure that gsl is present in the LD_LIBRARY_PATH environment variable (export LD_LIBRARY_PATH=$LD_LIBRARY_PATH:/data/gsl/lib/ ). Once this is done run gmake to compile the program, and then Noise to run it. Note that when running the digitization, a seed needs to be added to the text file. The script I use to run digitization jobs runs rnd_seed to generate a seed, puts the seed in a file named "NoiseByChannel.txt" (the default noise filename), and then appends the appropriate noisefile to this. To enable Channel Noise in Athena: ################################## 1. in digitization joboptions, set jobproperties.Digitization.doCaloNoise=False. Noise is normally done in the digitization step (added to each sample), but the Channel noise is done in the RawChannelBuilder (i.e. after OFC's have been applied). If doCaloNoise is not explicitly switched off, then both the default noise and the channel noise will be applied. 2. In the python directory of the LArDigitization package, eddit LarDigitGetter.py. On line 41, set theLArDigitization.makeAllDigits = True. By default digit information is only stored for those channels with nonzero energy. As no noise is added at this stage, this is generally only a few FCal channels. LArDigits need to be made for each channel, so that LArRawChannels can be made from the LArDigits. 3. In the python directory of the LArROD package, edit the LArRawChannelGetter.py file. on line 192 set theLArRawChannelBuilder.AddNoiseByChannel = True. theLArRawChannelBuilder.ChannelNoiseFileName may be used to specify a noise file here if you wish, the default is "NoiseByChannel.txt". 4. Place the noise file (or a link to it) in the directory you will run athena from. The text file produced by the noise code needs to be modified slightly, in that a seed for the RNG needs to be inserted in the first line. The second line should be "ID (key)", followed by the offline channel IDs in hex, etc. Using the QGSP_BERT_HP physics list ######################################################### Go to http://geant4.cern.ch/support/download.shtml and download the neutron data files with thermal cross sections - version 3.13. Install the data files somewhere, and make sure the G4NDL environment variable is set to this location when running athena (if it's not, you'll get an error message tell you to set it). Geant4 contains an element table that stores all the G4elements that are needed in the geometry. However, by default this contains all the elements that geant4 knows about, not just the ones that are needed. The HP physics list uses real data to model neutron processes, and uses the element table to work out which data to look up. If there is an element in the element table that there is no data for, it will try to look for something "close". If there is nothing that is close, then it throws an error and geant4/athena crashes. The elements present (by default) in geant4's element table mean that geant4 will crash when trying to use the HP physicslist. Check out Simulation/G4Utilities/Geo2G4/Geo2G4-00-00-57 and Edit src/Geo2G4Svc.cxx. At the end of the initialization method add the following lines: G4ElementTable* elemTable = (G4ElementTable*)G4Element::GetElementTable(); elemTable->clear(); This clears the element table. Geo2G4 then converts the volumes and materials from the GeoModel description of the geometry to G4Materials and G4*volumes. As it does this, it adds the elements that are present in the geometry (and no others) to the element table. Compile Geo2G4Svc, then set the physics list to QGSP_BERT_HP in the simulation joboptions and run athena normally. email thompson@physics.utoronto.ca if you have any questions or problems.