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: move topology parameters from PSet to xml, adapt the code #25417
Merged
Merged
Changes from 6 commits
Commits
Show all changes
7 commits
Select commit
Hold shift + click to select a range
0988b04
Move MTD parameters from PSet to xml
fabiocos c4286c9
add mtdParameters.xml to geometry configurations
fabiocos 57da8a7
Dump topology infomration and compare with detId
fabiocos ceaae07
Address comments in #25384 by M. Kortelainen, simplify MTDToplogyMode…
fabiocos 5451f7f
Minor code cleaning
fabiocos c3498e7
Address comments of K. Pedro, add further debug printouts
fabiocos 06403ce
Address comments of C. Vuosalo, temporarily remove serialization test…
fabiocos File filter
Filter by extension
Conversations
Failed to load comments.
Jump to
Jump to file
Failed to load files.
Diff view
Diff view
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,16 @@ | ||
<?xml version="1.0"?> | ||
<DDDefinition xmlns="http://www.cern.ch/cms/DDL" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xsi:schemaLocation="http://www.cern.ch/cms/DDL ../../../DetectorDescription/Schema/DDLSchema.xsd"> | ||
<ConstantsSection label="mtdParameters.xml" eval="true"> | ||
|
||
<Vector name="vPars" type="numeric" nEntries="4"> | ||
4, 4, 4, 24 | ||
</Vector> | ||
<Vector name="BTL" type="numeric" nEntries="12"> | ||
22, 24, 16, 10, 0x1, 0x3, 0x3F, 0x3F, 1, 16, 4, 1 | ||
</Vector> | ||
<Vector name="ETL" type="numeric" nEntries="12"> | ||
22, 24, 16, 7, 0x1, 0x3, 0x3F, 0xFF, 24, 4, 2, 8 | ||
</Vector> | ||
|
||
</ConstantsSection> | ||
</DDDefinition> |
16 changes: 16 additions & 0 deletions
16
Geometry/MTDCommonData/data/CrystalBarZflat/mtdParameters.xml
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,16 @@ | ||
<?xml version="1.0"?> | ||
<DDDefinition xmlns="http://www.cern.ch/cms/DDL" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xsi:schemaLocation="http://www.cern.ch/cms/DDL ../../../DetectorDescription/Schema/DDLSchema.xsd"> | ||
<ConstantsSection label="mtdParameters.xml" eval="true"> | ||
|
||
<Vector name="vPars" type="numeric" nEntries="4"> | ||
4, 4, 4, 24 | ||
</Vector> | ||
<Vector name="BTL" type="numeric" nEntries="12"> | ||
22, 24, 16, 10, 0x1, 0x3, 0x3F, 0x3F, 1, 16, 4, 1 | ||
</Vector> | ||
<Vector name="ETL" type="numeric" nEntries="12"> | ||
22, 24, 16, 7, 0x1, 0x3, 0x3F, 0xFF, 24, 4, 2, 8 | ||
</Vector> | ||
|
||
</ConstantsSection> | ||
</DDDefinition> |
16 changes: 16 additions & 0 deletions
16
Geometry/MTDCommonData/data/CrystalBarZflatNOhole/mtdParameters.xml
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,16 @@ | ||
<?xml version="1.0"?> | ||
<DDDefinition xmlns="http://www.cern.ch/cms/DDL" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xsi:schemaLocation="http://www.cern.ch/cms/DDL ../../../DetectorDescription/Schema/DDLSchema.xsd"> | ||
<ConstantsSection label="mtdParameters.xml" eval="true"> | ||
|
||
<Vector name="vPars" type="numeric" nEntries="4"> | ||
4, 4, 4, 24 | ||
</Vector> | ||
<Vector name="BTL" type="numeric" nEntries="12"> | ||
22, 24, 16, 10, 0x1, 0x3, 0x3F, 0x3F, 1, 16, 4, 1 | ||
</Vector> | ||
<Vector name="ETL" type="numeric" nEntries="12"> | ||
22, 24, 16, 7, 0x1, 0x3, 0x3F, 0xFF, 24, 4, 2, 8 | ||
</Vector> | ||
|
||
</ConstantsSection> | ||
</DDDefinition> |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,16 @@ | ||
<?xml version="1.0"?> | ||
<DDDefinition xmlns="http://www.cern.ch/cms/DDL" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xsi:schemaLocation="http://www.cern.ch/cms/DDL ../../../DetectorDescription/Schema/DDLSchema.xsd"> | ||
<ConstantsSection label="mtdParameters.xml" eval="true"> | ||
|
||
<Vector name="vPars" type="numeric" nEntries="4"> | ||
4, 4, 4, 24 | ||
</Vector> | ||
<Vector name="BTL" type="numeric" nEntries="12"> | ||
22, 24, 16, 10, 0x1, 0x3, 0x3F, 0x3F, 4, 4, 4, 1 | ||
</Vector> | ||
<Vector name="ETL" type="numeric" nEntries="12"> | ||
22, 24, 16, 7, 0x1, 0x3, 0x3F, 0xFF, 24, 4, 2, 8 | ||
</Vector> | ||
|
||
</ConstantsSection> | ||
</DDDefinition> |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,20 @@ | ||
#include "Geometry/MTDCommonData/interface/MTDTopologyMode.h" | ||
|
||
#include <string> | ||
|
||
namespace MTDTopologyMode { | ||
|
||
Mode MTDStringToEnumParser( const std::string &value ) { | ||
|
||
std::string prefix("MTDTopologyMode::"); | ||
Mode output = Mode::undefined; | ||
if ( value == prefix+"tile" ) { output = Mode::tile; } | ||
else if ( value == prefix+"bar" ) { output = Mode::bar; } | ||
else if ( value == prefix+"barzflat" ) { output = Mode::barzflat; } | ||
else { throw cms::Exception( "MTDTopologyModeError" ) | ||
<< "the value " << value << " is not defined."; } | ||
return output; | ||
|
||
} | ||
|
||
} |
This file was deleted.
Oops, something went wrong.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file was deleted.
Oops, something went wrong.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Oops, something went wrong.
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
If cast cannot be avoided, it would be better to use a named cast:
result = static_cast<int>(eparser);
These links have more info:
https://github.com/isocpp/CppCoreGuidelines/blob/master/CppCoreGuidelines.md#es49-if-you-must-use-a-cast-use-a-named-cast
https://www.geeksforgeeks.org/static_cast-in-c-type-casting-operators/
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
@cvuosalo thanks for the suggestion, I implement it assuming that the resi is ok for you and @ianna