-- SaimeSarikaya - 2022-05-17

TRT2016 with AYTUL

lxplus setup

initial setup
setupATLAS --quiet                                                             
asetup 20.1.6.4,64,here
localSetupDQ2Client --quiet
localSetupPandaClient
voms-proxy-init -voms atlas

checking grid certificate and vo membership

grid-proxy-init -debug -verify                                                 
voms-proxy-init -voms atlas

Other useful links

https://lcg-voms2.cern.ch:8443/voms/atlas/user/home.action
https://lcg-voms2.cern.ch:8443/voms/atlas/user/home.action

TRT Data/MC2016 comparison

Setting environment

mail from Joany

We were thinking about Data/MC 2016 comparison of tracking parameters (Time and Position residuals, Straw efficiency, Track extension, TRT hits, TRT tube hits for Xe and Ar). This is a very important and interesting task.
 

To start using the TRT xAODs I recommend to have a look on this tutorial https://gitlab.cern.ch/jvasquez/TRTFramework/wikis/Tutorial
You can find the list of TRT xAODs available here https://twiki.cern.ch/twiki/bin/view/Atlas/TrtxAOD#2016_Data_TRT_xAODs


For DATA you can use :
From the Zee stream
• group.det-indet.00297447.physics_Main.merge.TRTxAOD_EGZ.f694_trt080-01_EXT0 (1733 events)
• group.det-indet.00297730.physics_Main.merge.TRTxAOD_EGZ.f694_trt080-01_EXT0 (4420 events)
From the Zmumu stream
• group.det-indet.00297447.physics_Main.merge.TRTxAOD_ZMUMU.f694_trt080-01_EXT0 (21k events)
• group.det-indet.00297730.physics_Main.merge.TRTxAOD_ZMUMU.f694_trt080-01_EXT0 (19k events)

For MC comparisons you can use :

Samples with 2015 gas scenario
• group.det-indet.mc15_13TeV.361106.PowhegPythia8EvtGen_AZNLOCTEQ6L1_Zee.recon.TRTxAOD.e3601_s2576_s2132_r6780_trt071-00_EXT0 (5 M events)
• group.det-indet.mc15_13TeV.361107.PowhegPythia8EvtGen_AZNLOCTEQ6L1_Zmumu.recon.TRTxAOD.e3601_s2576_s2132_r6780_trt071-00_EXT0 (200k events)

Cheers
Joany

Tips

How to understand new files are read


TRT_CalDbSvc                               INFO Creating new rt-relation container

TRT_CalDbSvc                               INFO Creating new t0 container

TRT_CalDbSvc                               INFO Reading calibration data from text file /afs/cern.ch/user/j/johan/johantest/Cosmics/MCBinned.txt format 1

TRT_CalDbSvc                               INFO read 348477 t0 and 3 rt from file.  t0/rt footprints before 826572 / 84 and after 826572 / 84 compression.

Versions of cmt

cmt show packages ./
cmt show versions <package>

Others

When You get new caliboutput.txt file with errors please check that is written in a right way (not #rtErrors or #Rterrors)

pbook

pbook
>>>help()
>>>show(151)
>>>kill(151)
>>>sync()

E-LOG for myself

19 October

cmt co -r TRT_CalibTools-00-01-11 InnerDetector/InDetCalibTools/TRT_CalibTools/
cmt co -r TRT_ConditionsData-00-00-51 InnerDetector/InDetConditions/TRT_ConditionsData 
cmt co -r TRT_ConditionsServices-01-00-00-08 InnerDetector/InDetConditions/TRT_ConditionsServices 
cmt co -r InDetRecExample-02-05-63 InnerDetector/InDetExample/InDetRecExample/ 
cmt co -r TRT_DriftCircleTool-04-00-00 InnerDetector/InDetRecTools/TRT_DriftCircleTool 
cmt co -r TRT_DriftFunctionTool-00-02-18 InnerDetector/InDetRecTools/TRT_DriftFunctionTool 
cmt co -r TrkRIO_OnTrackCreator-01-02-01 Tracking/TrkTools/TrkRIO_OnTrackCreator/ 

cd InnerDetector/InDetConditions/TRT_ConditionsData/cmt/ && make && cd -
cd InnerDetector/InDetConditions/TRT_ConditionsServices/cmt/ && make && cd -

// open validity gate: 
//MinTrailingEdge = 16.0*ns MaxDriftTime = 75.0*ns LowGate = 0.0*ns HighGate = 75.0*ns 
//if globalflags.DataSource == 'data': 
//MinTrailingEdge = 11.0*ns MaxDriftTime = 75.0*ns LowGate = 0.0*ns HighGate = 75.0*ns
//SimpleOutOfTimePileupSupression = False, ValidityGateSuppression = False,
nano InnerDetector/InDetExample/InDetRecExample/share/ConfiguredInDetPreProcessingTRT.py

// Switching off mu scaling
/*
//double a = (is_endcap) ? m_scaling_trt_endcap[0] : m_scaling_trt_barrel[0];
//double b = (is_endcap) ? m_scaling_trt_endcap[1] : m_scaling_trt_barrel[1];
//double c = (is_endcap) ? m_scaling_trt_endcap[2] : m_scaling_trt_barrel[2];
  double a =1.;
  double b =0.;   
  double c =0.;
*/
nano Tracking/TrkTools/TrkRIO_OnTrackCreator/src/RIO_OnTrackErrorScalingTool.cxx
// adding mu variable 
// mu = (float) m_eventInfo->averageInteractionsPerCrossing();
nano InnerDetector/InDetCalibTools/TRT_CalibTools/src/FillAlignTRTHits.cxx

cd InnerDetector/InDetRecTools/TRT_DriftFunctionTool/cmt/ && make && cd -
cd InnerDetector/InDetRecTools/TRT_DriftCircleTool/cmt/ && make && cd -
cd InnerDetector/InDetCalibTools/TRT_CalibTools/cmt/ && make && cd -

cd InnerDetector/InDetExample/InDetRecExample/cmt/ && make && cd -
cd InnerDetector/InDetRecTools/TRT_DriftFunctionTool/cmt/ && make && cd -
cd Tracking/TrkTools/TrkRIO_OnTrackCreator/cmt/ && make && cd -

14 October

cmt co -r TRT_ElectronPidTools-01-00-18 InnerDetector/InDetRecTools/TRT_ElectronPidTools
cd InnerDetector/InDetRecTools/TRT_ElectronPidTools/cmt/ && make && cd -

cmt co -r TRT_ConditionsServices-01-00-00-08 InnerDetector/InDetConditions/TRT_ConditionsService
cmt co InnerDetector/InDetConditions/TRT_ConditionsData
cd InnerDetector/InDetConditions/TRT_ConditionsData/cmt/ && make && cd -
cd InnerDetector/InDetConditions/TRT_ConditionsServices/cmt/ && make && cd -

cmt co InnerDetector/InDetCalibTools/TRT_CalibTools/
cmt co Tracking/TrkTools/TrkRIO_OnTrackCreator/
cmt co -r InDetRecExample-02-05-63 InnerDetector/InDetExample/InDetRecExample
cmt co -r TRT_ConditionsAlgs-00-03-09 InnerDetector/InDetConditions/TRT_ConditionsAlgs

// change calib format to 2
nano InnerDetector/InDetConditions/TRT_ConditionsAlgs/src/TRTCondWrite.cxx 

// open validity gate: 
//MinTrailingEdge = 16.0*ns MaxDriftTime = 75.0*ns LowGate = 0.0*ns HighGate = 75.0*ns 
//if globalflags.DataSource == 'data': 
//MinTrailingEdge = 11.0*ns MaxDriftTime = 75.0*ns LowGate = 0.0*ns HighGate = 75.0*ns
//SimpleOutOfTimePileupSupression = False, ValidityGateSuppression = False,
nano InnerDetector/InDetExample/InDetRecExample/share/ConfiguredInDetPreProcessingTRT.py

// Switching off mu scaling
/*
//double a = (is_endcap) ? m_scaling_trt_endcap[0] : m_scaling_trt_barrel[0];
//double b = (is_endcap) ? m_scaling_trt_endcap[1] : m_scaling_trt_barrel[1];
//double c = (is_endcap) ? m_scaling_trt_endcap[2] : m_scaling_trt_barrel[2];
  double a =1.;
  double b =0.;   
  double c =0.;
*/
nano Tracking/TrkTools/TrkRIO_OnTrackCreator/src/RIO_OnTrackErrorScalingTool.cxx

// adding mu variable 
// mu = (float) m_eventInfo->averageInteractionsPerCrossing();
nano InnerDetector/InDetCalibTools/TRT_CalibTools/src/FillAlignTRTHits.cxx

cd InnerDetector/InDetCalibTools/TRT_CalibTools/cmt/ && make && cd -
cd Tracking/TrkTools/TrkRIO_OnTrackCreator/cmt/ && make && cd -
cd InnerDetector/InDetExample/InDetRecExample/cmt/ && make && cd -
cd InnerDetector/InDetConditions/TRT_ConditionsAlgs/cmt/ && make && cd -

26 August

Mail from Fred:


1) There is one voltage that corresponds to what we are currently using in the TRT detector. It is 1470 V for Ar/CO2/O3 70/27/3 which is the line labeled GG = 2.5*10^4 (GG means gas gain).

  1. ) Almost all current pp runs have Ar in the first layer of the barrel and
