[260] | 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 | ***********************************************************************/
|
---|
[188] | 31 |
|
---|
| 32 | #include "TApplication.h"
|
---|
[225] | 33 | #include "FrogUtil.h"
|
---|
| 34 | #include "SmearUtil.h"
|
---|
[188] | 35 | #include <iostream>
|
---|
[225] | 36 | #include <string>
|
---|
[188] | 37 | using namespace std;
|
---|
| 38 |
|
---|
| 39 | int 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
|
---|
[225] | 79 | FrogDisplay *FROG = new FrogDisplay(DetDatacard);
|
---|
| 80 | FROG->BuildEvents(inputfilename);
|
---|
| 81 | FROG->BuildGeom();
|
---|
[188] | 82 |
|
---|
| 83 | cout << "** Exiting..." << endl;
|
---|
| 84 | delete FROG;
|
---|
[225] | 85 | delete DET;
|
---|
[188] | 86 | }
|
---|