Some fixes to trigger generation for cbc/findchirp
authorTito Dal Canton <tito.canton@ligo.org>
Wed, 19 Dec 2012 15:33:09 +0000 (16:33 +0100)
committerTito Dal Canton <tito.canton@ligo.org>
Wed, 19 Dec 2012 15:33:09 +0000 (16:33 +0100)
common/include/cluster/GWClusterSimpleMax.hpp
common/src/io/GWMetaIO.cpp

index 9c5401f..f2fa8ef 100644 (file)
@@ -211,12 +211,12 @@ template <typename T> void ClusterSimpleMax<T>::FindClusters(
     dev_work_space->Fetch(host_work_space);
 
     for (int i = 0; i < num_of_triggers; i++) {
-//        if (host_work_space[2 * i] > threshold) {
+        if (host_work_space[2 * i] > threshold) {
             myTrigger.IntrParams = *IntrParams;
             myTrigger.snr        = (double) host_work_space[2 * i];
             myTrigger.time       = (double) host_work_space[2 * i + 1];
             triggers->push_back(myTrigger);
-//        }
+        }
     }
 
 };
index dc1047e..765d0ee 100644 (file)
@@ -273,8 +273,9 @@ void MetaIOWriter::assign_single_inspiral_table(SnglInspiralTable* sit,
 //                    Here it is only ment as example!
 
     sit->snr=    t_it->snr;
-    sit->beta=   t_it->time;
     sit->chisq=  t_it->chi2;
+    sit->end_time.gpsSeconds = t_it->time;
+    sit->end_time.gpsNanoSeconds = (t_it->time - sit->end_time.gpsSeconds) * 1e9;
     
     sit->tau0=   t_it->ExtrParams.distance;
     sit->tau2=   t_it->ExtrParams.iota;
@@ -287,6 +288,9 @@ void MetaIOWriter::assign_single_inspiral_table(SnglInspiralTable* sit,
     sit->mass1= boost::any_cast <float>   (t_it->IntrParams["m1"]);
     sit->mass2= boost::any_cast <float>   (t_it->IntrParams["m2"]);
     sit->f_final= boost::any_cast <float> (t_it->IntrParams["flow"]);
+    sit->mtotal = sit->mass1 + sit->mass2;
+    sit->eta = sit->mass1 * sit->mass2 / (sit->mtotal * sit->mtotal);
+    sit->mchirp = sit->mtotal * pow(sit->eta, 0.6);
 
     // copied from from lalmetaio for convenience: