From 9466b6c4e44ec8eeefaf4ecb6869bc858f268cd0 Mon Sep 17 00:00:00 2001
From: Salvador Marti <salvador.marti@ific.uv.es>
Date: Fri, 22 May 2020 08:21:02 +0200
Subject: [PATCH] cleaning

---
 .../share/runzmumu_align.py                   | 72 ++-----------------
 1 file changed, 4 insertions(+), 68 deletions(-)

diff --git a/InnerDetector/InDetMonitoring/InDetPerformanceMonitoring/share/runzmumu_align.py b/InnerDetector/InDetMonitoring/InDetPerformanceMonitoring/share/runzmumu_align.py
index 2602fba24b04..4380ad59a801 100644
--- a/InnerDetector/InDetMonitoring/InDetPerformanceMonitoring/share/runzmumu_align.py
+++ b/InnerDetector/InDetMonitoring/InDetPerformanceMonitoring/share/runzmumu_align.py
@@ -6,7 +6,6 @@ import os
 #
 print ' == runzmumu == START == TestArea = ',os.getenv("TestArea")
 print ' == runzmumu == CHECK if the TestArea is setup such that the setup.sh is sourced '
-#theCommand = "source %s/build/x86_64-slc6-gcc62-opt/setup.sh" %(os.getenv("TestArea"))
 theCommand = "source %s/x86_64-slc6-gcc62-opt/setup.sh" %(os.getenv("TestArea"))
 theOutput =  commands.getoutput(theCommand)
 print ' == runzmumu == Rel21 init command: ',theCommand
@@ -22,6 +21,7 @@ try:
     Athena_VERSION = os.getenv("Athena_VERSION")
 except:
     Athena_VERSION = "21.0.69"
+
 ###############################
 # enable outputs
 zmumuval = True
@@ -49,17 +49,11 @@ readPool = False  # default True
 readLocalDynamicDB = False # default False
 AlignYear = 2018
 
-#inputConstants = "step01_ConfigID_2_310634_AlignmentConstants_Iter0_Block00.root"
-#inputConstants = "step02_ConfigID_7_310634_AlignmentConstants_Iter0_Block00.root"
-#inputConstants = "step03_ConfigID_9_310634_AlignmentConstants_Iter0_Block00.root"
-#inputConstants = "step04_ConfigID_0_310634_AlignmentConstants_Iter0_Block00.root"
-#inputConstants = "step05_ConfigID_1_310634_AlignmentConstants_Iter0_Block00.root"
 inputConstants = "step06_ConfigID_2_310634_AlignmentConstants_Iter0_Block00.root"
 if (AlignYear == 2018): 
     inputConstants = "step_17_ConfigID_2_352448_AlignmentConstants_Iter0_Block00.root"
 
 inputdb = "Javi_Test_mycool.db"
-#inputdb = "step8_Iter1_mycool.db"
 
 if (readPool):
     print " readPool = True file: %s" %(inputConstants)
@@ -103,17 +97,11 @@ print ' ========= runzmumu === config == end == '
 #include("InDetSimpleVisual/GetDetectorPositions.py")
 
 if (grid_bool):
-    #PoolInput = ["/eos/user/m/martis/data/InputFileForGridJobs/data16_13TeV.00307935.physics_Main.merge.DAOD_ZMUMU.f741_m1616_f741_m1676._0052.1"]
     PoolInput = ["/eos/user/m/martis/data/InputFileForGridJobs/data18_13TeV.00352436.physics_Main.merge.DAOD_ZMUMU.f938_m1831_f938_m1982._0027.1"]
-    #PoolInput = ["/eos/user/m/martis/data/InputFileForGridJobs/DAOD_HIGG2D1.14773488._000014.pool.root.1"]
 if (MC_bool): 
-    #PoolInput = ["/eos/user/m/martis/data/InputFileForGridJobs/ggH400NW_ZZ4lep_AOD.16564460._000001.pool.root.1"]
-    #PoolInput = ["/eos/user/m/martis/data/InputFileForGridJobs/ZmumuMC16_AOD.18379878._000123.pool.root.1"]
-    #PoolInput = ["/eos/user/m/martis/data/InputFileForGridJobs/mc16_13TeV_361603.PowhegPy8EG_CT10nloME_AZNLOCTEQ6L1_ZZllll_mll4.deriv.DAOD_HIGG2D1_file11.pool.root.1"]
-    #PoolInput = ["/eos/user/m/martis/data/InputFileForGridJobs/mc16_13TeV.361603.PowhegPy8EG_CT10nloME_AZNLOCTEQ6L1_ZZllll_mll4.AOD.file01.pool.root.1"]
     PoolInput =["/eos/user/m/martis/data/mc16_13TeV/folder_mc16_13TeV.361107.PowhegPythia8EvtGen_AZNLOCTEQ6L1_Zmumu.recon.ESD.e3601_s3126_r10201/ESD.13642341._000503.pool.root.1"]
 EvtMax= -1
