- Timestamp:
- Oct 1, 2014, 11:19:34 PM (10 years ago)
- Branches:
- ImprovedOutputFile, Timing, dual_readout, llp, master
- Children:
- 164f032
- Parents:
- df634866
- File:
-
- 1 edited
Legend:
- Unmodified
- Added
- Removed
-
examples/geometry.C
rdf634866 rd2ac201 4 4 #include <vector> 5 5 #include <algorithm> 6 #include <sstream> 6 7 #include "TGeoManager.h" 7 8 #include "TGeoVolume.h" … … 206 207 std::pair<Double_t, Double_t> Delphes3DGeometry::addTracker(TGeoVolume *top) { 207 208 // tracker: a cylinder with two cones substracted 208 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_);209 new TGeoCone("forwardTkAcceptance",(tk_length_/2.+0.05),0.,tk_radius_,(tk_length_)*2.*exp(-tk_etamax_)/(1-exp(-2.*tk_etamax_)),tk_radius_); 209 210 TGeoTranslation *tr1 = new TGeoTranslation("tkacc1",0., 0., tk_length_/2.); 210 211 tr1->RegisterYourself(); … … 317 318 ++etaslice; 318 319 } 319 nEtaBins = ++etaslice;320 nEtaBins = etaslice; 320 321 for(int i=0;i<nEtaBins-1;++i) { // loop on the eta slices 321 322 vertices[8] = -dx[i]; vertices[9] = y[i]; … … 358 359 } 359 360 nEtaBins = etaslice; 360 for(int i=0;i<nEtaBins ;++i) { // loop on the eta slices361 vertices[8] = -r[i+1]*sin(TMath::Pi()/ 20.); vertices[9] = r[i+1]*cos(TMath::Pi()/20.);362 vertices[10] = -r[i]*sin(TMath::Pi()/ 20.); vertices[11] = r[i]*cos(TMath::Pi()/20.);363 vertices[12] = r[i]*sin(TMath::Pi()/ 20.); vertices[13] = r[i]*cos(TMath::Pi()/20.);364 vertices[14] = r[i+1]*sin(TMath::Pi()/ 20.); vertices[15] = r[i+1]*cos(TMath::Pi()/20.);361 for(int i=0;i<nEtaBins-1;++i) { // loop on the eta slices 362 vertices[8] = -r[i+1]*sin(TMath::Pi()/nphi[i]); vertices[9] = r[i+1]*cos(TMath::Pi()/nphi[i]); 363 vertices[10] = -r[i]*sin(TMath::Pi()/nphi[i]); vertices[11] = r[i]*cos(TMath::Pi()/nphi[i]); 364 vertices[12] = r[i]*sin(TMath::Pi()/nphi[i]); vertices[13] = r[i]*cos(TMath::Pi()/nphi[i]); 365 vertices[14] = r[i+1]*sin(TMath::Pi()/nphi[i]); vertices[15] = r[i+1]*cos(TMath::Pi()/nphi[i]); 365 366 new TGeoArb8(Form("%sfwdtower%d",name,i),R/2., vertices); // tower in the proper eta slice, at phi=0 366 367 // intersection between the tower and the calo_endcap
Note:
See TracChangeset
for help on using the changeset viewer.