Fork me on GitHub

source: git/display/Delphes3DGeometry.h@ b750b0a

Last change on this file since b750b0a was 77e9ae1, checked in by Pavel Demin <pavel-demin@…>, 5 years ago

set Standard to Cpp03 in .clang-format

  • Property mode set to 100644
File size: 3.4 KB
RevLine 
[cfc3160]1/*
[f53a4d2]2 * Delphes: a framework for fast simulation of a generic collider experiment
3 * Copyright (C) 2012-2014 Universite catholique de Louvain (UCL), Belgium
[1fa50c2]4 *
[f53a4d2]5 * This program is free software: you can redistribute it and/or modify
6 * it under the terms of the GNU General Public License as published by
7 * the Free Software Foundation, either version 3 of the License, or
8 * (at your option) any later version.
[1fa50c2]9 *
[f53a4d2]10 * This program is distributed in the hope that it will be useful,
11 * but WITHOUT ANY WARRANTY; without even the implied warranty of
12 * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
13 * GNU General Public License for more details.
[1fa50c2]14 *
[f53a4d2]15 * You should have received a copy of the GNU General Public License
16 * along with this program. If not, see <http://www.gnu.org/licenses/>.
[cfc3160]17 */
18
19#ifndef Delphes3DGeometry_h
20#define Delphes3DGeometry_h
21
22#include <map>
[341014c]23#include <set>
[cfc3160]24#include <vector>
[f53a4d2]25
26#include "Rtypes.h"
27
28class TAxis;
29class TGeoManager;
30class TGeoVolume;
31class TGeoMedium;
[cfc3160]32
33// TODO: asymmetric detector
34
[341014c]35class Delphes3DGeometry
36{
37public:
38 Delphes3DGeometry(TGeoManager *geom = NULL, bool transp = false);
39 ~Delphes3DGeometry() {}
40
41 void readFile(const char *filename, const char *ParticlePropagator = "ParticlePropagator",
42 const char *TrackingEfficiency = "ChargedHadronTrackingEfficiency",
43 const char *MuonEfficiency = "MuonEfficiency",
44 const char *Calorimeters = "Calorimeter");
45
46 void setContingency(Double_t contingency) { contingency_ = contingency; }
47 void setCaloBarrelThickness(Double_t thickness) { calo_barrel_thickness_ = thickness; }
48 void setCaloEndcapThickness(Double_t thickness) { calo_endcap_thickness_ = thickness; }
49 void setMuonSystemThickness(Double_t thickness) { muonSystem_thickn_ = thickness; }
50
51 TGeoVolume *getDetector(bool withTowers = true);
52
53 Double_t getTrackerRadius() const { return tk_radius_; }
54 Double_t getDetectorRadius() const { return muonSystem_radius_; }
55 Double_t getTrackerHalfLength() const { return tk_length_; }
56 Double_t getDetectorHalfLength() const { return muonSystem_length_; }
57 Double_t getBField() const { return tk_Bz_; }
58 std::pair<TAxis *, TAxis *> getCaloAxes() { return std::make_pair(etaAxis_, phiAxis_); }
59
60private:
61 std::pair<Double_t, Double_t> addTracker(TGeoVolume *top);
[77e9ae1]62 std::pair<Double_t, Double_t> addCalorimeter(TGeoVolume *top, const char *name, Double_t innerBarrelRadius, Double_t innerBarrelLength, std::set<std::pair<Double_t, Int_t> > &caloBinning);
[341014c]63 std::pair<Double_t, Double_t> addMuonDets(TGeoVolume *top, const char *name, Double_t innerBarrelRadius, Double_t innerBarrelLength);
[77e9ae1]64 void addCaloTowers(TGeoVolume *top, const char *name, Double_t innerBarrelRadius, Double_t innerBarrelLength, std::set<std::pair<Double_t, Int_t> > &caloBinning);
[341014c]65
66private:
67 TGeoManager *geom_;
68
69 TGeoMedium *vacuum_;
70 TGeoMedium *tkmed_;
71 TGeoMedium *calomed_;
72 TGeoMedium *mudetmed_;
73
74 TAxis *etaAxis_;
75 TAxis *phiAxis_;
76
77 Double_t contingency_;
78 Double_t calo_barrel_thickness_;
79 Double_t calo_endcap_thickness_;
80 Double_t muonSystem_thickn_;
81 Double_t muonSystem_radius_;
82 Double_t muonSystem_length_;
83 Double_t tk_radius_;
84 Double_t tk_length_;
85 Double_t tk_etamax_;
86 Double_t tk_Bz_;
87
88 std::vector<std::string> calorimeters_;
89 std::vector<std::string> muondets_;
90
91 std::map<std::string, Double_t> muonSystem_etamax_;
[77e9ae1]92 std::map<std::string, std::set<std::pair<Double_t, Int_t> > > caloBinning_;
[cfc3160]93};
94
95#endif
Note: See TracBrowser for help on using the repository browser.