Fork me on GitHub

Changeset d2ac201 in git


Ignore:
Timestamp:
Oct 1, 2014, 11:19:34 PM (10 years ago)
Author:
Christophe Delaere <christophe.delaere@…>
Branches:
ImprovedOutputFile, Timing, dual_readout, llp, master
Children:
164f032
Parents:
df634866
Message:

Bug fix in the calo towers for endcaps

Two little things: the number of phi bins was hardcoded and too many eta
bins were considered.

File:
1 edited

Legend:

Unmodified
Added
Removed
  • examples/geometry.C

    rdf634866 rd2ac201  
    44#include <vector>
    55#include <algorithm>
     6#include <sstream>
    67#include "TGeoManager.h"
    78#include "TGeoVolume.h"
     
    206207std::pair<Double_t, Double_t> Delphes3DGeometry::addTracker(TGeoVolume *top) {
    207208   // 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_);
    209210   TGeoTranslation *tr1  = new TGeoTranslation("tkacc1",0., 0., tk_length_/2.);
    210211   tr1->RegisterYourself();
     
    317318     ++etaslice;
    318319   }
    319    nEtaBins = ++etaslice;
     320   nEtaBins = etaslice;
    320321   for(int i=0;i<nEtaBins-1;++i) { // loop on the eta slices
    321322     vertices[8]  = -dx[i]; vertices[9]  = y[i];
     
    358359   }
    359360   nEtaBins = etaslice;
    360    for(int i=0;i<nEtaBins;++i) { // loop on the eta slices
    361      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]);
    365366     new TGeoArb8(Form("%sfwdtower%d",name,i),R/2., vertices); // tower in the proper eta slice, at phi=0
    366367     // intersection between the tower and the calo_endcap
Note: See TracChangeset for help on using the changeset viewer.