-EvtMax = 20000 #2000
+EvtMax = 20000 
 SkipEvents = 0
 
 from AthenaCommon.AlgSequence import AlgSequence
@@ -133,10 +121,6 @@ if useGRL:
 # END GRL
 ###############
 
-# DetFlags modifications are best set here (uncomment RecExCommon_flags first)
-#from PerfMonComps.PerfMonFlags import jobproperties as pmjp
-#pmjp.PerfMonFlags.doFastMon=True
-
 from AthenaCommon.AthenaCommonFlags import athenaCommonFlags
 athenaCommonFlags.FilesInput = PoolInput
 athenaCommonFlags.EvtMax = EvtMax
@@ -144,10 +128,9 @@ athenaCommonFlags.SkipEvents = SkipEvents
 
 from AthenaCommon.GlobalFlags import globalflags
 
-myConditionsTag = "auto-configured" #"CONDBR2-BLKPA-2018-10"
+myConditionsTag = "auto-configured"
 if (useConfigConditions):
     if MC_bool: # -> MC
-        #myConditionsTag = "OFLCOND-MC15c-SDR-05" # mc15
         myConditionsTag = "OFLCOND-MC16-SDR-25"
     if not MC_bool: # --> real data 
         myConditionsTag = "CONDBR2-BLKPA-2018-15" # RD
@@ -158,7 +141,7 @@ if (useConfigConditions):
 else: 
     print " == runzmumu == globalflags.ConditionsTag -> use default: ", myConditionsTag 
 
-myDetDescr = "auto-configured" #ATLAS-R2-2015-04-00-00  ATLAS-R2-2016-00-01-00
+myDetDescr = "auto-configured" 
 if (useConfigConditions):
     myDetDescr = "ATLAS-R2-2016-01-00-01"
     print " == runzmumu == globalflags.DetDescrVersion -> manually configured to ", myDetDescr
@@ -192,16 +175,11 @@ rec.doTau.set_Value_and_Lock(False)
 rec.doTrigger.set_Value_and_Lock(DoTrigger)
 rec.doTruth.set_Value_and_Lock(False)
 
-#rec.doMonitoring.set_Value_and_Lock(True)
-#from AthenaMonitoring.DQMonFlags import DQMonFlags
-#DQMonFlags.doInDetPerfMon.set_Value_and_Lock(True)
-
 #use dynamic alignment 
 from InDetRecExample.InDetJobProperties import InDetFlags 
 InDetFlags.useDynamicAlignFolders.set_Value_and_Lock(useIDADynamicFolders)
 
 
-
 from AthenaCommon.AppMgr import ServiceMgr as svcMgr
 
 include("RecExCond/RecExCommon_flags.py")
@@ -215,43 +193,6 @@ print " == runzmumu == user may define his favourite alignment == start == "
 from IOVDbSvc.CondDB import conddb
 if (useIDADynamicFolders):
     print " == runzmumu == in useIDADynamicFolders with AlignYear = ", AlignYear
