Fork me on GitHub

source: svn/trunk/Examples/Frog_on_analysis_output.cpp@ 351

Last change on this file since 351 was 260, checked in by severine ovyn, 16 years ago

add header

File size: 3.6 KB
Line 
1/***********************************************************************
2** **
3** /----------------------------------------------\ **
4** | Delphes, a framework for the fast simulation | **
5** | of a generic collider experiment | **
6** \----------------------------------------------/ **
7** **
8** **
9** This package uses: **
10** ------------------ **
11** FastJet algorithm: Phys. Lett. B641 (2006) [hep-ph/0512210] **
12** Hector: JINST 2:P09005 (2007) [physics.acc-ph:0707.1198v2] **
13** FROG: [hep-ex/0901.2718v1] **
14** **
15** ------------------------------------------------------------------ **
16** **
17** Main authors: **
18** ------------- **
19** **
20** Severine Ovyn Xavier Rouby **
21** severine.ovyn@uclouvain.be xavier.rouby@cern **
22** **
23** Center for Particle Physics and Phenomenology (CP3) **
24** Universite catholique de Louvain (UCL) **
25** Louvain-la-Neuve, Belgium **
26** **
27** Copyright (C) 2008-2009, **
28** All rights reserved. **
29** **
30***********************************************************************/
31
32#include "TApplication.h"
33#include "FrogUtil.h"
34#include "SmearUtil.h"
35#include <iostream>
36#include <string>
37using namespace std;
38
39int main(int argc, char *argv[])
40{
41 int appargc = 2;
42 char *appName = "Delphes";
43 char *appargv[] = {appName, "-b"};
44 TApplication app(appName, &appargc, appargv);
45
46 if(argc != 2 && argc != 3) {
47 cout << " Usage: " << argv[0] << " input_file [N_events]" << endl;
48 cout << " input_file - root file containing the events to display" << endl;
49 cout << " detector_card - Datacard containing resolution variables for the detector simulation (optional) "<<endl;
50 exit(1);
51 }
52
53// 1. ********** initialisation ***********
54 //read the input *root file
55 string inputfilename(argv[1]);
56 if(inputfilename.find(".root") > inputfilename.length() ) {
57 cout << "output_file should be a .root file!\n";
58 exit(1);
59 }
60
61 //data card
62 string DetDatacard("");
63 if(argc==3) DetDatacard =argv[2];
64
65 //create output log-file name
66 string forLog = inputfilename;
67 string LogName = forLog.erase(forLog.find(".root"));
68 LogName = LogName+"_FROG.log";
69
70
71
72 //Smearing information
73 RESOLution *DET = new RESOLution();
74 DET->ReadDataCard(DetDatacard);
75 DET->Logfile(LogName);
76
77
78// 2 ************** FROG display
79 FrogDisplay *FROG = new FrogDisplay(DetDatacard);
80 FROG->BuildEvents(inputfilename);
81 FROG->BuildGeom();
82
83 cout << "** Exiting..." << endl;
84 delete FROG;
85 delete DET;
86}
Note: See TracBrowser for help on using the repository browser.