Changeset 100 in svn for trunk/src/FrogUtil.cc
- Timestamp:
- Dec 18, 2008, 2:39:26 PM (16 years ago)
- File:
-
- 1 edited
Legend:
- Unmodified
- Added
- Removed
-
trunk/src/FrogUtil.cc
r97 r100 485 485 486 486 double Rayon_Tracker=50; 487 double Rayon_Calo = Rayon_Tracker*2; 488 double Lenght_Tracker=120; 489 double Lenght_Calo=Lenght_Tracker+Lenght_Tracker/2; 490 double Lenght_FWCalo=Lenght_Tracker+Lenght_Tracker; 491 492 int NumPhi=10; 487 double Rayon_Calo = Rayon_Tracker*1.5; 488 double Rayon_Muon = Rayon_Tracker*2; 489 double Lenght_Tracker=100; 490 double Lenght_Calo=Lenght_Tracker+Lenght_Tracker/2.5; 491 double Lenght_Muon=Lenght_Calo+Lenght_Calo/2.5; 492 double Lenght_FWCalo=Lenght_Tracker+1.5*Lenght_Tracker; 493 494 int plus=1; 495 int NumPhi=4; 493 496 494 497 //************************************************Tracker************************************************* … … 498 501 detector->addDaughter(Tracker); 499 502 unsigned int DetIdCountTracker = 1; 500 for(double ray=0;ray <= Rayon_Tracker;ray +=5){ 503 for(double ray=0;ray <= Rayon_Tracker;ray +=plus){ 504 // double ray=Rayon_Tracker; 501 505 double length = ray/tan(EtaToTheta(DET->CEN_max_tracker)); 502 506 if(length >= Lenght_Tracker) 503 507 { 504 FROG_Element_Primitive_Cylinder* tracker = new FROG_Element_Primitive_Cylinder(9100000+DetIdCountTracker*10,ray,0,0,0,0,0,Lenght_Tracker,NumPhi,0); 508 FROG_Element_Primitive_Cylinder* tracker = new FROG_Element_Primitive_Cylinder(9100000+DetIdCountTracker*10,ray,0,0,0,0,0,Lenght_Tracker,NumPhi,1); 509 // FROG_Element_Primitive_Cone* tracker = new FROG_Element_Primitive_Cone(9100000+DetIdCountTracker*10,ray,0,0,0,0,0,Lenght_Tracker,NumPhi,1); 505 510 Tracker->addDaughter(tracker); DetIdCountTracker++; 506 511 } … … 518 523 unsigned int DetIdCountCalo = 1; 519 524 520 for(double ray=Rayon_Tracker;ray <= Rayon_Calo ;ray += 5){525 for(double ray=Rayon_Tracker;ray <= Rayon_Calo ;ray +=plus){ 521 526 double length = ray/tan(EtaToTheta(DET->CEN_max_calo_cen)); 522 527 double add; … … 529 534 } 530 535 } 531 for(double ray=0;ray <= Rayon_Tracker;ray += 5){536 for(double ray=0;ray <= Rayon_Tracker;ray +=plus){ 532 537 double length = ray/tan(EtaToTheta(DET->CEN_max_calo_cen)); 533 538 double add; … … 552 557 double eta_Max=DET->CEN_max_calo_fwd,eta_Min=DET->CEN_max_calo_cen; 553 558 554 for(double ray=0;ray <= 50;ray += 5){559 for(double ray=0;ray <= 50;ray +=plus){ 555 560 double length = ray/tan(EtaToTheta(eta_Max)); 556 561 double add; 557 if(length >= Lenght_FWCalo)add=(Lenght_FWCalo-Lenght_ Calo)/2;558 else add=(length-Lenght_ Calo)/2;562 if(length >= Lenght_FWCalo)add=(Lenght_FWCalo-Lenght_Muon)/2; 563 else add=(length-Lenght_Muon)/2; 559 564 560 565 if(add > 0 && ray < Lenght_FWCalo*tan(EtaToTheta(eta_Min))) 561 566 { 562 FROG_Element_Primitive_Cylinder* caloFW1 = new FROG_Element_Primitive_Cylinder(9300000+DetIdCountFwCalo*10,ray,0,0,(Lenght_ Calo+add)/2,0,0,add,NumPhi,0);567 FROG_Element_Primitive_Cylinder* caloFW1 = new FROG_Element_Primitive_Cylinder(9300000+DetIdCountFwCalo*10,ray,0,0,(Lenght_Muon+add)/2,0,0,add,NumPhi,0); 563 568 FWCALO->addDaughter(caloFW1); DetIdCountFwCalo++; 564 FROG_Element_Primitive_Cylinder* caloFW2 = new FROG_Element_Primitive_Cylinder(9300000+DetIdCountFwCalo*10,ray,0,0,-(Lenght_ Calo+add)/2,0,0,add,NumPhi,0);569 FROG_Element_Primitive_Cylinder* caloFW2 = new FROG_Element_Primitive_Cylinder(9300000+DetIdCountFwCalo*10,ray,0,0,-(Lenght_Muon+add)/2,0,0,add,NumPhi,0); 565 570 FWCALO->addDaughter(caloFW2); DetIdCountFwCalo++; 566 571 } 567 572 } 573 574 //***********************************************Muon chambers******************************************** 575 //******************************************************************************************************** 576 // 577 FROG_Element_Base_With_DetId_And_Name* MUON = new FROG_Element_Base_With_DetId_And_Name(940000000,"MuonDet"); 578 detector->addDaughter(MUON); 579 unsigned int DetIdCountMuon = 1; 580 581 for(double ray=Rayon_Calo;ray <= Rayon_Muon ;ray +=plus){ 582 double length = ray/tan(EtaToTheta(DET->CEN_max_mu)); 583 double add; 584 if(length >= Lenght_Muon)add=Lenght_Muon; 585 else add=ray/tan(EtaToTheta(DET->CEN_max_calo_cen)); 586 if(add > 0) 587 { 588 FROG_Element_Primitive_Cylinder* muon = new FROG_Element_Primitive_Cylinder(9400000+DetIdCountMuon*10,ray,0,0,0,0,0,add,NumPhi,0); 589 MUON->addDaughter(muon); DetIdCountMuon++; 590 } 591 } 592 for(double ray=0;ray <= Rayon_Calo;ray +=plus){ 593 double length = ray/tan(EtaToTheta(DET->CEN_max_calo_cen)); 594 double add; 595 if(length >= Lenght_Muon)add=(Lenght_Muon-Lenght_Calo)/2; 596 else add=(length-Lenght_Calo)/2; 597 if(add > 0) 598 { 599 FROG_Element_Primitive_Cylinder* muonP = new FROG_Element_Primitive_Cylinder(9400000+DetIdCountMuon*10,ray,0,0,(Lenght_Calo+add)/2,0,0,add,NumPhi,0); 600 MUON->addDaughter(muonP); DetIdCountMuon++; 601 FROG_Element_Primitive_Cylinder* muonM = new FROG_Element_Primitive_Cylinder(9400000+DetIdCountMuon*10,ray,0,0,-(Lenght_Calo+add)/2,0,0,add,NumPhi,0); 602 MUON->addDaughter(muonM); DetIdCountMuon++; 603 } 604 } 605 606 568 607 569 608 FROG_Geometry* CustomGeom = new FROG_Geometry(prim);
Note:
See TracChangeset
for help on using the changeset viewer.