one type A wheel on each end-cap and you will have to use those runs to go to non-zero values of . The p-Pb runs are not really suitable for this purpose.

  1. ) I think that calibration procedure should not change no matter what the
running condition (as long as you select hits from channels using the Ar based gas mixture). Alex should correct me if I have this wrong.

Will work on 217999, 218006, 218024 from the list. These are the ones with 1470V and 70/27/3 mixtures. They have total 6.2M events. I guess this will be enough for mu~0.

Sending Job to Grid for run 217999:

pathena --trf "Reco_trf.py inputBSFile=%IN tmpESD=%OUT.ESD.pool.root conditionsTag='COMCOND-BLKPA-RUN1-06' --ignoreerrors='ALL' autoConfiguration='everything' preExec='from InDetRecExample.InDetJobProperties import InDetFlags;InDetFlags.doSlimming.set_Value_and_Lock(False);rec.doHIP.set_Value_and_Lock(True);InDetFlags.doLowPt.set_Value_and_Lock(False);InDetFlags.InDet25nsec.set_Value_and_Lock(False);from TrkDetDescrSvc.TrkDetDescrJobProperties import TrkDetFlags; TrkDetFlags.TRT_BuildStrawLayers.set_Value_and_Lock(True);' postExec='from AthenaCommon.AppMgr import ServiceMgr as svcMgr; svcMgr.AthenaPoolCnvSvc.MaxFileSizes=[\"40000000000\"]; from TRT_ConditionsServices.TRT_ConditionsServicesConf import TRT_CalDbSvc; TRTCalibDBSvc=TRT_CalDbSvc(); ServiceMgr += TRTCalibDBSvc; conddb.blockFolder(\"/TRT/Calib/RT\"); conddb.blockFolder(\"/TRT/Calib/T0\"); conddb.blockFolder(\"/TRT/Calib/errors\"); TRTCalibDBSvc.calibTextFile=\"caliboutput_default_argon_25082015.txt\"' geometryVersion='ATLAS-GEO-20-00-01' AMITag='f519' maxEvents='-1' postInclude_r2e='joboptions.py'" --inDS data13_hip.00217999.physics_MinBias.merge.RAW --outDS user.ssarikay.data13_hip.00217999.physics_MinBias.D3PD.argon_default_260815 --cmtConfig=x86_64-slc5-gcc43-opt --inputType=RAW --nFilesPerJob=1 --extOutFile=basic.root --extFile=caliboutput_default_argon_25082015.txt,joboptions.py --site=CERN-PROD_SCRATCHDISK

24 August

Adding mu variable

InnerDetector/InDetCalibTools/TRT_CalibTools/src/FillAlignTRTHits.cxx
         mu = (float) m_eventInfo->averageInteractionsPerCrossing();
after    the string     lbn = (float)          m_eventInfo->event_ID()->lumi_block();
Then do not forget to initialize before
float mu =-1;
and also add at the end of the file
(float)(*output)[TRT::Track::event],
lbn,
mu,
nvrt_rec,
...
Do not forget to recompile package. In your cmt dir for TRT_CalibTools do cmt config; cmt clean; make

Setting new environment in reco_17_clean. Openning validt gate changing new caliboutput file format. Everything make successfully.

10 August

Bins combined in caliboutput and run the reconstruction:

caliboutput_bins_combined_default.txt

pathena --trf "Reco_trf.py inputBSFile=%IN tmpESD=%OUT.ESD.pool.root conditionsTag='COMCOND-BLKPA-RUN1-06' --ignoreerrors='ALL' autoConfiguration='everything' preExec='from InDetRecExample.InDetJobProperties import InDetFlags;InDetFlags.doSlimming.set_Value_and_Lock(False);rec.doHIP.set_Value_and_Lock(True);InDetFlags.doLowPt.set_Value_and_Lock(False);InDetFlags.InDet25nsec.set_Value_and_Lock(False);from TrkDetDescrSvc.TrkDetDescrJobProperties import TrkDetFlags; TrkDetFlags.TRT_BuildStrawLayers.set_Value_and_Lock(True);' postExec='from AthenaCommon.AppMgr import ServiceMgr as svcMgr; svcMgr.AthenaPoolCnvSvc.MaxFileSizes=[\"40000000000\"]; from TRT_ConditionsServices.TRT_ConditionsServicesConf import TRT_CalDbSvc; TRTCalibDBSvc=TRT_CalDbSvc(); ServiceMgr += TRTCalibDBSvc; conddb.blockFolder(\"/TRT/Calib/RT\"); conddb.blockFolder(\"/TRT/Calib/T0\"); conddb.blockFolder(\"/TRT/Calib/errors\"); TRTCalibDBSvc.calibTextFile=\"caliboutput_bins_combined_default.txt\"' geometryVersion='ATLAS-GEO-20-00-01' AMITag='f519' maxEvents='-1' postInclude_r2e='joboptions.py'" --inDS data13_hip.00218213.physics_MinBias.merge.RAW --outDS user.ssarikay.data13_hip.00218213.physics_MinBias.D3PD.1st_argon_040815/ --cmtConfig=x86_64-slc5-gcc43-opt --inputType=RAW --nFilesPerJob=1  --extOutFile=basic.root --extFile=caliboutput_bins_combined_default.txt,joboptions.py --site=CERN-PROD_SCRATCHDISK --nFiles=10

04 August

Using the dataset Dimitrii produces before default pull values are extracted and created new drift circle errors for argon. Relevant files:

in directory reco_17_try/

TFile* file = TFile::Open ("/afs/cern.ch/user/s/ssarikay/work/TRT/reco_trt/user.dkrasnop.data12_8TeV.00218213.physics_MinBias.D3PD.7.4.15_calibfile_argon_EXT0.24279397/user.dkrasnop218213.all.root");
TFile *outfile = new TFile("user.dkrasnop218213.all_final.root","RECREATE");

caliboutput_1st_argon_040815.txt

Two jobs submitted to athena:

