From b6c1953e970707a5e859fa92fd768196fb2f4897 Mon Sep 17 00:00:00 2001 From: Whitney Armstrong <warmstrong@anl.gov> Date: Thu, 20 May 2021 12:46:01 -0500 Subject: [PATCH] new file: .clang-format new file: README.md modified: gem_tracker.xml modified: gps.mac new file: results/.gitignore modified: scripts/tutorial1_hit_position.cxx --- .clang-format | 58 ++++++++++++++++++++++++++++++ README.md | 8 +++++ gem_tracker.xml | 7 ++-- gps.mac | 2 +- results/.gitignore | 0 scripts/tutorial1_hit_position.cxx | 4 +-- 6 files changed, 72 insertions(+), 7 deletions(-) create mode 100644 .clang-format create mode 100644 README.md create mode 100644 results/.gitignore diff --git a/.clang-format b/.clang-format new file mode 100644 index 0000000..3693b09 --- /dev/null +++ b/.clang-format @@ -0,0 +1,58 @@ +--- +BasedOnStyle: Chromium +BreakConstructorInitializersBeforeComma: true +AlignAfterOpenBracket: Align +AlignConsecutiveAssignments: true +AlignConsecutiveDeclarations: true +AlignEscapedNewlines: Right +AlignOperands: true +AlignTrailingComments: true +AllowAllParametersOfDeclarationOnNextLine: true +AllowShortBlocksOnASingleLine: false +AllowShortCaseLabelsOnASingleLine: false +AllowShortFunctionsOnASingleLine: All +AllowShortIfStatementsOnASingleLine: false +AllowShortLoopsOnASingleLine: false +AlwaysBreakAfterDefinitionReturnType: None +AlwaysBreakAfterReturnType: None +AlwaysBreakBeforeMultilineStrings: false +AlwaysBreakTemplateDeclarations: true +BraceWrapping: + AfterClass: false + AfterControlStatement: false + AfterEnum: false + AfterFunction: false + AfterNamespace: false + AfterObjCDeclaration: false + AfterStruct: false + AfterUnion: false + AfterExternBlock: false + BeforeCatch: false + BeforeElse: false + IndentBraces: false + SplitEmptyFunction: true + SplitEmptyRecord: true + SplitEmptyNamespace: true +ConstructorInitializerAllOnOneLineOrOnePerLine: true +Cpp11BracedListStyle: true +ColumnLimit: 120 +Standard: Cpp11 +#SpaceBeforeParens: ControlStatements +SpaceAfterControlStatementKeyword: true +BinPackArguments: true +BinPackParameters: true +PenaltyBreakAssignment: 2 +PenaltyBreakBeforeFirstCallParameter: 19 +PenaltyBreakComment: 300 +PenaltyBreakFirstLessLess: 120 +PenaltyBreakString: 1000 +PenaltyExcessCharacter: 1000000 +PenaltyReturnTypeOnItsOwnLine: 60 +PointerAlignment: Left +PointerBindsToType: true +NamespaceIndentation: All +ReflowComments: true +SortIncludes: true +SortUsingDeclarations: true +SpacesBeforeTrailingComments: 1 +... diff --git a/README.md b/README.md new file mode 100644 index 0000000..cdeac0e --- /dev/null +++ b/README.md @@ -0,0 +1,8 @@ +# EIC Software tutorial + +## Tutorial held on 5/21/2021 + +### Sessions: +- 08:30 am - 10:30 am CDT +- 12:30 am - 02:30 am CDT + diff --git a/gem_tracker.xml b/gem_tracker.xml index 8351846..2c874ea 100644 --- a/gem_tracker.xml +++ b/gem_tracker.xml @@ -93,14 +93,13 @@ <readouts> <readout name="GEMTrackerHits"> + <!-- <segmentation type="CartesianGridXY" grid_size_x="1*cm" grid_size_y="3*cm" /> <id>system:8,barrel:2,layer:4,module:12,sensor:2,x:32:-16,y:-16</id> - <!-- - <segmentation type="PolarGridRPhi" grid_size_phi="5.0*degree" grid_size_r="1.0*cm"/> - <id>system:5,barrel:3,layer:4,module:5,r:32:-16,phi:-16</id> --> + <segmentation type="PolarGridRPhi" grid_size_phi="3.0*degree" grid_size_r="5.0*cm"/> + <id>system:5,barrel:3,layer:4,module:5,r:32:-16,phi:-16</id> </readout> - </readouts> <!-- diff --git a/gps.mac b/gps.mac index 34a060a..90e9bbf 100644 --- a/gps.mac +++ b/gps.mac @@ -21,4 +21,4 @@ /gps/ang/mintheta 30 degree /gps/ang/maxtheta 160 degree -/run/beamOn 100 +/run/beamOn 1000 diff --git a/results/.gitignore b/results/.gitignore new file mode 100644 index 0000000..e69de29 diff --git a/scripts/tutorial1_hit_position.cxx b/scripts/tutorial1_hit_position.cxx index 50ac7c9..e566c89 100644 --- a/scripts/tutorial1_hit_position.cxx +++ b/scripts/tutorial1_hit_position.cxx @@ -87,8 +87,8 @@ void tutorial1_hit_position(const char* fname = "gem_tracker_sim.root") { auto d1 = d0.Define("nhits", nhits, {"GEMTrackerHits"}) .Filter([=](const std::vector<dd4pod::TrackerHitData>& hits) { for (auto h : hits) { - auto pos = h.position; - if (std::hypot(pos.x,pos.y) > 30.0) { + auto pos = ROOT::Math::XYZVector(h.position.x,h.position.y,h.position.z); + if ((pos.r() > 100.0) && (std::abs(pos.phi()-M_PI/2.0)< M_PI/6)) { return true; } } -- GitLab