-    if (False):
-        print (" == runzmumu == configuring 2018 ReAlign family ") 
-        conddb.addOverride("/Indet/AlignL1/ID" ,"IndetAlignL1ID-R2dynamic_2018_ReAlign_Initial")
-        conddb.addOverride("/Indet/AlignL2/PIX" ,"IndetAlignL2PIX-R2dynamic_2018_ReAlign_Initial")
-        conddb.addOverride("/Indet/AlignL2/SCT" ,"IndetAlignL2SCT-R2dynamic_2018_ReAlign_Initial")
-        conddb.addOverride("/Indet/AlignL3" ,"IndetAlignL3-R2dynamic_2018_ReAlign_Initial")
-        conddb.addOverride("/Indet/IBLDist", "IndetAlignL3-R2dynamic_2018_ReAlign_Initial")
-        conddb.addOverride("/TRT/AlignL1/TRT", "TRTAlignL1-R2dynamic_2018_ReAlign_Initial")
-        conddb.addOverride("/TRT/AlignL2", "TRTAlignL2-R2dynamic_2018_ReAlign_Initial")
-    if (False):
-        if readPool :
-            conddb.blockFolder("/Indet/AlignL3")
-            conddb.blockFolder("/TRT/AlignL2")
-        if readLocalDynamicDB :
-            conddb.blockFolder("/Indet/AlignL1/ID")
-            conddb.blockFolder("/Indet/AlignL2/PIX")
-            conddb.blockFolder("/Indet/AlignL2/SCT")
-            conddb.blockFolder("/TRT/AlignL1/TRT")
-            conddb.blockFolder("/Indet/IBLDist")
-
-            conddb.addFolderWithTag('','<dbConnection>sqlite://X;schema='+inputdb+';dbname=CONDBR2</dbConnection>/Indet/AlignL1/ID','IndetL1Test',True);
-            conddb.addFolderWithTag('','<dbConnection>sqlite://X;schema='+inputdb+';dbname=CONDBR2</dbConnection>/Indet/AlignL2/PIX','IndetL2PIXTest',True);
-            conddb.addFolderWithTag('','<dbConnection>sqlite://X;schema='+inputdb+';dbname=CONDBR2</dbConnection>/Indet/AlignL2/SCT','IndetL2SCTTest',True);
-            conddb.addFolderWithTag('','<dbConnection>sqlite://X;schema='+inputdb+';dbname=CONDBR2</dbConnection>/TRT/AlignL1/TRT','IndetL1TRTTest',True);
-            conddb.addFolderWithTag('','<dbConnection>sqlite://X;schema='+inputdb+';dbname=CONDBR2</dbConnection>/Indet/IBLDist','IndetIBLDist',True); 
-
-    if (False): # --> ReAlign 2018 default True
-        print (" == runzmumu == tags + SiL3 + TRTL2.... ") 
-        conddb.addOverride("/Indet/AlignL1/ID",  "IndetAlignL1ID-R2dynamic_2018_ReAlign_Initial")
-        conddb.addOverride("/Indet/AlignL2/PIX", "IndetAlignL2PIX-R2dynamic_2018_ReAlign_Initial")
-        conddb.addOverride("/Indet/AlignL2/SCT", "IndetAlignL2SCT-R2dynamic_2018_ReAlign_Initial")
-        conddb.addOverride("/Indet/IBLDist",     "IndetIBLDist-R2dynamic_2018_ReAlign_Initial")
-        conddb.addOverride("/TRT/AlignL1/TRT",   "TRTAlignL1-R2dynamic_2018_ReAlign_Initial")
-        if readPool :
-            conddb.blockFolder("/Indet/AlignL3")
-            conddb.blockFolder("/TRT/AlignL2")
-
     if (AlignYear == 2018): # --> ReAlign 2018 default True
         print (" == runzmumu == 2018 part 1 -- initial tags + SiL3 + TRTL2.... ") 
         conddb.addOverride("/Indet/AlignL1/ID",  "IndetAlignL1ID-R2dynamic_2018_Part1_ReAlign_Initial")
@@ -280,9 +221,6 @@ if (useIDADynamicFolders):
             conddb.blockFolder("/Indet/AlignL3")
             conddb.blockFolder("/TRT/AlignL2")
         else:
-            #print (" == runzmumu == 2016 part 1 -- using silicon L3 tag: IndetAlignL3_2016_ReAlign_April2020_Initial"
-            #conddb.addOverride("/Indet/AlignL3", "IndetAlignL3_2016_ReAlign_April2020_Initial")
-            #conddb.addOverride("/TRT/AlignL2",   "TRTAlignL2_2016_ReAlign_April2020_Initial")
             print (" == runzmumu == 2016 part 1 -- using silicon L3 tag: Repro-Rel21-UPD3-00")
             conddb.addOverride("/Indet/AlignL3", "IndetAlignL3-Repro-Rel21-UPD3-00")
             conddb.addOverride("/TRT/AlignL2",   "TRTAlignL2-Repro-Rel21-UPD3-00")
@@ -443,11 +381,9 @@ if (monitoringAllTracks):
 if (zmumuval and globalAlignmentMon):
     trackCollections = ["SelectedMuonsRefit1", "SelectedMuonsRefit2", "Tracks"]
     if (monitoringAllTracks): trackCollections.append("CombinedInDetTracks")
-#   trackCollections = ["SelectedMuonsDefault"]
     StoreGateSvc = Service("StoreGateSvc")
     StoreGateSvc.Dump = False # True in case of debug ** WARNING ** very large output
     include("InDetPerformanceMonitoring/TrackMonitoring.py")
-    #include("TrackMonitoring.py")
 
 ### try ID alignment
 ##-------- Load Alignment --------------------
-- 
GitLab