[ssarikay@lxplus0090 reco_17_try]$ pathena --trf "Reco_trf.py inputBSFile=%IN tmpESD=%OUT.ESD.pool.root conditionsTag='COMCOND-BLKPA-RUN1-06' --ignoreerrors='ALL' autoConfiguration='everything' preExec='from InDetRecExample.InDetJobProperties import InDetFlags;InDetFlags.doSlimming.set_Value_and_Lock(False);rec.doHIP.set_Value_and_Lock(True);InDetFlags.doLowPt.set_Value_and_Lock(False);InDetFlags.InDet25nsec.set_Value_and_Lock(False);from TrkDetDescrSvc.TrkDetDescrJobProperties import TrkDetFlags; TrkDetFlags.TRT_BuildStrawLayers.set_Value_and_Lock(True);' postExec='from AthenaCommon.AppMgr import ServiceMgr as svcMgr; svcMgr.AthenaPoolCnvSvc.MaxFileSizes=[\"40000000000\"]; from TRT_ConditionsServices.TRT_ConditionsServicesConf import TRT_CalDbSvc; TRTCalibDBSvc=TRT_CalDbSvc(); ServiceMgr += TRTCalibDBSvc; conddb.blockFolder(\"/TRT/Calib/RT\"); conddb.blockFolder(\"/TRT/Calib/T0\"); conddb.blockFolder(\"/TRT/Calib/errors\"); TRTCalibDBSvc.calibTextFile=\"caliboutput_1st_argon_040815.txt\"' geometryVersion='ATLAS-GEO-20-00-01' AMITag='f519' maxEvents='-1' postInclude_r2e='joboptions.py'" --inDS data13_hip.00218213.physics_MinBias.merge.RAW --outDS user.ssarikay.data13_hip.00218213.physics_MinBias.D3PD.1st_argon_040815/ --cmtConfig=x86_64-slc5-gcc43-opt --inputType=RAW --nFilesPerJob=1  --extOutFile=basic.root --extFile=caliboutput_1st_argon_040815.txt,joboptions.py --site=CERN-PROD_SCRATCHDISK --nFiles=10
INFO : using CMTCONFIG=x86_64-slc5-gcc43-opt
INFO : extracting run configuration
INFO : archiving source files
INFO : archiving InstallArea
INFO : checking symbolic links
INFO : uploading source/jobO files
INFO : submit
INFO : succeeded. new jediTaskID=6194727
[ssarikay@lxplus0090 reco_17_try]$ pathena --trf "Reco_trf.py inputBSFile=%IN tmpESD=%OUT.ESD.pool.root conditionsTag='COMCOND-BLKPA-RUN1-06' --ignoreerrors='ALL' autoConfiguration='everything' preExec='from InDetRecExample.InDetJobProperties import InDetFlags;InDetFlags.doSlimming.set_Value_and_Lock(False);rec.doHIP.set_Value_and_Lock(True);from TrkDetDescrSvc.TrkDetDescrJobProperties import TrkDetFlags; TrkDetFlags.TRT_BuildStrawLayers.set_Value_and_Lock(True);' postExec='from AthenaCommon.AppMgr import ServiceMgr as svcMgr; svcMgr.AthenaPoolCnvSvc.MaxFileSizes=[\"40000000000\"]; from TRT_ConditionsServices.TRT_ConditionsServicesConf import TRT_CalDbSvc; TRTCalibDBSvc=TRT_CalDbSvc(); ServiceMgr += TRTCalibDBSvc; conddb.blockFolder(\"/TRT/Calib/RT\"); conddb.blockFolder(\"/TRT/Calib/T0\"); conddb.blockFolder(\"/TRT/Calib/errors\"); TRTCalibDBSvc.calibTextFile=\"caliboutput_1st_argon_040815.txt\"' geometryVersion='ATLAS-GEO-20-00-01' AMITag='f519' maxEvents='-1' postInclude_r2e='joboptions.py'" --inDS data13_hip.00218213.physics_MinBias.merge.RAW --outDS user.ssarikay.data13_hip.00218213.physics_MinBias.D3PD.1st_argon_040815_lesscommand/ --cmtConfig=x86_64-slc5-gcc43-opt --inputType=RAW --nFilesPerJob=1  --extOutFile=basic.root --extFile=caliboutput_1st_argon_040815.txt,joboptions.py --site=CERN-PROD_SCRATCHDISK --nFiles=10
INFO : using CMTCONFIG=x86_64-slc5-gcc43-opt
INFO : extracting run configuration
INFO : archiving source files
INFO : archiving InstallArea
INFO : checking symbolic links
INFO : uploading source/jobO files
INFO : submit
INFO : succeeded. new jediTaskID=6194766

Running first iteration locally:

=
Reco_trf.py inputBSFile=/afs/cern.ch/user/s/ssarikay/work/TRT/reco_17_try/data13_hip.00218213.physics_MinBias.merge.RAW/data13_hip.00218213.physics_MinBias.merge.RAW._lb0133._SFO-9._0001.1 outputESDFile=OUT.ESD.pool.root conditionsTag='COMCOND-BLKPA-RUN1-06' --ignoreerrors='ALL' autoConfiguration='everything' preExec='from InDetRecExample.InDetJobProperties import InDetFlags;InDetFlags.doSlimming.set_Value_and_Lock(False);from TrkDetDescrSvc.TrkDetDescrJobProperties import TrkDetFlags; TrkDetFlags.TRT_BuildStrawLayers.set_Value_and_Lock(True);' geometryVersion='ATLAS-GEO-20-00-01' maxEvents='10000' postInclude_r2e='joboptions.py' postExec='from TRT_ConditionsServices.TRT_ConditionsServicesConf import TRT_CalDbSvc; TRTCalibDBSvc=TRT_CalDbSvc(); ServiceMgr += TRTCalibDBSvc; conddb.blockFolder("/TRT/Calib/RT"); conddb.blockFolder("/TRT/Calib/T0"); conddb.blockFolder("/TRT/Calib/errors"); TRTCalibDBSvc.calibTextFile="/afs/cern.ch/user/s/ssarikay/work/TRT/reco_17_try/caliboutput_1st_argon_040815.txt"'
=

16 july

Release 17

setting environment with the file changes done in release 19(!):

cmt co -r TRT_CalibTools-00-00-38 InnerDetector/InDetCalibTools/TRT_CalibTools/
cmt co InnerDetector/InDetConditions/TRT_ConditionsAlgs/
cmt co -r InDetRecExample-01-23-75-04 InnerDetector/InDetExample/InDetRecExample/
cmt co -r TRT_CalibAlgs-00-00-78 InnerDetector/InDetCalibAlgs/TRT_CalibAlgs/

cd InnerDetector/InDetConditions/TRT_ConditionsAlgs/cmt && make && cd -
cd InnerDetector/InDetExample/InDetRecExample/cmt && make && cd - 
cd InnerDetector/InDetCalibTools/TRT_CalibTools/cmt && make && cd -
cd InnerDetector/InDetCalibAlgs/TRT_CalibAlgs/cmt && make && cd - 

Running Code:

Reco_trf.py inputBSFile=/afs/cern.ch/user/s/ssarikay/work/TRT/reco_17_try/data13_hip.00218213.physics_MinBias.merge.RAW/data13_hip.00218213.physics_MinBias.merge.RAW._lb0133._SFO-9._0001.1 outputESDFile=OUT.ESD.pool.root conditionsTag='COMCOND-BLKPA-RUN1-06' --ignoreerrors='ALL' autoConfiguration='everything' preExec='from InDetRecExample.InDetJobProperties import InDetFlags;InDetFlags.doSlimming.set_Value_and_Lock(False);from TrkDetDescrSvc.TrkDetDescrJobProperties import TrkDetFlags; TrkDetFlags.TRT_BuildStrawLayers.set_Value_and_Lock(True);' geometryVersion='ATLAS-GEO-20-00-01' maxEvents='1' postExec='from TRT_ConditionsAlgs.TRT_ConditionsAlgsConf import TRTCondWrite; TRTCondWrite= TRTCondWrite( name = "TRTCondWrite"); topSequence+=TRTCondWrite'

---> caliboutput_default_160715.txt

Running over 1000 events to get default pull values:

Reco_trf.py inputBSFile=/afs/cern.ch/user/s/ssarikay/work/TRT/reco_17_try/data13_hip.00218213.physics_MinBias.merge.RAW/data13_hip.00218213.physics_MinBias.merge.RAW._lb0133._SFO-9._0001.1  outputESDFile=OUT.ESD.pool.root conditionsTag='COMCOND-BLKPA-RUN1-06' --ignoreerrors='ALL' autoConfiguration='everything' preExec='from InDetRecExample.InDetJobProperties import InDetFlags;InDetFlags.doSlimming.set_Value_and_Lock(False);from TrkDetDescrSvc.TrkDetDescrJobProperties import TrkDetFlags; TrkDetFlags.TRT_BuildStrawLayers.set_Value_and_Lock(True);' geometryVersion='ATLAS-GEO-20-00-01' maxEvents='1000' postInclude_r2e='joboptions.py'

---> basic_default_160715.root ---> basic_default_160715_final.root

New errors are the same as Dimitrii's. Running the code:

