Back to home page

Project CMSSW displayed by LXR

 
 

    


File indexing completed on 2021-02-14 12:45:59

0001 ######################################################################
0002 ######################################################################
0003 intoNTuplesTemplate="""
0004 import FWCore.ParameterSet.Config as cms
0005 
0006 process = cms.Process("ValidationIntoNTuples")
0007 
0008 .oO[LoadGlobalTagTemplate]Oo.
0009 
0010 process.load("Configuration.Geometry.GeometryRecoDB_cff")
0011 
0012 process.load("CondCore.CondDB.CondDB_cfi")
0013 
0014 process.MessageLogger = cms.Service("MessageLogger",
0015     destinations = cms.untracked.vstring('detailedInfo', 
0016         'cout')
0017 ) 
0018 
0019 .oO[condLoad]Oo.
0020 
0021 process.source = cms.Source("EmptySource",
0022     firstRun=cms.untracked.uint32(.oO[runGeomComp]Oo.)
0023     )
0024 
0025 process.maxEvents = cms.untracked.PSet(
0026     input = cms.untracked.int32(1)
0027 )
0028 process.dump = cms.EDAnalyzer("TrackerGeometryIntoNtuples",
0029     outputFile = cms.untracked.string('.oO[alignmentName]Oo.ROOTGeometry.root'),
0030     outputTreename = cms.untracked.string('alignTree')
0031 )
0032 
0033 process.p = cms.Path(process.dump)  
0034 """
0035 
0036 
0037 ######################################################################
0038 ######################################################################
0039 compareTemplate="""
0040 import FWCore.ParameterSet.Config as cms
0041 
0042 process = cms.Process("validation")
0043 
0044 .oO[LoadGlobalTagTemplate]Oo.
0045 
0046 process.load("Configuration.Geometry.GeometryRecoDB_cff")
0047 
0048 process.load("CondCore.CondDB.CondDB_cfi")
0049 
0050 process.MessageLogger = cms.Service("MessageLogger",
0051     destinations = cms.untracked.vstring('detailedInfo', 
0052         'cout')
0053 )
0054 
0055 process.source = cms.Source("EmptySource",
0056     firstRun=cms.untracked.uint32(.oO[runGeomComp]Oo.)
0057     )
0058 
0059 process.maxEvents = cms.untracked.PSet(
0060     input = cms.untracked.int32(1)
0061 )
0062 
0063 process.siStripQualityESProducer.ListOfRecordToMerge=cms.VPSet(
0064     cms.PSet(record = cms.string('SiStripDetCablingRcd'),
0065             tag = cms.string('')), 
0066         cms.PSet(record = cms.string('RunInfoRcd'),
0067             tag = cms.string('')), 
0068         cms.PSet(record = cms.string('SiStripBadChannelRcd'),
0069             tag = cms.string('')), 
0070         cms.PSet(record = cms.string('SiStripBadFiberRcd'),
0071             tag = cms.string('')), 
0072         cms.PSet(record = cms.string('SiStripBadModuleRcd'),
0073             tag = cms.string('')), 
0074         cms.PSet(record = cms.string('SiStripBadStripRcd'),
0075             tag = cms.string(''))
0076 )
0077 
0078 process.load("DQM.SiStripCommon.TkHistoMap_cff")
0079 
0080   # configuration of the Tracker Geometry Comparison Tool
0081   # Tracker Geometry Comparison
0082 process.load("Alignment.OfflineValidation.TrackerGeometryCompare_cfi")
0083   # the input "IDEAL" is special indicating to use the ideal geometry of the release
0084 
0085 process.TrackerGeometryCompare.inputROOTFile1 = '.oO[referenceGeometry]Oo.'
0086 process.TrackerGeometryCompare.inputROOTFile2 = '.oO[comparedGeometry]Oo.'
0087 process.TrackerGeometryCompare.moduleList = '.oO[moduleListBase]Oo.'
0088 process.TrackerGeometryCompare.outputFile = ".oO[name]Oo..Comparison_common.oO[common]Oo..root"
0089 
0090 process.load("CommonTools.UtilAlgos.TFileService_cfi")  
0091 process.TFileService.fileName = cms.string("TkSurfDeform_.oO[name]Oo..Comparison_common.oO[common]Oo..root") 
0092 
0093 process.TrackerGeometryCompare.levels = [ .oO[levels]Oo. ]
0094 
0095   ##FIXME!!!!!!!!!
0096   ##replace TrackerGeometryCompare.writeToDB = .oO[dbOutput]Oo.
0097   ##removed: dbOutputService
0098 
0099 process.p = cms.Path(process.TrackerGeometryCompare)
0100 """
0101   
0102 
0103 ######################################################################
0104 ######################################################################
0105 dbOutputTemplate= """
0106 //_________________________ db Output ____________________________
0107         # setup for writing out to DB
0108         include "CondCore/DBCommon/CondDBSetup.cfi"
0109 #       include "CondCore/DBCommon/data/CondDBCommon.cfi"
0110 
0111     service = PoolDBOutputService {
0112         using CondDBSetup
0113         VPSet toPut = {
0114             { string record = "TrackerAlignmentRcd"  string tag = ".oO[tag]Oo." },
0115             { string record = "TrackerAlignmentErrorExtendedRcd"  string tag = ".oO[errortag]Oo." }
0116         }
0117                 # string connect = "sqlite_file:.oO[workdir]Oo./.oO[name]Oo.Common.oO[common]Oo..db"
0118                 string connect = "sqlite_file:.oO[name]Oo.Common.oO[common]Oo..db"
0119                 # untracked string catalog = "file:alignments.xml"
0120         untracked string timetype = "runnumber"
0121     }
0122 """
0123 
0124 ######################################################################
0125 ######################################################################
0126 visualizationTrackerTemplate= """
0127 #include "Alignment/OfflineValidation/scripts/visualizationTracker.C"
0128 void TkAl3DVisualization_.oO[common]Oo._.oO[name]Oo.(){
0129             //------------------------------ONLY NEEDED INPUTS-------------------------------//
0130 //------Tree Read In--------
0131     TString inputFileName = ".oO[outputFile]Oo.";
0132     //output file name
0133     string outputFileName = ".oO[common]Oo._.oO[name]Oo..Visualization";
0134     //title
0135     string line1 = ".oO[alignmentTitle]Oo.";
0136     string line2 = "vs. .oO[referenceTitle]Oo.";
0137     //set subdetectors to see
0138     int subdetector1 = .oO[3DSubdetector1]Oo.;
0139     int subdetector2 = .oO[3DSubdetector2]Oo.;
0140     //translation scale factor
0141     int sclftr = .oO[3DTranslationalScaleFactor]Oo.;
0142     //rotation scale factor
0143     int sclfrt = 1;
0144     //module size scale factor
0145     float sclfmodulesizex = 1;
0146     float sclfmodulesizey = 1;
0147     float sclfmodulesizez = 1;
0148     //beam pipe radius
0149     float piperadius = 2.25;
0150     //beam pipe xy coordinates
0151     float pipexcoord = 0;
0152     float pipeycoord = 0;
0153     //beam line xy coordinates
0154     float linexcoord = 0;
0155     float lineycoord = 0;
0156 //------------------------------End of ONLY NEEDED INPUTS-------------------------------//
0157     cout << "running visualizer" << endl;
0158     runVisualizer(inputFileName,
0159                     outputFileName,
0160                     line1,
0161                     line2,
0162                     subdetector1,
0163                     subdetector2,
0164                     sclftr,
0165                     sclfrt,
0166                     sclfmodulesizex,
0167                     sclfmodulesizey,
0168                     sclfmodulesizez,
0169                     piperadius,
0170                     pipexcoord,
0171                     pipeycoord,
0172                     linexcoord,
0173                     lineycoord );
0174 }
0175 """