[4d999a57] | 1 | /*
|
---|
| 2 | * Delphes: a framework for fast simulation of a generic collider experiment
|
---|
| 3 | * Copyright (C) 2012-2014 Universite catholique de Louvain (UCL), Belgium
|
---|
| 4 | *
|
---|
| 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.
|
---|
| 9 | *
|
---|
| 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.
|
---|
| 14 | *
|
---|
| 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/>.
|
---|
| 17 | */
|
---|
| 18 |
|
---|
| 19 | #include "display/DelphesBranchElement.h"
|
---|
| 20 |
|
---|
| 21 | // special case for calo towers
|
---|
| 22 | template<> DelphesBranchElement<DelphesCaloData>::DelphesBranchElement(const char* name, const char*type, const enum EColor color):DelphesBranchBase(name, type, color) {
|
---|
| 23 | if(TString(type)=="tower") {
|
---|
| 24 | data_ = new DelphesCaloData(2);
|
---|
| 25 | data_->RefSliceInfo(0).Setup("ECAL", 0.1, kRed);
|
---|
| 26 | data_->RefSliceInfo(1).Setup("HCAL", 0.1, kBlue);
|
---|
| 27 | data_->IncDenyDestroy();
|
---|
| 28 | } else {
|
---|
| 29 | throw std::exception();
|
---|
| 30 | }
|
---|
| 31 | }
|
---|
| 32 | template<> void DelphesBranchElement<DelphesCaloData>::Reset() { data_->ClearTowers(); }
|
---|
| 33 |
|
---|
| 34 | // special case for element lists
|
---|
| 35 | template<> DelphesBranchElement<TEveElementList>::DelphesBranchElement(const char* name, const char*type, const enum EColor color):DelphesBranchBase(name, type, color) {
|
---|
| 36 | if(TString(type)=="vector" || TString(type)=="jet") {
|
---|
| 37 | data_ = new TEveElementList(name);
|
---|
| 38 | data_->SetMainColor(color_);
|
---|
| 39 | } else {
|
---|
| 40 | throw std::exception();
|
---|
| 41 | }
|
---|
| 42 | }
|
---|
| 43 | template<> void DelphesBranchElement<TEveElementList>::Reset() { data_->DestroyElements(); }
|
---|
| 44 |
|
---|
| 45 | // special case for track lists
|
---|
| 46 | template<> DelphesBranchElement<TEveTrackList>::DelphesBranchElement(const char* name, const char*type, const enum EColor color):DelphesBranchBase(name, type, color) {
|
---|
| 47 | data_ = new TEveTrackList(name);
|
---|
| 48 | data_->SetMainColor(color_);
|
---|
| 49 | data_->SetMarkerColor(color_);
|
---|
| 50 | data_->SetMarkerStyle(kCircle);
|
---|
| 51 | data_->SetMarkerSize(0.5);
|
---|
| 52 | }
|
---|
| 53 | template<> void DelphesBranchElement<TEveTrackList>::Reset() { data_->DestroyElements(); }
|
---|
| 54 |
|
---|