Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
Original file line number Diff line number Diff line change
Expand Up @@ -12,7 +12,7 @@

/*** Alignment ***/
#include "Alignment/MillePedeAlignmentAlgorithm/interface/PedeLabelerBase.h"
#include "CondFormats/PCLConfig/interface/AlignPCLThresholds.h"
#include "CondFormats/PCLConfig/interface/AlignPCLThresholdsHG.h"

struct mpPCLresults {
private:
Expand Down Expand Up @@ -59,7 +59,7 @@ class MillePedeFileReader {
public: //====================================================================
explicit MillePedeFileReader(const edm::ParameterSet&,
const std::shared_ptr<const PedeLabelerBase>&,
const std::shared_ptr<const AlignPCLThresholds>&);
const std::shared_ptr<const AlignPCLThresholdsHG>&);

virtual ~MillePedeFileReader() = default;

Expand All @@ -81,7 +81,7 @@ class MillePedeFileReader {
const std::array<double, 6>& getTZobs() const { return tZobs_; }
const std::array<double, 6>& getTZobsErr() const { return tZobsErr_; }

const AlignPCLThresholds::threshold_map getThresholdMap() const { return theThresholds_.get()->getThreshold_Map(); }
const AlignPCLThresholdsHG::threshold_map getThresholdMap() const { return theThresholds_.get()->getThreshold_Map(); }

const int binariesAmount() const { return binariesAmount_; }

Expand Down Expand Up @@ -119,7 +119,7 @@ class MillePedeFileReader {
const std::shared_ptr<const PedeLabelerBase> pedeLabeler_;

// thresholds from DB
const std::shared_ptr<const AlignPCLThresholds> theThresholds_;
const std::shared_ptr<const AlignPCLThresholdsHG> theThresholds_;

// file-names
const std::string millePedeEndFile_;
Expand Down Expand Up @@ -168,8 +168,8 @@ class MillePedeFileReader {
};

const std::array<std::string, 8> coord_str = {{"X", "Y", "Z", "theta_X", "theta_Y", "theta_Z", "extra_DOF", "none"}};
inline std::ostream& operator<<(std::ostream& os, const AlignPCLThresholds::coordType& c) {
if (c >= AlignPCLThresholds::endOfTypes || c < AlignPCLThresholds::X)
inline std::ostream& operator<<(std::ostream& os, const AlignPCLThresholdsHG::coordType& c) {
if (c >= AlignPCLThresholdsHG::endOfTypes || c < AlignPCLThresholdsHG::X)
return os << "unrecongnized coordinate";
return os << coord_str[c];
}
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -87,7 +87,7 @@ using namespace gbl;
MillePedeAlignmentAlgorithm::MillePedeAlignmentAlgorithm(const edm::ParameterSet &cfg, edm::ConsumesCollector &iC)
: AlignmentAlgorithmBase(cfg, iC),
topoToken_(iC.esConsumes<TrackerTopology, TrackerTopologyRcd, edm::Transition::BeginRun>()),
aliThrToken_(iC.esConsumes<AlignPCLThresholds, AlignPCLThresholdsRcd, edm::Transition::BeginRun>()),
aliThrToken_(iC.esConsumes<AlignPCLThresholdsHG, AlignPCLThresholdsHGRcd, edm::Transition::BeginRun>()),
theConfig(cfg),
theMode(this->decodeMode(theConfig.getUntrackedParameter<std::string>("mode"))),
theDir(theConfig.getUntrackedParameter<std::string>("fileDir")),
Expand Down Expand Up @@ -183,7 +183,7 @@ void MillePedeAlignmentAlgorithm::initialize(const edm::EventSetup &setup,
//Retrieve the thresolds cuts from DB for the PCL
if (runAtPCL_) {
const auto &th = &setup.getData(aliThrToken_);
theThresholds = std::make_shared<AlignPCLThresholds>();
theThresholds = std::make_shared<AlignPCLThresholdsHG>();
storeThresholds(th->getNrecords(), th->getThreshold_Map());
}

Expand Down Expand Up @@ -301,7 +301,7 @@ bool MillePedeAlignmentAlgorithm::addCalibrations(const std::vector<IntegratedCa

//____________________________________________________
bool MillePedeAlignmentAlgorithm::storeThresholds(const int &nRecords,
const AlignPCLThresholds::threshold_map &thresholdMap) {
const AlignPCLThresholdsHG::threshold_map &thresholdMap) {
theThresholds->setAlignPCLThresholds(nRecords, thresholdMap);
return true;
}
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -25,8 +25,8 @@
#include "DataFormats/TrackerCommon/interface/TrackerTopology.h"
#include "Geometry/Records/interface/TrackerTopologyRcd.h"

#include "CondFormats/PCLConfig/interface/AlignPCLThresholds.h"
#include "CondFormats/DataRecord/interface/AlignPCLThresholdsRcd.h"
#include "CondFormats/PCLConfig/interface/AlignPCLThresholdsHG.h"
#include "CondFormats/DataRecord/interface/AlignPCLThresholdsHGRcd.h"

#include <vector>
#include <string>
Expand Down Expand Up @@ -76,7 +76,7 @@ class MillePedeAlignmentAlgorithm : public AlignmentAlgorithmBase {
/// Pass integrated calibrations to Millepede (they are not owned by Millepede!)
bool addCalibrations(const std::vector<IntegratedCalibrationBase *> &iCals) override;

virtual bool storeThresholds(const int &nRecords, const AlignPCLThresholds::threshold_map &thresholdMap);
virtual bool storeThresholds(const int &nRecords, const AlignPCLThresholdsHG::threshold_map &thresholdMap);

/// Called at end of job
void terminate(const edm::EventSetup &iSetup) override;
Expand Down Expand Up @@ -271,7 +271,7 @@ class MillePedeAlignmentAlgorithm : public AlignmentAlgorithmBase {
//--------------------------------------------------------

const edm::ESGetToken<TrackerTopology, TrackerTopologyRcd> topoToken_;
const edm::ESGetToken<AlignPCLThresholds, AlignPCLThresholdsRcd> aliThrToken_;
const edm::ESGetToken<AlignPCLThresholdsHG, AlignPCLThresholdsHGRcd> aliThrToken_;

enum EModeBit { myMilleBit = 1 << 0, myPedeRunBit = 1 << 1, myPedeSteerBit = 1 << 2, myPedeReadBit = 1 << 3 };
unsigned int decodeMode(const std::string &mode) const;
Expand All @@ -291,7 +291,7 @@ class MillePedeAlignmentAlgorithm : public AlignmentAlgorithmBase {
std::unique_ptr<PedeSteerer> thePedeSteer;
std::unique_ptr<TrajectoryFactoryBase> theTrajectoryFactory;
std::vector<IntegratedCalibrationBase *> theCalibrations;
std::shared_ptr<AlignPCLThresholds> theThresholds;
std::shared_ptr<AlignPCLThresholdsHG> theThresholds;
unsigned int theMinNumHits;
double theMaximalCor2D; /// maximal correlation allowed for 2D hit in TID/TEC.
/// If larger, the 2D measurement gets diagonalized!!!
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -93,7 +93,7 @@ void MillePedeDQMModule ::beginRun(const edm::Run&, const edm::EventSetup& setup
// take the thresholds from DB
const auto& thresholds_ = &setup.getData(aliThrToken_);

auto myThresholds = std::make_shared<AlignPCLThresholds>();
auto myThresholds = std::make_shared<AlignPCLThresholdsHG>();
myThresholds->setAlignPCLThresholds(thresholds_->getNrecords(), thresholds_->getThreshold_Map());

TrackerGeomBuilderFromGeometricDet builder;
Expand All @@ -110,7 +110,7 @@ void MillePedeDQMModule ::beginRun(const edm::Run&, const edm::EventSetup& setup
labelerPlugin, PedeLabelerBase::TopLevelAlignables(tracker_.get(), nullptr, nullptr), labelerConfig)};

mpReader_ = std::make_unique<MillePedeFileReader>(
mpReaderConfig_, pedeLabeler, std::shared_ptr<const AlignPCLThresholds>(myThresholds));
mpReaderConfig_, pedeLabeler, std::shared_ptr<const AlignPCLThresholdsHG>(myThresholds));
}

void MillePedeDQMModule ::fillStatusHisto(MonitorElement* statusHisto) {
Expand Down Expand Up @@ -264,6 +264,10 @@ int MillePedeDQMModule ::getIndexFromString(const std::string& alignableId) {
return 5;
} else if (alignableId == "TPEHalfCylinderXplusZplus") {
return 4;
} else if (alignableId.rfind("TPBLadder", 0) == 0) {
return 6;
} else if (alignableId.rfind("TPEPanel", 0) == 0) {
return 7;
} else {
throw cms::Exception("LogicError") << "@SUB=MillePedeDQMModule::getIndexFromString\n"
<< "Retrieving conversion for not supported Alignable partition" << alignableId;
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -30,7 +30,7 @@
#include "Geometry/TrackerGeometryBuilder/interface/TrackerGeomBuilderFromGeometricDet.h"

/*** Thresholds from DB ***/
#include "CondFormats/DataRecord/interface/AlignPCLThresholdsRcd.h"
#include "CondFormats/DataRecord/interface/AlignPCLThresholdsHGRcd.h"

/*** DQM ***/
#include "DQMServices/Core/interface/DQMEDHarvester.h"
Expand Down Expand Up @@ -82,7 +82,7 @@ class MillePedeDQMModule : public DQMEDHarvester {
const edm::ESGetToken<GeometricDet, IdealGeometryRecord> gDetToken_;
const edm::ESGetToken<PTrackerParameters, PTrackerParametersRcd> ptpToken_;
const edm::ESGetToken<PTrackerAdditionalParametersPerDet, PTrackerAdditionalParametersPerDetRcd> ptitpToken_;
const edm::ESGetToken<AlignPCLThresholds, AlignPCLThresholdsRcd> aliThrToken_;
const edm::ESGetToken<AlignPCLThresholdsHG, AlignPCLThresholdsHGRcd> aliThrToken_;

const edm::ParameterSet mpReaderConfig_;
std::unique_ptr<AlignableTracker> tracker_;
Expand Down
16 changes: 8 additions & 8 deletions Alignment/MillePedeAlignmentAlgorithm/src/MillePedeFileReader.cc
Original file line number Diff line number Diff line change
Expand Up @@ -14,7 +14,7 @@

MillePedeFileReader ::MillePedeFileReader(const edm::ParameterSet& config,
const std::shared_ptr<const PedeLabelerBase>& pedeLabeler,
const std::shared_ptr<const AlignPCLThresholds>& theThresholds)
const std::shared_ptr<const AlignPCLThresholdsHG>& theThresholds)
: pedeLabeler_(pedeLabeler),
theThresholds_(theThresholds),
millePedeEndFile_(config.getParameter<std::string>("millePedeEndFile")),
Expand Down Expand Up @@ -142,32 +142,32 @@ void MillePedeFileReader ::readMillePedeResultFile() {

auto det = getHLS(alignable);
int detIndex = static_cast<int>(det);
auto coord = static_cast<AlignPCLThresholds::coordType>(alignableIndex);
auto coord = static_cast<AlignPCLThresholdsHG::coordType>(alignableIndex);
std::string detLabel = getStringFromHLS(det);

if (det != PclHLS::NotInPCL) {
switch (coord) {
case AlignPCLThresholds::X:
case AlignPCLThresholdsHG::X:
Xobs_[detIndex] = ObsMove;
XobsErr_[detIndex] = ObsErr;
break;
case AlignPCLThresholds::Y:
case AlignPCLThresholdsHG::Y:
Yobs_[detIndex] = ObsMove;
YobsErr_[detIndex] = ObsErr;
break;
case AlignPCLThresholds::Z:
case AlignPCLThresholdsHG::Z:
Zobs_[detIndex] = ObsMove;
ZobsErr_[detIndex] = ObsErr;
break;
case AlignPCLThresholds::theta_X:
case AlignPCLThresholdsHG::theta_X:
tXobs_[detIndex] = ObsMove;
tXobsErr_[detIndex] = ObsErr;
break;
case AlignPCLThresholds::theta_Y:
case AlignPCLThresholdsHG::theta_Y:
tYobs_[detIndex] = ObsMove;
tYobsErr_[detIndex] = ObsErr;
break;
case AlignPCLThresholds::theta_Z:
case AlignPCLThresholdsHG::theta_Z:
tZobs_[detIndex] = ObsMove;
tZobsErr_[detIndex] = ObsErr;
break;
Expand Down
16 changes: 8 additions & 8 deletions Configuration/AlCa/python/autoCond.py
Original file line number Diff line number Diff line change
Expand Up @@ -24,23 +24,23 @@
# GlobalTag for MC production (p-Pb collisions) with realistic alignment and calibrations for Run2
'run2_mc_pa' : '123X_mcRun2_pA_v1',
# GlobalTag for Run2 data reprocessing
'run2_data' : '124X_dataRun2_v1',
'run2_data' : '124X_dataRun2_v2',
# GlobalTag for Run2 data 2018B relvals only: HEM-15-16 fail
'run2_data_HEfail' : '124X_dataRun2_HEfail_v1',
'run2_data_HEfail' : '124X_dataRun2_HEfail_v2',
# GlobalTag for Run2 data relvals: allows customization to run with fixed L1 menu
'run2_data_relval' : '124X_dataRun2_relval_v1',
'run2_data_relval' : '124X_dataRun2_relval_v2',
# GlobalTag for Run2 HI data
'run2_data_promptlike_hi' : '123X_dataRun2_PromptLike_HI_v3',
'run2_data_promptlike_hi' : '124X_dataRun2_PromptLike_HI_v1',
# GlobalTag with fixed snapshot time for Run2 HLT RelVals: customizations to run with fixed L1 Menu
'run2_hlt_relval' : '123X_dataRun2_HLT_relval_v3',
# GlobalTag for Run3 HLT: identical to the online GT (124X_dataRun3_HLT_v1) but with snapshot at 2022-06-08 15:00:00 (UTC)
'run3_hlt' : '124X_dataRun3_HLT_frozen_v1',
# GlobalTag with fixed snapshot time for Run3 HLT RelVals: customizations to run with fixed L1 Menu
'run3_hlt_relval' : '124X_dataRun3_HLT_relval_v2',
# GlobalTag for Run3 data relvals (express GT) - identical to 123X_dataRun3_Express_v8 but with snapshot at 2022-05-31 20:00:00 (UTC)
'run3_data_express' : '123X_dataRun3_Express_frozen_v4',
# GlobalTag for Run3 data relvals (prompt GT) - identical to 123X_dataRun3_Prompt_v10 but with snapshot at 2022-05-31 20:00:00 (UTC)
'run3_data_prompt' : '123X_dataRun3_Prompt_frozen_v4',
# GlobalTag for Run3 data relvals (express GT) - identical to 124X_dataRun3_Express_v1 but with snapshot at 2022-06-09 20:00:00 (UTC)
'run3_data_express' : '124X_dataRun3_Express_frozen_v1',
# GlobalTag for Run3 data relvals (prompt GT) - identical to 124X_dataRun3_Prompt_v1 but with snapshot at 2022-06-09 20:00:00 (UTC)
'run3_data_prompt' : '124X_dataRun3_Prompt_frozen_v1',
# GlobalTag for Run3 offline data reprocessing
'run3_data' : '124X_dataRun3_v2',
# GlobalTag for Run3 data relvals: allows customization to run with fixed L1 menu
Expand Down