Changeset 1d42548 in git for examples/geometry.C
- Timestamp:
- Sep 28, 2014, 11:23:00 PM (10 years ago)
- Branches:
- ImprovedOutputFile, Timing, dual_readout, llp, master
- Children:
- df634866
- Parents:
- a0b6d15
- File:
-
- 1 edited
Legend:
- Unmodified
- Added
- Removed
-
examples/geometry.C
ra0b6d15 r1d42548 21 21 22 22 // TODO: asymmetric detector 23 // TODO: generalize for FCC-like config: >1 calorimeter & flexibility in module names24 23 class Delphes3DGeometry { 25 24 public: … … 185 184 186 185 TGeoVolume* 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 188 192 addTracker(top); 189 193 addCalorimeters(top); // TODO: allow for more than one calo … … 192 196 addCaloTowers(top); 193 197 } 198 // return the result 194 199 return top; 195 200 } 196 201 197 //TODO: there should be a cut by two cones to limit the acceptance in eta198 202 //typically from ChargedHadronTrackingEfficiency 199 203 void 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_); 202 214 tracker->SetLineColor(kYellow); 203 215 top->AddNode(tracker,1);
Note:
See TracChangeset
for help on using the changeset viewer.