Reco_trf.py inputBSFile=/afs/cern.ch/user/s/ssarikay/work/TRT/reco_17_try/data13_hip.00218213.physics_MinBias.merge.RAW/data13_hip.00218213.physics_MinBias.merge.RAW._lb0133._SFO-9._0001.1 outputESDFile=OUT.ESD.pool.root conditionsTag='COMCOND-BLKPA-RUN1-06' --ignoreerrors='ALL' autoConfiguration='everything' preExec='from InDetRecExample.InDetJobProperties import InDetFlags;InDetFlags.doSlimming.set_Value_and_Lock(False);from TrkDetDescrSvc.TrkDetDescrJobProperties import TrkDetFlags; TrkDetFlags.TRT_BuildStrawLayers.set_Value_and_Lock(True);' geometryVersion='ATLAS-GEO-20-00-01' maxEvents='1000' postInclude_r2e='joboptions.py' postExec='from TRT_ConditionsServices.TRT_ConditionsServicesConf import TRT_CalDbSvc; TRTCalibDBSvc=TRT_CalDbSvc(); ServiceMgr += TRTCalibDBSvc; conddb.blockFolder("/TRT/Calib/RT"); conddb.blockFolder("/TRT/Calib/T0"); conddb.blockFolder("/TRT/Calib/errors"); TRTCalibDBSvc.calibTextFile="/afs/cern.ch/user/s/ssarikay/work/TRT/reco_17_try/caliboutput_2.txt"'

--->basic_1st_160715.root ---> basic_1st_160715_final.root

Release 19

Setting 19th release new environment with the Dimitrii's settings:

cmt co -r TRT_CalibAlgs-00-01-08 InnerDetector/InDetCalibAlgs/TRT_CalibAlgs/
cmt co -r TRT_CalibTools-00-01-10 InnerDetector/InDetCalibTools/TRT_CalibTools/ 
cmt co -r TRT_ConditionsAlgs-00-03-09 InnerDetector/InDetConditions/TRT_ConditionsAlgs/ 
cmt co -r TRT_ConditionsServices-01-00-00-06 InnerDetector/InDetConditions/TRT_ConditionsServices 
cmt co -r TRT_ElectronPidTools-01-00-19 InnerDetector/InDetRecTools/TRT_ElectronPidTools 
cmt co -r InDetRecExample-02-04-15 InnerDetector/InDetExample/InDetRecExample 

Openning validity gate with changing validity suppression to true. Changing error file format.

nano InnerDetector/InDetExample/InDetRecExample/share/ConfiguredInDetPreProcessingTRT.py
nano InnerDetector/InDetConditions/TRT_ConditionsAlgs/src/TRTCondWrite.cxx

MinTrailingEdge = 16.0*ns MaxDriftTime = 75.0*ns LowGate = 0.0*ns HighGate = 75.0*ns if globalflags.DataSource == 'data': MinTrailingEdge = 11.0*ns MaxDriftTime = 75.0*ns LowGate = 0.0*ns HighGate = 75.0*ns

SimpleOutOfTimePileupSupression = False, ValidityGateSuppression = False,

making libraries:

cd InnerDetector/InDetConditions/TRT_ConditionsServices/cmt && make && cd -
cd InnerDetector/InDetRecTools/TRT_ElectronPidTools/cmt && make && cd -
cd InnerDetector/InDetExample/InDetRecExample/cmt && make && cd -
cd InnerDetector/InDetConditions/TRT_ConditionsAlgs/cmt && make && cd -
cd InnerDetector/InDetCalibTools/TRT_CalibTools/cmt && make && cd -
cd InnerDetector/InDetCalibAlgs/TRT_CalibAlgs/cmt && make && cd -

Getting Files and joboptions that Dimitrii use

dq2-get -f data13_hip.00218213.physics_MinBias.merge.RAW._lb0133._SFO-9._0001.1 data13_hip.00218213.physics_MinBias.merge.RAW

Running code:

Reco_tf.py --inputBSFile=/afs/cern.ch/user/s/ssarikay/work/TRT/reco_19_try/data13_hip.00218213.physics_MinBias.merge.RAW/data13_hip.00218213.physics_MinBias.merge.RAW._lb0133._SFO-9._0001.1 --outputESDFile=OUT.ESD.pool.root --conditionsTag=COMCOND-BLKPA-RUN1-06 --autoConfiguration=everything --preExec='from InDetRecExample.InDetJobProperties import InDetFlags;InDetFlags.doSlimming.set_Value_and_Lock(False);from TrkDetDescrSvc.TrkDetDescrJobProperties import TrkDetFlags; TrkDetFlags.TRT_BuildStrawLayers.set_Value_and_Lock(True);' --geometryVersion=ATLAS-GEO-20-00-01 --maxEvents=1 --postExec='from TRT_ConditionsAlgs.TRT_ConditionsAlgsConf import TRTCondWrite; TRTCondWrite= TRTCondWrite( name = "TRTCondWrite"); topSequence+=TRTCondWrite'

But after a while I got error:

00:47:02 Py:Athena            INFO including file "HIRecExample/HIPRec_jobOptions.py"
00:47:02 Py:Athena            INFO including file "CaloRec/CaloClusterSignificance_jobOption.py"
00:47:02 Shortened traceback (most recent user call last):
00:47:02   File "/cvmfs/atlas.cern.ch/repo/sw/software/x86_64-slc6-gcc47-opt/19.1.1/AtlasProduction/19.1.1.10/InstallArea/jobOptions/RecJobTrans
forms/skeleton.RAWtoESD_tf.py", line 155, in <module>
00:47:02     else: include( "RecExCommon/RecExCommon_topOptions.py" )
00:47:02   File "/cvmfs/atlas.cern.ch/repo/sw/software/x86_64-slc6-gcc47-opt/19.1.1/AtlasProduction/19.1.1.10/InstallArea/jobOptions/RecExCommon
/RecExCommon_topOptions.py", line 699, in <module>
00:47:02     protectedInclude ("HIRecExample/HIPRec_jobOptions.py")
00:47:02   File "/cvmfs/atlas.cern.ch/repo/sw/software/x86_64-slc6-gcc47-opt/19.1.1/AtlasReconstruction/19.1.1/InstallArea/jobOptions/HIRecExamp
le/HIPRec_jobOptions.py", line 12, in <module>
00:47:02     include('CaloRec/CaloClusterSignificance_jobOption.py')
00:47:02   File "/cvmfs/atlas.cern.ch/repo/sw/software/x86_64-slc6-gcc47-opt/19.1.1/AtlasReconstruction/19.1.1/InstallArea/jobOptions/CaloRec/Ca
loClusterSignificance_jobOption.py", line 8, in <module>
00:47:02     topSequence.CaloTopoCluster.TopoMoments.AODMomentsNames += ["SIGNIFICANCE","CELL_SIGNIFICANCE","CELL_SIG_SAMPLING"]
00:47:02 AttributeError: '<class 'CaloRec.CaloRecConf.CaloClusterMomentsMaker'>' object has no attribute 'AODMomentsNames'
00:47:02 Py:Athena            INFO leaving with code 8: "an unknown exception occurred"

13 july

New directory created:

 /afs/cern.ch/user/s/ssarikay/work/TRT/reco17 

setup file is copied here. Clean directory will be created. With files checked out and make successfully.

cmt show packages .
TRT_CalibAlgs TRT_CalibAlgs-00-00-78 /afs/cern.ch/user/s/ssarikay/work/TRT/reco17/./InnerDetector/InDetCalibAlgs
TRT_CalibTools TRT_CalibTools-00-00-38 /afs/cern.ch/user/s/ssarikay/work/TRT/reco17/./InnerDetector/InDetCalibTools
InDetRecExample InDetRecExample-01-23-75-04 /afs/cern.ch/user/s/ssarikay/work/TRT/reco17/./InnerDetector/InDetExample
TRT_ConditionsAlgs TRT_ConditionsAlgs-r674712 /afs/cern.ch/user/s/ssarikay/work/TRT/reco17/./InnerDetector/InDetConditions

Downloading file as Dimitrii:

cp ../reco_trt/data13_hip.00218213.physics_MinBias.merge.RAW/data13_hip.00218213.physics_MinBias.merge.RAW._lb0133._SFO-9._0001.1 data13_hip.00218213.physics_MinBias.merge.RAW/.

creating default errors:

