g. battistoni & s.m. vallepcbat1.mi.infn.it/~battist/foot/foot_root_output.pdf · crossnreg =...

33
A very short description of the ROOT file of Simulation Output G. Battistoni & S.M. Valle 7 March 2018

Upload: trinhngoc

Post on 17-Aug-2019

214 views

Category:

Documents


0 download

TRANSCRIPT

AveryshortdescriptionoftheROOTfileofSimulationOutput

G.Battistoni&S.M.Valle

7March2018

Introduction This(very)shorttutorial ismeanttoexplainhowtouse the MC data output produced for FOOT. Themaintopicsare:•  ThestructureoftherootdataproducedbyMC•  Givesomebasic infosspecif icofMCsimulation(FLUKA)thateverybodyneedstoknow

FOOT simulation setup now (V13.1.1)

Start counter

Beam Monitor (Drift chamber)

Target

Vertex pixel

Tracker Magnet 1

Intermediate tracker

Scintillator

Calorimeter

Magnet 2

MicroStrip Detectors

A few things specific of FLUKA MC that are useful to know

Defaultunitsthemostimportantare:time➞s,length➞cm,energy➞GeV,masses➞GeV/c2B➞Tesla

Particles:eachparticleisidentifiedbyanumber

Referenceframe:(cartesian,right-handed)zisprimarybeamdirectionyispointingupwards

z

y

x

FLUKAname

FLUKAnumber

PDGcorrespondence

Since we are mostly interested to nuclear fragments, notice that:

forp,n,d,t,3He,4HethereisaspecificFLUKAparticlenumberForA>4:FLUKAparticlenumbersisalways-2,andnucleusisidentifiedbyZandAFragmentsandnucleonsoriginatinginthe“nuclearevaporation”phaseareidentifiedwithparticlenumberintherangefrom-39to-7.AgainidentifiedbyZandA.therewouldbealsoawaytoidentifyisomers,butwecanomitthisnow

The concept of “Region” FLUKA makes use of “Combinatorial Geometry” (originally from Oak Ridge and later extended/modified) Basic objects called bodies (such as cylinders, spheres, parallelepipeds, etc.) are combined to form more complex objects called Regions

1 complex object = REGION •  The user knows the region

usually by name, byt internally it is identified by a number

•  to each region is assigned a single Material (chemical element or compound or mixture) 3 basic

objects

Example “Air”(or“Mag_Air”)isoneregion,filledwithair(N,O,Ar@STP)

“Target”isanotherregion,filledwithC2H4

each“Vertex”planeisadifferentregion,forthemomentjustfilledwithSi

unlessdifferentlyspecified,thedefaultisotopicabundanceofagivenelementisthenaturalone

The VERTEX regions

1cm

3,5mm6,5mm

VTX0

VTX2

ReadoutsideforVTX0and

VTX1

ReadoutsideforVTX2and

VTX3

Sensitiveregion

A realistic Inner Tracker

Siliconlayers

SiCFoam

A realistic Inner Tracker

A realistic Inner Tracker

y

x

Board

Sensitive Silicon region

Insensitive Silicon regions

Plu

me

1 Pl

um

e 3

Plu

me

2 Pl

um

e 0

y=0

new PLUMEs have been flipped and aligned in order to avoid dead space in y. Do we havo to overlap the sensitive regions?

Plu

me

1 Pl

um

e 3

Plu

me

2 Pl

um

e 0

y=0

A realistic Inner Tracker

The MSD tracker

V13.0

The MSD tracker

V13.1

The B-field map for tracking Plot #1

-4 -2 0 2 4

x (cm)

-4

-2

0

2

4

y (

cm

)

0

0.1

0.2

0.3

0.4

0.5

0.6

0.7

0.8

0.9

1

B [

T]

The MC Output for FOOT We have configured some user routines of FLUKA to produce an “ad hoc” event-by-event output written as an ASCII file (*TXT.dat) Those ASCII files contain information about all the particles and interactions simulated. A simple and portable code reads these txt’s and outputs ROOT files

Tree Branches

Output from MC: Txt file

ROOT file with Tree structure

1stStep 2ndStep

Example of a root output file

ForinstancetheRootfile:16O_C2H4_200_1.root(in/gpfs_data/local/foot/Simulation/V13.1.1onTier3)107eventsof16Oona2mmC2H4targetAtpresentonlyeventswithinelasticinteractioninthetargetwerewrittenonoutput,forcompactness:~1.1%oftotalno.ofsimulatedeventsNotnecessarilyawisechoicefortherealexperiment..

Region Numbering

