Skip to content

Commit

Permalink
Merge pull request #24 from project8/develop
Browse files Browse the repository at this point in the history
Develop
  • Loading branch information
pslocum authored Aug 28, 2018
2 parents 7bfec6f + 73fb497 commit 48cc057
Show file tree
Hide file tree
Showing 31 changed files with 1,203 additions and 513 deletions.
2 changes: 1 addition & 1 deletion .gitmodules
Original file line number Diff line number Diff line change
Expand Up @@ -8,4 +8,4 @@
[submodule "kassiopeia"]
path = kassiopeia
url = https://github.com/project8/kassiopeia.git
branch = feature/eventmod
branch = feature/eventmod
43 changes: 43 additions & 0 deletions Config/Tutorial/LocustFakeTrack.json
Original file line number Diff line number Diff line change
@@ -0,0 +1,43 @@
{
"generators":
[
"fake-track",
"lpf-fft",
"decimate-signal",
"gaussian-noise",
"digitizer"
],

"fake-track":
{
"signal-power": 1.0e-15,
"start-frequency": 20.05e9,
"start-vphase": 0.0,
"slope": 0.6,
"start-time": 0.001,
"end-time": 0.005,
"lo-frequency": 20.0e9
},

"simulation":
{
"egg-filename": "/home/penny/locust_mc/cbuild/bin/locust_mc.egg",
"n-records": 1,
"n-channels": 1,
"record-size": 1228800
},

"gaussian-noise":
{
"noise-floor": 4.0e-21,
"domain": "time"
},

"digitizer":
{
"v-range": 1.0e-5,
"v-offset": -0.5e-5
}

}

6 changes: 3 additions & 3 deletions Config/Tutorial/LocustPhase1Template.json
Original file line number Diff line number Diff line change
Expand Up @@ -36,14 +36,14 @@

"gaussian-noise":
{
"noise-floor": 4.0e-24,
"noise-floor": 2.0e-22,
"domain": "time"
},

"digitizer":
{
"v-range": 1.0e-6,
"v-offset": -0.5e-6
"v-range": 4.0e-5,
"v-offset": -2.0e-5
}

}
Expand Down
9 changes: 5 additions & 4 deletions Config/Tutorial/LocustPhase3Template.json
Original file line number Diff line number Diff line change
Expand Up @@ -16,7 +16,8 @@

"patch-signal":
{
"lo-frequency": 25.8781e9,
"lo-frequency": 26.0681e9,
"feed": "corporate",
"xml-filename": "/home/hep/baker/ps48/locust_mc/Config/Tutorial/Project8Phase3_WithRoot_Template.xml"
},

Expand All @@ -30,13 +31,13 @@
{
"egg-filename": "/home/hep/baker/ps48/locust_mc/cbuild/bin/locust_mc.egg",
"n-records": 1,
"record-size": 4194304,
"n-channels": 3
"record-size": 81920,
"n-channels": 30
},

"gaussian-noise":
{
"noise-floor": 4.0e-24,
"noise-floor": 2.0e-22,
"domain": "time"
},

Expand Down
2 changes: 1 addition & 1 deletion Config/Tutorial/Project8Phase1_WithRoot_Template.xml
Original file line number Diff line number Diff line change
Expand Up @@ -3,7 +3,7 @@

<external_define name="simulation" value="1"/>
<external_define name="pinch" value="1.e-5"/> <!-- -1.0 for harmonic, 1.e-5 for bathtub due to apparent slow performance with 0.0 value -->
<external_define name="bathtub" value="1.0"/> <!-- 1.0 for bathtub, 1.e-5 for harmonic due\
<external_define name="bathtub" value="0.5"/> <!-- 1.0 for bathtub, 1.e-5 for harmonic due\
to apparent slow performance with 0.0 value -->

<external_define name="fieldZ" value="0.9583"/> <!-- no tilt -->
Expand Down
2 changes: 1 addition & 1 deletion Config/Tutorial/Project8Phase2_WithRoot_Template.xml
Original file line number Diff line number Diff line change
Expand Up @@ -433,7 +433,7 @@


