Skip to content

Commit

Permalink
---
Browse files Browse the repository at this point in the history
yaml
---
r: 133118
b: refs/heads/gem-CR-stand
c: a548aef
h: "refs/heads/CMSSW_6_2_X_SLHC"
  • Loading branch information
ktf committed Dec 12, 2013
1 parent 6469f7c commit 031b8d6
Show file tree
Hide file tree
Showing 188 changed files with 2,749 additions and 11,771 deletions.
2 changes: 1 addition & 1 deletion [refs]
Original file line number Diff line number Diff line change
Expand Up @@ -2,4 +2,4 @@
refs/heads/gh-pages: 4bec1f03ca2f14e90d0ca17351c4d42d84ec2c82
"refs/heads/CMSSW_6_2_X_SLHC": 5893ef29c12b2718b3c1385e821170f91afb5446
"refs/heads/CMSSW_5_3_X": 90eebdc93fdcd1c69c8670cdb1376c336a5876bd
refs/heads/gem-CR-stand: 0b74e63c196b14f1ea7fd6dae195bdc7989c8283
refs/heads/gem-CR-stand: a548aef4cd1e863d83ebb990ec41004492a42450
Original file line number Diff line number Diff line change
Expand Up @@ -503,7 +503,7 @@ void PlotAlignmentValidation::plotSS( const std::string& options, const std::str
//------------------------------------------------------------------------------
void PlotAlignmentValidation::plotDMR(const std::string& variable, Int_t minHits, const std::string& options)
{
// If several, comma-separated values are given,
// If several, comma-separated values are given in 'variable',
// call plotDMR with each value separately.
// If a comma is found, the string is divided to two.
// (no space allowed)
Expand All @@ -525,6 +525,14 @@ void PlotAlignmentValidation::plotDMR(const std::string& variable, Int_t minHits
return;
}

// options:
// -plain (default, the whole distribution)
// -split (distribution splitted to two)
// -layers (plain db for each layer/disc superimposed in one plot)
// -layersSeparate (plain db for each layer/disc in separate plots)
// -layersSplit (splitted db for each layers/disc in one plot)
// -layersSplitSeparate (splitted db, for each layers/disc in separate plots)

TRegexp layer_re("layer=[0-9]+");
bool plotPlain = false, plotSplits = false, plotLayers = false;
int plotLayerN = 0;
Expand Down Expand Up @@ -565,10 +573,13 @@ void PlotAlignmentValidation::plotDMR(const std::string& variable, Int_t minHits
plotinfo.plotPlain = plotPlain;
plotinfo.plotLayers = plotLayers;

// width in cm
// for DMRS, use 100 bins in range +-10 um, bin width 0.2um
// if modified, check also TrackerOfflineValidationSummary_cfi.py and TrackerOfflineValidation_Standalone_cff.py
if (variable == "meanX") { plotinfo.nbins = 50; plotinfo.min = -0.001; plotinfo.max = 0.001; }
else if (variable == "meanY") { plotinfo.nbins = 50; plotinfo.min = -0.005; plotinfo.max = 0.005; }
else if (variable == "medianX") { plotinfo.nbins = 50; plotinfo.min = -0.005; plotinfo.max = 0.005; }
else if (variable == "medianY") { plotinfo.nbins = 50; plotinfo.min = -0.005; plotinfo.max = 0.005; }
else if (variable == "medianX") { plotinfo.nbins = 100; plotinfo.min = -0.001; plotinfo.max = 0.001; }
else if (variable == "medianY") { plotinfo.nbins = 100; plotinfo.min = -0.001; plotinfo.max = 0.001; }
else if (variable == "meanNormX") { plotinfo.nbins = 100; plotinfo.min = -2.0; plotinfo.max = 2.0; }
else if (variable == "meanNormY") { plotinfo.nbins = 100; plotinfo.min = -2.0; plotinfo.max = 2.0; }
else if (variable == "rmsX") { plotinfo.nbins = 100; plotinfo.min = 0.0; plotinfo.max = 0.1; }
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -106,6 +106,13 @@ def __init__(self, valName, alignment,config):
defaultDict = defaults )
self.general.update( offline )
self.__NJobs = self.general["parallelJobs"]
self.outputFiles = []
for index in range(int(self.general["parallelJobs"])):
fName = replaceByMap("AlignmentValidation_"+self.name
+"_.oO[name]Oo._%d.root"%(index),
self.getRepMap())
self.outputFiles.append(fName)


def createConfiguration(self, path, configBaseName = "TkAlOfflineValidation"):
# if offline validation uses N parallel jobs, we create here N cfg files
Expand Down Expand Up @@ -140,12 +147,7 @@ def createConfiguration(self, path, configBaseName = "TkAlOfflineValidation"):
repMap.update({"nIndex": str(index)})
# Create the result file directly to datadir since should not use /tmp/
# see https://cern.service-now.com/service-portal/article.do?n=KB0000484
repMap.update({
"outputFile": replaceByMap("AlignmentValidation_"
+ self.name +
"_.oO[name]Oo._.oO[nIndex]Oo..root",
repMap )
})
repMap.update({"outputFile": self.outputFiles[index]})
repMap["outputFile"] = os.path.expandvars( repMap["outputFile"] )

cfgs = {cfgName:replaceByMap(configTemplates.offlineParallelTemplate,
Expand All @@ -168,12 +170,7 @@ def createScript(self, path, scriptBaseName = "TkAlOfflineValidation"):
repMap["nIndex"]=""
repMap["nIndex"]=str(index)
repMap["CommandLine"]=""
repMap.update({
"outputFile": replaceByMap("AlignmentValidation_"
+ self.name +
"_.oO[name]Oo._.oO[nIndex]Oo..root",
repMap )
})
repMap.update({"outputFile": self.outputFiles[index]})
for cfg in self.configFiles:
# The ugly solution here is to change the name for each parallel job
cfgtemp = cfg.replace(str(numJobs-1)+"_cfg.py",
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -416,15 +416,8 @@
# ls -al .oO[datadir]Oo./AlignmentValidation*.root > .oO[datadir]Oo./log_rootfilelist.txt
ls -al AlignmentValidation*.root > .oO[datadir]Oo./log_rootfilelist.txt
# Remove parallel job files if merged file exists
for file in $(cmsLs -l /store/caf/user/$USER/.oO[eosdir]Oo. |awk '{print $5}')
do
if [[ ${file} = /store/caf/user/$USER/.oO[eosdir]Oo./AlignmentValidation*_[0-9].root ]]
then
cmsRm ${file}
fi
done
# Remove parallel job files
.oO[rmUnmerged]Oo.
"""


Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -9,7 +9,10 @@

# DMR (distribution of median of residuals per module) of X coordinate (Strip)
TH1DmrXprimeStripModules = cms.PSet(
Nbinx = cms.int32(200), xmin = cms.double(-0.05), xmax = cms.double(0.05)
# width 2.0 um
# Nbinx = cms.int32(500), xmin = cms.double(-0.05), xmax = cms.double(0.05)
# width 0.5 um
Nbinx = cms.int32(5000), xmin = cms.double(-0.05), xmax = cms.double(0.05)
),

# DMR (distribution of median of residuals per module) of Y coordinate (Strip)
Expand All @@ -19,12 +22,14 @@

# DMR (distribution of median of residuals per module) of X coordinate (Pixel)
TH1DmrXprimePixelModules = cms.PSet(
Nbinx = cms.int32(200), xmin = cms.double(-0.05), xmax = cms.double(0.05)
# Nbinx = cms.int32(500), xmin = cms.double(-0.05), xmax = cms.double(0.05)
Nbinx = cms.int32(5000), xmin = cms.double(-0.05), xmax = cms.double(0.05)
),

# DMR (distribution of median of residuals per module) of Y coordinate (Pixel)
TH1DmrYprimePixelModules = cms.PSet(
Nbinx = cms.int32(200), xmin = cms.double(-0.05), xmax = cms.double(0.05)
# Nbinx = cms.int32(200), xmin = cms.double(-0.05), xmax = cms.double(0.05)
Nbinx = cms.int32(5000), xmin = cms.double(-0.05), xmax = cms.double(0.05)
)

)
Original file line number Diff line number Diff line change
Expand Up @@ -14,19 +14,19 @@
#TrackerOfflineValidation.TH1NormXResStripModules.xmin = -3.0
#TrackerOfflineValidation.TH1NormXResStripModules.xmax = 3.0

TrackerOfflineValidation.TH1XprimeResStripModules.Nbinx = 2000
TrackerOfflineValidation.TH1XprimeResStripModules.xmin = -0.1 #-0.5
TrackerOfflineValidation.TH1XprimeResStripModules.xmax = 0.1 #0.5
TrackerOfflineValidation.TH1XprimeResStripModules.Nbinx = 5000
TrackerOfflineValidation.TH1XprimeResStripModules.xmin = -0.05 #-0.5
TrackerOfflineValidation.TH1XprimeResStripModules.xmax = 0.05 #0.5

#TrackerOfflineValidation.TH1XResStripModules.Nbinx = 2000
#TrackerOfflineValidation.TH1XResStripModules.Nbinx = 5000
#TrackerOfflineValidation.TH1XResStripModules.xmin = -0.5
#TrackerOfflineValidation.TH1XResStripModules.xmax = 0.5

TrackerOfflineValidation.TH1NormYResStripModules.Nbinx = 120
TrackerOfflineValidation.TH1NormYResStripModules.xmin = -3.0
TrackerOfflineValidation.TH1NormYResStripModules.xmax = 3.0

TrackerOfflineValidation.TH1YResStripModules.Nbinx = 2000
TrackerOfflineValidation.TH1YResStripModules.Nbinx = 5000
TrackerOfflineValidation.TH1YResStripModules.xmin = -11.0
TrackerOfflineValidation.TH1YResStripModules.xmax = 11.0

Expand All @@ -38,21 +38,21 @@
#TrackerOfflineValidation.TH1NormXResPixelModules.xmin = -3.0
#TrackerOfflineValidation.TH1NormXResPixelModules.xmax = 3.0

TrackerOfflineValidation.TH1XprimeResPixelModules.Nbinx = 2000
TrackerOfflineValidation.TH1XprimeResPixelModules.xmin = -0.1 #-0.5
TrackerOfflineValidation.TH1XprimeResPixelModules.xmax = 0.1 #0.5
TrackerOfflineValidation.TH1XprimeResPixelModules.Nbinx = 5000
TrackerOfflineValidation.TH1XprimeResPixelModules.xmin = -0.05 #-0.5
TrackerOfflineValidation.TH1XprimeResPixelModules.xmax = 0.05 #0.5

#TrackerOfflineValidation.TH1XResPixelModules.Nbinx = 2000
#TrackerOfflineValidation.TH1XResPixelModules.Nbinx = 5000
#TrackerOfflineValidation.TH1XResPixelModules.xmin = -0.5
#TrackerOfflineValidation.TH1XResPixelModules.xmax = 0.5

TrackerOfflineValidation.TH1NormYResPixelModules.Nbinx = 120
TrackerOfflineValidation.TH1NormYResPixelModules.xmin = -3.0
TrackerOfflineValidation.TH1NormYResPixelModules.xmax = 3.0

TrackerOfflineValidation.TH1YResPixelModules.Nbinx = 2000
TrackerOfflineValidation.TH1YResPixelModules.xmin = -0.1 #-0.5
TrackerOfflineValidation.TH1YResPixelModules.xmax = 0.1 #0.5
TrackerOfflineValidation.TH1YResPixelModules.Nbinx = 5000
TrackerOfflineValidation.TH1YResPixelModules.xmin = -0.05 #-0.5
TrackerOfflineValidation.TH1YResPixelModules.xmax = 0.05 #0.5

TrackerOfflineValidation.TProfileXResStripModules.Nbinx = 34
TrackerOfflineValidation.TProfileXResStripModules.xmin = -1.02
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -298,14 +298,27 @@ def createParallelMergeScript( path, validations ):

# introduced to merge individual validation outputs separately
# -> avoids problems with merge script
repMap["haddLoop"] = ""
repMap["haddLoop"] = "mergeRetCode=0\n"
repMap["rmUnmerged"] = "if [[ mergeRetCode -eq 0 ]]; then\n"
for validation in comparisonLists["OfflineValidationParallel"]:
repMap["haddLoop"] = validation.appendToMergeParJobs(repMap["haddLoop"])
repMap["haddLoop"] += "tmpMergeRetCode=${?}\n"
repMap["haddLoop"] += ("if [[ mergeRetCode -eq 0 ]]; "
"then mergeRetCode=${tmpMergeRetCode}; "
"fi\n")
repMap["haddLoop"] += ("cmsStage -f "
+validation.getRepMap()["outputFile"]
+" "
+validation.getRepMap()["resultFile"]
+"\n")
for f in validation.outputFiles:
longName = os.path.join("/store/caf/user/$USER/",
validation.getRepMap()["eosdir"], f)
repMap["rmUnmerged"] += " cmsRm "+longName+"\n"
repMap["rmUnmerged"] += ("else\n"
" echo \"WARNING: Merging failed, unmerged"
" files won't be deleted.\"\n"
"fi\n")

repMap["RunExtendedOfflineValidation"] = \
replaceByMap(configTemplates.extendedValidationExecution, repMap)
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -156,8 +156,7 @@ const SiStripModule& SiStripFecCabling::module( const FedChannelConnection& conn
}

if ( !ss.str().empty() ) { edm::LogWarning(mlCabling_) << ss.str(); }
static FedChannelConnection temp;
static const SiStripModule module(temp);
static const SiStripModule module{FedChannelConnection{}};
return module;
}

Expand All @@ -175,8 +174,7 @@ const SiStripModule& SiStripFecCabling::module( const uint32_t& dcu_id ) const {
}
}
}
static const FedChannelConnection temp;
static const SiStripModule module(temp);
static const SiStripModule module{FedChannelConnection{}};
return module;
}

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -18,7 +18,7 @@ namespace edm {

// once a module is born, these parts of the module's product provenance
// are constant (change to ModuleDescription)


class ModuleDescription {
public:
Expand Down Expand Up @@ -70,6 +70,15 @@ namespace edm {
///Returns a unique id each time called. Intended to be passed to ModuleDescription's constructor's modID argument. Thread safe.
static unsigned int getUniqueID();

///Returns a value identifying an invalid id (the max unsigned int value)
#if !defined(__CINT__) && !defined(__MAKECINT__) && !defined(__REFLEX__)
static constexpr unsigned int invalidID() {
return std::numeric_limits<unsigned int>::max();
}
#else
static unsigned int invalidID();
#endif

private:

// ID of parameter set of the creator
Expand All @@ -84,7 +93,7 @@ namespace edm {

// The process configuration.
ProcessConfiguration const* processConfigurationPtr_;

unsigned int id_;
};

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -18,13 +18,12 @@ namespace edm {
moduleName_(),
moduleLabel_(),
processConfigurationPtr_(nullptr),
id_(std::numeric_limits<unsigned int>::max()){}
id_(invalidID()){}

ModuleDescription::ModuleDescription(
ParameterSetID const& pid,
std::string const& modName,
std::string const& modLabel) : ModuleDescription{pid, modName, modLabel, nullptr,
std::numeric_limits<unsigned int>::max()} {}
std::string const& modLabel) : ModuleDescription{pid, modName, modLabel, nullptr, invalidID()} {}

ModuleDescription::ModuleDescription(
ParameterSetID const& pid,
Expand All @@ -40,12 +39,12 @@ namespace edm {

ModuleDescription::ModuleDescription(
std::string const& modName,
std::string const& modLabel) : ModuleDescription{ParameterSetID(), modName, modLabel, nullptr,std::numeric_limits<unsigned int>::max()} {}
std::string const& modLabel) : ModuleDescription{ParameterSetID(), modName, modLabel, nullptr, invalidID()} {}

ModuleDescription::ModuleDescription(
std::string const& modName,
std::string const& modLabel,
ProcessConfiguration const* procConfig) : ModuleDescription{ParameterSetID(), modName, modLabel, procConfig,std::numeric_limits<unsigned int>::max()} {}
ProcessConfiguration const* procConfig) : ModuleDescription{ParameterSetID(), modName, modLabel, procConfig, invalidID()} {}

ModuleDescription::~ModuleDescription() {}

Expand Down Expand Up @@ -104,7 +103,7 @@ namespace edm {
ModuleDescription::getUniqueID() {
return s_id++;
}

void
ModuleDescription::write(std::ostream& os) const {
os << "Module type=" << moduleName() << ", "
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -127,7 +127,7 @@ class SiPixelRecHitQuality {
//--- Setters: the inverse of the above.
//------------------------------------------------------
//
inline void setProbabilityXY( float prob, QualWordType & qualWord ) {
inline void setProbabilityXY( float prob, QualWordType & qualWord ) const {
if(prob<0 || prob>1) {
edm::LogWarning("OutOfBounds") << "Prob XY outside the bounds of the quality word. Defaulting to Prob=0. Prob = " << prob << " QualityWord = " << qualWord;
prob=0;
Expand All @@ -137,7 +137,7 @@ class SiPixelRecHitQuality {
// cout << "Prob = " << prob << " --> Bits = " << raw << endl;
qualWord |= ((raw & probX_mask) << probX_shift);
}
inline void setProbabilityQ( float prob, QualWordType & qualWord ) {
inline void setProbabilityQ( float prob, QualWordType & qualWord ) const {
if(prob<0 || prob>1) {
edm::LogWarning("OutOfBounds") << "Prob Q outside the bounds of the quality word. Defaulting to Prob=0. Prob = " << prob << " QualityWord = " << qualWord;
prob=0;
Expand All @@ -149,30 +149,30 @@ class SiPixelRecHitQuality {
}


inline void setQBin( int qbin, QualWordType & qualWord ) {
inline void setQBin( int qbin, QualWordType & qualWord ) const {
if(qbin<0 || qbin >7) {
edm::LogWarning("OutOfBounds") << "Qbin outside the bounds of the quality word. Defaulting to Qbin=0. Qbin = " << qbin << " QualityWord = " << qualWord;
qbin=0;
}
qualWord |= ((qbin & qBin_mask) << qBin_shift);
}

inline void setIsOnEdge( bool flag, QualWordType & qualWord ) {
inline void setIsOnEdge( bool flag, QualWordType & qualWord ) const {
qualWord |= ((flag & edge_mask) << edge_shift);
}
inline void setHasBadPixels( bool flag, QualWordType & qualWord ) {
inline void setHasBadPixels( bool flag, QualWordType & qualWord ) const {
qualWord |= ((flag & bad_mask) << bad_shift);
}
inline void setSpansTwoROCs( bool flag, QualWordType & qualWord ) {
inline void setSpansTwoROCs( bool flag, QualWordType & qualWord ) const {
qualWord |= ((flag & twoROC_mask) << twoROC_shift);
}
inline void setHasFilledProb( bool flag, QualWordType & qualWord ) {
inline void setHasFilledProb( bool flag, QualWordType & qualWord ) const {
qualWord |= ((flag & hasFilledProb_mask) << hasFilledProb_shift);
}
};

public:
static Packing thePacking;
static const Packing thePacking;
};

#endif
Original file line number Diff line number Diff line change
Expand Up @@ -52,5 +52,5 @@ SiPixelRecHitQuality::Packing::Packing()
}

// Initialize the packing format singleton
SiPixelRecHitQuality::Packing SiPixelRecHitQuality::thePacking;
const SiPixelRecHitQuality::Packing SiPixelRecHitQuality::thePacking;

Loading

0 comments on commit 031b8d6

Please sign in to comment.