air: 2startcounter: 3bmnshield: 4bmnfrontmylar: 5bmnbackmylar: 6bmncells: 7-43bmnfieldwires: 44bmnsensewires: 45target: 46vertexTrackerplanes: 47-50vertexTrackerDeadReg.: 51-54innerTrackerplanes: 55-86innerTrackerDeadReg.: 87-170Magnetpieces: 171-175magneticfieldairregion: 175

MSDlayers: 176-178airboxforscintandcalo: 179scintillatorbars: 180-223calorimetercrystals: 224-583

Allthoseinfosareavailbleinafileautomaticallygeneratedbythegeometryconfigurator(now:foot.reg)

MSDactivelayers: 176-211MSDDeadReg.: 212-217MSDKaptonlayers: 218-220airboxforscintandcalo: 221scintillatorbars: 222-265calorimetercrystals: 266-625

TherootdatabyFLUKAThedataarestoredinarootfilewithseveralblocksinthe structure EVENT_STRUCT (defined in the fileEventStruct.h):•  Theparticleblock:kinematicsinformationoftheproducedparticles

•  Thedetectorblock:informationaboutthedetectoroutputsoftheeventandnamelyaboutenergyreleasesandhits+linksto“MCtruth”.

•  Thecrossingblock:informationabouttheparticlethatcrossdifferentregionsofthesetup(bothinactiveandactive)

The particle structure Int_t EventNumber; Int_t TRn; Int_t TRpaid[MAXTR]; Int_t TRgen[MAXTR]; Int_t TRcha[MAXTR]; Int_t TRreg[MAXTR]; Int_t TRbar[MAXTR]; Int_t TRdead[MAXTR]; Int_t TRfid[MAXTR]; Double_t TRix[MAXTR]; Double_t TRiyi[MAXTR]; Double_t TRiz[MAXTR]; Double_t TRfx[MAXTR]; Double_t TRfy[MAXTR]; Double_t TRfz[MAXTR]; Double_t TRipx[MAXTR]; Double_t TRipy[MAXTR]; Double_t TRipz[MAXTR]; Double_t TRfpx[MAXTR]; Double_t TRfpy[MAXTR]; Double_t TRfpz[MAXTR]; Double_t TRmass[MAXTR]; Double_t TRtime [MAXTR]; Double_t TRtof[MAXTR]; Double_t TRlen[MAXTR];

for each of the produced particles we register the info in arrays: i.e. TRmass[2] is the mass of the 3rd produced particle EventNumber = FLUKA event number:

TRn= number of particles produced: max equal to MAXTR TRpaid = index in the part common of the particle parent TRcha = charge TRbar = barionic number TRfid = FLUKA code for the particle (es: photon, jpa=7) TRgen = generation number TRix, TRiy, TRiz = production position of the particle TRfx, TRfy, TRfz = final position of the particle TRipx,TRipy,TRipz = production momentum of the particle TRifx,TRfpy,TRfpz = final momentum of the particle TRmass = particle mass TRtime = production time of the particle TRtrlen = Track lenght of the particle

The individual detectors structures

DETn = number of energy release in the detector DET DETid = position of the particle responsible of the release

in the particle block DETixin, DETyin, DETzin = inizial position of energy release

For each detector with n energy releases the info are stored in arrays (x, p, De, time, etc...) with the i-th component related to the i-th release . Same syntax for all scint detector: "info""NAMEDETECTOR”[index of the release]

DETxout, DETyout, DETzout = final position ” “ DETpxin, DETpyin, DETpzin = inizial momentum “ ” DETpxout, DETpyout, DETpzout = final momentum “ “ DETde = energy release

DETtim = initial time of the energy release

StartCounter:STC

Int_t STCn; Int_t STCid[MAXSTC]; Double_t STCxin[MAXSTC]; Double_t STCyin[MAXSTC]; Double_t STCzin[MAXSTC]; Double_t STCxout[MAXSTC]; Double_t STCyout[MAXSTC]; Double_t STCzout[MAXSTC]; Double_t STCpxin[MAXSTC]; Double_t STCpyin[MAXSTC]; Double_t STCpzin[MAXSTC]; Double_t STCpxout[MAXSTC]; Double_t STCpyout[MAXSTC]; Double_t STCpzout[MAXSTC]; Double_t STCde[MAXSTC]; Double_t STCal[MAXSTC]; Double_t STCtim[MAXSTC];

MAXSTC = 200

Simplecaseofnon-segmenteddetector

VertexTracker:VTXThisisinsteadasegmented(=pixelated)detectorAdditionalvariablesareneeded

