Single Particle Study

Event Generation

For generating the events with single particles I use ParticleGenerator. To run event generation using Athena one can use Generate_trf.py, which also requires a job options file. Here is an example of a job options file for running ParticleGenerator:

from AthenaCommon.AlgSequence import AlgSequence 
topAlg = AlgSequence("TopAlg") 

from ParticleGenerator.ParticleGeneratorConf import ParticleGenerator
topAlg += ParticleGenerator()


ParticleGenerator = topAlg.ParticleGenerator

# For VERBOSE output from ParticleGenerator.
ParticleGenerator.OutputLevel = 1

ParticleGenerator.orders = [
 "PDGcode: sequence -13 13",
 "p: constant 20000",
 "eta: flat -0.7 0.7",
 "phi: flat -3.14159 3.14159"
 ]


from EvgenJobTransforms.EvgenConfig import evgenConfig

evgenConfig.generators += [ "ParticleGenerator" ]
evgenConfig.description = "simpleJobOption"

These job options will in each event create one muon with 20 GeV momentum (not pt!), all muons being flatly distributed over -0.7<|eta|<0.7. In order to run such a job options file I login to lxplus, cd to a convenient directory and type following lines:

asetup 17.2.8.8,AtlasProduction,here,slc5
Generate_trf.py jobConfig=path/to/my/JobOptionsFile.py firstEvent=1 maxEvents=10 randomSeed=12345 runNumber=54321 outputEVNTFile=outputFile.EVNT.pool.root ecmEnergy=8000

Simulation

To run simulation with full Xenon configuration I did the following:

asetup 17.2.5.2,AtlasProduction,here,slc5
cmt co -r TRT_GeoModel-00-02-42 InnerDetector/InDetDetDescr/TRT_GeoModel
setupWorkArea.py
cd WorkArea/cmt
cmt br cmt config
source setup.sh
cmt br cmt make
cd ../run
AtlasG4_trf.py inputEvgenFile=path/to/my/eventsFile.EVNT.pool.root outputHitsFile=outputFile.HITS.pool.root maxEvents=10 skipEvents=0 randomSeed=1237 geometryVersion=ATLAS-GEO-20-00-01 conditionsTag=OFLCOND-MC12-SDR-06

To use implementation of Argon in layer0 made by Alex everything is the same (except for the cmt co line, of course). You can find the code in /afs/cern.ch/user/m/maevskiy/public/singleParticleStudy/AlexCode.

Digitization

In order to run digitization there are two packages required to be checked out: TRT_Digitization and TRT_PAI_Process. Since the beginning of my study the TRT_Digitization package evolved significantly, thus setup should be slightly different for its different tags. My first results were obtained with a currently obsolete TRT_Digitization-00-10-74-12 tag. In that version photon hits were simply ignored during digitization for Argon straws (such implementation assumed Argon straws being treated as Xenon ones during simulation and proved to be inaccurate), so this line should be commented out in case Argon was taken into account during simulation. The newest tag that I have used so far is TRT_Digitization-00-11-06.

In any case setup should look like this:

asetup 17.2.8.8,AtlasProduction,here,slc5
cmt co -r <required tag> InnerDetector/InDetDigitization/TRT_Digitization
cmt co -r TRT_PAI_Process-00-00-38 InnerDetector/InDetSimUtils/TRT_PAI_Process
setupWorkArea.py
cd WorkArea/cmt
cmt br cmt config
source setup.sh

# changes in source code (if needed) can be made until here

cmt br cmt make

