Logo coherent WaveBurst  
Library Reference Guide
Logo
cwb1G_parameters.C
Go to the documentation of this file.
1 // main cwb configuration file for the 1G pipeline
2 // parameters can be redefined/added in user_parameters.C
3 // for reference contact
4 // S.Klimenko, University of Florida. klimenko@phys.ufl.edu
5 // G.Vedovato, University of Padova, vedovato@lnl.infn.it
6 {
7 #ifndef CWB_PARAMETER_FILE
8 #define CWB_PARAMETER_FILE
9 
10  #include "xroot.hh" // defines macro to manage ROOT5 vs ROOT6
11 
12  char analysis[8]="1G"; // 1G pipeline
13  CheckAnalysis(); // check consistency with the environment CWB_ANALYSIS
14 
15  bool online=false; // true/false -> online/offline
16 
17  char ifo[NIFO_MAX][8];
18  if(NIFO_MAX>0) strcpy(ifo[0],"L1"); // LIGO Livingston
19  if(NIFO_MAX>1) strcpy(ifo[1],"H1"); // LIGO Hanford
20  if(NIFO_MAX>2) strcpy(ifo[2],"V1"); // Virgo
21  if(NIFO_MAX>3) strcpy(ifo[3],"I1"); // LIGO India
22  if(NIFO_MAX>4) strcpy(ifo[4],"J1"); // KAGRA Japan
23  if(NIFO_MAX>5) strcpy(ifo[5],"G1"); // GEO-600 Hannover
24  for(int i=6;i<NIFO_MAX;i++) strcpy(ifo[i],""); // ifo[] can be redefined by user
25 
26  int nIFO = 3; // size of network starting with first detector ifo[]
27  char refIFO[4] = "L1"; // reference IFO
28  SEARCH(char) = 'r'; // see description below
29  // user define detectors list : is selected if detectorParams[n].name!=""
30  // {name, latitude, longitude, elevation, AltX, AzX, AltY, AzY
32  detectorParams _detParms = {"",0.,0.,0.,0,0.,0.,0.};
33  for(int i=0;i<NIFO_MAX;i++) detParms[i] = _detParms;
34 
35  // cWB settings
36 
37  int runID = 0; // run number, set in the production job
38  size_t inRate= 16384; // input data rate
39  double bpp = 0.0001; // probability for pixel selection
40  double Tgap = 0.05; // time gap between clusters (sec)
41  double Fgap = 128.; // frequency gap between clusters (Hz)
42  double fLow = 64.; // low frequency of the search
43  double fHigh = 2048.; // high frequency of the search
44  size_t fResample = 0; // if>0 the inRate is resampled to fResample
45  double Acore = sqrt(2); // threshold for selection of core pixels
46  double Tlpr = 120.; // 1G: training time for LPR filter
47 
48  double x2or = 1.5; // 1G: 2 OR threshold
49  double netRHO= 3.5; // threshold on rho
50  double netCC = 0.5; // threshold on network correlation
51 
52  // time-frequency transformation settings
53 
54  int levelR = 2; // resampling level : inRate[fResample]/(2^levelR) Hz
55  int levelF = 6; // level where second LPR filter is applied
56  int levelD = 8; // decomposition level
57  int l_low = 3; // low frequency resolution level (2^l_low Hz)
58  int l_high = 8; // high frequency resolution level (2^l_high Hz)
59 
60  // time shift analysis settings
61 
62  // segments
63  double segLen = 600.; // Segment length [sec]
64  double segMLS = 300.; // Minimum Segment Length after DQ_CAT1 [sec]
65  double segTHR = 30.; // Minimum Segment Length after DQ_CAT2 [sec] (to disable put segTHR=0)
66  double segEdge = 8.; // wavelet boundary offset [sec]
67  double segOverlap = 0.; // overlap between job segments [sec]
68 
69  // lags
70  size_t lagSize = 1; // number of lags (simulation=1)
71  double lagStep = 1.; // time interval between lags [sec]
72  size_t lagOff = 0; // first lag id (lagOff=0 - include zero lag )
73  size_t lagMax = 150; // 0/>0 - standard/extended lags
74  char* lagFile = NULL; // lag file list
75  char lagMode[] = "w"; // w/r - write/read lag list
76  size_t* lagSite = NULL; // site index starting with 0
77  double shift[NIFO_MAX]; // use for standard shifts
78  for(int i=0;i<NIFO_MAX;i++) shift[i] = 0.;
79 
80  // multi lags
81  int mlagStep = 0; // if mlagStep=0 then 'standard lag mode' else cicle over lags with step mlagStep
82 
83  // super lags
84  int slagSize = 0; // number of super lags (simulation=1) - if slagSize=0 -> Igor Segments
85  int slagMin = 0; // if slagMax=0 -> slagMin must be < slagMax
86  int slagMax = 0; // if slagMax=0
87  int slagOff = 0; // first slag id (slagOff=0 - include zero slag )
88  size_t* slagSite = NULL; // site index starting with 0
89  char* slagFile = NULL; // slag file list
90 
91  // whitening parameters
92  double whiteWindow = 60.; // time window dT. if = 0 - dT=T, where T is wavearray duration
93  double whiteStride = 20.; // noise sampling interval (window stride)
94 
95  // Skymap probability to be saved in the final output root file (saved if !=0 : see nSky)
96  int Psave = 0;
97 
98  // DC corrections
99  double dcCal[NIFO_MAX];
100  for(int i=0;i<NIFO_MAX;i++) dcCal[i] = 1.0;
101 
102  // simulation parameters
103  int simulation = 0; // 1/2/3 for simulation(hrss/snr/tshift), 0 for production
104  int nfactor=0; // number of strain factors
105  double factors[100]; // array of strain factors
106  for(int i=0;i<100;i++) factors[i]=0.;
107  double iwindow = 5.; // injection time window (Tinj +/- iwindow/2)
108 
109  // noise shift data
110  double dataShift[NIFO_MAX];
111  for(int i=0;i<NIFO_MAX;i++) dataShift[i] = 0.;
112 
113  // use this parameter to shift in time the injections (sec)
114  // use {0,0,0} to set mdc_shift to 0
115  // if {-1,0,0} the shift is automaticaly selected
116  // {startMDC, stopMDC}
117  mdcshift mdc_shift = {0, 0, 0};
118 
119  // delay filter
120 
121  char filter[1024] = "up2"; // 1G: delay filter suffix: "", or "up1", or "up2"
122 
123  // regulator
124 
125  double delta = 1.0; // 1G: [0/1] -> [weak/soft]
126  GAMMA(double) = 0.2; // 1G: set params in net5, [0/1]->net5=[nIFO/0],
127  // 1G: if net5>[threshold=(nIFO-1)] weak/soft[according to delta] else hard
128 
129  bool eDisbalance = true; // 1G:
130 
131  // sky settings
132 
133  bool EFEC = true; // Earth Fixed / Selestial coordinates
134  size_t mode = 0; // sky search mode
135  double angle = 0.4; // angular resolution
136  double Theta1 = 0.; // start theta
137  double Theta2 = 180.; // end theta
138  double Phi1 = 0.; // start theta
139  double Phi2 = 360.; // end theta
140  double mask = 0.00; // sky mask fraction
141  size_t healpix= 0; // if not 0 use healpix sky map (number of sky pixels = 12*pow(4,healpix))
142 
143  // error regions settings
144 
145  double precision = 0.001; // No = nIFO*(K+KZero)+precision*E
146 
147  // file dump mode
148 
150  CWB_OUTF_OPTIONS outfOptions = CWB_OUTF_SAVE_DISABLE; // output root file options
151 
152  bool dumpHistory = true; // dump history into output root file
153  bool dump = false; // dump triggers into ascii file
154  bool savemode = true; // temporary save clusters on disc
155  bool cedDump = false; // dump ced plots with rho>cedRHO
156  double cedRHO = 4.0;
157  long nSky = 0; // if nSky>0 -> # of skymap prob pixels dumped to ascii
158  // if nSky=0 -> (#pixels==1000 || cum prob > 0.99)
159  // if nSky<0 -> nSky=-XYZ... save all pixels with prob < 0.XYZ...
160 
161  // directories, file names
162 
163  char filter_dir[1024];
164  if(gSystem->Getenv("HOME_WAT_FILTERS")==NULL) {
165  cout << "Error : environment HOME_WAT_FILTERS is not defined!!!" << endl;exit(1);
166  } else {
167  strcpy(filter_dir,TString(gSystem->Getenv("HOME_WAT_FILTERS")).Data());
168  }
169 
170  char injectionList[1024]="";
171  char skyMaskFile[1024]="";
172  char skyMaskCCFile[1024]="";
175  for(int i=0;i<NIFO_MAX;i++) strcpy(channelNamesRaw[i],"");
176  for(int i=0;i<NIFO_MAX;i++) strcpy(channelNamesMDC[i],"");
177 
178  // working dir
179  char work_dir[1024];
180  sprintf(work_dir,"%s",gSystem->WorkingDirectory());
181 
182  char config_dir[1024] = "config";
183  char input_dir[1024] = "input";
184  char output_dir[1024] = "output";
185  char merge_dir[1024] = "merge";
186  char condor_dir[1024] = "condor";
187  char report_dir[1024] = "report";
188  char macro_dir[1024] = "macro";
189  char log_dir[1024] = "log";
190  char data_dir[1024] = "data";
191  char tmp_dir[1024] = "tmp";
192  char ced_dir[1024] = "report/ced";
193  char pp_dir[1024] = "report/postprod";
194  char dump_dir[1024] = "report/dump";
195  char www_dir[1024];
196 
197  UserGroup_t* uinfo = gSystem->GetUserInfo();
198  TString uname = uinfo->fUser;
199  TString uhome = TString(gSystem->Getenv("HOME")).Data();
200 
201  // set public dir
202  if(gSystem->Getenv("WWW_PUBLIC_DIR")!=NULL) {
203  // read from env
204  TString www_public_dir = TString(gSystem->Getenv("WWW_PUBLIC_DIR"));
205  www_public_dir.ReplaceAll("X_HOME",uhome.Data());
206  www_public_dir.ReplaceAll("X_USER_NAME",uname.Data());
207  www_public_dir.ReplaceAll("X_HOST_NAME",gSystem->HostName());
208  sprintf(www_dir,"%s",www_public_dir.Data());
209  } else {
210  cout << "cwb_parameters.C : Error env WWW_PUBLIC_DIR not defined !!!" << endl;
211  cout << "www_public_dir can not be defined" << endl;
212  exit(1);
213  }
214  cout << "www_dir : " << www_dir << endl;
215 
216  // data label
217  char data_label[1024];
218  sprintf(data_label,gSystem->BaseName(work_dir));
219  cout << "data_label : " << data_label << endl;
220 
221  // condor declarations
222  char condor_log[1024];
223  if(gSystem->Getenv("CONDOR_LOG_DIR")!=NULL) {
224  // get host name & strip string after the first '.'
225  // strip is necessary to get the correct condor path
226  // condor log dir is in the local header nodes
227  // used in ATLAS cluster to fix issue with HSM
228  TString host_name = gSystem->HostName();
229  if(host_name.First(".")>=0) host_name.Resize(host_name.First("."));
230  // read from env
231  TString condor_log_dir = TString(gSystem->Getenv("CONDOR_LOG_DIR"));
232  condor_log_dir.ReplaceAll("X_HOME",uhome.Data());
233  condor_log_dir.ReplaceAll("X_USER_NAME",uname.Data());
234  condor_log_dir.ReplaceAll("X_HOST_NAME",host_name);
235  sprintf(condor_log,"%s",condor_log_dir.Data());
236  } else {
237  cout << "cwb_parameters.C : Error env CONDOR_LOG_DIR not defined !!!" << endl;
238  cout << "condor_log can not be defined" << endl;
239  exit(1);
240  }
241  cout << "condor_log : " << condor_log << endl;
242 
243  // Define a Unique Tag for Condor Jobs
244  // See the following link:
245  // https://ldas-gridmon.ligo.caltech.edu/accounting/condor_groups/determine_condor_account_group.html
246  // Ex : ligo.dev.o1.burst.allsky.cwboffline, ligo.prod.o1.burst.allsky.cwboffline
247  char condor_tag[1024] = "";
248 
249  // frame files list : [0:nIFO-1]/[nIFO:2*nIFO-1] contains strain/mdc file names
250  // If all mdc channels are in a single frame file -> mdc must be declared in the nIFO position
251  char frFiles[2*NIFO_MAX][1024];
252  for(int i=0;i<2*NIFO_MAX;i++) strcpy(frFiles[i],"");
253  // frame reading retry time (sec) : 0 -> disable
254  // retry time = frRetryTime*(num of trials) : max trials = 3
255  int frRetryTime=60;
256 
257  // dq file list
258  // {ifo, dqcat_file, dqcat[0/1/2], shift[sec], inverse[false/true], 4columns[true/false]}
259  int nDQF = 0;
260  dqfile DQF[20];
261 
262  // read and dump data on local disk (nodedir)
263  char nodedir[1024] = "";
264  if(gSystem->Getenv("NODE_DATA_DIR")!=NULL) {
265  // read from env
266  TString node_data_dir = TString(gSystem->Getenv("NODE_DATA_DIR"));
267  node_data_dir.ReplaceAll("X_HOME",uhome.Data());
268  node_data_dir.ReplaceAll("X_USER_NAME",uname.Data());
269  node_data_dir.ReplaceAll("X_HOST_NAME",gSystem->HostName());
270  sprintf(nodedir,"%s",node_data_dir.Data());
271  } else {
272  cout << "cwb_parameters.C : Error env NODE_DATA_DIR not defined !!!" << endl;
273  cout << "nodir can not be defined" << endl;
274  exit(1);
275  }
276  cout << "nodename : " << gSystem->HostName() << endl;
277  cout << "nodedir : " << nodedir << endl;
278 
279  // Plugin
280 
281  TMacro plugin; // Macro source
282  TMacro configPlugin; // Macro config
283  plugin.SetName("");
284  configPlugin.SetName("");
285  bool dataPlugin = false; // if dataPlugin=true disable read data from frames
286  bool mdcPlugin = false; // if dataPlugin=true disable read mdc from frames
287 
288  // statistics:
289  // L - likelihood
290  // c - network correlation coefficient
291  // A - energy disbalance asymmetry
292  // P - penalty factor based on correlation coefficients <x,s>/sqrt(<x,x>*<s,s>)
293  // E - total energy in the data streams
294 
295  // 1G search modes
296  // 'c' - un-modeled search, fast S5 cWB version, requires constraint settings
297  // 'h' - un-modeled search, S5 cWB version, requires constraint settings
298  // 'B' - un-modeled search, max(P*L*c/E)
299  // 'b' - un-modeled search, max(P*L*c*A/E)
300  // 'I' - elliptical polarisation, max(P*L*c/E)
301  // 'S' - linear polarisation, max(P*L*c/E)
302  // 'G' - circular polarisation, max(P*L*c/E)
303  // 'i' - elliptical polarisation, max(P*L*c*A/E)
304  // 's' - linear polarisation, max(P*L*c*A/E)
305  // 'g' - circular polarisation, max(P*L*c*A/E)
306 
307  // ----------------------------------------------
308  // obsolete parameters
309  // ----------------------------------------------
310 
311  double &gap = iwindow; // alias of iwindow
312  char wdmXTalk[1024]=""; // 2G parameter
313  double TFgap = 0.; // 2G parameter
314  size_t upTDF = 0; // 2G parameter
315  size_t TDSize = 0; // 2G parameter
316  int BATCH = 0; // 2G parameter
317  int LOUD = 0; // 2G parameter
318  bool dcPlugin = false; // 2G parameter
319  bool outPlugin = false; // 2G parameter
320  bool optim = true; // 2G parameter
321  double subnet = 0.; // 2G parameter
322  bool dataPlugin = false; // 2G parameter
323  bool mdcPlugin = false; // 2G parameter
324  bool dcPlugin = false; // 2G parameter
325  bool cohPlugin = false; // 2G parameter
326  bool scPlugin = false; // 2G parameter
327  bool outPlugin = false; // 2G parameter
328 
329 #endif
330 }
char skyMaskFile[1024]
char wdmXTalk[1024]
double segMLS
Definition: test_config1.C:47
int slagSize
Definition: test_config1.C:65
bool online
double lagStep
Definition: test_config1.C:53
char filter_dir[1024]
size_t * slagSite
Definition: test_config1.C:69
int slagOff
Definition: test_config1.C:68
mdcshift mdc_shift
Definition: test_config1.C:93
TString condor_log_dir
size_t TDSize
char channelNamesMDC[NIFO_MAX][50]
double fHigh
double delta
CWB_OUTF_OPTIONS outfOptions
CWB_JOBF_OPTIONS
Definition: config.hh:55
char channelNamesRaw[NIFO_MAX][50]
size_t * lagSite
Definition: test_config1.C:58
double angle
bool scPlugin
TString("c")
GAMMA(double)=0.2
char www_dir[512]
Definition: test_config1.C:157
char skyMaskCCFile[1024]
double x2or
double bpp
Definition: test_config1.C:22
bool optim
char frFiles[NIFO_MAX+1][256]
Definition: test_config1.C:166
int slagMax
Definition: test_config1.C:67
CWB_JOBF_OPTIONS jobfOptions
size_t lagOff
Definition: test_config1.C:54
double & gap
double Theta2
char refIFO[4]
Definition: test_config1.C:14
char macro_dir[512]
Definition: test_config1.C:150
double segEdge
Definition: test_config1.C:49
char report_dir[512]
Definition: test_config1.C:149
i drho i
int l_low
Definition: test_config1.C:40
double whiteWindow
Definition: test_config1.C:72
CWB_OUTF_OPTIONS
Definition: config.hh:79
double netCC
Definition: test_config1.C:33
char ifo[NIFO_MAX][8]
double Tgap
Definition: test_config1.C:23
double Theta1
double fResample
Definition: test_config1.C:27
char ced_dir[512]
Definition: test_config1.C:154
char injectionList[1024]
nDQF
Definition: cwb_eced.C:109
int Psave
Definition: test_config1.C:75
double Acore
Definition: test_config1.C:28
double segTHR
Definition: test_config1.C:48
size_t mode
#define nIFO
bool mdcPlugin
char data_label[512]
Definition: test_config1.C:160
char input_dir[512]
Definition: test_config1.C:145
int BATCH
int levelD
char tmp_dir[512]
Definition: test_config1.C:153
char lagMode[2]
Definition: test_config1.C:57
size_t upTDF
const int NIFO_MAX
Definition: wat.hh:22
dqfile DQF[12]
Definition: test_config1.C:171
double dataShift[NIFO_MAX]
Definition: test_config1.C:87
bool EFEC
int mlagStep
segLen
Definition: cwb_eced.C:24
double precision
bool dumpHistory
char merge_dir[512]
Definition: test_config1.C:147
double cedRHO
bool eDisbalance
char data_dir[512]
Definition: test_config1.C:152
UserGroup_t * uinfo
Definition: cwb_frdisplay.C:91
char log_dir[512]
Definition: test_config1.C:151
char config_dir[512]
Definition: test_config1.C:144
double Phi1
bool outPlugin
double dcCal[NIFO_MAX]
Definition: test_config1.C:78
char filter[1024]
bool cohPlugin
double Fgap
Definition: test_config1.C:24
double fLow
int LOUD
double whiteStride
Definition: test_config1.C:73
char dump_dir[512]
Definition: test_config1.C:156
char pp_dir[512]
Definition: test_config1.C:155
char * lagFile
Definition: test_config1.C:56
strcpy(RunLabel, RUN_LABEL)
int nfactor
Definition: test_config1.C:83
double mask
double netRHO
Definition: test_config1.C:32
sprintf(condor_log,"%s", condor_log_dir.Data())
char condor_log[512]
Definition: test_config1.C:163
TMacro plugin
bool dump
CheckAnalysis()
Definition: Toolfun.hh:303
bool savemode
int l_high
Definition: test_config1.C:41
slagFile
Definition: cwb_tune_slag.C:25
char nodedir[1024]
Definition: test_config1.C:187
double Phi2
char condor_dir[512]
Definition: test_config1.C:148
char work_dir[512]
Definition: test_config1.C:143
TMacro configPlugin
long nSky
int levelR
Definition: test_config1.C:37
int slagMin
Definition: test_config1.C:66
simulation
Definition: cwb_eced.C:26
double Tlpr
detectorParams detParms[4]
factors[0]
Definition: cwb_eced.C:27
double shift[NIFO_MAX]
char output_dir[512]
Definition: test_config1.C:146
bool dcPlugin
bool dataPlugin
#define SEARCH(TYPE)
Definition: xroot.hh:4
size_t lagMax
Definition: test_config1.C:55
bool cedDump
int levelF
exit(0)
size_t healpix
size_t lagSize
Definition: test_config1.C:52