<!-- terminators -->
<ksterm_max_time name="term_max_time" time="0.5e-3"/>
<ksterm_max_time name="term_max_time" time="1.e-6"/>
<ksterm_max_steps name="term_max_steps" steps="10000"/>
<ksterm_min_energy name="term_min_energy" energy="17000."/>
<ksterm_max_energy name="term_max_energy" energy="19000."/>
Expand Down
18 changes: 11 additions & 7 deletions Config/Tutorial/Project8Phase3_WithRoot_Template.xml
Original file line number Diff line number Diff line change
Expand Up @@ -4,7 +4,7 @@
<external_define name="simulation" value="1"/>

<external_define name="pinch" value="1.e-5"/> <!-- -1.0 for harmonic, 1.e-5 for bathtub due to apparent slow performance with 0.0 value -->
<external_define name="bathtub" value="1.0"/> <!-- 1.0 for bathtub -->
<external_define name="bathtub" value="5.0"/> <!-- 1.0 for bathtub -->
<external_define name="fieldZ" value="0.9583"/> <!-- no tilt -->
<external_define name="fieldX" value="0.0"/> <!-- earth's horiz. field in Seattle -->
<external_define name="fieldY" value="0.0"/>
Expand All @@ -24,14 +24,18 @@
<external_define name="count" value="1"/>
<external_define name="seed" value="112377"/>

<external_define name="output_path" value="[KASPERSYS]/output/Kassiopeia"/>
<external_define name="file" value="Phase3Output"/>
<external_define name="output_path" value="/home/hep/baker/ps48/data/Simulation/Phase3/"/>
<external_define name="file" value="Phase3Seed[seed]Output"/>



<geometry>
<include name="/home/hep/baker/ps48/locust_mc/Config/Tutorial/Project8Phase2AuxCoilGeometry.xml"/>
<include name="/home/hep/baker/ps48/locust_mc/Config/Tutorial/Project8Phase3LargeGeometry.xml"/>
</geometry>





<!-- solenoid turns -->

Expand Down Expand Up @@ -201,16 +205,16 @@

