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

Cigar #258

Closed
wants to merge 4 commits into from
Closed

Cigar #258

wants to merge 4 commits into from

Conversation

MarcSeemann
Copy link

No description provided.

@paolafer
Copy link
Contributor

Hi @MarcSeemann! I've noticed that your branch is quite old (in fact, it doesn't compile with the last Geant4 version). I suggest you rebase it on master before we can go through a review.

@MarcSeemann
Copy link
Author

MarcSeemann commented Jun 24, 2024 via email

@paolafer
Copy link
Contributor

Hey Dr. Paola Ferrario,Sorry I didn‘t mean to try and push to main. But yes, if I ever want to I will make sure it works with the latest version.Kind Regards>

It's just that for anyone to review your code properly, it needs to compile and it doesn't at the moment. I can hack it locally and make it compile for now, but you should rebase it, and the sooner the better.

@paolafer
Copy link
Contributor

There are a lot of geometry overlaps in the code. Review each one of them, because they could bring to an unexpected behaviour in tracking.

@@ -0,0 +1,26 @@
### --------------------------------------------------------
### This init macro simulates the response of a SensL SiPM DICE
Copy link
Contributor

Choose a reason for hiding this comment

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

Update the description of the macro to what it actually does.

@@ -0,0 +1,21 @@
#/Generator/SingleParticle/particle opticalphoton
Copy link
Contributor

Choose a reason for hiding this comment

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

Add the description of the macro (same text as the init file).


/nexus/RegisterRunAction DefaultRunAction
/nexus/RegisterTrackingAction DefaultTrackingAction
/nexus/RegisterTrackingAction OpticalTrackingAction
Copy link
Contributor

Choose a reason for hiding this comment

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

The OpticalTrackingAction saves all optical photons. Why do you need that? It creates very huge files and should be used only for debugging. Please, use the default tracking action instead.

@@ -0,0 +1,64 @@
#!/bin/bash
Copy link
Contributor

Choose a reason for hiding this comment

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

Remove this file, you may have added it by mistake.

@@ -0,0 +1,21 @@
#/Generator/SingleParticle/particle opticalphoton
Copy link
Contributor

Choose a reason for hiding this comment

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

Remove this file.


new G4LogicalSkinSurface("TEFLON_OPSURF", teflon_logic_top, opsur_teflon);

G4VPhysicalVolume *teflon_top = new G4PVPlacement(0, G4ThreeVector(0, cigar_width_/2+panel_width/2+fiber_diameter_+extra_width/2+panel_width/2+fiber_diameter_/4,0),
Copy link
Contributor

Choose a reason for hiding this comment

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

You don't need to define a variable for the placement, if you're not going to use it later. You can just write:

new G4PVPlacement(...)

// G4LogicalVolume* teflon_logic_front =
// new G4LogicalVolume(teflon_closing_panel, teflon, "TEFLON");
// teflon_logic_front->SetVisAttributes(nexus::White());
G4VSolid* temp_solid = teflon_closing_panel;
Copy link
Contributor

Choose a reason for hiding this comment

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

Why are you redefining this variable?

// new G4LogicalVolume(teflon_closing_panel, teflon, "TEFLON");
// teflon_logic_front->SetVisAttributes(nexus::White());
G4VSolid* temp_solid = teflon_closing_panel;
G4double fiber_radius = fiber_diameter_/1.1;
Copy link
Contributor

Choose a reason for hiding this comment

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

The name of this variable is somewhat misleading: a radius should be a diameter/2. In line 328 it becomes evident that it is not a radius, so change the name to a more meaningful one.


std::string label = std::to_string(ifiber);

G4PVPlacement* fiber_placement1 = new G4PVPlacement(0, G4ThreeVector(cigar_width_ / 2 + fiber_diameter_ / 2+extra_width/2+panel_width/2+fiber_diameter_/4, -cigar_width_ / 2 + ifiber * fiber_diameter_ + fiber_diameter_ / 2, 3.5 * cm),
Copy link
Contributor

Choose a reason for hiding this comment

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

Review the length of the lines following the nexus coding conventions.

### board in the black box.
### --------------------------------------------------------

/control/execute macros/physics/DefaultPhysicsList.mac
Copy link
Contributor

Choose a reason for hiding this comment

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

If you use the default physics, do not repeat the 13-18 lines. Make sure you actually want to use the default list, otherwise, just remove this line.

@paolafer paolafer closed this Jun 24, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

3 participants