27 edm::LogInfo(
"SurveyDataConverter") <<
"Analyzer called";
37 textFileNames[0] = textFiles.getUntrackedParameter<
std::string>(
"forTIB",
"NONE");
39 textFileNames[1] = textFiles.getUntrackedParameter<
std::string>(
"forTID",
"NONE");
44 if (textFileNames[
ii] ==
"NONE")
45 throw cms::Exception(
"BadConfig") << fileType[
ii] <<
" input file not found in configuration";
46 dataReader.
readFile(textFileNames[
ii], fileType[ii], tTopo);
51 std::cout <<
"DATA HAS BEEN READ INTO THE MAP" << std::endl;
52 std::cout <<
"DATA HAS BEEN CONVERTED IN ALIGNABLE COORDINATES" << std::endl;
67 std::cout <<
"Apply fine info: " << std::endl;
69 for (MapType::const_iterator it = map.begin(); it != map.end(); it++) {
73 translations.push_back(align_params[0]);
74 translations.push_back(align_params[1]);
75 translations.push_back(align_params[2]);
105 std::cout <<
"Apply coarse info: " << std::endl;
115 std::cout <<
"Apply APEs: " << std::endl;
123 if (TIBerrors.size() < 3 || TOBerrors.size() < 4 || TIDerrors.size() < 4 || TECerrors.size() < 4) {
124 std::cout <<
"APE info not valid : please check test/run-converter.cfg" << std::endl;
130 align::Alignables::const_iterator iter;
134 for (iter = theTIBhb.begin(); iter != theTIBhb.end(); ++iter) {
135 theModifier.addAlignmentPositionErrorLocal(*iter, TIBerrors.at(0), TIBerrors.at(0), TIBerrors.at(0));
138 for (iter = theTIBlayers.begin(); iter != theTIBlayers.end(); ++iter) {
139 theModifier.addAlignmentPositionErrorLocal(*iter, TIBerrors.at(1), TIBerrors.at(1), TIBerrors.at(1));
142 for (iter = theTIBgd.begin(); iter != theTIBgd.end(); ++iter) {
143 theModifier.addAlignmentPositionErrorLocal(*iter, TIBerrors.at(2), TIBerrors.at(2), TIBerrors.at(2));
148 for (iter = theTOBhb.begin(); iter != theTOBhb.end(); ++iter) {
149 theModifier.addAlignmentPositionErrorLocal(*iter, TOBerrors.at(0), TOBerrors.at(0), TOBerrors.at(1));
152 for (iter = theTOBrods.begin(); iter != theTOBrods.end(); ++iter) {
153 theModifier.addAlignmentPositionErrorLocal(*iter, TOBerrors.at(2), TOBerrors.at(2), TOBerrors.at(2));
156 for (iter = theTOBgd.begin(); iter != theTOBgd.end(); ++iter) {
157 theModifier.addAlignmentPositionErrorLocal(*iter, TOBerrors.at(3), TOBerrors.at(3), TOBerrors.at(3));
162 for (iter = theTIDs.begin(); iter != theTIDs.end(); ++iter) {
163 theModifier.addAlignmentPositionErrorLocal(*iter, TIDerrors.at(0), TIDerrors.at(0), TIDerrors.at(0));
166 for (iter = theTIDdiscs.begin(); iter != theTIDdiscs.end(); ++iter) {
167 theModifier.addAlignmentPositionErrorLocal(*iter, TIDerrors.at(1), TIDerrors.at(1), TIDerrors.at(1));
170 for (iter = theTIDrings.begin(); iter != theTIDrings.end(); ++iter) {
171 theModifier.addAlignmentPositionErrorLocal(*iter, TIDerrors.at(2), TIDerrors.at(2), TIDerrors.at(2));
174 for (iter = theTIDgd.begin(); iter != theTIDgd.end(); ++iter) {
175 theModifier.addAlignmentPositionErrorLocal(*iter, TIDerrors.at(3), TIDerrors.at(3), TIDerrors.at(3));
180 for (iter = theTECs.begin(); iter != theTECs.end(); ++iter) {
181 theModifier.addAlignmentPositionErrorLocal(*iter, TECerrors.at(0), TECerrors.at(0), TECerrors.at(0));
184 for (iter = theTECdiscs.begin(); iter != theTECdiscs.end(); ++iter) {
185 theModifier.addAlignmentPositionErrorLocal(*iter, TECerrors.at(1), TECerrors.at(1), TECerrors.at(1));
188 for (iter = theTECpetals.begin(); iter != theTECpetals.end(); ++iter) {
189 theModifier.addAlignmentPositionErrorLocal(*iter, TECerrors.at(2), TECerrors.at(2), TECerrors.at(2));
192 for (iter = theTECgd.begin(); iter != theTECgd.end(); ++iter) {
193 theModifier.addAlignmentPositionErrorLocal(*iter, TECerrors.at(3), TECerrors.at(3), TECerrors.at(3));
SurveyDataReader::MapType MapType
void analyze(const edm::Event &iEvent, const edm::EventSetup &iSetup) override
#define DEFINE_FWK_MODULE(type)
void applyFineSurveyInfo(TrackerAlignment &tr_align, const MapType &map)
const edm::ESGetToken< TrackerTopology, TrackerTopologyRcd > topoToken
bool getData(T &iHolder) const
U second(std::pair< T, U > const &p)
void applyCoarseSurveyInfo(TrackerAlignment &tr_align)
void applyAPEs(TrackerAlignment &tr_align)
edm::ParameterSet MisalignScenario
Alignables & innerBarrelGeomDets()
Return inner barrel GeomDets.
std::vector< Scalar > Scalars
Alignables & endCaps()
Return TECs.
Alignables & TIDGeomDets()
Return TID GeomDets.
Alignables & outerBarrelRods()
Return outer barrel rods.
void moveAlignableTIBTIDs(int rawId, const align::Scalars &globalDisplacements, const align::RotationType &backwardRotation, const align::RotationType &forwardRotation, bool toAndFro)
edm::ParameterSet theParameterSet
Alignables & endcapGeomDets()
Return endcap GeomDets.
SurveyDataConverter(const edm::ParameterSet &iConfig)
Alignables & TIDs()
Return TIDs.
Log< level::Info, false > LogInfo
const MapType & detIdMap() const
Alignables & outerBarrelGeomDets()
Return outer barrel GeomDets.
Alignables & TIDLayers()
Return TID layers.
Alignables & TIDRings()
Return TID rings.
T getParameter(std::string const &) const
AlignableTracker * getAlignableTracker()
std::vector< Alignable * > Alignables
Alignables & innerBarrelLayers()
Return inner barrel layers.
void readFile(const std::string &textFileName, const std::string &fileType, const TrackerTopology *tTopo)
Read given text file.
void applyScenario(const edm::ParameterSet &scenario) override
Apply misalignment scenario to the tracker.
const edm::ESGetToken< TrackerGeometry, TrackerDigiGeometryRecord > ttrackerGeometryToken
Alignables & endcapPetals()
Return encap petals.
Alignables & innerHalfBarrels()
Return TIB half barrels.
Builds a scenario from configuration and applies it to the alignable tracker.
Alignables & endcapLayers()
Return endcap layers.
Alignables & outerHalfBarrels()
Return TOB half barrels.