- Timestamp:
- Dec 24, 2008, 11:21:44 AM (16 years ago)
- Location:
- trunk
- Files:
-
- 2 edited
Legend:
- Unmodified
- Added
- Removed
-
trunk/Utilities/FROG/config.txt
r109 r112 88 88 Id_21005000_Color = {0.0 , 1.0 , 1.0 , 1.0}; // Jets 89 89 Id_21006000_Color = {0.5 , 0.5 , 0.5 , 1.0}; // MET 90 =======91 Id_21001000_Color = {0.0 , 1.0 , 0.0 , 1.0}; // Electrons92 Id_21002000_Color = {0.0 , 0.0 , 1.0 , 1.0}; // Muons93 Id_21003000_Color = {1.0 , 0.0 , 0.0 , 1.0}; // Taus94 Id_21004000_Color = {1.0 , 1.0 , 0.0 , 1.0}; // Photons95 Id_21005000_Color = {0.0 , 1.0 , 1.0 , 1.0}; // Jets96 Id_21006000_Color = {1.0 , 0.0 , 1.0 , 1.0}; // MET97 >>>>>>> 1.398 90 99 91 -
trunk/src/FrogUtil.cc
r107 r112 79 79 FROG_Element_Event_Hit* hit1 = new FROG_Element_Event_Hit(400000001 + ((int)pos1_z)/50, pos1_x, pos1_y, pos1_z, -1); 80 80 track1->addDaughter(hit1); 81 82 81 83 trackCollection->addDaughter(track1); 82 84 // photon 2 … … 360 362 const TClonesArray* branchJet = treeReader ->UseBranch("Jet"); 361 363 const TClonesArray* branchMET = treeReader ->UseBranch("ETmis"); 362 const TClonesArray* branchTracks = treeReader ->UseBranch("Tracks");363 const TClonesArray* particles = treeReaderGen->UseBranch("Particle");364 364 365 365 TRootElectron* elec; … … 385 385 386 386 //Create a new event 387 387 388 FROG_Element_Event* frog_event = new FROG_Element_Event(1,entry); 388 389 frog_events->AddEvent(frog_event); … … 439 440 440 441 //SIM JETS 441 442 //Create a new sub-branch in the SIM branch with name Jets: this sub branch will contais all the Jets 442 //Create a new sub-branch in the SIM branch with name Jets: this sub branch will contais all the Jets 443 443 FROG_Element_Base_With_DetId_And_Name* frog_branchJets = new FROG_Element_Base_With_DetId_And_Name(EVTID_SIM+5000,"Jets"); 444 444 frog_branchSIM->addDaughter(frog_branchJets); … … 446 446 jet = (TRootJet*) branchJet->At(p); 447 447 cout<<"Jet nO"<<p<<" PT: "<<jet->PT<<"Eta "<<jet->Eta<<" Phi"<<jet->Phi<<endl; 448 cout<<"eta du jet "<<jet->Eta<<" theta du jet "<<FROG_COORD::EtaToTheta(jet->Eta)<<" et en degre "<<57.29*FROG_COORD::EtaToTheta(jet->Eta)<<endl;449 448 FROG_Element_Event_Jet* frog_jet = new FROG_Element_Event_Jet(jet->E,jet->Eta,jet->Phi); 450 449 frog_branchJets->addDaughter(frog_jet); … … 486 485 mygeom->addDaughter(detector); 487 486 488 double Rayon_Tracker= 50;487 double Rayon_Tracker=40; 489 488 double Rayon_Calo = Rayon_Tracker*1.5; 490 489 double Rayon_Muon = Rayon_Tracker*2; … … 492 491 double Lenght_Calo=Lenght_Tracker+Lenght_Tracker/2.5; 493 492 double Lenght_Muon=Lenght_Calo+Lenght_Calo/2.5; 494 double Lenght_FWCalo=Lenght_Tracker+1.5*Lenght_Tracker; 495 496 int plus=1; 497 498 int NumPhi=20; 499 500 501 502 503 493 double Lenght_CaloFwd=Lenght_Muon+Lenght_Muon/2.5; 494 495 int NumPhi=100; 496 float frac=1; 497 504 498 //************************************************Tracker************************************************* 505 499 //******************************************************************************************************** … … 508 502 detector->addDaughter(Tracker); 509 503 unsigned int DetIdCountTracker = 1; 510 for(double ray=0;ray <= Rayon_Tracker;ray +=plus){ 511 // double ray=Rayon_Tracker; 512 double length = ray/tan(EtaToTheta(DET->CEN_max_tracker)); 513 if(length >= Lenght_Tracker) 514 { 515 FROG_Element_Primitive_Cylinder* tracker = new FROG_Element_Primitive_Cylinder(9100000+DetIdCountTracker*10,ray,0,0,0,0,0,Lenght_Tracker,NumPhi,1); 516 // FROG_Element_Primitive_Cone* tracker = new FROG_Element_Primitive_Cone(9100000+DetIdCountTracker*10,ray,0,0,0,0,0,Lenght_Tracker,NumPhi,1); 517 Tracker->addDaughter(tracker); DetIdCountTracker++; 518 } 519 else { 520 FROG_Element_Primitive_Cylinder* tracker = new FROG_Element_Primitive_Cylinder(9100000+DetIdCountTracker*10,ray,0,0,0,0,0,length,NumPhi,0); 521 Tracker->addDaughter(tracker); DetIdCountTracker++; 522 } 504 505 double ray=Rayon_Tracker; 506 double rayCone = tan(EtaToTheta(DET->CEN_max_tracker))*Lenght_Tracker/2; 507 if(ray < rayCone)ray=rayCone; 508 509 double dphi = 6.283185307179586476925286766559 /NumPhi; 510 for(double phi=0; phi<=6.2831/frac;phi+=dphi){ 511 512 FROG_Element_Primitive_CustomSurface* trackerCone1 = new FROG_Element_Primitive_CustomSurface(9100000+DetIdCountTracker*10, 513 rayCone*sin(phi) ,rayCone*cos(phi) ,-Lenght_Tracker/2, 514 rayCone*sin(phi+dphi) ,rayCone*cos(phi+dphi) ,-Lenght_Tracker/2, 515 0 , 0 , 0, 516 0 , 0 , 0 517 ); 518 519 Tracker->addDaughter(trackerCone1); DetIdCountTracker++; 520 521 FROG_Element_Primitive_CustomSurface* trackerCone2 = new FROG_Element_Primitive_CustomSurface(9100000+DetIdCountTracker*10, 522 0 , 0 ,0, 523 0 , 0 ,0, 524 rayCone*sin(phi) , rayCone*cos(phi) , Lenght_Tracker/2, 525 rayCone*sin(phi+dphi) , rayCone*sin(phi+dphi) , Lenght_Tracker/2 526 ); 527 Tracker->addDaughter(trackerCone2); DetIdCountTracker++; 528 529 530 FROG_Element_Primitive_CustomSurface* trackerB = new FROG_Element_Primitive_CustomSurface(9100000+DetIdCountTracker*10, 531 ray*sin(phi) ,ray*cos(phi) ,-Lenght_Tracker*0.5, 532 ray*sin(phi+dphi) ,ray*cos(phi+dphi) ,-Lenght_Tracker*0.5, 533 ray*sin(phi+dphi) ,ray*cos(phi+dphi) , Lenght_Tracker*0.5, 534 ray*sin(phi) ,ray*cos(phi) , Lenght_Tracker*0.5); 535 536 Tracker->addDaughter(trackerB); DetIdCountTracker++; 537 538 FROG_Element_Primitive_CustomSurface* trackerEndCap1 = new FROG_Element_Primitive_CustomSurface(9100000+DetIdCountTracker*10, 539 rayCone*sin(phi) , rayCone*cos(phi) , -(Lenght_Tracker)/2, 540 rayCone*sin(phi+dphi) , rayCone*cos(phi+dphi) , -(Lenght_Tracker)/2, 541 ray*sin(phi+dphi) , ray*cos(phi+dphi) , -(Lenght_Tracker)/2, 542 ray*sin(phi) , ray*cos(phi) , -(Lenght_Tracker)/2 543 ); 544 Tracker->addDaughter(trackerEndCap1); DetIdCountTracker++; 545 546 FROG_Element_Primitive_CustomSurface* trackerEndCap2 = new FROG_Element_Primitive_CustomSurface(9100000+DetIdCountTracker*10, 547 rayCone*sin(phi) , rayCone*cos(phi) , (Lenght_Tracker)/2, 548 rayCone*sin(phi+dphi) , rayCone*cos(phi+dphi) , (Lenght_Tracker)/2, 549 ray*sin(phi+dphi) , ray*cos(phi+dphi) , (Lenght_Tracker)/2, 550 ray*sin(phi) , ray*cos(phi) , (Lenght_Tracker)/2 551 ); 552 Tracker->addDaughter(trackerEndCap2); DetIdCountTracker++; 553 523 554 } 555 556 Rayon_Calo = ray*1.5; 524 557 525 558 //******************************************Central calorimeters****************************************** … … 530 563 unsigned int DetIdCountCalo = 1; 531 564 532 for(double ray=Rayon_Tracker;ray <= Rayon_Calo ;ray +=plus){ 533 double length = ray/tan(EtaToTheta(DET->CEN_max_calo_cen)); 534 double add; 535 if(length >= Lenght_Calo)add=Lenght_Calo; 536 else add=ray/tan(EtaToTheta(DET->CEN_max_calo_cen)); 537 if(add > 0) 538 { 539 FROG_Element_Primitive_Cylinder* calo = new FROG_Element_Primitive_Cylinder(9200000+DetIdCountCalo*10,ray,0,0,0,0,0,add,NumPhi,0); 540 CALO->addDaughter(calo); DetIdCountCalo++; 541 } 565 float rayConeD = tan(EtaToTheta(DET->CEN_max_calo_cen))*Lenght_Tracker/2; 566 float rayConeF = tan(EtaToTheta(DET->CEN_max_calo_cen))*Lenght_Calo/2; 567 ray=Rayon_Calo; 568 if(ray<rayConeF)ray=rayConeF; 569 570 for(double phi=0; phi<=6.2831/frac;phi+=dphi){ 571 572 //BARREL 573 FROG_Element_Primitive_CustomSurface* caloB = new FROG_Element_Primitive_CustomSurface(9100000+DetIdCountCalo*10, 574 ray*sin(phi) ,ray*cos(phi) ,-Lenght_Calo*0.5, 575 ray*sin(phi+dphi) ,ray*cos(phi+dphi) ,-Lenght_Calo*0.5, 576 ray*sin(phi+dphi) ,ray*cos(phi+dphi) , Lenght_Calo*0.5, 577 ray*sin(phi) ,ray*cos(phi) , Lenght_Calo*0.5 578 ); 579 580 CALO->addDaughter(caloB); DetIdCountCalo++; 581 582 //Partial cone + side 583 FROG_Element_Primitive_CustomSurface* caloEndCap1a = new FROG_Element_Primitive_CustomSurface(9200000+DetIdCountCalo*10, 584 rayConeD*sin(phi) , rayConeD*cos(phi) , (Lenght_Tracker)/2, 585 rayConeD*sin(phi+dphi) , rayConeD*cos(phi+dphi) , (Lenght_Tracker)/2, 586 rayConeF*sin(phi+dphi) , rayConeF*cos(phi+dphi) , (Lenght_Calo)/2, 587 rayConeF*sin(phi) , rayConeF*cos(phi) , (Lenght_Calo)/2 588 ); 589 CALO->addDaughter(caloEndCap1a); DetIdCountCalo++; 590 591 //Close Endcap + side 592 FROG_Element_Primitive_CustomSurface* caloEndCap1b = new FROG_Element_Primitive_CustomSurface(9200000+DetIdCountTracker*10, 593 rayConeF*sin(phi) , rayConeF*cos(phi) , (Lenght_Calo)/2, 594 rayConeF*sin(phi+dphi) , rayConeF*cos(phi+dphi) , (Lenght_Calo)/2, 595 ray*sin(phi+dphi) , ray*cos(phi+dphi) , (Lenght_Calo)/2, 596 ray*sin(phi) , ray*cos(phi) , (Lenght_Calo)/2 597 ); 598 CALO->addDaughter(caloEndCap1b); DetIdCountCalo++; 599 600 //Partial cone - side 601 FROG_Element_Primitive_CustomSurface* caloEndCap2a = new FROG_Element_Primitive_CustomSurface(9200000+DetIdCountCalo*10, 602 rayConeD*sin(phi) , rayConeD*cos(phi) , -(Lenght_Tracker)/2, 603 rayConeD*sin(phi+dphi) , rayConeD*cos(phi+dphi) , -(Lenght_Tracker)/2, 604 rayConeF*sin(phi+dphi) , rayConeF*cos(phi+dphi) , -(Lenght_Calo)/2, 605 rayConeF*sin(phi) , rayConeF*cos(phi) , -(Lenght_Calo)/2 606 ); 607 CALO->addDaughter(caloEndCap2a); DetIdCountCalo++; 608 609 //Close Endcap - side 610 FROG_Element_Primitive_CustomSurface* caloEndCap2b = new FROG_Element_Primitive_CustomSurface(9200000+DetIdCountTracker*10, 611 rayConeF*sin(phi) , rayConeF*cos(phi) , -(Lenght_Calo)/2, 612 rayConeF*sin(phi+dphi) , rayConeF*cos(phi+dphi) , -(Lenght_Calo)/2, 613 ray*sin(phi+dphi) , ray*cos(phi+dphi) , -(Lenght_Calo)/2, 614 ray*sin(phi) , ray*cos(phi) , -(Lenght_Calo)/2 615 ); 616 CALO->addDaughter(caloEndCap2b); DetIdCountCalo++; 617 542 618 } 543 for(double ray=0;ray <= Rayon_Tracker;ray +=plus){ 544 double length = ray/tan(EtaToTheta(DET->CEN_max_calo_cen)); 545 double add; 546 if(length >= Lenght_Calo)add=(Lenght_Calo-Lenght_Tracker)/2; 547 else add=(length-Lenght_Tracker)/2; 548 if(add > 0) 549 { 550 FROG_Element_Primitive_Cylinder* caloP = new FROG_Element_Primitive_Cylinder(9200000+DetIdCountCalo*10,ray,0,0,(Lenght_Tracker+add)/2,0,0,add,NumPhi,0); 551 CALO->addDaughter(caloP); DetIdCountCalo++; 552 FROG_Element_Primitive_Cylinder* caloM = new FROG_Element_Primitive_Cylinder(9200000+DetIdCountCalo*10,ray,0,0,-(Lenght_Tracker+add)/2,0,0,add,NumPhi,0); 553 CALO->addDaughter(caloM); DetIdCountCalo++; 554 } 619 620 Rayon_Muon = ray*1.2; 621 622 //***********************************************Muon chambers******************************************** 623 //******************************************************************************************************** 624 625 FROG_Element_Base_With_DetId_And_Name* MUON = new FROG_Element_Base_With_DetId_And_Name(930000000,"Muon"); 626 detector->addDaughter(MUON); 627 unsigned int DetIdCountMuon = 1; 628 629 rayConeD = tan(EtaToTheta(DET->CEN_max_mu))*Lenght_Calo/2; 630 rayConeF = tan(EtaToTheta(DET->CEN_max_mu))*Lenght_Muon/2; 631 ray=Rayon_Muon; 632 if(ray<rayConeF)ray=rayConeF; 633 634 for(double phi=0; phi<=6.2831/frac;phi+=dphi){ 635 636 //BARREL 637 FROG_Element_Primitive_CustomSurface* muonB = new FROG_Element_Primitive_CustomSurface(9300000+DetIdCountMuon*10, 638 ray*sin(phi) ,ray*cos(phi) ,-Lenght_Muon*0.5, 639 ray*sin(phi+dphi) ,ray*cos(phi+dphi) ,-Lenght_Muon*0.5, 640 ray*sin(phi+dphi) ,ray*cos(phi+dphi) , Lenght_Muon*0.5, 641 ray*sin(phi) ,ray*cos(phi) , Lenght_Muon*0.5); 642 643 MUON->addDaughter(muonB); DetIdCountMuon++; 644 645 //Partial cone + side 646 FROG_Element_Primitive_CustomSurface* muonEndCap1a = new FROG_Element_Primitive_CustomSurface(9300000+DetIdCountMuon*10, 647 rayConeD*sin(phi) , rayConeD*cos(phi) , (Lenght_Calo)/2, 648 rayConeD*sin(phi+dphi) , rayConeD*cos(phi+dphi) , (Lenght_Calo)/2, 649 rayConeF*sin(phi+dphi) , rayConeF*cos(phi+dphi) , (Lenght_Muon)/2, 650 rayConeF*sin(phi) , rayConeF*cos(phi) , (Lenght_Muon)/2 651 ); 652 MUON->addDaughter(muonEndCap1a); DetIdCountMuon++; 653 654 //Close Endcap + side 655 FROG_Element_Primitive_CustomSurface* muonEndCap1b = new FROG_Element_Primitive_CustomSurface(9300000+DetIdCountMuon*10, 656 rayConeF*sin(phi) , rayConeF*cos(phi) , (Lenght_Muon)/2, 657 rayConeF*sin(phi+dphi) , rayConeF*cos(phi+dphi) , (Lenght_Muon)/2, 658 ray*sin(phi+dphi) , ray*cos(phi+dphi) , (Lenght_Muon)/2, 659 ray*sin(phi) , ray*cos(phi) , (Lenght_Muon)/2 660 ); 661 MUON->addDaughter(muonEndCap1b); DetIdCountMuon++; 662 663 //Partial cone - side 664 FROG_Element_Primitive_CustomSurface* muonEndCap2a = new FROG_Element_Primitive_CustomSurface(9300000+DetIdCountMuon*10, 665 rayConeD*sin(phi) , rayConeD*cos(phi) , -(Lenght_Calo)/2, 666 rayConeD*sin(phi+dphi) , rayConeD*cos(phi+dphi) , -(Lenght_Calo)/2, 667 rayConeF*sin(phi+dphi) , rayConeF*cos(phi+dphi) , -(Lenght_Muon)/2, 668 rayConeF*sin(phi) , rayConeF*cos(phi) , -(Lenght_Muon)/2 669 ); 670 MUON->addDaughter(muonEndCap2a); DetIdCountMuon++; 671 672 //Close Endcap - side 673 FROG_Element_Primitive_CustomSurface* muonEndCap2b = new FROG_Element_Primitive_CustomSurface(9300000+DetIdCountMuon*10, 674 rayConeF*sin(phi) , rayConeF*cos(phi) , -(Lenght_Muon)/2, 675 rayConeF*sin(phi+dphi) , rayConeF*cos(phi+dphi) , -(Lenght_Muon)/2, 676 ray*sin(phi+dphi) , ray*cos(phi+dphi) , -(Lenght_Muon)/2, 677 ray*sin(phi) , ray*cos(phi) , -(Lenght_Muon)/2 678 ); 679 MUON->addDaughter(muonEndCap2b); DetIdCountMuon++; 680 555 681 } 556 682 683 557 684 //******************************************Forward calorimeters****************************************** 558 685 //******************************************************************************************************** 559 686 560 FROG_Element_Base_With_DetId_And_Name* FWCALO = new FROG_Element_Base_With_DetId_And_Name(930000000,"FWCalo"); 561 detector->addDaughter(FWCALO); 562 unsigned int DetIdCountFwCalo = 1; 563 564 double eta_Max=DET->CEN_max_calo_fwd,eta_Min=DET->CEN_max_calo_cen; 565 566 for(double ray=0;ray <= 50;ray +=plus){ 567 double length = ray/tan(EtaToTheta(eta_Max)); 568 double add; 569 if(length >= Lenght_FWCalo)add=(Lenght_FWCalo-Lenght_Muon)/2; 570 else add=(length-Lenght_Muon)/2; 571 572 if(add > 0 && ray < Lenght_FWCalo*tan(EtaToTheta(eta_Min))) 573 { 574 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); 575 FWCALO->addDaughter(caloFW1); DetIdCountFwCalo++; 576 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); 577 FWCALO->addDaughter(caloFW2); DetIdCountFwCalo++; 578 } 687 FROG_Element_Base_With_DetId_And_Name* CALOFWD = new FROG_Element_Base_With_DetId_And_Name(940000000,"CaloFwd"); 688 detector->addDaughter(CALOFWD); 689 unsigned int DetIdCountCaloFwd = 1; 690 691 rayConeD = tan(EtaToTheta(DET->CEN_max_calo_fwd))*Lenght_Muon; 692 rayConeF = tan(EtaToTheta(DET->CEN_max_calo_fwd))*Lenght_CaloFwd; 693 ray=tan(EtaToTheta(DET->CEN_max_calo_cen))*Lenght_CaloFwd; 694 695 for(double phi=0; phi<=6.2831/frac;phi+=dphi){ 696 697 698 //Partial cone + side 699 FROG_Element_Primitive_CustomSurface* caloFWDEndCap1a = new FROG_Element_Primitive_CustomSurface(9400000+DetIdCountCaloFwd*10, 700 rayConeD*sin(phi) , rayConeD*cos(phi) , (Lenght_Muon)/2, 701 rayConeD*sin(phi+dphi) , rayConeD*cos(phi+dphi) , (Lenght_Muon)/2, 702 rayConeF*sin(phi+dphi) , rayConeF*cos(phi+dphi) , (Lenght_CaloFwd)/2, 703 rayConeF*sin(phi) , rayConeF*cos(phi) , (Lenght_CaloFwd)/2 704 ); 705 CALOFWD->addDaughter(caloFWDEndCap1a); DetIdCountCaloFwd++; 706 707 //Close Endcap + side 708 FROG_Element_Primitive_CustomSurface* caloFWDEndCap1b = new FROG_Element_Primitive_CustomSurface(9400000+DetIdCountCaloFwd*10, 709 rayConeF*sin(phi) , rayConeF*cos(phi) , (Lenght_CaloFwd)/2, 710 rayConeF*sin(phi+dphi) , rayConeF*cos(phi+dphi) , (Lenght_CaloFwd)/2, 711 ray*sin(phi+dphi) , ray*cos(phi+dphi) , (Lenght_CaloFwd)/2, 712 ray*sin(phi) , ray*cos(phi) , (Lenght_CaloFwd)/2 713 ); 714 CALOFWD->addDaughter(caloFWDEndCap1b); DetIdCountCaloFwd++; 715 716 //BARREL 717 FROG_Element_Primitive_CustomSurface* caloFWDB1 = new FROG_Element_Primitive_CustomSurface(9400000+DetIdCountMuon*10, 718 ray*sin(phi) ,ray*cos(phi) , Lenght_Muon*0.5, 719 ray*sin(phi+dphi) ,ray*cos(phi+dphi) , Lenght_Muon*0.5, 720 ray*sin(phi+dphi) ,ray*cos(phi+dphi) , Lenght_CaloFwd*0.5, 721 ray*sin(phi) ,ray*cos(phi) , Lenght_CaloFwd*0.5); 722 723 CALOFWD->addDaughter(caloFWDB1); DetIdCountCaloFwd++; 724 725 726 727 728 //Partial cone - side 729 FROG_Element_Primitive_CustomSurface* caloFWDEndCap2a = new FROG_Element_Primitive_CustomSurface(9400000+DetIdCountCaloFwd*10, 730 rayConeD*sin(phi) , rayConeD*cos(phi) , -(Lenght_Muon)/2, 731 rayConeD*sin(phi+dphi) , rayConeD*cos(phi+dphi) , -(Lenght_Muon)/2, 732 rayConeF*sin(phi+dphi) , rayConeF*cos(phi+dphi) , -(Lenght_CaloFwd)/2, 733 rayConeF*sin(phi) , rayConeF*cos(phi) , -(Lenght_CaloFwd)/2 734 ); 735 CALOFWD->addDaughter(caloFWDEndCap2a); DetIdCountCaloFwd++; 736 737 //Close Endcap - side 738 FROG_Element_Primitive_CustomSurface* caloFWDEndCap2b = new FROG_Element_Primitive_CustomSurface(9400000+DetIdCountCaloFwd*10, 739 rayConeF*sin(phi) , rayConeF*cos(phi) , -(Lenght_CaloFwd)/2, 740 rayConeF*sin(phi+dphi) , rayConeF*cos(phi+dphi) , -(Lenght_CaloFwd)/2, 741 ray*sin(phi+dphi) , ray*cos(phi+dphi) , -(Lenght_CaloFwd)/2, 742 ray*sin(phi) , ray*cos(phi) , -(Lenght_CaloFwd)/2); 743 744 CALOFWD->addDaughter(caloFWDEndCap2b); DetIdCountCaloFwd++; 745 746 //BARREL 747 FROG_Element_Primitive_CustomSurface* caloFWDB2 = new FROG_Element_Primitive_CustomSurface(9400000+DetIdCountMuon*10, 748 ray*sin(phi) ,ray*cos(phi) , -Lenght_Muon*0.5, 749 ray*sin(phi+dphi) ,ray*cos(phi+dphi) , -Lenght_Muon*0.5, 750 ray*sin(phi+dphi) ,ray*cos(phi+dphi) , -Lenght_CaloFwd*0.5, 751 ray*sin(phi) ,ray*cos(phi) , -Lenght_CaloFwd*0.5); 752 753 CALOFWD->addDaughter(caloFWDB2); DetIdCountCaloFwd++; 754 579 755 } 580 581 //***********************************************Muon chambers******************************************** 582 //******************************************************************************************************** 583 // 584 FROG_Element_Base_With_DetId_And_Name* MUON = new FROG_Element_Base_With_DetId_And_Name(940000000,"MuonDet"); 585 detector->addDaughter(MUON); 586 unsigned int DetIdCountMuon = 1; 587 588 for(double ray=Rayon_Calo;ray <= Rayon_Muon ;ray +=plus){ 589 double length = ray/tan(EtaToTheta(DET->CEN_max_mu)); 590 double add; 591 if(length >= Lenght_Muon)add=Lenght_Muon; 592 else add=ray/tan(EtaToTheta(DET->CEN_max_calo_cen)); 593 if(add > 0) 594 { 595 FROG_Element_Primitive_Cylinder* muon = new FROG_Element_Primitive_Cylinder(9400000+DetIdCountMuon*10,ray,0,0,0,0,0,add,NumPhi,0); 596 MUON->addDaughter(muon); DetIdCountMuon++; 597 } 598 } 599 for(double ray=0;ray <= Rayon_Calo;ray +=plus){ 600 double length = ray/tan(EtaToTheta(DET->CEN_max_calo_cen)); 601 double add; 602 if(length >= Lenght_Muon)add=(Lenght_Muon-Lenght_Calo)/2; 603 else add=(length-Lenght_Calo)/2; 604 if(add > 0) 605 { 606 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); 607 MUON->addDaughter(muonP); DetIdCountMuon++; 608 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); 609 MUON->addDaughter(muonM); DetIdCountMuon++; 610 } 611 } 612 613 614 756 757 758 759 615 760 FROG_Geometry* CustomGeom = new FROG_Geometry(prim); 616 761 CustomGeom->Save("DelphesToFrog.geom");
Note:
See TracChangeset
for help on using the changeset viewer.