Skip to content

Geometry Factory for Muon Calorimeter#1302

Open
ethancline wants to merge 15 commits into
developmentfrom
mucal-geomfactory
Open

Geometry Factory for Muon Calorimeter#1302
ethancline wants to merge 15 commits into
developmentfrom
mucal-geomfactory

Conversation

@ethancline
Copy link
Copy Markdown
Collaborator

Initial implementation of Muon Calorimeter Geometry Factory for the future ddvcs experiment.


/**
*
* @author kenjo
Copy link
Copy Markdown
Collaborator

Choose a reason for hiding this comment

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

Is this the correct author?


private Geant4Basic getLayer(int isec, int isuper, int ilayer) {
return getRegion(isec, isuper/2).getChildren().get((isuper%2)*6 + ilayer);
return getRegion(isec, isuper/2).getChildren().get(0).getChildren().get((isuper%2)*6 + ilayer);
Copy link
Copy Markdown
Collaborator

Choose a reason for hiding this comment

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

Should there be a comment about "why the get(0)"?

Copy link
Copy Markdown
Collaborator

Choose a reason for hiding this comment

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

the DC factory should not be part of this PR

*/
public final class MUCALGeant4Factory extends Geant4Factory {

private final double motherGap = 4.0 * Length.cm;
Copy link
Copy Markdown
Collaborator

Choose a reason for hiding this comment

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

lines 31-47 seem to be leftovers of the FTOF factory that was used as an example to start from, and could be removed

// private final double[] mucal_oradius = { CrmaxU + 40*microgap, CrmaxD + 40*microgap };
private final int[] nPaddles = new int[stringLayers.length];

private final int npaddles = 48;
Copy link
Copy Markdown
Collaborator

Choose a reason for hiding this comment

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

same as above

private List<G4Trd> createLayer(ConstantProvider cp, int layer) {


double Dat25deg = 596.*Length.mm; // distance of the upstream face from the target at 25 deg
Copy link
Copy Markdown
Collaborator

Choose a reason for hiding this comment

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

same as above


double Dat25deg = 596.*Length.mm; // distance of the upstream face from the target at 25 deg
double ThetaU = Math.toRadians(25); // deg
double ThetaMin = Math.toRadians(7); // deg
Copy link
Copy Markdown
Collaborator

Choose a reason for hiding this comment

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

aren't the crystal parameters already defined above?

double microgap = 0.5*Length.mm;
double Cwidth = (CwidthU+CwidthD)/2. + microgap;
int nCrystal = 2*((int)(CrmaxU / Cwidth)+100);// add 100 to get full coverage
double paddlewidth = 10*Length.cm;
Copy link
Copy Markdown
Collaborator

Choose a reason for hiding this comment

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

are these used?

return paddleVolumes;
}

public G4Box getComponent(int sector, int layer, int paddle) {
Copy link
Copy Markdown
Collaborator

Choose a reason for hiding this comment

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

zg4Box should be replaced with G4Trd

throw new IndexOutOfBoundsException();
}

public double getThickness(int sector, int layer, int paddle) {
Copy link
Copy Markdown
Collaborator

Choose a reason for hiding this comment

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

this and the following three methods can be removed

private final double CrmaxD = CrmaxU + Clength*Math.tan(CexitAngle);


private final double nplanes = 4;
Copy link
Copy Markdown
Collaborator

Choose a reason for hiding this comment

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

is the polucone containing the crystals created?

double centerX, centerY, x12, x22, y12, y22, rad1, rad2, rad3, rad4, rxy;
double centerZ, thetaX, thetaY, radius, posX, posY, posZ, dx1, dx2, dz;
String vname;
List<G4Trd> paddleVolumes = new ArrayList<>();
Copy link
Copy Markdown
Collaborator

Choose a reason for hiding this comment

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

maybe replace paddle with crystal?

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