Reco_trf.py inputBSFile=/afs/cern.ch/user/s/ssarikay/work/TRT/reco17/data13_hip.00218213.physics_MinBias.merge.RAW/data13_hip.00218213.physics_MinBias.merge.RAW._lb0133._SFO-9._0001.1 outputESDFile=OUT.ESD.pool.root conditionsTag='COMCOND-BLKPA-RUN1-06' --ignoreerrors='ALL' autoConfiguration='everything' preExec='from InDetJobProperties import InDetFlags;InDetFlags.doSlimming.set_Value_and_Lock(False);from TrkDetDescrJobProperties import TrkDetFlags; TrkDetFlags.TRT_BuildStrawLayers.set_Value_and_Lock(True);' geometryVersion='ATLAS-GEO-20-00-01' maxEvents='1' postExec='from TRT_ConditionsAlgs.TRT_ConditionsAlgsConf import TRTCondWrite; TRTCondWrite= TRTCondWrite( name = "TRTCondWrite"); topSequence+=TRTCondWrite'

Trying same stuff with release 19: Reco_tf.py --inputBSFile=/afs/cern.ch/user/s/ssarikay/work/TRT/reco_try/data13_hip.00218213.physics_MinBias.merge.RAW/data13_hip.00218213.physics_MinBias.merge.RAW._lb0133._SFO-9._0001.1 --outputESDFile=OUT.ESD.pool.root --conditionsTag=COMCOND-BLKPA-RUN1-06 --autoConfiguration=everything --preExec='from InDetJobProperties import InDetFlags;InDetFlags.doSlimming.set_Value_and_Lock(False);from TrkDetDescrJobProperties import TrkDetFlags; TrkDetFlags.TRT_BuildStrawLayers.set_Value_and_Lock(True);' --geometryVersion=ATLAS-GEO-20-00-01 --maxEvents=1 --postExec='from TRT_ConditionsAlgs.TRT_ConditionsAlgsConf import TRTCondWrite; TRTCondWrite= TRTCondWrite( name = "TRTCondWrite"); topSequence+=TRTCondWrite'

cmt show packages . TRT_CalibAlgs TRT_CalibAlgs-00-01-08 /afs/cern.ch/user/s/ssarikay/work/TRT/reco_try/./InnerDetector/InDetCalibAlgs TRT_ConditionsAlgs TRT_ConditionsAlgs-00-03-12 /afs/cern.ch/user/s/ssarikay/work/TRT/reco_try/./InnerDetector/InDetConditions TRT_ConditionsServices TRT_ConditionsServices-01-00-00-06 /afs/cern.ch/user/s/ssarikay/work/TRT/reco_try/./InnerDetector/InDetConditions TRT_ElectronPidTools TRT_ElectronPidTools-01-00-30 /afs/cern.ch/user/s/ssarikay/work/TRT/reco_try/./InnerDetector/InDetRecTools TRT_CalibTools TRT_CalibTools-00-01-11 /afs/cern.ch/user/s/ssarikay/work/TRT/reco_try/./InnerDetector/InDetCalibTools InDetRecExample InDetRecExample-02-05-56 /afs/cern.ch/user/s/ssarikay/work/TRT/reco_try/./InnerDetector/InDetExample

06 july

Checked the code with Erkcan no error could be found. The idea to check things is changing one bin and seeing the effect.

Changed the 20th bin in barrel with the command:

perl -pi -w -e 's/0.111087/0.555435/g;' caliboutput_218213_one_straw_change_060715.txt

Running 1000 events:

Reco_trf.py inputBSFile=/afs/cern.ch/user/s/ssarikay/work/TRT/reco_trt/data13_hip.00218213.physics_MinBias.merge.RAW/data13_hip.00218213.physics_MinBias.merge.RAW._lb0133._SFO-8._0001.1 outputESDFile=OUT.ESD.pool.root conditionsTag='COMCOND-BLKPA-RUN1-06' --ignoreerrors='ALL' autoConfiguration='everything' preExec='from InDetRecExample.InDetJobProperties import InDetFlags;InDetFlags.doSlimming.set_Value_and_Lock(False);from TrkDetDescrSvc.TrkDetDescrJobProperties import TrkDetFlags; TrkDetFlags.TRT_BuildStrawLayers.set_Value_and_Lock(True);' geometryVersion='ATLAS-GEO-20-00-01' maxEvents='1000' postInclude_r2e='joboptions.py'; postExec='from TRT_ConditionsServices.TRT_ConditionsServicesConf import TRT_CalDbSvc; TRTCalibDBSvc=TRT_CalDbSvc(); ServiceMgr += TRTCalibDBSvc; conddb.blockFolder("/TRT/Calib/RT"); conddb.blockFolder("/TRT/Calib/T0"); conddb.blockFolder("/TRT/Calib/errors"); TRTCalibDBSvc.calibTextFile="/afs/cern.ch/user/s/ssarikay/reco_trt//afs/cern.ch/user/s/ssarikay/work/TRT/reco_trt/caliboutput_218213_one_straw_change_060715.txt"'

Problem reading calibfile tried:

Reco_trf.py inputBSFile=/afs/cern.ch/user/s/ssarikay/work/TRT/reco_trt/data13_hip.00218213.physics_MinBias.merge.RAW/data13_hip.00218213.physics_MinBias.merge.RAW._lb0133._SFO-8._0001.1  outputESDFile=OUT.ESD.pool.root conditionsTag='COMCOND-BLKPA-RUN1-06' --ignoreerrors='ALL' autoConfiguration='everything' preExec='from InDetRecExample.InDetJobProperties import InDetFlags;InDetFlags.doSlimming.set_Value_and_Lock(False);from TrkDetDescrSvc.TrkDetDescrJobProperties import TrkDetFlags; TrkDetFlags.TRT_BuildStrawLayers.set_Value_and_Lock(True);' geometryVersion='ATLAS-GEO-20-00-01' maxEvents='1000' postInclude_r2e='joboptions.py' postExec='from TRT_ConditionsServices.TRT_ConditionsServicesConf import TRT_CalDbSvc; TRTCalibDBSvc=TRT_CalDbSvc(); ServiceMgr += TRTCalibDBSvc; conddb.blockFolder("/TRT/Calib/RT"); conddb.blockFolder("/TRT/Calib/T0"); conddb.blockFolder("/TRT/Calib/errors"); TRTCalibDBSvc.calibTextFile="/afs/cern.ch/user/s/ssarikay/work/TRT/reco_trt/caliboutput_218213_one_straw_change_060715.txt"'

30 june

producing default errors for run 218213:

Reco_trf.py inputBSFile=/afs/cern.ch/user/s/ssarikay/work/TRT/reco_trt/data13_hip.00218213.physics_MinBias.merge.RAW/data13_hip.00218213.physics_MinBias.merge.RAW._lb0133._SFO-6._0001.1  outputESDFile=OUT.ESD.pool.root conditionsTag='COMCOND-BLKPA-RUN1-06' --ignoreerrors='ALL' autoConfiguration='everything' preExec='from InDetRecExample.InDetJobProperties import InDetFlags;InDetFlags.doSlimming.set_Value_and_Lock(False);from TrkDetDescrSvc.TrkDetDescrJobProperties import TrkDetFlags; TrkDetFlags.TRT_BuildStrawLayers.set_Value_and_Lock(True);' geometryVersion='ATLAS-GEO-20-00-01' maxEvents='1'  postExec='from TRT_ConditionsAlgs.TRT_ConditionsAlgsConf import TRTCondWrite; TRTCondWrite= TRTCondWrite( name = "TRTCondWrite"); topSequence+=TRTCondWrite'

created caliboutput file:

 caliboutput_218213_default_300615.txt 

compared it with

caliboutput_218213_all_straws_default.txt
They are exactly same.

Using the file

caliboutput_218213_all_straws_default.txt
. It should be the same. But this time pull values will be calculated for only argon straws in local.

Local directory and codes:

/home/heplab/trt/reco/ntuple_argon.C&h
the default errors are true.

Find out that the pull sigmas are very large because of binning. Changed the binning from 100,-2.5,2.5 to 50,-5,5. Looks reasonable now.

New root file in local :

basic_213218_all_straws_local_final_300615.root

sigma pull values:

sigma_pull_218213_300615.txt
original rt errors:
rt_218213_all_straws_default.txt
new rt errors:
rt_218213_argon_1st_300615.txt

created (and moved to lxplus)

caliboutput_218213_3_argon_1st_300615.txt

Running First Iteration on 1000 events:

