Fork me on GitHub

Ignore:
Timestamp:
Oct 15, 2014, 2:27:37 PM (10 years ago)
Author:
Christophe Delaere <christophe.delaere@…>
Branches:
ImprovedOutputFile, Timing, dual_readout, llp, master
Children:
cfc3160
Parents:
b3c42d3
Message:

Still broken, but better.

debugging may require to transfer chuncks of the code to compiled code.
I have in mind the geometry and the code that prepares the GUI.
Right now I got a segfault + funny cint errors.

File:
1 edited

Legend:

Unmodified
Added
Removed
  • display/DelphesBranchElement.cc

    rb3c42d3 r4d999a57  
     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
     22template<> 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    }
     32template<> void DelphesBranchElement<DelphesCaloData>::Reset() { data_->ClearTowers(); }
     33
     34// special case for element lists
     35template<> 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    }
     43template<> void DelphesBranchElement<TEveElementList>::Reset() { data_->DestroyElements(); }
     44
     45// special case for track lists
     46template<> DelphesBranchElement<TEveTrackList>::DelphesBranchElement(const char* name, const char*type, const enum EColor color):DelphesBranchBase(name, type, color) {
     47      if(TString(type)=="track") {
     48        data_ = new TEveTrackList(name);
     49        data_->SetMainColor(color_);
     50        data_->SetMarkerColor(color_);
     51        data_->SetMarkerStyle(kCircle);
     52        data_->SetMarkerSize(0.5);
     53      } else if(TString(type)=="photon") {
     54        data_ = new TEveTrackList(name);
     55        data_->SetMainColor(color_);
     56        data_->SetMarkerColor(color_);
     57        data_->SetMarkerStyle(kCircle);
     58        data_->SetMarkerSize(0.5);
     59      } else {
     60        throw std::exception();
     61      }
     62    }
     63template<> void DelphesBranchElement<TEveTrackList>::Reset() { data_->DestroyElements(); }
     64
Note: See TracChangeset for help on using the changeset viewer.