30 std::vector<double>
disk_z = trackerMaterial.
getParameter<std::vector<double> >(
"disk_z");
49 bool add_disk =
false;
68 unsigned layerNr =
i +
j;
71 if (theDisk->mediumProperties().radLen() > 0.)
73 theDisk,
true, layerNr, std::vector<double>(), std::vector<double>(), std::vector<double>()));
87 unsigned layerNr =
i +
j;
90 if (theCylinder->mediumProperties().radLen() > 0.)
92 theCylinder,
false, layerNr, std::vector<double>(), std::vector<double>(), std::vector<double>()));
216 throw cms::Exception(
"FastSimulation/TrackerInteractionGeometry ")
217 <<
" WARNING with fudge factors ! You have " <<
fudgeLayer.size() <<
" layers, but " <<
fudgeMin.size()
218 <<
" min values, " <<
fudgeMax.size() <<
" max values and " <<
fudgeFactor.size() <<
" fudge factor values!"
220 <<
"Please make enter the same number of inputs "
221 <<
"in FastSimulation/TrackerInteractionGeometry/data/TrackerMaterial.cfi" << std::endl;
274 if (!theGeomSearchTracker)
276 <<
"The pointer to the GeometricSearchTracker was not set";
279 auto const& barrelLayers = theGeomSearchTracker->
barrelLayers();
300 auto bl = barrelLayers.begin();
301 double maxLength = (**bl).specificSurface().bounds().length() / 2. + 1.7;
302 double maxRadius = (**bl).specificSurface().radius() + 0.01;
311 maxLength =
std::max((**bl).specificSurface().bounds().length() / 2. + 1.7, maxLength + 0.000);
312 maxRadius = (**bl).specificSurface().radius();
321 maxRadius = (**bl).specificSurface().radius();
326 maxLength =
std::max((**bl).specificSurface().bounds().length() / 2. + 1.7, maxLength + 0.000);
347 maxRadius = (**bl).specificSurface().radius();
348 maxLength = (**bl).specificSurface().bounds().length() / 2.;
352 maxRadius = (**bl).specificSurface().radius();
353 maxLength =
std::max((**bl).specificSurface().bounds().length() / 2., maxLength + 0.000);
357 maxRadius = (**bl).specificSurface().radius();
358 maxLength =
std::max((**bl).specificSurface().bounds().length() / 2., maxLength + 0.000);
362 maxRadius = (**bl).specificSurface().radius();
363 maxLength =
std::max((**bl).specificSurface().bounds().length() / 2., maxLength + 0.000);
381 maxRadius = (**bl).specificSurface().radius();
382 maxLength = (**bl).specificSurface().bounds().length() / 2. + 0.0;
386 maxRadius = (**bl).specificSurface().radius();
387 maxLength =
std::max((**bl).specificSurface().bounds().length() / 2. + 0.0, maxLength + 0.000);
391 maxRadius = (**bl).specificSurface().radius();
392 maxLength =
std::max((**bl).specificSurface().bounds().length() / 2. + 0.0, maxLength + 0.000);
396 maxRadius = (**bl).specificSurface().radius();
397 maxLength =
std::max((**bl).specificSurface().bounds().length() / 2. + 0.0, maxLength + 0.000);
401 maxRadius = (**bl).specificSurface().radius();
402 maxLength =
std::max((**bl).specificSurface().bounds().length() / 2. + 0.0, maxLength + 0.000);
406 maxRadius = (**bl).specificSurface().radius();
407 maxLength =
std::max((**bl).specificSurface().bounds().length() / 2. + 0.0, maxLength + 0.000);
422 auto fl = posForwardLayers.begin();
426 double innerRadius = (**fl).specificSurface().innerRadius() - 1.0;
427 double outerRadius = (**fl).specificSurface().outerRadius() + 2.0;
432 innerRadius = (**fl).specificSurface().innerRadius() - 1.0;
441 innerRadius = (**fl).specificSurface().innerRadius() - 0.5;
442 outerRadius = (**fl).specificSurface().outerRadius() + 3.5;
447 innerRadius = (**fl).specificSurface().innerRadius() - 0.5;
453 innerRadius = (**fl).specificSurface().innerRadius() - 0.5;
467 innerRadius = (**fl).specificSurface().innerRadius() - 1.5;
468 outerRadius = (**fl).specificSurface().outerRadius() + 2.0;
473 innerRadius = (**fl).specificSurface().innerRadius() - 1.5;
479 innerRadius = (**fl).specificSurface().innerRadius() - 1.5;
485 innerRadius = (**fl).specificSurface().innerRadius() - 2.5;
491 innerRadius = (**fl).specificSurface().innerRadius() - 2.5;
497 innerRadius = (**fl).specificSurface().innerRadius() - 2.5;
503 innerRadius = (**fl).specificSurface().innerRadius() - 9.5;
509 innerRadius = (**fl).specificSurface().innerRadius() - 9.5;
515 innerRadius = (**fl).specificSurface().innerRadius() - 20.5;
533 unsigned layerNr = 100;
536 if (theCylinder->mediumProperties().radLen() > 0.)
545 theCylinder =
new BoundCylinder(thePosition, theRotation, PIXB1);
547 if (theCylinder->mediumProperties().radLen() > 0.)
554 theDisk =
new BoundDisk(PPIXBOut1, theRotation2, PIXBOut1);
556 if (theDisk->mediumProperties().radLen() > 0.)
563 theCylinder =
new BoundCylinder(thePosition, theRotation, PIXB2);
565 if (theCylinder->mediumProperties().radLen() > 0.)
572 theDisk =
new BoundDisk(PPIXBOut2, theRotation2, PIXBOut2);
574 if (theDisk->mediumProperties().radLen() > 0.)
581 theDisk =
new BoundDisk(PPIXBOut3, theRotation2, PIXBOut3);
583 if (theDisk->mediumProperties().radLen() > 0.)
590 theCylinder =
new BoundCylinder(thePosition, theRotation, PIXB3);
592 if (theCylinder->mediumProperties().radLen() > 0.)
599 theDisk =
new BoundDisk(PPIXBOut4, theRotation2, PIXBOut4);
601 if (theDisk->mediumProperties().radLen() > 0.)
608 theDisk =
new BoundDisk(PPIXBOut, theRotation2, PIXBOut);
610 if (theDisk->mediumProperties().radLen() > 0.)
617 theDisk =
new BoundDisk(PPIXD1, theRotation2, PIXD1);
619 if (theDisk->mediumProperties().radLen() > 0.)
626 theDisk =
new BoundDisk(PPIXD2, theRotation2, PIXD2);
628 if (theDisk->mediumProperties().radLen() > 0.)
635 theCylinder =
new BoundCylinder(thePosition, theRotation, PIXBOut5);
637 if (theCylinder->mediumProperties().radLen() > 0.)
644 theDisk =
new BoundDisk(PPIXBOut6, theRotation2, PIXBOut6);
646 if (theDisk->mediumProperties().radLen() > 0.)
656 theCylinder->setMediumProperties(*
_theMPTIB1);
657 if (theCylinder->mediumProperties().radLen() > 0.)
665 theCylinder->setMediumProperties(*
_theMPTIB2);
666 if (theCylinder->mediumProperties().radLen() > 0.)
674 theCylinder->setMediumProperties(*
_theMPTIB3);
675 if (theCylinder->mediumProperties().radLen() > 0.)
683 theCylinder->setMediumProperties(*
_theMPTIB4);
684 if (theCylinder->mediumProperties().radLen() > 0.)
691 theDisk =
new BoundDisk(PTIBEOut, theRotation2, TIBEOut);
693 if (theDisk->mediumProperties().radLen() > 0.)
700 theDisk =
new BoundDisk(PTIBEOut2, theRotation2, TIBEOut2);
702 if (theDisk->mediumProperties().radLen() > 0.)
713 if (theDisk->mediumProperties().radLen() > 0.)
721 if (theDisk->mediumProperties().radLen() > 0.)
730 if (theDisk->mediumProperties().radLen() > 0.)
737 theDisk =
new BoundDisk(PTIDEOut, theRotation2, TIDEOut);
739 if (theDisk->mediumProperties().radLen() > 0.)
748 theCylinder =
new BoundCylinder(thePosition, theRotation, TOBCIn);
750 if (theCylinder->mediumProperties().radLen() > 0.)
758 theCylinder->setMediumProperties(*
_theMPTOB1);
759 if (theCylinder->mediumProperties().radLen() > 0.)
767 theCylinder->setMediumProperties(*
_theMPTOB2);
768 if (theCylinder->mediumProperties().radLen() > 0.)
776 theCylinder->setMediumProperties(*
_theMPTOB3);
777 if (theCylinder->mediumProperties().radLen() > 0.)
785 theCylinder->setMediumProperties(*
_theMPTOB4);
786 if (theCylinder->mediumProperties().radLen() > 0.)
794 theCylinder->setMediumProperties(*
_theMPTOB5);
795 if (theCylinder->mediumProperties().radLen() > 0.)
803 theCylinder->setMediumProperties(*
_theMPTOB6);
804 if (theCylinder->mediumProperties().radLen() > 0.)
811 theDisk =
new BoundDisk(PTOBEOut, theRotation2, TOBEOut);
813 if (theDisk->mediumProperties().radLen() > 0.)
824 if (theDisk->mediumProperties().radLen() > 0.)
832 if (theDisk->mediumProperties().radLen() > 0.)
838 theDisk =
new BoundDisk(PTEC3, theRotation2, TEC3);
840 if (theDisk->mediumProperties().radLen() > 0.)
846 theDisk =
new BoundDisk(PTEC4, theRotation2, TEC4);
848 if (theDisk->mediumProperties().radLen() > 0.)
854 theDisk =
new BoundDisk(PTEC5, theRotation2, TEC5);
856 if (theDisk->mediumProperties().radLen() > 0.)
862 theDisk =
new BoundDisk(PTEC6, theRotation2, TEC6);
864 if (theDisk->mediumProperties().radLen() > 0.)
870 theDisk =
new BoundDisk(PTEC7, theRotation2, TEC7);
872 if (theDisk->mediumProperties().radLen() > 0.)
878 theDisk =
new BoundDisk(PTEC8, theRotation2, TEC8);
880 if (theDisk->mediumProperties().radLen() > 0.)
886 theDisk =
new BoundDisk(PTEC9, theRotation2, TEC9);
888 if (theDisk->mediumProperties().radLen() > 0.)
896 theCylinder =
new BoundCylinder(thePosition, theRotation, TBOut);
898 if (theCylinder->mediumProperties().radLen() > 0.)
905 theDisk =
new BoundDisk(PTEOut, theRotation2, TEOut);
907 if (theDisk->mediumProperties().radLen() > 0.)
914 theDisk =
new BoundDisk(PTEOut2, theRotation2, TEOut2);
916 if (theDisk->mediumProperties().radLen() > 0.)
929 std::list<TrackerLayer>::const_iterator cyliterOut =
cylinderBegin();
931 if (cyliterOut->forward()) {
932 zin = cyliterOut->disk()->position().z();
933 rin = cyliterOut->disk()->outerRadius();
935 zin = cyliterOut->cylinder()->bounds().length() / 2.;
936 rin = cyliterOut->cylinder()->bounds().width() / 2.;
944 if (cyliterOut->forward()) {
945 zout = cyliterOut->disk()->position().z();
946 rout = cyliterOut->disk()->outerRadius();
948 zout = cyliterOut->cylinder()->bounds().length() / 2.;
949 rout = cyliterOut->cylinder()->bounds().width() / 2.;
953 if (zout < zin || rout < rin) {
954 throw cms::Exception(
"FastSimulation/TrackerInteractionGeometry ")
955 <<
" WARNING with cylinder number " << nCyl <<
" (Active Layer Number = " << cyliterOut->layerNumber()
956 <<
" Forward ? " << cyliterOut->forward() <<
" ) "
957 <<
" has dimensions smaller than previous cylinder : " << std::endl
958 <<
" zout/zin = " << zout <<
" " << zin << std::endl
959 <<
" rout/rin = " << rout <<
" " << rin << std::endl;
981 std::vector<double>
min;
982 for (
unsigned iLayer = 0; iLayer <
fudgeFactor.size(); ++iLayer) {
991 std::vector<double>
max;
992 for (
unsigned iLayer = 0; iLayer <
fudgeFactor.size(); ++iLayer) {
1001 std::vector<double> fudge;
1002 for (
unsigned iLayer = 0; iLayer <
fudgeFactor.size(); ++iLayer) {