Reco_trf.py inputBSFile=/afs/cern.ch/user/s/ssarikay/work/TRT/reco_trt/data13_hip.00218213.physics_MinBias.merge.RAW/data13_hip.00218213.physics_MinBias.merge.RAW._lb0133._SFO-8._0001.1 outputESDFile=OUT.ESD.pool.root conditionsTag='COMCOND-BLKPA-RUN1-06' --ignoreerrors='ALL' autoConfiguration='everything' preExec='from InDetRecExample.InDetJobProperties import InDetFlags;InDetFlags.doSlimming.set_Value_and_Lock(False);from TrkDetDescrSvc.TrkDetDescrJobProperties import TrkDetFlags; TrkDetFlags.TRT_BuildStrawLayers.set_Value_and_Lock(True);' geometryVersion='ATLAS-GEO-20-00-01' maxEvents='1000' postInclude_r2e='joboptions.py'; postExec='from TRT_ConditionsServices.TRT_ConditionsServicesConf import TRT_CalDbSvc; TRTCalibDBSvc=TRT_CalDbSvc(); ServiceMgr += TRTCalibDBSvc; conddb.blockFolder("/TRT/Calib/RT"); conddb.blockFolder("/TRT/Calib/T0"); conddb.blockFolder("/TRT/Calib/errors"); TRTCalibDBSvc.calibTextFile="/afs/cern.ch/user/s/ssarikay/reco_trt//afs/cern.ch/user/s/ssarikay/work/TRT/reco_trt/caliboutput_218213_3_argon_1st_300615.txt"'

Did not work frown

output root file:

basic_218213_argon_1stiter_300615.root

Trying once more with the calibration file that is taken from full data set calibration over 2000 events:

Reco_trf.py inputBSFile=/afs/cern.ch/user/s/ssarikay/work/TRT/reco_trt/data13_hip.00218213.physics_MinBias.merge.RAW/data13_hip.00218213.physics_MinBias.merge.RAW._lb0133._SFO-8._0001.1  outputESDFile=OUT.ESD.pool.root conditionsTag='COMCOND-BLKPA-RUN1-06' --ignoreerrors='ALL' autoConfiguration='everything' preExec='from InDetRecExample.InDetJobProperties import InDetFlags;InDetFlags.doSlimming.set_Value_and_Lock(False);from TrkDetDescrSvc.TrkDetDescrJobProperties import TrkDetFlags; TrkDetFlags.TRT_BuildStrawLayers.set_Value_and_Lock(True);' geometryVersion='ATLAS-GEO-20-00-01' maxEvents='2000' postInclude_r2e='joboptions.py' postExec='from TRT_ConditionsServices.TRT_ConditionsServicesConf import TRT_CalDbSvc; TRTCalibDBSvc=TRT_CalDbSvc(); ServiceMgr += TRTCalibDBSvc; conddb.blockFolder("/TRT/Calib/RT"); conddb.blockFolder("/TRT/Calib/T0"); conddb.blockFolder("/TRT/Calib/errors"); TRTCalibDBSvc.calibTextFile="/afs/cern.ch/user/s/ssarikay/reco_trt//afs/cern.ch/user/s/ssarikay/work/TRT/reco_trt/caliboutput_argon_1st_300615_full.txt"'

output file named:

basic_218213_argon_1stiter_300615.root

Running on grid with default errors:

pathena --trf "Reco_trf.py inputBSFile=%IN tmpESD=%OUT.ESD.pool.root conditionsTag='COMCOND-BLKPA-RUN1-06' --ignoreerrors='ALL' autoConfiguration='everything' preExec='from InDetRecExample.InDetJobProperties import InDetFlags;InDetFlags.doSlimming.set_Value_and_Lock(False);rec.doHIP.set_Value_and_Lock(True);InDetFlags.doLowPt.set_Value_and_Lock(False);InDetFlags.InDet25nsec.set_Value_and_Lock(False);from TrkDetDescrSvc.TrkDetDescrJobProperties import TrkDetFlags; TrkDetFlags.TRT_BuildStrawLayers.set_Value_and_Lock(True);' postExec='from AthenaCommon.AppMgr import ServiceMgr as svcMgr; svcMgr.AthenaPoolCnvSvc.MaxFileSizes=[\"40000000000\"];' geometryVersion='ATLAS-GEO-20-00-01' AMITag='f519' maxEvents='10000' postInclude_r2e='joboptions.py'" --inDS data13_hip.00218213.physics_MinBias.merge.RAW --outDS user.ssarikay.data13_hip.00218213.physics_MinBias.D3PD.30.06.15/ --cmtConfig=x86_64-slc5-gcc43-opt --inputType=RAW --nFilesPerJob=1  --extOutFile=basic.root --extFile=joboptions.py --site=CERN-PROD_SCRATCHDISK

Running the code on the full dataset:

at local:
~/trt/reco/user.dkrasnop.data12_8TeV.00218213.physics_MinBias.D3PD.7.4.15_calibfile_argon_EXT0.24279397

created caliboutput file(moved to lxplus):

caliboutput_argon_1st_300615_full.txt

the output file is sent to grid:

pathena --trf "Reco_trf.py inputBSFile=%IN tmpESD=%OUT.ESD.pool.root conditionsTag='COMCOND-BLKPA-RUN1-06' --ignoreerrors='ALL' autoConfiguration='everything' preExec='from InDetRecExample.InDetJobProperties import InDetFlags;InDetFlags.doSlimming.set_Value_and_Lock(False);rec.doHIP.set_Value_and_Lock(True);InDetFlags.doLowPt.set_Value_and_Lock(False);InDetFlags.InDet25nsec.set_Value_and_Lock(False);from TrkDetDescrSvc.TrkDetDescrJobProperties import TrkDetFlags; TrkDetFlags.TRT_BuildStrawLayers.set_Value_and_Lock(True);' postExec='from AthenaCommon.AppMgr import ServiceMgr as svcMgr; svcMgr.AthenaPoolCnvSvc.MaxFileSizes=[\"40000000000\"]; from TRT_ConditionsServices.TRT_ConditionsServicesConf import TRT_CalDbSvc; TRTCalibDBSvc=TRT_CalDbSvc(); ServiceMgr += TRTCalibDBSvc; conddb.blockFolder(\"/TRT/Calib/RT\"); conddb.blockFolder(\"/TRT/Calib/T0\"); conddb.blockFolder(\"/TRT/Calib/errors\"); TRTCalibDBSvc.calibTextFile=\"caliboutput_argon_1st_300615_full.txt\"' geometryVersion='ATLAS-GEO-20-00-01' AMITag='f519' maxEvents='-1' postInclude_r2e='joboptions.py'" --inDS data13_hip.00218213.physics_MinBias.merge.RAW --outDS user.ssarikay.data13_hip.00218213.physics_MinBias.D3PD.calibfile_1stiter_30.06.15_full2/ --cmtConfig=x86_64-slc5-gcc43-opt --inputType=RAW --nFilesPerJob=1  --extOutFile=basic.root --extFile=caliboutput_argon_1st_300615_full.txt,joboptions.py --site=CERN-PROD_SCRATCHDISK --nFiles=20

19 june

basic_213218_all_straws_local_1st.root

is processed in heplab. output:

basic_213218_all_straws_local_1st_final.root

The pull values seem to be not changing a lot.

4 june

starting from the beginning running the whole procedure for all straws in my local to be sure that the problem is not from selection of argon straws using:

inputBSFile=/afs/cern.ch/user/s/ssarikay/work/TRT/reco_trt/data13_hip.00218213.physics_MinBias.merge.RAW/data13_hip.00218213.physics_MinBias.merge.RAW._lb0133._SFO-8._0001.1
output calib file:
 caliboutput_218213_all_straws_default.txt 
Running on 1000 events: output file created:
basic_213218_all_straws_local.root

Processing basic root file new calib errors are created in:

caliboutput_218213_all_straws_1st.txt

Running first iteration on 1000 events. output file:

basic_213218_all_straws_local_1st.root

Setting up new environment

