diff --git a/InnerDetector/InDetMonitoring/InDetAlignmentMonitoring/src/IDAlignMonResiduals.cxx b/InnerDetector/InDetMonitoring/InDetAlignmentMonitoring/src/IDAlignMonResiduals.cxx index dd369144069726befcb65534fd260cbaa46343e4..da5e1a8afb64cfc2ebefdeb5410d654103257106 100755 --- a/InnerDetector/InDetMonitoring/InDetAlignmentMonitoring/src/IDAlignMonResiduals.cxx +++ b/InnerDetector/InDetMonitoring/InDetAlignmentMonitoring/src/IDAlignMonResiduals.cxx @@ -1119,7 +1119,7 @@ StatusCode IDAlignMonResiduals::fillHistograms() SG::ReadHandle<TrackCollection> inputTracks{m_tracksName}; if (not inputTracks.isValid()) { - ATH_MSG_WARNING ("IDAlignMonResiduals::fillHistograms ** " << m_tracksName.key() << " could not be retrieved"); + ATH_MSG_DEBUG ("IDAlignMonResiduals::fillHistograms ** " << m_tracksName.key() << " could not be retrieved"); return StatusCode::RECOVERABLE; } diff --git a/InnerDetector/InDetMonitoring/InDetPerformanceMonitoring/share/runzmumu_test.py b/InnerDetector/InDetMonitoring/InDetPerformanceMonitoring/share/runzmumu_test.py index c95756ccb493bc545222cc030c1e9c0f23028524..be70e4fac9a76c836eb7ff2c7a9723154f7272b4 100644 --- a/InnerDetector/InDetMonitoring/InDetPerformanceMonitoring/share/runzmumu_test.py +++ b/InnerDetector/InDetMonitoring/InDetPerformanceMonitoring/share/runzmumu_test.py @@ -30,15 +30,14 @@ fillIDAmonitoring = True runAlignment = False 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/data18_13TeV.00352448.physics_Main.merge.DRAW_ZMUMU.f938_m1831._0568.1"] if (MC_bool): PoolInput = ["/eos/user/m/martis/data/InputFileForGridJobs/ZmumuMC16_AOD.18379878._000123.pool.root.1"] - #PoolInput = ["/eos/user/m/martis/data/InputFileForGridJobs/mc16_13TeV.424108.Pythia8B_A14_CTEQ6L1_Jpsimu6.recon.AOD.e5441_s3126_r10724_file_AOD.15269147._001234.pool.root.1"] - #PoolInput = ["/eos/user/m/martis/data/InputFileForGridJobs/mc16_13TeV.424108.Pythia8B_A14_CTEQ6L1_Jpsimu6.recon.AOD.e5441_e5984_s3126_r12295_tid23570654_00_file004040.pool.root.1"] - #PoolInput = ["/eos/user/j/jajimene/JPsi_samples/MC16a/AOD.23570656._000001.pool.root.1", "/eos/user/j/jajimene/JPsi_samples/MC16a/AOD.23570656._000002.pool.root.1", "/eos/user/j/jajimene/JPsi_samples/MC16a/AOD.23570656._000003.pool.root.1", "/eos/user/j/jajimene/JPsi_samples/MC16a/AOD.23570656._000004.pool.root.1", "/eos/user/j/jajimene/JPsi_samples/MC16a/AOD.23570656._000005.pool.root.1", "/eos/user/j/jajimene/JPsi_samples/MC16a/AOD.23570656._000006.pool.root.1", "/eos/user/j/jajimene/JPsi_samples/MC16a/AOD.23570656._000007.pool.root.1", "/eos/user/j/jajimene/JPsi_samples/MC16a/AOD.23570656._000008.pool.root.1"] conditionsTag = "default" #conditionsTag = "CONDBR2-BLKPA-2018-14" +#conditionsTag = "CONDBR2-BLKPA-RUN2-03" ########################################################### print (' ========= runzmumu === config == start == ') @@ -105,13 +104,11 @@ print ('\n == runzmumu == final list == ConfigFlags.Input.Files = ',ConfigFlags. print ('\n == runzmumu == final list == jobproperties.AthenaCommonFlags.FilesInput = ',jobproperties.AthenaCommonFlags.FilesInput) # -# use the athen logger +# use the athena logger from AthenaCommon.Logging import logging msg = logging.getLogger('RunZmumu') msg.info('\n == Input list of files: {0}'.format(PoolInput)) -# - ########################### # user given conditions tag if ("default" not in conditionsTag): @@ -119,6 +116,14 @@ if ("default" not in conditionsTag): globalflags.ConditionsTag.set_Value_and_Lock(conditionsTag) globalflags.DetDescrVersion.set_Value_and_Lock("ATLAS-R2-2016-01-00-01") +########################## +# athena recognizes if input file is data or mc. +# However from 22.0.30 when using data and trying to change alignment tags as soon as one tries: +# from IOVDbSvc.CondDB import conddb +# then athena thinks input is MC --> fix the data type +if not MC_bool: + globalflags.DataSource.set_Value_and_Lock("data") + # from GeoModelSvc.GeoModelSvcConf import GeoModelSvc GeoModelSvc = GeoModelSvc() @@ -157,6 +162,7 @@ if ('21.' in os.getenv("Athena_VERSION") ): print (' == runzmumu == including InDetRecExample/InDetRecConditionsAccess.py') include("InDetRecExample/InDetRecConditionsAccess.py") +########################## # user given alignment constants set if ("NONE" not in inputConstantsFile or userAlignTags): inputCollections = [] @@ -164,54 +170,36 @@ if ("NONE" not in inputConstantsFile or userAlignTags): print (' == runzmumu == setting user inputConstantsFile in == %s' %inputConstantsFile) inputCollections = [inputConstantsFile] + print (' == runzmumu == going to: from IOVDbSvc.CondDB import conddb') from IOVDbSvc.CondDB import conddb - # for debugging - from TRT_ConditionsServices.TRT_ConditionsServicesConf import TRT_AlignDbSvc - TRT_AlignDbSvc.forceUserDBConfig = True - TRT_AlignDbSvc.OutputLevel = VERBOSE - ServiceMgr += TRT_AlignDbSvc() - print (' == runzmumu == TRT_AlignDBSvc ==') - print (TRT_AlignDbSvc) - - if (MC_bool): - print (' == runzmumu == use this set of alignment constants on MC') - #globalflags.ConditionsTag.set_Value_and_Lock("OFLCOND-MC16-SDR-25") - #globalflags.DetDescrVersion.set_Value_and_Lock("ATLAS-R2-2016-01-00-01") - #conddb.blockFolder("/Indet/Align") - #conddb.blockFolder("/TRT/Align") - #conddb.addFolderWithTag('','<dbConnection>sqlite://X;schema='+inputConstantsFile+';dbname=CONDBR2</dbConnection>/Indet/AlignL3','IndetAlign_test',force=True,className="AlignableTransformContainer"); - conddb.blockFolder("/Indet/Align") - conddb.addFolder("INDET","<dbConnection>sqlite://X;schema="+inputConstantsFile+";dbname=OFLP200</dbConnection>",force=True,className="AlignableTransformContainer") - else: - print (' == runzmumu == use this set of alignment constants on RD') - if (userAlignTags): - print (' == runzmumu == setting userAlignTags == ') - if (False): - 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", "IndetIBLDist-R2dynamic_2018_ReAlign_Initial") - conddb.addOverride("/TRT/AlignL1/TRT", "TRTAlignL1-R2dynamic_2018_ReAlign_Initial") - conddb.addOverride("/TRT/AlignL2", "TRTAlignL2-R2dynamic_2018_ReAlign_Initial") - if (True): - conddb.addOverride("/Indet/AlignL1/ID", "IndetAlignL1ID_Run2_Legacy_looser") - conddb.addOverride("/Indet/AlignL2/PIX", "IndetAlignL2PIX_Run2_Legacy_looser") - conddb.addOverride("/Indet/AlignL2/SCT", "IndetAlignL2SCT_Run2_Legacy_looser") - conddb.addOverride("/Indet/AlignL3", "IndetAlignL3_Run2_Legacy_looser") - conddb.addOverride("/Indet/IBLDist", "IndetIBLDist_Run2_Legacy_looser") - conddb.addOverride("/TRT/AlignL1/TRT", "TRTAlignL1_Run2_Legacy_looser") - conddb.addOverride("/TRT/AlignL2", "TRTAlignL2_Run2_Legacy_looser") - if ("NONE" not in inputConstantsFile): - print (' == runzmumu == setting user constants file == %s' %inputConstantsFile) - conddb.blockFolder("/Indet/AlignL1/ID") - conddb.blockFolder("/TRT/AlignL1/TRT") - conddb.addFolder('INDET','/Indet/AlignL1/ID'+'<dbConnection>sqlite://X;schema='+inputConstantsFile+';dbname=CONDBR2</dbConnection><tag>IndetAlignTest</tag>',force=True,className="CondAttrListCollection") - conddb.addFolder('INDET','/TRT/AlignL1/TRT'+'<dbConnection>sqlite://X;schema='+inputConstantsFile+';dbname=CONDBR2</dbConnection><tag>IndetAlignTest</tag>',force=True,className="CondAttrListCollection") - #conddb.blockFolder("/Indet/AlignL3") - #conddb.blockFolder("/TRT/AlignL2") - #conddb.addFolder('INDET','/Indet/AlignL3'+'<dbConnection>sqlite://X;schema='+inputConstantsFile+';dbname=CONDBR2</dbConnection><tag>IndetL3Test</tag>',force=True,className="CondAttrListCollection") + print (' == runzmumu == use this set of alignment constants on RD') + if (userAlignTags): + if (True): + print (' == runzmumu == setting userAlignTags == 2018_ReAlign_Initial ') + 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", "IndetIBLDist-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): + print (' == runzmumu == setting userAlignTags == Run2_Legacy_looser') + conddb.addOverride("/Indet/AlignL1/ID", "IndetAlignL1ID_Run2_Legacy_looser") + conddb.addOverride("/Indet/AlignL2/PIX", "IndetAlignL2PIX_Run2_Legacy_looser") + conddb.addOverride("/Indet/AlignL2/SCT", "IndetAlignL2SCT_Run2_Legacy_looser") + conddb.addOverride("/Indet/AlignL3", "IndetAlignL3_Run2_Legacy_looser") + conddb.addOverride("/Indet/IBLDist", "IndetIBLDist_Run2_Legacy_looser") + conddb.addOverride("/TRT/AlignL1/TRT", "TRTAlignL1_Run2_Legacy_looser") + conddb.addOverride("/TRT/AlignL2", "TRTAlignL2_Run2_Legacy_looser") + + if ("NONE" not in inputConstantsFile): + print (' == runzmumu == setting user constants file == %s' %inputConstantsFile) + conddb.blockFolder("/Indet/AlignL1/ID") + conddb.blockFolder("/TRT/AlignL1/TRT") + conddb.addFolder('INDET','/Indet/AlignL1/ID'+'<dbConnection>sqlite://X;schema='+inputConstantsFile+';dbname=CONDBR2</dbConnection><tag>IndetAlignTest</tag>',force=True,className="CondAttrListCollection") + conddb.addFolder('INDET','/TRT/AlignL1/TRT'+'<dbConnection>sqlite://X;schema='+inputConstantsFile+';dbname=CONDBR2</dbConnection><tag>IndetAlignTest</tag>',force=True,className="CondAttrListCollection") from EventSelectorAthenaPool.EventSelectorAthenaPoolConf import CondProxyProvider ServiceMgr += CondProxyProvider() @@ -220,16 +208,33 @@ if ("NONE" not in inputConstantsFile or userAlignTags): # set this to the file containing AlignableTransform objects if len(inputCollections) > 0: ServiceMgr.CondProxyProvider.InputCollections += inputCollections - ServiceMgr.CondProxyProvider.OutputLevel=INFO + ServiceMgr.CondProxyProvider.OutputLevel=INFO print (ServiceMgr.CondProxyProvider) # this preload causes callbacks for read in objects to be activated, # allowing GeoModel to pick up the transforms ServiceMgr.IOVSvc.preLoadData=True ServiceMgr.IOVSvc.OutputLevel=INFO + + print (' == runzmumu == condproxyprovider already set') + + if ("NONE" not in inputConstantsFile): + print (' == runzmumu == setting user constants: inputConstantsFile= %s - completed -' % inputConstantsFile) + if (userAlignTags): + print (' == runzmumu == setting user align tags ') + + # report + print (svcMgr.IOVDbSvc) + print (svcMgr.IOVSvc) - print (' == runzmumu == setting user constants: inputConstantsFile= %s - completed -' % inputConstantsFile) else: - print (' == runzmumu == setting user constants: NO') + print (' == runzmumu == setting user alignment constants or tags: NO user input') + +''' +if not MC_bool: + print (' == runzmumu == setting TRT Status HT (rel22) == ') + from IOVDbSvc.CondDB import conddb + conddb.addFolderSplitOnline("TRT","/TRT/Onl/Cond/StatusHT","/TRT/Cond/StatusHT",className='TRTCond::StrawStatusMultChanContainer') +''' # main jobOptions include("RecExCommon/RecExCommon_topOptions.py") @@ -237,8 +242,6 @@ include("RecExCommon/RecExCommon_topOptions.py") from PerfMonComps.PerfMonFlags import jobproperties jobproperties.PerfMonFlags.doMonitoring = False -# report -#print (svcMgr.IOVDbSvc) # # Track Selection Tool