Int_tVTXn;Int_tVTXid[MAXVTX];Int_tVTXilay[MAXVTX];Int_tVTXirow[MAXVTX];Int_tVTXicol[MAXVTX];Double_tVTXxin[MAXVTX];Double_tVTXyin[MAXVTX];Double_tVTXzin[MAXVTX];Double_tVTXxout[MAXVTX];Double_tVTXyout[MAXVTX];Double_tVTXzout[MAXVTX];Double_tVTXpxin[MAXVTX];Double_tVTXpyin[MAXVTX];Double_tVTXpzin[MAXVTX];Double_tVTXpxout[MAXVTX];Double_tVTXpyout[MAXVTX];Double_tVTXpzout[MAXVTX];Double_tVTXde[MAXVTX];Double_tVTXal[MAXVTX];Double_tVTXtim[MAXVTX];MAXVTX=300

Plane

Row(inagivenplane)

Column(inagivenplane)

Identifythepixel

InnerTracker:ITR

beammonitor(1stdriftch.):BMN

Int_tBMNn;...MAXBMN=1000Int_tBMNilay[MAXBMN];➞layer#Int_tBMNicell[MAXBMN];➞cell#Int_tBMNiview[MAXBMN];➞view(-1:x1:y)

Microstrips.:MSD Int_tMSDn;...MAXMSD=1000Int_tMSDilay[MAXDCH];....SEElater

scintillator:SCN Int_tSCNn;...MAXSCN=1000Int_tSCNibar[MAXSCN];Int_tSCNiview[MAXSCN];

crystalcalorimeter:CALInt_tCALn;...MAXCAL=2000Int_tCALicry[MAXCAL];

Int_tITRn;...MAXITR=300SEElater

Specific Variables for ITR (Plume)

Specific Variables for MSD

MSDinV13.0.x MSDinV13.1.x

The crossing data structure Not yet inherited in SHOE

Int_t CROSSn; Int_t CROSSid[MAXCROSS]; Int_t CROSSnreg[MAXCROSS]; Int_t CROSSnregold[MAXCROSS]; Double_t CROSSx[MAXCROSS]; Double_t CROSSy[MAXCROSS]; Double_t CROSSzMAXCROSS]; Double_t CROSSpx[MAXCROSS]; Double_t CROSSpy[MAXCROSS]; Double_t CROSSpz[MAXCROSS]; Double_t CROSSm[MAXCROSS]; Double_t CROSSch[MAXCROSS]; Double_t CROSSt[MAXCROSS]; MAXCROSS = 10000

CROSSn = number of boundary crossing CROSSid = position of the crossing particle in the particle block CROSSnreg = no. of region in which the particle is entering [CROSSnregold = np. of region the particle is leaving]*

CROSSpx, CROSSpy, CROSSpz = momentum at the boundary crossing CROSSx, CROSSy, CROSSz = position of the boundary crossing CROSSt = time of the boundary crossi CROSSch = charge of crossing particle CROSSm = mass of the crossing particle

This structure registers the info on the particles that cross the boundaries between the different regions of the setup (detector elements, air, target). At each crossing the info are stored in arrays

*Not yet implemented

Energy releases and hits connection to particles

Tofindwhichparticlereleasedenergyinadetectorweneedtobuildapointertotheparticleblock.Giventhej---thenergyreleaseinthedetectorDET,thenwebuild:

pointer=pevstr->DETid[j]---1; Thenthefeaturesoftheparticlesresponsibleoftherelease(forexamplethemassandthexcoordofproduction)canberetrievedfromtheparticleblockas:

Massa=pevstr->TRmass[pointer];Xprod=pevstr->TRix[pointer];

DET

DETn=2

DETn=1

DETxin(1),DETyin(1),DETzin(1)DETxout(1),DETyout(1),DETzout(1)

DETde(1)=Sumofenergyreleasesbythat“particle”inDET

DETid(1)-1=pointertotheparticleinParticleStructurethatoriginatedhit=1toaccessallinfos(id,quantumnumbers+kinematics)aboutthatparticle

DETxin(2),DETyin(2),DETzin(2) DETxout(2),DETyout(2),DETzout(2)

DETde(2)=Sumofenergyreleasesbythat“particle”inagivenregionofdetectorDET

DETid(2)-1=pointertotheparticleinParticleStructurethatoriginatedhit=2toaccessallinfos(id,quantumnumbers+kinematics)aboutthatparticle

edep1=0;edep_H1=0;for(int i=0;i<pevstr->SCNn;i++){ ipart = pevstr->SCNid[i]-1; if (pevstr->SCNiview[i] == -1) { edep1 += pevstr->SCNde[i]; if ( pevstr->TRcha[ipart]==1 && pevstr->TRbar[ipart] == 1 ){

edep_H1 += pevstr->SCNde[i]; }}