Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

MTD geometry: speed up MTD reco geometry construction #43124

Merged
merged 2 commits into from
Nov 6, 2023
Merged
Changes from 1 commit
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
52 changes: 0 additions & 52 deletions Geometry/MTDNumberingBuilder/plugins/DDCmsMTDConstruction.cc
Original file line number Diff line number Diff line change
@@ -1,5 +1,3 @@
//#define EDM_ML_DEBUG
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Do you want to remove also this comment of debug? Because I still see #ifdef EDM_ML_DEBUG in the code.

Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I would guess there is nothing left to test, next time it may be added.

Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Not sure I understand. I see, i.e.

#ifdef EDM_ML_DEBUG
    edm::LogVerbatim("MTDNumbering") << "Module = " << fv.name() << " fullNode = " << fullNode
                                     << " thisNode = " << thisNode;
#endif

in the code. It is not a big deal for me. I just want to confirm if this is by intention.

Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Just to note that the preferred way is to define the EDM_ML_DEBUG macro at the compilation command

USER_CXXFLAGS="-DEDM_ML_DEBUG" scram b

https://twiki.cern.ch/twiki/bin/view/CMSPublic/SWGuideMessageLogger#LogDebug

(that doesn't provide file-level control, but the message categories are the intended ones for finer-grained control)

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I very often use file-level control, and in the past I was used to add commented #define EDM_ML_DEBUG statements in many places. But since the file needs anyway to be edited, adding the statement directly when needed does not really make any difference, and the code looks cleaner.


#include "Geometry/MTDNumberingBuilder/plugins/DDCmsMTDConstruction.h"

#include <utility>
Expand Down Expand Up @@ -51,56 +49,6 @@ std::unique_ptr<GeometricTimingDet> DDCmsMTDConstruction::construct(const DDComp
filter.add("btl:");
filter.add("etl:");

std::vector<std::string> volnames = {"service",
"support",
"FSide",
"BSide",
"LSide",
"RSide",
"Between",
"SupportPlate",
"Shield",
"ThermalScreen",
"Aluminium_Disc",
"MIC6_Aluminium_Disc",
"ThermalPad",
"AlN",
"LairdFilm",
"ETROC",
"SensorModule",
"SensorModule_Front_Left",
"SensorModule_Front_Right",
"SensorModule_Back_Left",
"SensorModule_Back_Right",
"DiscSector",
"LGAD_Substrate",
"ConcentratorCard",
"PowerControlCard",
"CoolingPlate",
"FrontEndCard",
"FrontModerator",
"Cables",
"Cables1",
"Cables2",
"Cables3",
"Cables4",
"Cables5",
"Cables6",
"Cables7",
"PatchPanel",
"Notich_cables",
"ServicesExtVolume1",
"ServicesExtVolume2",
"glueLGAD",
"BumpBonds",
"ModulePCB",
"connectorsGap",
"ReadoutBoard",
"LGAD"};
for (auto const& theVol : volnames) {
filter.veto(theVol);
}

DDFilteredView fv(cpv, filter);

CmsMTDStringToEnum theCmsMTDStringToEnum;
Expand Down