In order to set up argon configuration in the digitization two files are needed: mycool.db and testforargon.pool.root. For a configuration where argon is in barrel layer0 and EC wheel3 (4th if count from 1) such files can be found in /afs/cern.ch/user/m/maevskiy/singleParticleStudy/public/singleParticleStudy/AlexEmails/1/. Also an email from Alex with a brief explanation is put there. In case one needs a different Argon configuration another email with instructions from Alex is saved into /afs/cern.ch/user/m/maevskiy/singleParticleStudy/public/singleParticleStudy/AlexEmails/2/ (I myself never followed them since I didn't need different configurations yet).

To run such a setup:

# for argon setup only START
pool_insertFileToCatalog testforargon.pool.root
# for argon setup only END

DigiMReco_trf.py \
maxEvents=10 \
outputESDFile=outputFile.ESD.pool.root \
digiRndmSvc='AtDSFMTGenSvc' \
preExec_r2e='
rec.Commissioning.set_Value_and_Lock(False)
jobproperties.Beam.energy.set_Value_and_Lock(4000*Units.GeV)
muonRecFlags.writeSDOs=True
jobproperties.Beam.numberOfCollisions.set_Value_and_Lock(20.0)
jobproperties.Beam.bunchSpacing.set_Value_and_Lock(50)
from CaloRec.CaloCellFlags import jobproperties
jobproperties.CaloCellFlags.doLArCellEmMisCalib=False
from InDetRecExample.InDetJobProperties import InDetFlags
InDetFlags.doSlimming.set_Value_and_Lock(False)
' \
inputHitsFile=path/to/my/hitsFile.HITS.pool.root \
tmpRDO='myRDO.tmp.pool.root' \
preExec_h2r='
from Digitization.DigitizationFlags import digitizationFlags
digitizationFlags.overrideMetadata+=["SimLayout","PhysicsList"]
' \
conditionsTag='OFLCOND-MC12-SDR-06' \
autoConfiguration='everything' \
postExec_r2e='
StreamESD.ItemList+=[
  "JetCollection#InTimeAntiKt4TruthJets",
  "JetCollection#OutOfTimeAntiKt4TruthJets"]' \
# for argon setup only START
postExec_h2r='from IOVDbSvc.CondDB import conddb
conddb.blockFolder("/TRT/Cond/StatusHT")
conddb.addFolder("","<dbConnection>sqlite://;schema=mycool.db;dbname=COMP200</dbConnection> /TRT/Cond/StatusHT <tag>TrtStrawStatusHT-MC_Ba_layer0_EC_wheel3_00-00</tag>",force=True)
from TRT_Digitization.TRT_DigitizationConf import TRTDigitizationTool
TRTDigitizationTool.UseArgonStraws = True
TRTDigitizationTool.UseConditionsHTStatus = True' \
# for argon setup only END
DataRunNumber='-1' \
geometryVersion='ATLAS-GEO-20-00-01'

Lines between "# for argon setup only START" and "# for argon setup only END" should be cut out in case of full Xenon configuration. (Also lines "# for argon setup only START" and "# for argon setup only END" themselves should be cut out in any way.)

D3PD production

D3PD production is mostly based on this recipe. It is based on using three packages: InDetRecExample, D3PDMakerCoreComps and TrackD3PDMaker. The version of latter that I am using was not tagged, thus setup (in case one want to use exactly the same code) is the following:

asetup 17.2.10.1,AtlasProduction,here,slc5
svn co -r 564446 svn+ssh://svn.cern.ch/reps/atlasoff/PhysicsAnalysis/D3PDMaker/TrackD3PDMaker/trunk
mkdir PhysicsAnalysis
mkdir PhysicsAnalysis/D3PDMaker
mv trunk PhysicsAnalysis/D3PDMaker/TrackD3PDMaker
cmt co -r D3PDMakerCoreComps-00-02-02 PhysicsAnalysis/D3PDMaker/D3PDMakerCoreComps
cmt co -r InDetRecExample-01-25-01 InnerDetector/InDetExample/InDetRecExample
echo "TrackD3PDMaker-r564446" > PhysicsAnalysis/D3PDMaker/TrackD3PDMaker/cmt/version.cmt
setupWorkArea.py
cd WorkArea/cmt
cmt br cmt config
source setup.sh
cmt br cmt make

Job options that I am using can be found here: /afs/cern.ch/user/m/maevskiy/public/singleParticleStudy/D3PDMakerJobOptions.py

-- ArtemMaevskiy - 17 Jan 2014

Edit | Attach | Watch | Print version | History: r5 < r4 < r3 < r2 < r1 | Backlinks | Raw View | WYSIWYG | More topic actions
Topic revision: r5 - 2014-11-07 - ArtemMaevskiy
 
    • Cern Search Icon Cern Search
    • TWiki Search Icon TWiki Search
    • Google Search Icon Google Search

    Main All webs login

This site is powered by the TWiki collaboration platform Powered by PerlCopyright & 2008-2019 by the contributing authors. All material on this collaboration platform is the property of the contributing authors.
Ideas, requests, problems regarding TWiki? Send feedback