directory:
/afs/cern.ch/user/s/ssarikay/work/TRT/reco19th
setup:
setupATLAS
asetup 19.1.1.10,64,here
localSetupPandaClient
localSetupDQ2Client --skipConfirm
voms-proxy-init --voms atlas
checking out packages:
cmt co -r TRT_CalibAlgs-00-01-08 InnerDetector/InDetCalibAlgs/TRT_CalibAlgs
cmt co -r TRT_ConditionsAlgs-00-03-09 InnerDetector/InDetConditions/TRT_ConditionsAlgs
cmt co -r TRT_ConditionsServices-01-00-00-06 InnerDetector/InDetConditions/TRT_ConditionsServices
cmt co -r TRT_ElectronPidTools-01-00-19 InnerDetector/InDetRecTools/TRT_ElectronPidTools
cmt co -r TRT_CalibTools-00-01-10 InnerDetector/InDetCalibTools/TRT_CalibTools
change:
InnerDetector/InDetConditions/TRT_ConditionsAlgs/src/TRTCondWrite.cxx
Alex @CPH: sc=m_caldbtool->writeTextFile("caliboutput.txt",1);
Alex @CPH: sc=m_caldbtool->writeTextFile("caliboutput.txt",2);
making them(be careful about the order, use same!):
cd InnerDetector/InDetConditions/TRT_ConditionsServices/cmt && make && cd -
cd InnerDetector/InDetConditions/TRT_ConditionsAlgs/cmt && make && cd -
cd InnerDetector/InDetRecTools/TRT_ElectronPidTools/cmt && make && cd -
cd InnerDetector/InDetCalibTools/TRT_CalibTools/cmt && make && cd -
cd InnerDetector/InDetCalibAlgs/TRT_CalibAlgs/cmt && make && cd -

creating ntuple header file

root -l *
TChain *ch = new TChain("ntuple")
ch->Add("*.root")
ntuple->MakeClass("ntuple.C")

Sending job to grid

[ssarikay@lxplus0086 reco_trt]$ pathena --trf "Reco_trf.py inputBSFile=%IN tmpESD=%OUT.ESD.pool.root conditionsTag='COMCOND-BLKPA-RUN1-06' --ignoreerrors='ALL' autoConfiguration='everything' preExec='from InDetRecExample.InDetJobProperties import InDetFlags;InDetFlags.doSlimming.set_Value_and_Lock(False);rec.doHIP.set_Value_and_Lock(True);InDetFlags.doLowPt.set_Value_and_Lock(False);InDetFlags.InDet25nsec.set_Value_and_Lock(False);from TrkDetDescrSvc.TrkDetDescrJobProperties import TrkDetFlags; TrkDetFlags.TRT_BuildStrawLayers.set_Value_and_Lock(True);' postExec='from AthenaCommon.AppMgr import ServiceMgr as svcMgr; svcMgr.AthenaPoolCnvSvc.MaxFileSizes=[\"40000000000\"];' geometryVersion='ATLAS-GEO-20-00-01' AMITag='f519' maxEvents='-1' postInclude_r2e='joboptions.py'" --inDS data13_hip.00218197.physics_MinBias.merge.RAW --outDS user.ssarikay.data13_hip.00218197.physics_MinBias.D3PD.09.04.15/ --cmtConfig=x86_64-slc5-gcc43-opt --inputType=RAW --nFilesPerJob=1  --extOutFile=basic.root --extFile=joboptions.py --site=CERN-PROD_SCRATCHDISK

pathena --trf "Reco_trf.py inputBSFile=%IN tmpESD=%OUT.ESD.pool.root conditionsTag='COMCOND-BLKPA-RUN1-06' --ignoreerrors='ALL' autoConfiguration='everything' preExec='from InDetRecExample.InDetJobProperties import InDetFlags;InDetFlags.doSlimming.set_Value_and_Lock(False);rec.doHIP.set_Value_and_Lock(True);InDetFlags.doLowPt.set_Value_and_Lock(False);InDetFlags.InDet25nsec.set_Value_and_Lock(False);from TrkDetDescrSvc.TrkDetDescrJobProperties import TrkDetFlags; TrkDetFlags.TRT_BuildStrawLayers.set_Value_and_Lock(True);' postExec='from AthenaCommon.AppMgr import ServiceMgr as svcMgr; svcMgr.AthenaPoolCnvSvc.MaxFileSizes=[\"40000000000\"]; from TRT_ConditionsServices.TRT_ConditionsServicesConf import TRT_CalDbSvc; TRTCalibDBSvc=TRT_CalDbSvc(); ServiceMgr += TRTCalibDBSvc; conddb.blockFolder(\"/TRT/Calib/RT\"); conddb.bloryVersion='ATLAS-GEO-20-00-01' AMITag='f519' maxEvents='1000' postInclude_r2e='joboptions.py'" --inDS data13_hip.00218213.physics_MinBias.merge.RAW --outDS user.ssarikay.data13_hip.00218213.physics_MinBias.D3PD.calibfile_1stiter_30.04.15/ --cmtConfig=x86_64-slc5-gcc43-opt --inputType=RAW --nFilesPerJob=1 --extOutFile=basic.root --extFile=caliboutput_argon_1st_full.txt,joboptions.py --site=CERN-PROD_SCRATCHDISK --nFiles=1

Setting up ATLAS dq2 environment

setupATLAS

localSetupDQ2Client

voms-proxy-init -voms atlas

makeclass commands

root filename.root

.ls -> get tree names

tree_name -> MakeClass("trial")
then you got the c and h file

running macro

root -l
.L trial.C  

variables in basic.root

run             =  Run Number
evt             = Event number  
lbn             = Lumibloc
nvx             =  number of vertices 
trk             =  track number
det             = det id (-2, -1, 1, 2)
lay             =  Layer ID (0-2 for barrel, 0-13 Endcap)
mod             = Module number (0-31)
stl             =  Straw layer ID
stw             = Straw ID
brd             = Board number
chp             = Chip Number
sid             =  ID
r               =  Drift radius
dr              = Drift radius Error
t               = Raw time (due to a bug, you have to correct by event phase )Raw time = t + ephase
rtrack          = track to wire distance
drrtrack        = Track to wire distance error
rtrackunbias    = track to wire distance Unbias
drrtrackunbias  = Track to wire distance error Unbias
ttrack          = time for track to wire distance
ttrackunbias    = time for track to wire distance unbias
t0              =  t0
ephase          = event phase
phi             =  Phi 
theta           = Theta
pt              =  Pt
d0              = Do
ToT             = Time over threshold
HT              = Is high threshold?
ToTCorrection   = Time correction based on ToT
HTCorrection    = Time correction based on HT
So,

Drift time = t + ephase - t0 - ToTCorrection + HTCorrection

Then, for the Unbias Pull:

PullUn = r - rtrackUnbias / sqrt( dr*dr + drrtrackunbias* drrtrackunbias)

Pull bias:

Pull = r - rtrack / sqrt( dr*dr - drrtrack* drrtrack)

This info is filled here:

https://svnweb.cern.ch/trac/atlasoff/browser/InnerDetector/InDetCalibTools/TRT_CalibTools/trunk/src/FillAlignTRTHits.cxx#L384

Argon studies:

>> nHitTrt = 15
>> nHitSct = 8
>> pTMin = 2000 ,
>> fitChi2OnNdfMax = 50. ,
>> z0Max = 300 ,
>> nHitBLayer = 0 ,
>> nHitPix = 0 ,
>> nHitBLayerPlusPix = 0 ,
>> nHitSct = 0 ,
>> nHitSi = 8 ,
>> nHolesPixel = 0,
>> nHitTrt = 1,
>> nHitTrtPlusOutliers =0,
>> nHitTrtHighE =0,
>> nHitTrtPlusOutliersHighE =0,
>> nHitTrtHighEFractionMax =1,
>> nHitTrtHighEFractionWithOutliersMax=1

if ((run==206724) && (lbn<51 || lbn>59))continue;
     if ((run==206725) && (lbn<54 || lbn>76))continue;
     if ((run==203636) && (lbn<55 || lbn>1059))continue;
     if ((run==200805) && (lbn<205 || lbn>401))continue;
     if ((run==216399) && (lbn<325 || lbn>434))continue;
     
     if (!(((det == 1 || det == -1) && lay==0 && mod>27 && mod<32) || (det==-2 && lay==3)) ) continue;
     
     if (fabs(-log(tan(theta/2)))>2) continue;
     if (fabs(d0)>1.5) continue;
     if (pt<2000) continue;

Argon Data Sets