<ksgen_generator_composite name="gen_uniform" pid="11">
<energy_composite>
<energy_fix value="18000.0"/>
<energy_fix value="18600.0"/>
</energy_composite>
<position_rectangular_composite space="world/project8">
<x_uniform value_min="0.0" value_max="0.0"/>
<y_uniform value_min="0.00" value_max="0.00"/>
<y_uniform value_min="0.0" value_max="0.0"/>
<z_uniform value_min="0.0" value_max="0.0"/>
</position_rectangular_composite>
<direction_spherical_composite space="world/project8">
<!-- <theta_spherical angle_min="89.9" angle_max="90"/> -->
<theta_uniform value_min="90." value_max="90."/>
<theta_uniform value_min="90.0" value_max="90.0"/>
<phi_uniform value_min="0." value_max="0."/>
</direction_spherical_composite>
<time_composite>
Expand Down
10 changes: 10 additions & 0 deletions Source/CMakeLists.txt
Original file line number Diff line number Diff line change
Expand Up @@ -38,9 +38,11 @@ set( LOCUST_MC_HEADER_FILES

Generators/LMCDigitizer.hh
Generators/LMCGaussianNoiseGenerator.hh
Generators/LMCFakeTrackGenerator.hh
Generators/LMCTestSignalGenerator.hh
Generators/LMCDecimateSignalGenerator.hh
Generators/LMCLowPassFilterFFTGenerator.hh
Generators/LMCLocalOscillatorGenerator.hh
Generators/LMCButterworthLPFGenerator.hh

# Generators/LMCBasebandTrackGenerator.hh
Expand All @@ -63,9 +65,11 @@ set( LOCUST_MC_SOURCE_FILES

Generators/LMCDigitizer.cc
Generators/LMCGaussianNoiseGenerator.cc
Generators/LMCFakeTrackGenerator.cc
Generators/LMCTestSignalGenerator.cc
Generators/LMCDecimateSignalGenerator.cc
Generators/LMCLowPassFilterFFTGenerator.cc
Generators/LMCLocalOscillatorGenerator.cc
Generators/LMCButterworthLPFGenerator.cc

# Generators/LMCBasebandTrackGenerator.cc
Expand All @@ -79,9 +83,12 @@ if (locust_mc_BUILD_WITH_KASSIOPEIA)
Generators/LMCPatchSignalGenerator.hh
Generators/LMCKassSignalGenerator.hh

Core/LMCChannel.hh
Core/LMCGlobalsDeclaration.hh
Core/LMCGlobalsDefinition.hh
Core/LMCPatchAntenna.hh
Core/LMCParticle.hh
Core/LMCReceiver.hh
Core/LMCHFSSReader.hh

Kassiopeia/LMCCyclotronRadiationExtractor.hh
Expand All @@ -97,8 +104,11 @@ if (locust_mc_BUILD_WITH_KASSIOPEIA)
Generators/LMCPatchSignalGenerator.cc
Generators/LMCKassSignalGenerator.cc

Core/LMCChannel.cc
Core/LMCHFSSReader.cc
Core/LMCParticle.cc
Core/LMCPatchAntenna.cc
Core/LMCReceiver.cc

Kassiopeia/LMCCyclotronRadiationExtractor.cc
Kassiopeia/LMCCyclotronRadiationExtractorBuilder.cc
Expand Down
25 changes: 25 additions & 0 deletions Source/Core/LMCChannel.cc
Original file line number Diff line number Diff line change
@@ -0,0 +1,25 @@
/*
* LMCChannel.cc
*
* Created on: Mar 5, 2018
* Author: nbuzinsky
*/

#include "LMCReceiver.hh"
#include "LMCChannel.hh"

#include <numeric>

namespace locust
{

//Use lambda to add all of GetVoltages() from all receiver elements
template< class T>
double Channel<T>::PhasedSum()
{
return std::accumulate(receiverElements.begin(), receiverElements.end(), 0,
[](double s ,T r) {return s + r->GetVoltage();});
}

} /* namespace locust */

41 changes: 41 additions & 0 deletions Source/Core/LMCChannel.hh
Original file line number Diff line number Diff line change
@@ -0,0 +1,41 @@
/*
* LMCChannel.hh
*
* Created on: Mar 1, 2018
* Author: nbuzinsky
*/

#ifndef LMCCHANNEL_HH_
#define LMCCHANNEL_HH_
#include <vector>

namespace locust
{
/*!
@class Channel
@author N. Buzinsky
@brief Used to conveniently group multiple receivers into a channel/ and do phased sum
@details
Available configuration options:
No input parameters
*/
template <class T>
class Channel
{
public:

double PhasedSum();
void AddReceiver(const T receiver){receiverElements.push_back(receiver);}

T& operator[] (const int &index) {return receiverElements[index];}
std::size_t size() {return receiverElements.size();}

private:
std::vector<T> receiverElements; //Best way to add receivers w/o object slicing?

};


} /* namespace locust */

#endif /* LMCCHANNEL_HH_ */
6 changes: 3 additions & 3 deletions Source/Core/LMCGlobalsDeclaration.hh
Original file line number Diff line number Diff line change
Expand Up @@ -8,9 +8,9 @@
#ifndef GLOBALSDECLARATION_HH_
#define GLOBALSDECLARATION_HH_

#define NPATCHES_PER_STRIP 11
#define PATCH_SPACING 0.0108 // m. Spacing along Z.
#define PATCH_RADIUS 0.0516 // m. Radius of patch ring.
#define NPATCHES_PER_STRIP 21
#define PATCH_SPACING 0.0054 // m. Spacing along Z.
#define PATCH_RADIUS 0.045 // m. Radius of patch ring.
#define PATCH_RING_OFFSET 0.0 // m. Offset of entire array in X direction


Expand Down
Loading

0 comments on commit 48cc057

Please sign in to comment.