Fork me on GitHub

Changeset 1d42548 in git for examples


Ignore:
Timestamp:
Sep 28, 2014, 11:23:00 PM (10 years ago)
Author:
Christophe Delaere <christophe.delaere@…>
Branches:
ImprovedOutputFile, Timing, dual_readout, llp, master
Children:
df634866
Parents:
a0b6d15
Message:

Display the eta acceptance of the tracking volume

File:
1 edited

Legend:

Unmodified
Added
Removed
  • examples/geometry.C

    ra0b6d15 r1d42548  
    2121
    2222// TODO: asymmetric detector
    23 // TODO: generalize for FCC-like config: >1 calorimeter & flexibility in module names
    2423class Delphes3DGeometry {
    2524   public:
     
    185184
    186185TGeoVolume* Delphes3DGeometry::getDetector(bool withTowers) {
    187    TGeoVolume *top = geom_->MakeBox("Delphes3DGeometry", vacuum_, 1500, 1500, 2300); // determine the size from what we know about the detector TODO
     186   // compute the envelope
     187   Double_t system_radius = tk_radius_+calo_barrel_thickness_+3*contingency_;
     188   Double_t system_length = tk_length_+TMath::Max(calo_endcap_coneThickness_,calo_endcap_thickness_)+3*contingency_;
     189   // the detector volume
     190   TGeoVolume *top = geom_->MakeBox("Delphes3DGeometry", vacuum_, system_radius, system_radius, system_length);
     191   // build the detector
    188192   addTracker(top);
    189193   addCalorimeters(top); // TODO: allow for more than one calo
     
    192196     addCaloTowers(top);
    193197   }
     198   // return the result
    194199   return top;
    195200}
    196201
    197 //TODO: there should be a cut by two cones to limit the acceptance in eta
    198202//typically from ChargedHadronTrackingEfficiency
    199203void Delphes3DGeometry::addTracker(TGeoVolume *top) {
    200    // tracker: a cylinder
    201    TGeoVolume *tracker = geom_->MakeTube("tracker", tkmed_, 0., tk_radius_, tk_length_);
     204   // tracker: a cylinder with two cones substracted
     205   TGeoCone* forwardCone = new TGeoCone("forwardTkAcceptance",(tk_length_/2.+0.05),0.,tk_radius_,(tk_length_)*2.*exp(-tk_etamax_)/(1-exp(-2.*tk_etamax_)),tk_radius_);
     206   TGeoTranslation *tr1  = new TGeoTranslation("tkacc1",0., 0., tk_length_/2.);
     207   tr1->RegisterYourself();
     208   TGeoRotation *negz    = new TGeoRotation("tknegz",0,180,0);
     209   negz->RegisterYourself();
     210   TGeoCombiTrans  *tr2  = new TGeoCombiTrans("tkacc2",0.,0.,-tk_length_/2.,negz);
     211   tr2->RegisterYourself();
     212   TGeoCompositeShape* tracker_cs = new TGeoCompositeShape("tracker_cs","forwardTkAcceptance:tkacc1+forwardTkAcceptance:tkacc2");
     213   TGeoVolume *tracker = new TGeoVolume("tracker",tracker_cs,tkmed_);   
    202214   tracker->SetLineColor(kYellow);
    203215   top->AddNode(tracker,1);
Note: See TracChangeset for help on using the changeset viewer.