Fork me on GitHub

Changeset 100 in svn for trunk/src/FrogUtil.cc


Ignore:
Timestamp:
Dec 18, 2008, 2:39:26 PM (16 years ago)
Author:
severine ovyn
Message:

Remove datacard bug + CaloTowers OK

File:
1 edited

Legend:

Unmodified
Added
Removed
  • trunk/src/FrogUtil.cc

    r97 r100  
    485485 
    486486  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;
    493496 
    494497  //************************************************Tracker*************************************************
     
    498501  detector->addDaughter(Tracker);
    499502  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;
    501505    double length = ray/tan(EtaToTheta(DET->CEN_max_tracker));
    502506    if(length >= Lenght_Tracker)
    503507      {
    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);
    505510        Tracker->addDaughter(tracker);   DetIdCountTracker++;
    506511      }
     
    518523  unsigned int DetIdCountCalo = 1;
    519524 
    520   for(double ray=Rayon_Tracker;ray <= Rayon_Calo ;ray +=5){
     525  for(double ray=Rayon_Tracker;ray <= Rayon_Calo ;ray +=plus){
    521526    double length = ray/tan(EtaToTheta(DET->CEN_max_calo_cen));
    522527    double add;
     
    529534      }
    530535  }
    531   for(double ray=0;ray <= Rayon_Tracker;ray +=5){
     536  for(double ray=0;ray <= Rayon_Tracker;ray +=plus){
    532537    double length = ray/tan(EtaToTheta(DET->CEN_max_calo_cen));
    533538    double add;
     
    552557  double eta_Max=DET->CEN_max_calo_fwd,eta_Min=DET->CEN_max_calo_cen;
    553558 
    554   for(double ray=0;ray <= 50;ray +=5){
     559  for(double ray=0;ray <= 50;ray +=plus){
    555560    double length = ray/tan(EtaToTheta(eta_Max));
    556561    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;
    559564   
    560565    if(add > 0 && ray < Lenght_FWCalo*tan(EtaToTheta(eta_Min)))
    561566      {
    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);
    563568        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);
    565570        FWCALO->addDaughter(caloFW2);   DetIdCountFwCalo++;
    566571      }
    567572  }
     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 
    568607   
    569608  FROG_Geometry* CustomGeom = new FROG_Geometry(prim);
Note: See TracChangeset for help on using the changeset viewer.