https://twiki.cern.ch/twiki/bin/viewauth/Atlas/TrtCentralD3PD2013pPb

produce file with default errors

Reco_trf.py inputBSFile=/afs/cern.ch/work/d/dkrasnop/makeTRTD3PD/data12_8TeV.00206717.physics_MinBias.merge.RAW/data12_8TeV.00206717.physics_MinBias.merge.RAW._lb0335._SFO-ALL._0001.1  outputESDFile=OUT.ESD.pool.root conditionsTag='COMCOND-BLKPA-RUN1-06' --ignoreerrors='ALL' autoConfiguration='everything' preExec='from InDetRecExample.InDetJobProperties import InDetFlags;InDetFlags.doSlimming.set_Value_and_Lock(False);from TrkDetDescrSvc.TrkDetDescrJobProperties import TrkDetFlags; TrkDetFlags.TRT_BuildStrawLayers.set_Value_and_Lock(True);' geometryVersion='ATLAS-GEO-20-00-01' maxEvents='1'  postExec='from TRT_ConditionsAlgs.TRT_ConditionsAlgsConf import TRTCondWrite; TRTCondWrite= TRTCondWrite( name = "TRTCondWrite"); topSequence+=TRTCondWrite'

to get calibration root file

Reco_trf.py inputBSFile=/afs/cern.ch/user/s/ssarikay/work/TRT/reco_trt/data13_hip.00218213.physics_MinBias.merge.RAW/data13_hip.00218213.physics_MinBias.merge.RAW._lb0133._SFO-8._0001.1 outputESDFile=OUT.ESD.pool.root conditionsTag='COMCOND-BLKPA-RUN1-06' --ignoreerrors='ALL' autoConfiguration='everything' preExec='from InDetRecExample.InDetJobProperties import InDetFlags;InDetFlags.doSlimming.set_Value_and_Lock(False);from TrkDetDescrSvc.TrkDetDescrJobProperties import TrkDetFlags; TrkDetFlags.TRT_BuildStrawLayers.set_Value_and_Lock(True);' geometryVersion='ATLAS-GEO-20-00-01' maxEvents='100000' postInclude_r2e='joboptions.py'

reconstruction with new errors

Reco_trf.py inputBSFile=/afs/cern.ch/user/s/ssarikay/work/TRT/reco_trt/data13_hip.00218213.physics_MinBias.merge.RAW/data13_hip.00218213.physics_MinBias.merge.RAW._lb0133._SFO-8._0001.1 outputESDFile=OUT.ESD.pool.root conditionsTag='COMCOND-BLKPA-RUN1-06' --ignoreerrors='ALL' autoConfiguration='everything' preExec='from InDetRecExample.InDetJobProperties import InDetFlags;InDetFlags.doSlimming.set_Value_and_Lock(False);from TrkDetDescrSvc.TrkDetDescrJobProperties import TrkDetFlags; TrkDetFlags.TRT_BuildStrawLayers.set_Value_and_Lock(True);' geometryVersion='ATLAS-GEO-20-00-01' maxEvents='3000' postInclude_r2e='joboptions.py'; postExec='from TRT_ConditionsServices.TRT_ConditionsServicesConf import TRT_CalDbSvc; TRTCalibDBSvc=TRT_CalDbSvc(); ServiceMgr += TRTCalibDBSvc; conddb.blockFolder("/TRT/Calib/RT"); conddb.blockFolder("/TRT/Calib/T0"); conddb.blockFolder("/TRT/Calib/errors"); TRTCalibDBSvc.calibTextFile="/afs/cern.ch/user/s/ssarikay/reco_trt//afs/cern.ch/user/s/ssarikay/work/TRT/reco_trt/caliboutput.txt"'

Dimitrii's mails:

Tarih: Per, Tem 9, 2015 00:56

Dear Saime

I spent some time today to check hip run and the calibration procedure. Briefly speaking everything worked. Please find more details below:

I took data13_hip.00218213.physics_MinBias.merge.RAW._lb0133._SFO-9._0001.1 file from data13_hip.00218213.physics_MinBias.merge.RAW and generate caliboutput file with default errors

JO Reco_trf.py inputBSFile=/afs/cern.ch/work/d/dkrasnop/makeTRTD3PD/data13_hip.00218213.physics_MinBias.merge.RAW/data13_hip.00218213.physics_MinBias.merge.RAW._lb0133._SFO-9._0001.1 outputESDFile=OUT.ESD.pool.root conditionsTag='COMCOND-BLKPA-RUN1-06' --ignoreerrors='ALL' autoConfiguration='everything' preExec='from InDetJobProperties import InDetFlags;InDetFlags.doSlimming.set_Value_and_Lock(False);from TrkDetDescrJobProperties import TrkDetFlags; TrkDetFlags.TRT_BuildStrawLayers.set_Value_and_Lock(True);' geometryVersion='ATLAS-GEO-20-00-01' maxEvents='1' postExec='from TRT_ConditionsAlgs.TRT_ConditionsAlgsConf import TRTCondWrite; TRTCondWrite= TRTCondWrite( name = "TRTCondWrite"); topSequence+=TRTCondWrite'

Then I had run over 1000 events to get pulls values for the first calibration. JO Reco_trf.py inputBSFile=/afs/cern.ch/work/d/dkrasnop/makeTRTD3PD/data13_hip.00218213.physics_MinBias.merge.RAW/data13_hip.00218213.physics_MinBias.merge.RAW._lb0133._SFO-9._0001.1 outputESDFile=OUT.ESD.pool.root conditionsTag='COMCOND-BLKPA-RUN1-06' --ignoreerrors='ALL' autoConfiguration='everything' preExec='from InDetJobProperties import InDetFlags;InDetFlags.doSlimming.set_Value_and_Lock(False);from TrkDetDescrJobProperties import TrkDetFlags; TrkDetFlags.TRT_BuildStrawLayers.set_Value_and_Lock(True);' geometryVersion='ATLAS-GEO-20-00-01' maxEvents='1000' postInclude_r2e='joboptions.py'

Then I obtain new errors values using the new short code (calib_code.C) in attachment and run over 1000 events again. You can see from the plot for barrel (pulls_vs_drifttime_hip_barrel) that even in these low stat we can see improvements. I am also attaching output log file (RAWtoESD) for the step with the first calibration and input file with corrected errors (caliboutput_2).

JO for the first calibration Reco_trf.py inputBSFile=/afs/cern.ch/work/d/dkrasnop/makeTRTD3PD/data13_hip.00218213.physics_MinBias.merge.RAW/data13_hip.00218213.physics_MinBias.merge.RAW._lb0133._SFO-9._0001.1 outputESDFile=OUT.ESD.pool.root conditionsTag='COMCOND-BLKPA-RUN1-06' --ignoreerrors='ALL' autoConfiguration='everything' preExec='from InDetJobProperties import InDetFlags;InDetFlags.doSlimming.set_Value_and_Lock(False);from TrkDetDescrJobProperties import TrkDetFlags; TrkDetFlags.TRT_BuildStrawLayers.set_Value_and_Lock(True);' geometryVersion='ATLAS-GEO-20-00-01' maxEvents='1000' postInclude_r2e='joboptions.py' postExec='from TRT_ConditionsServices.TRT_ConditionsServicesConf import TRT_CalDbSvc; TRTCalibDBSvc=TRT_CalDbSvc(); ServiceMgr += TRTCalibDBSvc; conddb.blockFolder("/TRT/Calib/RT"); conddb.blockFolder("/TRT/Calib/T0"); conddb.blockFolder("/TRT/Calib/errors"); TRTCalibDBSvc.calibTextFile="/afs/cern.ch/work/d/dkrasnop/makeTRTD3PD/caliboutput_2.txt"'

I would recommend You to follow my instructure and start from the empty dir with new code based on whose I am sending you. Hope it will help you! Please let me know if there will be any questions.

Best Regards, Krasnopevtsev Dimitriy.

Edit | Attach | Watch | Print version | History: r1 | Backlinks | Raw View | WYSIWYG | More topic actions
Topic revision: r1 - 2022-05-17 - SaimeSarikaya
 
    • 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-2024 by the contributing authors. All material on this collaboration platform is the property of the contributing authors.
or Ideas, requests, problems regarding TWiki? use Discourse or Send feedback