Hall-D Software  alpha
 All Classes Namespaces Files Functions Variables Typedefs Enumerations Enumerator Friends Macros Groups Pages
hddm_select_events.h
Go to the documentation of this file.
1 // $Id$
2 //
3 // Created Oct 09, 2013 Kei Moriya
4 
5 /*************************************************************
6  *
7  * 2013/10/09 Kei Moriya
8  *
9  * This program is based on hddm_cull_events and will
10  * select events for output based on a user-specified
11  * criteria.
12  *
13  * The purpose is for example events containing Lambda
14  * events, where the particle must go through GEANT
15  * to have decay products, but some selection criteria
16  * on the daughters is wanted.
17  *
18  * I have rewritten some of the original code
19  * so that the options are easier to use (in my mind)
20  * but this deviates from the behavior of other
21  * hddm_xxx programs.
22  *
23  * This program will not work on REST format.
24  * To do this, a new program will have to be written
25  * based on the hddm_r file.
26  *
27  * Usage:
28  * hddm_select_events [-i Inputfile] [-o Outputfile] [-r input is REST] \
29  * [-a save remainder events] [-s selection type] \
30  * [-M maximum number of events] [-d debug]
31  *
32  * selection types:
33  * 1. select Lambda -> p pi-
34  * 2. select Lambda -> p pi-, eta -> gamma gamma
35  * 3. select Lambda -> p pi-, decay length less than 2 cm
36  *
37  *************************************************************/
38 
39 #include <iostream>
40 #include <iomanip>
41 #include <vector>
42 #include <stdio.h>
43 #include "unistd.h" // to use optarg
44 
45 using namespace std;
46 
47 #include <signal.h>
48 #include <time.h>
49 #include <stdlib.h>
50 
51 #include <HDDM/hddm_s.hpp>
52 #include <HDDM/hddm_r.hpp>
53 
54 #include "TRandom2.h"
55 #include "TLorentzVector.h"
56 
57 extern bool HDDM_USE_COMPRESSION;
58 extern bool HDDM_USE_INTEGRITY_CHECKS;
59 
60 bool selectEvent_s(int select_type, hddm_s::HDDM &record, int nevents, bool debug);
61 bool selectEvent_r(int select_type, hddm_r::HDDM &record, int nevents, bool debug);
62 
63 // Lambda decay constant
64 const double alpha = 0.642;
bool selectEvent_r(int select_type, hddm_r::HDDM &record, int nevents, bool debug)
const double alpha
bool selectEvent_s(int select_type, hddm_s::HDDM &record, int nevents, bool debug)
bool debug
bool HDDM_USE_COMPRESSION
bool HDDM_USE_INTEGRITY_CHECKS