diff --git a/Alignment/OfflineValidation/python/TkAlAllInOneTool/alignment.py b/Alignment/OfflineValidation/python/TkAlAllInOneTool/alignment.py index 309990df329f7..c9c61ddc8aeec 100644 --- a/Alignment/OfflineValidation/python/TkAlAllInOneTool/alignment.py +++ b/Alignment/OfflineValidation/python/TkAlAllInOneTool/alignment.py @@ -8,8 +8,9 @@ def __init__(self, name, config, runGeomComp = "1"): self.condShorts = { "TrackerAlignmentErrorExtendedRcd": {"zeroAPE":{"connectString": ("frontier://FrontierProd" - "/CMS_COND_31X_FROM21X"), - "tagName": "TrackerIdealGeometryErrors210_mc", + "/CMS_CONDITIONS"), + "tagName": "TrackerAlignmentExtendedErr_2009_v2_express_IOVs", + "labelName": ""}}} section = "alignment:%s"%name if not config.has_section( section ): diff --git a/Alignment/OfflineValidation/python/TkAlAllInOneTool/configTemplates.py b/Alignment/OfflineValidation/python/TkAlAllInOneTool/configTemplates.py index 60c22ae718d94..f7017ebcd9874 100644 --- a/Alignment/OfflineValidation/python/TkAlAllInOneTool/configTemplates.py +++ b/Alignment/OfflineValidation/python/TkAlAllInOneTool/configTemplates.py @@ -44,7 +44,7 @@ cd .oO[CMSSW_BASE]Oo./src export SCRAM_ARCH=.oO[SCRAM_ARCH]Oo. eval `scramv1 ru -sh` -rfmkdir -p .oO[datadir]Oo. &>! /dev/null +#rfmkdir -p .oO[datadir]Oo. &>! /dev/null #remove possible result file from previous runs previous_results=$(cmsLs -l /store/caf/user/$USER/.oO[eosdir]Oo. | awk '{print $5}') diff --git a/Alignment/OfflineValidation/python/TkAlAllInOneTool/genericValidation.py b/Alignment/OfflineValidation/python/TkAlAllInOneTool/genericValidation.py index 539d5b3eca8fb..3ae906c59dfa9 100644 --- a/Alignment/OfflineValidation/python/TkAlAllInOneTool/genericValidation.py +++ b/Alignment/OfflineValidation/python/TkAlAllInOneTool/genericValidation.py @@ -98,6 +98,7 @@ def getRepMap(self, alignment = None): "CMSSW_RELEASE_BASE": self.cmsswreleasebase, "alignmentName": alignment.name, "condLoad": alignment.getConditions(), + "condLoad": alignment.getConditions(), }) return result diff --git a/Alignment/OfflineValidation/python/TkAlAllInOneTool/geometryComparison.py b/Alignment/OfflineValidation/python/TkAlAllInOneTool/geometryComparison.py index c2ec796e287a2..3aeec4c2c8c60 100644 --- a/Alignment/OfflineValidation/python/TkAlAllInOneTool/geometryComparison.py +++ b/Alignment/OfflineValidation/python/TkAlAllInOneTool/geometryComparison.py @@ -97,7 +97,7 @@ def createConfiguration(self, path ): cfgs[cfgName] = configTemplates.compareTemplate repMaps[cfgName] = repMap - cfgSchedule.append( cfgName ) + cfgSchedule.append( cfgName ) GenericValidation.createConfiguration(self, cfgs, path, cfgSchedule, repMaps = repMaps) def createScript(self, path): @@ -107,6 +107,8 @@ def createScript(self, path): %self.name), repMap) for name in self.__compares: if '"DetUnit"' in self.__compares[name][0].split(","): + repMap["outputFile"] = (".oO[name]Oo..Comparison_common"+name+".root") + repMap["nIndex"] = ("") repMap["runComparisonScripts"] += \ ("rfcp .oO[CMSSW_BASE]Oo./src/Alignment/OfflineValidation" "/scripts/comparisonScript.C .\n" @@ -118,37 +120,205 @@ def createScript(self, path): ".oO[name]Oo..Comparison_common"+name+".root\",\"" "./\")'\n") if self.copyImages: + #~ repMap["runComparisonScripts"] += \ + #~ ("rfmkdir -p .oO[datadir]Oo./.oO[name]Oo." + #~ ".Comparison_common"+name+"_Images\n") + #~ repMap["runComparisonScripts"] += \ + #~ ("find . -maxdepth 1 -name \"*PXB*\" " + #~ "-print | xargs -I {} bash -c \"rfcp {} .oO[datadir]Oo." + #~ "/.oO[name]Oo..Comparison_common"+name+"_Images/\" \n") + #~ repMap["runComparisonScripts"] += \ + #~ ("find . -maxdepth 1 -name \"*PXF*\" " + #~ "-print | xargs -I {} bash -c \"rfcp {} .oO[datadir]Oo." + #~ "/.oO[name]Oo..Comparison_common"+name+"_Images/\" \n") + #~ repMap["runComparisonScripts"] += \ + #~ ("find . -maxdepth 1 -name \"*TIB*\" " + #~ "-print | xargs -I {} bash -c \"rfcp {} .oO[datadir]Oo." + #~ "/.oO[name]Oo..Comparison_common"+name+"_Images/\" \n") + #~ repMap["runComparisonScripts"] += \ + #~ ("find . -maxdepth 1 -name \"*TID*\" " + #~ "-print | xargs -I {} bash -c \"rfcp {} .oO[datadir]Oo." + #~ "/.oO[name]Oo..Comparison_common"+name+"_Images/\" \n") + #~ repMap["runComparisonScripts"] += \ + #~ ("find . -maxdepth 1 -name \"*TEC*\" " + #~ "-print | xargs -I {} bash -c \"rfcp {} .oO[datadir]Oo." + #~ "/.oO[name]Oo..Comparison_common"+name+"_Images/\" \n") + #~ repMap["runComparisonScripts"] += \ + #~ ("find . -maxdepth 1 -name \"*TOB*\" " + #~ "-print | xargs -I {} bash -c \"rfcp {} .oO[datadir]Oo." + #~ "/.oO[name]Oo..Comparison_common"+name+"_Images/\" \n") + #~ repMap["runComparisonScripts"] += \ + #~ ("find . -maxdepth 1 -name \"*tracker*\" " + #~ "-print | xargs -I {} bash -c \"rfcp {} .oO[datadir]Oo." + #~ "/.oO[name]Oo..Comparison_common"+name+"_Images/\" \n") repMap["runComparisonScripts"] += \ ("rfmkdir -p .oO[datadir]Oo./.oO[name]Oo." ".Comparison_common"+name+"_Images\n") repMap["runComparisonScripts"] += \ - ("find . -maxdepth 1 -name \"*PXB*\" " + ("rfmkdir -p .oO[datadir]Oo./.oO[name]Oo." + ".Comparison_common"+name+"_Images/Translations\n") + repMap["runComparisonScripts"] += \ + ("rfmkdir -p .oO[datadir]Oo./.oO[name]Oo." + ".Comparison_common"+name+"_Images/Rotations\n") + repMap["runComparisonScripts"] += \ + ("rfmkdir -p .oO[datadir]Oo./.oO[name]Oo." + ".Comparison_common"+name+"_Images/CrossTalk\n") + repMap["runComparisonScripts"] += \ + ("find . -maxdepth 1 -name \"*phi_vs_dr*\" " + "-print | xargs -I {} bash -c \"rfcp {} .oO[datadir]Oo." + "/.oO[name]Oo..Comparison_common"+name+"_Images/Translations/\" \n") + repMap["runComparisonScripts"] += \ + ("find . -maxdepth 1 -name \"*phi_vs_dx*\" " + "-print | xargs -I {} bash -c \"rfcp {} .oO[datadir]Oo." + "/.oO[name]Oo..Comparison_common"+name+"_Images/Translations/\" \n") + repMap["runComparisonScripts"] += \ + ("find . -maxdepth 1 -name \"*phi_vs_dy*\" " + "-print | xargs -I {} bash -c \"rfcp {} .oO[datadir]Oo." + "/.oO[name]Oo..Comparison_common"+name+"_Images/Translations/\" \n") + repMap["runComparisonScripts"] += \ + ("find . -maxdepth 1 -name \"*phi_vs_dz*\" " + "-print | xargs -I {} bash -c \"rfcp {} .oO[datadir]Oo." + "/.oO[name]Oo..Comparison_common"+name+"_Images/Translations/\" \n") + repMap["runComparisonScripts"] += \ + ("find . -maxdepth 1 -name \"*phi_vs_rdphi*\" " + "-print | xargs -I {} bash -c \"rfcp {} .oO[datadir]Oo." + "/.oO[name]Oo..Comparison_common"+name+"_Images/Translations/\" \n") + repMap["runComparisonScripts"] += \ + ("find . -maxdepth 1 -name \"*r_vs_dr*\" " + "-print | xargs -I {} bash -c \"rfcp {} .oO[datadir]Oo." + "/.oO[name]Oo..Comparison_common"+name+"_Images/Translations/\" \n") + repMap["runComparisonScripts"] += \ + ("find . -maxdepth 1 -name \"*r_vs_dx*\" " + "-print | xargs -I {} bash -c \"rfcp {} .oO[datadir]Oo." + "/.oO[name]Oo..Comparison_common"+name+"_Images/Translations/\" \n") + repMap["runComparisonScripts"] += \ + ("find . -maxdepth 1 -name \"*r_vs_dy*\" " + "-print | xargs -I {} bash -c \"rfcp {} .oO[datadir]Oo." + "/.oO[name]Oo..Comparison_common"+name+"_Images/Translations/\" \n") + repMap["runComparisonScripts"] += \ + ("find . -maxdepth 1 -name \"*r_vs_dz*\" " + "-print | xargs -I {} bash -c \"rfcp {} .oO[datadir]Oo." + "/.oO[name]Oo..Comparison_common"+name+"_Images/Translations/\" \n") + repMap["runComparisonScripts"] += \ + ("find . -maxdepth 1 -name \"*r_vs_rdphi*\" " + "-print | xargs -I {} bash -c \"rfcp {} .oO[datadir]Oo." + "/.oO[name]Oo..Comparison_common"+name+"_Images/Translations/\" \n") + repMap["runComparisonScripts"] += \ + ("find . -maxdepth 1 -name \"*z_vs_dr*\" " + "-print | xargs -I {} bash -c \"rfcp {} .oO[datadir]Oo." + "/.oO[name]Oo..Comparison_common"+name+"_Images/Translations/\" \n") + repMap["runComparisonScripts"] += \ + ("find . -maxdepth 1 -name \"*z_vs_dx*\" " + "-print | xargs -I {} bash -c \"rfcp {} .oO[datadir]Oo." + "/.oO[name]Oo..Comparison_common"+name+"_Images/Translations/\" \n") + repMap["runComparisonScripts"] += \ + ("find . -maxdepth 1 -name \"*z_vs_dy*\" " + "-print | xargs -I {} bash -c \"rfcp {} .oO[datadir]Oo." + "/.oO[name]Oo..Comparison_common"+name+"_Images/Translations/\" \n") + repMap["runComparisonScripts"] += \ + ("find . -maxdepth 1 -name \"*z_vs_dz*\" " + "-print | xargs -I {} bash -c \"rfcp {} .oO[datadir]Oo." + "/.oO[name]Oo..Comparison_common"+name+"_Images/Translations/\" \n") + repMap["runComparisonScripts"] += \ + ("find . -maxdepth 1 -name \"*z_vs_rdphi*\" " + "-print | xargs -I {} bash -c \"rfcp {} .oO[datadir]Oo." + "/.oO[name]Oo..Comparison_common"+name+"_Images/Translations/\" \n") + repMap["runComparisonScripts"] += \ + ("find . -maxdepth 1 -name \"*alpha_vs_dalpha*\" " + "-print | xargs -I {} bash -c \"rfcp {} .oO[datadir]Oo." + "/.oO[name]Oo..Comparison_common"+name+"_Images/Rotations/\" \n") + repMap["runComparisonScripts"] += \ + ("find . -maxdepth 1 -name \"*alpha_vs_dbeta*\" " + "-print | xargs -I {} bash -c \"rfcp {} .oO[datadir]Oo." + "/.oO[name]Oo..Comparison_common"+name+"_Images/Rotations/\" \n") + repMap["runComparisonScripts"] += \ + ("find . -maxdepth 1 -name \"*alpha_vs_dgamma*\" " + "-print | xargs -I {} bash -c \"rfcp {} .oO[datadir]Oo." + "/.oO[name]Oo..Comparison_common"+name+"_Images/Rotations/\" \n") + repMap["runComparisonScripts"] += \ + ("find . -maxdepth 1 -name \"*beta_vs_dalpha*\" " + "-print | xargs -I {} bash -c \"rfcp {} .oO[datadir]Oo." + "/.oO[name]Oo..Comparison_common"+name+"_Images/Rotations/\" \n") + repMap["runComparisonScripts"] += \ + ("find . -maxdepth 1 -name \"*beta_vs_dbeta*\" " + "-print | xargs -I {} bash -c \"rfcp {} .oO[datadir]Oo." + "/.oO[name]Oo..Comparison_common"+name+"_Images/Rotations/\" \n") + repMap["runComparisonScripts"] += \ + ("find . -maxdepth 1 -name \"*beta_vs_dgamma*\" " + "-print | xargs -I {} bash -c \"rfcp {} .oO[datadir]Oo." + "/.oO[name]Oo..Comparison_common"+name+"_Images/Rotations/\" \n") + repMap["runComparisonScripts"] += \ + ("find . -maxdepth 1 -name \"*gamma_vs_dalpha*\" " + "-print | xargs -I {} bash -c \"rfcp {} .oO[datadir]Oo." + "/.oO[name]Oo..Comparison_common"+name+"_Images/Rotations/\" \n") + repMap["runComparisonScripts"] += \ + ("find . -maxdepth 1 -name \"*gamma_vs_dbeta*\" " + "-print | xargs -I {} bash -c \"rfcp {} .oO[datadir]Oo." + "/.oO[name]Oo..Comparison_common"+name+"_Images/Rotations/\" \n") + repMap["runComparisonScripts"] += \ + ("find . -maxdepth 1 -name \"*gamma_vs_dgamma*\" " + "-print | xargs -I {} bash -c \"rfcp {} .oO[datadir]Oo." + "/.oO[name]Oo..Comparison_common"+name+"_Images/Rotations/\" \n") + repMap["runComparisonScripts"] += \ + ("find . -maxdepth 1 -name \"*dr_vs_dalpha*\" " + "-print | xargs -I {} bash -c \"rfcp {} .oO[datadir]Oo." + "/.oO[name]Oo..Comparison_common"+name+"_Images/CrossTalk/\" \n") + repMap["runComparisonScripts"] += \ + ("find . -maxdepth 1 -name \"*dr_vs_dbeta*\" " + "-print | xargs -I {} bash -c \"rfcp {} .oO[datadir]Oo." + "/.oO[name]Oo..Comparison_common"+name+"_Images/CrossTalk/\" \n") + repMap["runComparisonScripts"] += \ + ("find . -maxdepth 1 -name \"*dr_vs_dgamma*\" " + "-print | xargs -I {} bash -c \"rfcp {} .oO[datadir]Oo." + "/.oO[name]Oo..Comparison_common"+name+"_Images/CrossTalk/\" \n") + repMap["runComparisonScripts"] += \ + ("find . -maxdepth 1 -name \"*dx_vs_dalpha*\" " + "-print | xargs -I {} bash -c \"rfcp {} .oO[datadir]Oo." + "/.oO[name]Oo..Comparison_common"+name+"_Images/CrossTalk/\" \n") + repMap["runComparisonScripts"] += \ + ("find . -maxdepth 1 -name \"*dx_vs_dbeta*\" " + "-print | xargs -I {} bash -c \"rfcp {} .oO[datadir]Oo." + "/.oO[name]Oo..Comparison_common"+name+"_Images/CrossTalk/\" \n") + repMap["runComparisonScripts"] += \ + ("find . -maxdepth 1 -name \"*dx_vs_dgamma*\" " + "-print | xargs -I {} bash -c \"rfcp {} .oO[datadir]Oo." + "/.oO[name]Oo..Comparison_common"+name+"_Images/CrossTalk/\" \n") + repMap["runComparisonScripts"] += \ + ("find . -maxdepth 1 -name \"*dy_vs_dalpha*\" " + "-print | xargs -I {} bash -c \"rfcp {} .oO[datadir]Oo." + "/.oO[name]Oo..Comparison_common"+name+"_Images/CrossTalk/\" \n") + repMap["runComparisonScripts"] += \ + ("find . -maxdepth 1 -name \"*dy_vs_dbeta*\" " + "-print | xargs -I {} bash -c \"rfcp {} .oO[datadir]Oo." + "/.oO[name]Oo..Comparison_common"+name+"_Images/CrossTalk/\" \n") + repMap["runComparisonScripts"] += \ + ("find . -maxdepth 1 -name \"*dy_vs_dgamma*\" " "-print | xargs -I {} bash -c \"rfcp {} .oO[datadir]Oo." - "/.oO[name]Oo..Comparison_common"+name+"_Images/\" \n") + "/.oO[name]Oo..Comparison_common"+name+"_Images/CrossTalk/\" \n") repMap["runComparisonScripts"] += \ - ("find . -maxdepth 1 -name \"*PXF*\" " + ("find . -maxdepth 1 -name \"*dz_vs_dalpha*\" " "-print | xargs -I {} bash -c \"rfcp {} .oO[datadir]Oo." - "/.oO[name]Oo..Comparison_common"+name+"_Images/\" \n") + "/.oO[name]Oo..Comparison_common"+name+"_Images/CrossTalk/\" \n") repMap["runComparisonScripts"] += \ - ("find . -maxdepth 1 -name \"*TIB*\" " + ("find . -maxdepth 1 -name \"*dz_vs_dbeta*\" " "-print | xargs -I {} bash -c \"rfcp {} .oO[datadir]Oo." - "/.oO[name]Oo..Comparison_common"+name+"_Images/\" \n") + "/.oO[name]Oo..Comparison_common"+name+"_Images/CrossTalk/\" \n") repMap["runComparisonScripts"] += \ - ("find . -maxdepth 1 -name \"*TID*\" " + ("find . -maxdepth 1 -name \"*dz_vs_dgamma*\" " "-print | xargs -I {} bash -c \"rfcp {} .oO[datadir]Oo." - "/.oO[name]Oo..Comparison_common"+name+"_Images/\" \n") + "/.oO[name]Oo..Comparison_common"+name+"_Images/CrossTalk/\" \n") repMap["runComparisonScripts"] += \ - ("find . -maxdepth 1 -name \"*TEC*\" " + ("find . -maxdepth 1 -name \"*rdphi_vs_dalpha*\" " "-print | xargs -I {} bash -c \"rfcp {} .oO[datadir]Oo." - "/.oO[name]Oo..Comparison_common"+name+"_Images/\" \n") + "/.oO[name]Oo..Comparison_common"+name+"_Images/CrossTalk/\" \n") repMap["runComparisonScripts"] += \ - ("find . -maxdepth 1 -name \"*TOB*\" " + ("find . -maxdepth 1 -name \"*rdphi_vs_dbeta*\" " "-print | xargs -I {} bash -c \"rfcp {} .oO[datadir]Oo." - "/.oO[name]Oo..Comparison_common"+name+"_Images/\" \n") + "/.oO[name]Oo..Comparison_common"+name+"_Images/CrossTalk/\" \n") repMap["runComparisonScripts"] += \ - ("find . -maxdepth 1 -name \"*tracker*\" " + ("find . -maxdepth 1 -name \"*rdphi_vs_dgamma*\" " "-print | xargs -I {} bash -c \"rfcp {} .oO[datadir]Oo." - "/.oO[name]Oo..Comparison_common"+name+"_Images/\" \n") + "/.oO[name]Oo..Comparison_common"+name+"_Images/CrossTalk/\" \n") repMap["runComparisonScripts"] += \ ("find . -maxdepth 1 -name " "\"TkMap_SurfDeform*.pdf\" -print | xargs -I {} bash -c" @@ -171,7 +341,7 @@ def createScript(self, path): repMap["runComparisonScripts"] += \ ("rfcp .oO[CMSSW_BASE]Oo./src/Alignment" "/OfflineValidation/scripts/makeArrowPlots.C " - "$CWD/TkAllInOneTool\n" + ".\n" "root -b -q 'makeArrowPlots.C(\"" ".oO[name]Oo..Comparison_common"+name +".root\",\".oO[name]Oo.." @@ -199,7 +369,8 @@ def createScript(self, path): for cfg in self.configFiles: # FIXME: produce this line only for enabled dbOutput # postProcess = "rfcp .oO[workdir]Oo./*.db .oO[datadir]Oo.\n" - postProcess = "rfcp *.db .oO[datadir]Oo.\n" + # postProcess = "rfcp *.db .oO[datadir]Oo.\n" + postProcess = "" repMap["CommandLine"]+= \ repMap["CommandLineTemplate"]%{"cfgFile":cfg, "postProcess":postProcess} @@ -207,6 +378,7 @@ def createScript(self, path): ".oO[runComparisonScripts]Oo.\n" ) + #~ print configTemplates.scriptTemplate scripts = {scriptName: replaceByMap( configTemplates.scriptTemplate, repMap ) } return GenericValidation.createScript(self, scripts, path) diff --git a/Alignment/OfflineValidation/python/TkAlAllInOneTool/geometryComparisonTemplates.py b/Alignment/OfflineValidation/python/TkAlAllInOneTool/geometryComparisonTemplates.py index 9c9bac7867075..84f15579e7b29 100644 --- a/Alignment/OfflineValidation/python/TkAlAllInOneTool/geometryComparisonTemplates.py +++ b/Alignment/OfflineValidation/python/TkAlAllInOneTool/geometryComparisonTemplates.py @@ -9,11 +9,11 @@ process.load("Configuration.StandardSequences.FrontierConditions_GlobalTag_cff") process.GlobalTag.globaltag = ".oO[GlobalTag]Oo." -process.load("Configuration.Geometry.GeometryDB_cff") -#process.load("Geometry.TrackerNumberingBuilder.trackerNumberingGeometry_cfi") -#process.load("Geometry.TrackerGeometryBuilder.trackerGeometry_cfi") +process.load('Configuration.Geometry.GeometryExtended2015_cff') +process.TrackerTopologyEP = cms.ESProducer("TrackerTopologyEP") + +process.load("Geometry.TrackerGeometryBuilder.trackerGeometry_cfi") -#process.load("Alignment.CommonAlignmentProducer.GlobalPosition_Frontier_cff") process.load("CondCore.DBCommon.CondDBSetup_cfi") process.MessageLogger = cms.Service("MessageLogger", @@ -31,7 +31,6 @@ input = cms.untracked.int32(1) ) process.dump = cms.EDAnalyzer("TrackerGeometryIntoNtuples", - # outputFile = cms.untracked.string('.oO[workdir]Oo./.oO[alignmentName]Oo.ROOTGeometry.root'), outputFile = cms.untracked.string('.oO[alignmentName]Oo.ROOTGeometry.root'), outputTreename = cms.untracked.string('alignTree') ) @@ -50,15 +49,11 @@ # global tag process.load("Configuration.StandardSequences.FrontierConditions_GlobalTag_cff") process.GlobalTag.globaltag = ".oO[GlobalTag]Oo." -process.load("Configuration.Geometry.GeometryDB_cff") - -#process.load("Geometry.TrackerNumberingBuilder.trackerNumberingGeometry_cfi") -#process.load("Geometry.TrackerGeometryBuilder.trackerGeometry_cfi") +process.load('Configuration.Geometry.GeometryExtended2015_cff') +process.TrackerTopologyEP = cms.ESProducer("TrackerTopologyEP") -#process.load("Alignment.CommonAlignmentProducer.GlobalPosition_Frontier_cff") -# the input .GlobalPosition_Frontier_cff is providing the frontier://FrontierProd/CMS_COND_31X_ALIGNMENT in the release which does not provide the ideal geometry -#process.GlobalPosition.connect = 'frontier://FrontierProd/CMS_COND_31X_FROM21X' +process.load("Geometry.TrackerGeometryBuilder.trackerGeometry_cfi") process.load("CondCore.DBCommon.CondDBSetup_cfi") @@ -76,11 +71,8 @@ process.load("DQM.SiStripCommon.TkHistoMap_cfi") process.DQMStore=cms.Service("DQMStore") -#process.TkDetMap = cms.Service("TkDetMap") -#process.SiStripDetInfoFileReader = cms.Service("SiStripDetInfoFileReader") process.load("DQMServices.Core.DQMStore_cfg") -#process.DQMStore=cms.Service("DQMStore") # configuration of the Tracker Geometry Comparison Tool # Tracker Geometry Comparison @@ -89,13 +81,9 @@ process.TrackerGeometryCompare.inputROOTFile1 = '.oO[comparedGeometry]Oo.' process.TrackerGeometryCompare.inputROOTFile2 = '.oO[referenceGeometry]Oo.' -# process.TrackerGeometryCompare.outputFile = ".oO[workdir]Oo./.oO[name]Oo..Comparison_common.oO[common]Oo..root" process.TrackerGeometryCompare.outputFile = ".oO[name]Oo..Comparison_common.oO[common]Oo..root" process.load("CommonTools.UtilAlgos.TFileService_cfi") -#process.TFileService = cms.Service("TFileService", -# fileName = cms.string('TkSurfDeform.root') -# ) process.TFileService.fileName = cms.string("TkSurfDeform_.oO[name]Oo..Comparison_common.oO[common]Oo..root") process.TrackerGeometryCompare.levels = [ .oO[levels]Oo. ] @@ -113,7 +101,7 @@ dbOutputTemplate= """ //_________________________ db Output ____________________________ # setup for writing out to DB - include "CondCore/DBCommon/data/CondDBSetup.cfi" + include "CondCore/DBCommon/CondDBSetup.cfi" # include "CondCore/DBCommon/data/CondDBCommon.cfi" service = PoolDBOutputService { diff --git a/Alignment/OfflineValidation/scripts/comparisonScript.C b/Alignment/OfflineValidation/scripts/comparisonScript.C index f5c9e3c441ba1..6d7b94c4d5490 100644 --- a/Alignment/OfflineValidation/scripts/comparisonScript.C +++ b/Alignment/OfflineValidation/scripts/comparisonScript.C @@ -33,25 +33,68 @@ void comparisonScript (TString inFile,//="mp1510_vs_mp1509.Comparison_commonTrac // from r and dphi // now the object to produce the comparison plots is created - GeometryComparisonPlotter * cp = new GeometryComparisonPlotter (inFile, outDir); + + // Plot Translations + GeometryComparisonPlotter * trans = new GeometryComparisonPlotter (inFile, outDir); // x and y contain the couples to plot // -> every combination possible will be performed // /!\ always give units (otherwise, unexpected bug from root...) vector x,y; - x.push_back("r"); cp->SetBranchUnits("r", "cm"); - x.push_back("phi"); cp->SetBranchUnits("phi", "rad"); - x.push_back("z"); cp->SetBranchUnits("z", "cm"); //cp->SetBranchMax("z", 100); cp->SetBranchMin("z", -100); - y.push_back("dr"); cp->SetBranchSF("dr", 10000); cp->SetBranchUnits("dr", "#mum"); - y.push_back("dz"); cp->SetBranchSF("dz", 10000); cp->SetBranchUnits("dz", "#mum"); - y.push_back("rdphi"); cp->SetBranchSF("rdphi",10000); cp->SetBranchUnits("rdphi", "#mum rad"); - y.push_back("dx"); cp->SetBranchSF("dx", 10000); cp->SetBranchUnits("dx", "#mum"); //cp->SetBranchMax("dx", 10); cp->SetBranchMin("dx", -10); - y.push_back("dy"); cp->SetBranchSF("dy", 10000); cp->SetBranchUnits("dy", "#mum"); //cp->SetBranchMax("dy", 10); cp->SetBranchMin("dy", -10); - cp->MakePlots(x, y); // default output is pdf, but png gives a nicer result, so we use it as well + x.push_back("r"); trans->SetBranchUnits("r", "cm"); + x.push_back("phi"); trans->SetBranchUnits("phi", "rad"); + x.push_back("z"); trans->SetBranchUnits("z", "cm"); //trans->SetBranchMax("z", 100); trans->SetBranchMin("z", -100); + y.push_back("dr"); trans->SetBranchSF("dr", 10000); trans->SetBranchUnits("dr", "#mum"); + y.push_back("dz"); trans->SetBranchSF("dz", 10000); trans->SetBranchUnits("dz", "#mum"); + y.push_back("rdphi"); trans->SetBranchSF("rdphi",10000); trans->SetBranchUnits("rdphi", "#mum rad"); + y.push_back("dx"); trans->SetBranchSF("dx", 10000); trans->SetBranchUnits("dx", "#mum"); //trans->SetBranchMax("dx", 10); trans->SetBranchMin("dx", -10); + y.push_back("dy"); trans->SetBranchSF("dy", 10000); trans->SetBranchUnits("dy", "#mum"); //trans->SetBranchMax("dy", 10); trans->SetBranchMin("dy", -10); + trans->MakePlots(x, y); // default output is pdf, but png gives a nicer result, so we use it as well // remark: what takes the more time is the creation of the output files, // not the looping on the tree (because the code is perfect, of course :p) - cp->SetGrid(1,1); - cp->SetPrintOption("png"); - cp->MakePlots(x, y); + trans->SetGrid(1,1); + trans->SetPrintOption("png"); + trans->MakePlots(x, y); + + + // Plot Rotations + GeometryComparisonPlotter * rot = new GeometryComparisonPlotter (inFile, outDir); + // x and y contain the couples to plot + // -> every combination possible will be performed + // /!\ always give units (otherwise, unexpected bug from root...) + vector a,b; + a.push_back("alpha"); rot->SetBranchUnits("alpha", "rad"); + a.push_back("beta"); rot->SetBranchUnits("beta", "rad"); + a.push_back("gamma"); rot->SetBranchUnits("gamma", "rad"); + b.push_back("dalpha"); rot->SetBranchUnits("dalpha", "rad"); + b.push_back("dbeta"); rot->SetBranchUnits("dbeta", "rad"); + b.push_back("dgamma"); rot->SetBranchUnits("dgamma", "rad"); + rot->MakePlots(a, b); // default output is pdf, but png gives a nicer result, so we use it as well + // remark: what takes the more time is the creation of the output files, + // not the looping on the tree (because the code is perfect, of course :p) + rot->SetGrid(1,1); + rot->SetPrintOption("png"); + rot->MakePlots(a, b); + + // Plot cross talk + GeometryComparisonPlotter * cross = new GeometryComparisonPlotter (inFile, outDir); + // x and y contain the couples to plot + // -> every combination possible will be performed + // /!\ always give units (otherwise, unexpected bug from root...) + vector dx,dy; + dx.push_back("dr"); cross->SetBranchSF("dr", 10000); cross->SetBranchUnits("dr", "#mum"); + dx.push_back("dz"); cross->SetBranchSF("dz", 10000); cross->SetBranchUnits("dz", "#mum"); + dx.push_back("rdphi"); cross->SetBranchSF("rdphi",10000); cross->SetBranchUnits("rdphi", "#mum rad"); + dx.push_back("dx"); cross->SetBranchSF("dx", 10000); cross->SetBranchUnits("dx", "#mum"); + dx.push_back("dy"); cross->SetBranchSF("dy", 10000); cross->SetBranchUnits("dy", "#mum"); + dy.push_back("dalpha"); cross->SetBranchUnits("dalpha", "rad"); + dy.push_back("dbeta"); cross->SetBranchUnits("dbeta", "rad"); + dy.push_back("dgamma"); cross->SetBranchUnits("dgamma", "rad"); + cross->MakePlots(dx,dy); // default output is pdf, but png gives a nicer result, so we use it as well + // remark: what takes the more time is the creation of the output files, + // not the looping on the tree (because the code is perfect, of course :p) + cross->SetGrid(1,1); + cross->SetPrintOption("png"); + cross->MakePlots(dx, dy); // now the same object can be reused with other specifications/cuts //void SetPrint (const bool); // activates the printing of the individual and global pdf diff --git a/Alignment/OfflineValidation/scripts/makeArrowPlots.C b/Alignment/OfflineValidation/scripts/makeArrowPlots.C index af26db4cf5126..cf678daa5fdca 100644 --- a/Alignment/OfflineValidation/scripts/makeArrowPlots.C +++ b/Alignment/OfflineValidation/scripts/makeArrowPlots.C @@ -12,7 +12,7 @@ float y_,x_,z_,phi_,r_,dphi_,dr_,dx_,dz_,dy_; int level_,sublevel_; char outputDir_[192]; -void Plot10Mu(char* text,float X, float Y, float size) +void Plot10Mu(const char* text,float X, float Y, float size) { TPaveText* atext = new TPaveText(X,Y,X+size,Y+size); atext->AddText(text); @@ -48,13 +48,8 @@ void DrawRPhiLegend(double xLim, double yLim, double barrelRPhiRescale) normArrow(xTest+dYTest,yTest-4*dYTest-disty,500./10000*barrelRPhiRescale); } -void Write() -{ - output->Write(); -} - -int makeRPhiArrowPlot( TTree* data, char* name, double xLim, double yLim, double level, double sublevel, double zMin, double zMax, double rMin, double rMax, double barrelRPhiRescale){ +int makeRPhiArrowPlot( TTree* data, const char* name, double xLim, double yLim, double level, double sublevel, double zMin, double zMax, double rMin, double rMax, double barrelRPhiRescale){ TCanvas* OBPCanvas = new TCanvas(name,name,1050,875); @@ -80,7 +75,7 @@ int makeRPhiArrowPlot( TTree* data, char* name, double xLim, double yLim, double DrawRPhiLegend( xLim, yLim, barrelRPhiRescale ); char sliceLeg[192]; - sprintf( sliceLeg, "%s: %d < z <= %d", name, zMin, zMax ); + sprintf( sliceLeg, "%s: %f < z <= %f", name, zMin, zMax ); //Plot10Mu( name, xLim/2, yLim, 0.2*xLim ); TPaveText* atext = new TPaveText(0.2*xLim,0.85*yLim,0.66*xLim,0.99*yLim); atext->AddText(sliceLeg); @@ -99,7 +94,7 @@ int makeRPhiArrowPlot( TTree* data, char* name, double xLim, double yLim, double return passcut; } -int makeZPhiArrowPlot( TTree* data, char* name, double zLim, double phiLim, double level, double sublevel, double zMin, double zMax, double rMin, double rMax, double barrelRPhiRescale){ +int makeZPhiArrowPlot( TTree* data, const char* name, double zLim, double phiLim, double level, double sublevel, double zMin, double zMax, double rMin, double rMax, double barrelRPhiRescale){ TCanvas* OBPCanvas = new TCanvas(name,name,1050,875); @@ -125,7 +120,7 @@ int makeZPhiArrowPlot( TTree* data, char* name, double zLim, double phiLim, doub DrawRPhiLegend( zLim, phiLim, barrelRPhiRescale ); char sliceLeg[192]; - sprintf( sliceLeg, "%s: %d < r <= %d", name, rMin, rMax ); + sprintf( sliceLeg, "%s: %f < r <= %f", name, rMin, rMax ); //Plot10Mu( name, xLim/2, yLim, 0.2*xLim ); TPaveText* atext = new TPaveText(0.2*zLim,0.85*phiLim,0.66*zLim,0.99*phiLim); atext->AddText(sliceLeg); @@ -198,7 +193,7 @@ int makeRZArrowPlot( TTree* data, char* name, double zLim, double zLimMax, doubl } */ -void makeArrowPlots(char* filename, char* outputDir) +void makeArrowPlots(const char* filename, const char* outputDir) { fin = new TFile(filename);