Fork me on GitHub

source: git/display/DelphesEventDisplay.h@ 30bb83a

ImprovedOutputFile Timing dual_readout llp
Last change on this file since 30bb83a was 30bb83a, checked in by Christophe Delaere <christophe.delaere@…>, 10 years ago

Some small cleaning

  • Property mode set to 100644
File size: 2.8 KB
Line 
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#ifndef DelphesEventDisplay_h
20#define DelphesEventDisplay_h
21
22#include <vector>
23#include <iostream>
24#include "external/ExRootAnalysis/ExRootTreeReader.h"
25#include "display/DelphesDisplay.h"
26#include "display/Delphes3DGeometry.h"
27#include "TChain.h"
28#include "TClonesArray.h"
29
30/*
31 * assembly.C: sauvegarde as shape-extract -> implement in the geometry class (read/write)
32 * histobrowser.C: intégration d'histogrammes dans le display (on pourrait avoir Pt, eta, phi pour les principales collections)
33 * also from alice_esd: summary html table
34 *
35 */
36
37class DelphesEventDisplay
38{
39 public:
40 DelphesEventDisplay();
41 DelphesEventDisplay(const char *configFile, const char *inputFile, Delphes3DGeometry& det3D);
42 ~DelphesEventDisplay();
43
44 private:
45 void make_gui();
46 void load_event();
47 void delphes_read_towers(TClonesArray* data, DelphesBranchBase* element);
48 void delphes_read_tracks(TClonesArray* data, DelphesBranchBase* element);
49 void delphes_read_jets(TClonesArray* data, DelphesBranchBase* element);
50 void delphes_read_vectors(TClonesArray* data, DelphesBranchBase* element);
51 void readConfig(const char *configFile, Delphes3DGeometry& det3D, std::vector<DelphesBranchBase*>& elements, std::vector<TClonesArray*>& arrays);
52
53 // Configuration and global variables.
54 Int_t event_id_;
55 ExRootTreeReader *treeReader_;
56 Double_t tkRadius_, totRadius_, tkHalfLength_, bz_;
57 TChain* chain_;
58 std::vector<DelphesBranchBase*> elements_;
59 std::vector<TClonesArray*> arrays_;
60 DelphesDisplay *delphesDisplay_;
61
62 // gui controls
63 public:
64 void Fwd() {
65 if (event_id_ < treeReader_->GetEntries() - 1) {
66 ++event_id_;
67 load_event();
68 } else {
69 printf("Already at last event.\n");
70 }
71 }
72
73 void Bck() {
74 if (event_id_ > 0) {
75 --event_id_;
76 load_event();
77 } else {
78 printf("Already at first event.\n");
79 }
80 }
81};
82
83#endif //DelphesEventDisplay_h
Note: See TracBrowser for help on using the repository browser.