Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Adding new package restDAQ #234

Closed
wants to merge 7 commits into from
Closed
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
3 changes: 3 additions & 0 deletions .gitmodules
Original file line number Diff line number Diff line change
Expand Up @@ -40,6 +40,9 @@
[submodule "source/libraries/legacy"]
path = source/libraries/legacy
url = https://github.com/rest-for-physics/legacylib.git
[submodule "source/packages/restDAQ"]
path = source/packages/restDAQ
url = https://github.com/rest-for-physics/restDAQ.git
[submodule "projects/trexdm"]
path = projects/trexdm
url = [email protected]:gifna/trexdm-project.git
Expand Down
127 changes: 25 additions & 102 deletions examples/01.alphaTrack/processing.rml
Original file line number Diff line number Diff line change
@@ -1,22 +1,13 @@
<?xml version="1.0" ?>
<?xml version="1.0"?>
<TRestManager name="RESTManagerSim" title="Template manager to process a simulation generated by restG4.">

<globals>
<variable name="EXPERIMENT" value="Fluorescence" overwrite="false"/>
<variable name="RAW_PROCESSING" value="OFF" />
<variable name="HIT_PROCESSING" value="OFF" />
<variable name="TRACK_PROCESSING" value="OFF" />
<variable name="SHAPING" value="OFF" />
<parameter name="mainDataPath" value="."/>
<parameter name="verboseLevel" value="warning"/>
<globals><variable name="EXPERIMENT" value="Fluorescence" overwrite="false"/><variable name="RAW_PROCESSING" value="OFF"/><variable name="HIT_PROCESSING" value="OFF"/><variable name="TRACK_PROCESSING" value="OFF"/><variable name="SHAPING" value="OFF"/><parameter name="mainDataPath" value="."/><parameter name="verboseLevel" value="warning"/>
%options are : essential silent, warning, info, debug

<parameter name="sampling" value="10ns" />
<parameter name="driftVelocity" value="" />
<parameter name="electricField" value="100" units="V/cm" />
<parameter name="gasPressure" value="1" />
<parameter name="sampling" value="10ns"/>
<parameter name="driftVelocity" value=""/>
<parameter name="electricField" value="100" units="V/cm"/>
<parameter name="gasPressure" value="1"/>
</globals>

<TRestRun name="Process" title="Alpha simulations.">
<parameter name="experimentName" value="${EXPERIMENT}"/>
<parameter name="readOnly" value="false"/>
Expand All @@ -27,90 +18,37 @@
<parameter name="user" value="${USER}"/>
<parameter name="verboseLevel" value="1"/>
<parameter name="overwrite" value="off"/>
<parameter name="outputFileName" value="data/Response_[fRunTag].root" />

<addMetadata type="TRestDetectorReadout" name="cathode" file="readout/readouts.root" store="false" />
<TRestDetectorGas name="Argon-Isobutane 1Pct 10-10E3Vcm" pressure="1" file="server" />
<parameter name="outputFileName" value="data/Response_[fRunTag].root"/>
<addMetadata type="TRestDetectorReadout" name="cathode" file="readout/readouts.root" store="false"/>
<TRestDetectorGas name="Argon-Isobutane 1Pct 10-10E3Vcm" pressure="1" file="server"/>
</TRestRun>
<TRestProcessRunner name="TemplateEventProcess" verboseLevel="info"><parameter name="eventsToProcess" value="0"/><parameter name="threadNumber" value="1"/><parameter name="inputAnalysisStorage" value="on"/><parameter name="inputEventStorage" value="off"/><parameter name="outputEventStorage" value="on"/>

// observable = all will add all NON `custom` observables
<addProcess type="TRestGeant4AnalysisProcess" name="g4Ana" value="ON"><observable name="thetaPrimary" value="ON"/><observable name="phiPrimary" value="ON"/><observable name="xOriginPrimary" value="ON"/><observable name="yOriginPrimary" value="ON"/><observable name="zOriginPrimary" value="ON"/><observable name="xDirectionPrimary" value="ON"/><observable name="yDirectionPrimary" value="ON"/><observable name="zDirectionPrimary" value="ON"/><observable name="totalEdep" value="ON"/></addProcess>

<TRestProcessRunner name="TemplateEventProcess" verboseLevel="info">
<parameter name="eventsToProcess" value="0"/>
<parameter name="threadNumber" value="1"/>
<addProcess type="TRestGeant4ToDetectorHitsProcess" name="G4ToHits" value="ON"/>

<parameter name="inputAnalysisStorage" value="on"/>
<parameter name="inputEventStorage" value="off"/>
<parameter name="outputEventStorage" value="on"/>
<addProcess type="TRestDetectorElectronDiffusionProcess" name="eDiff" value="ON"><parameter name="attachment" value="0"/><parameter name="Wvalue" value="" units="eV"/><parameter name="maxHits" value="2000"/></addProcess>

// observable = all will add all NON `custom` observables
<addProcess type="TRestGeant4AnalysisProcess" name="g4Ana" value="ON">
<observable name="thetaPrimary" value="ON" />
<observable name="phiPrimary" value="ON" />
<observable name="xOriginPrimary" value="ON" />
<observable name="yOriginPrimary" value="ON" />
<observable name="zOriginPrimary" value="ON" />
<observable name="xDirectionPrimary" value="ON" />
<observable name="yDirectionPrimary" value="ON" />
<observable name="zDirectionPrimary" value="ON" />
<observable name="totalEdep" value="ON" />
</addProcess>

<addProcess type="TRestGeant4ToDetectorHitsProcess" name="G4ToHits" value="ON" />

<addProcess type="TRestDetectorElectronDiffusionProcess" name="eDiff" value="ON" >
<parameter name="attachment" value="0" />
<parameter name="Wvalue" value="" units="eV" />
<parameter name="maxHits" value="2000" />
</addProcess>

<addProcess type="TRestDetectorHitsSmearingProcess" name="smear" title="Smearing template">
<parameter name="energyReference" value="6keV" />
<parameter name="resolutionReference" value="13" />
</addProcess>
<addProcess type="TRestDetectorHitsSmearingProcess" name="smear" title="Smearing template"><parameter name="energyReference" value="6keV"/><parameter name="resolutionReference" value="13"/></addProcess>

<addProcess type="TRestDetectorFiducializationProcess" name="fidutialization" title="Readout fiducialization"/>

<addProcess type="TRestDetectorHitsAnalysisProcess" name="hitsAnaDiff" title="A hits analysis process">
<observable name="energy" value="ON" />
<observable name="xMean" value="ON" />
<observable name="yMean" value="ON" />
<observable name="zMean" value="ON" />
</addProcess>
<addProcess type="TRestDetectorHitsAnalysisProcess" name="hitsAnaDiff" title="A hits analysis process"><observable name="energy" value="ON"/><observable name="xMean" value="ON"/><observable name="yMean" value="ON"/><observable name="zMean" value="ON"/></addProcess>

<addProcess type="TRestDetectorHitsToSignalProcess" name="hitsToSignal" title="A hits to signal template" value="${HIT_PROCESSING}" >
<parameter name="driftVelocity" value="" />
</addProcess>
<addProcess type="TRestDetectorHitsToSignalProcess" name="hitsToSignal" title="A hits to signal template" value="${HIT_PROCESSING}"><parameter name="driftVelocity" value=""/></addProcess>

<addProcess type="TRestDetectorSignalToRawSignalProcess" name="signalToRaw" title="Physical signal to raw signal" value="${RAW_PROCESSING}">
<parameter name="Npoints" value="512" />
<parameter name="triggerMode" value="firstDeposit" />
<parameter name="triggerDelay" value="120" />
<parameter name="gain" value="10" />
</addProcess>
<addProcess type="TRestDetectorSignalToRawSignalProcess" name="signalToRaw" title="Physical signal to raw signal" value="${RAW_PROCESSING}"><parameter name="Npoints" value="512"/><parameter name="triggerMode" value="firstDeposit"/><parameter name="triggerDelay" value="120"/><parameter name="gain" value="10"/></addProcess>

<addProcess type="TRestRawSignalShapingProcess" name="shaping" title="Signal shaping" value="${SHAPING}">
<parameter name="shapingType" value="shaperSin" />
<parameter name="shapingTime" value="10" />
<parameter name="gain" value="1" />
</addProcess>
<addProcess type="TRestRawSignalShapingProcess" name="shaping" title="Signal shaping" value="${SHAPING}"><parameter name="shapingType" value="shaperSin"/><parameter name="shapingTime" value="10"/><parameter name="gain" value="1"/></addProcess>

<addProcess type="TRestRawSignalAddNoiseProcess" name="noise" title="Signal noise" value="${RAW_PROCESSING}">
<parameter name="noiseLevel" value="2" />
</addProcess>
<addProcess type="TRestRawSignalAddNoiseProcess" name="noise" title="Signal noise" value="${RAW_PROCESSING}"><parameter name="noiseLevel" value="2"/></addProcess>

<addProcess type="TRestRawSignalAnalysisProcess" name="rawAna" title="Signal noise" value="${RAW_PROCESSING}" observable="all">
</addProcess>

<addProcess type="TRestRawToDetectorSignalProcess" name="zS" value="${RAW_PROCESSING}"
triggerStarts="0us"
gain="1"
threshold="0.01"
zeroSuppression="true"
baseLineRange="(5,55)"
integralRange="(10,500)"
pointThreshold="2"
nPointsOverThreshold="5"
signalThreshold="3" />
<addProcess type="TRestRawToDetectorSignalProcess" name="zS" value="${RAW_PROCESSING}" triggerStarts="0us" gain="1" threshold="0.01" zeroSuppression="true" baseLineRange="(5,55)" integralRange="(10,500)" pointThreshold="2" nPointsOverThreshold="5" signalThreshold="3"/>

<!-- Requires a bit of debugging
<addProcess type="TRestDetectorSignalChannelActivityProcess" name="chActivity" value="${RAW_PROCESSING}" verboseLevel="info" observable="all" >
Expand All @@ -119,29 +57,14 @@
</addProcess>
-->

<addProcess type="TRestDetectorSignalToHitsProcess" name="signalToHits" value="${HIT_PROCESSING}"
observable="all" method="all" />
<addProcess type="TRestDetectorSignalToHitsProcess" name="signalToHits" value="${HIT_PROCESSING}" observable="all" method="all"/>

<addProcess type="TRestDetectorHitsToTrackFastProcess" name="hitsToTrackFast" title="" value="OFF">
<parameter name="netOrigin" value="(-100,-100,-100)" units="mm" />
<parameter name="netSize" value="200" units="mm" />
<parameter name="cellResolution" value="2" units="mm" />
</addProcess>
<addProcess type="TRestDetectorHitsToTrackFastProcess" name="hitsToTrackFast" title="" value="OFF"><parameter name="netOrigin" value="(-100,-100,-100)" units="mm"/><parameter name="netSize" value="200" units="mm"/><parameter name="cellResolution" value="2" units="mm"/></addProcess>

<addProcess type="TRestDetectorHitsToTrackProcess" name="hitsToTrack" title="" value="${TRACK_PROCESSING}">
<parameter name="clusterDistance" value="1" units="cm" />
</addProcess>
<addProcess type="TRestDetectorHitsToTrackProcess" name="hitsToTrack" title="" value="${TRACK_PROCESSING}"><parameter name="clusterDistance" value="1" units="cm"/></addProcess>

<addProcess type="TRestTrackReductionProcess" name="reduction" title="" value="${TRACK_PROCESSING}">
<parameter name="startingDistance" value="0.15mm" />
<parameter name="minimumDistance" value="0.5mm" />
<parameter name="distanceStepFactor" value="1.15" />
<parameter name="maxNodes" value="3" />
</addProcess>
<addProcess type="TRestTrackReductionProcess" name="reduction" title="" value="${TRACK_PROCESSING}"><parameter name="startingDistance" value="0.15mm"/><parameter name="minimumDistance" value="0.5mm"/><parameter name="distanceStepFactor" value="1.15"/><parameter name="maxNodes" value="3"/></addProcess>

</TRestProcessRunner>

<addTask type="processEvents" value="ON"/>

</TRestManager>

56 changes: 9 additions & 47 deletions examples/01.alphaTrack/readout/microbulkModule.rml
Original file line number Diff line number Diff line change
@@ -1,61 +1,23 @@
<readoutModule name="module" size="((nChannels+1)*pitch-1*pitch/2,(nChannels+1)*pitch-pitch/2-pitch/4)" tolerance="1.e-3" pixelTolerance="1.e-3" >
<?xml version="1.0"?>
<readoutModule name="module" size="((nChannels+1)*pitch-1*pitch/2,(nChannels+1)*pitch-pitch/2-pitch/4)" tolerance="1.e-3" pixelTolerance="1.e-3">

// Y-strips
<for variable="nCh" from="1" to="nChannels-2" step="1" >
<readoutChannel id="${nCh}" >
<for variable="nPix" from="0" to="nChannels-1" step="1" >
<addPixel id="${nPix}" origin="((1+${nCh})*pitch,pitch/4+${nPix}*pitch)" size="(pixelSize,pixelSize)" rotation="45" />
</for>
<addPixel id="nChannels" origin="((1+${nCh})*pitch-pitch/2,pitch/4+(nChannels-1)*pitch+pitch/2)" size="(pitch,pitch/2)" rotation="0" />
</readoutChannel>
</for>
<for variable="nCh" from="1" to="nChannels-2" step="1"><readoutChannel id="${nCh}"><for variable="nPix" from="0" to="nChannels-1" step="1"><addPixel id="${nPix}" origin="((1+${nCh})*pitch,pitch/4+${nPix}*pitch)" size="(pixelSize,pixelSize)" rotation="45"/></for><addPixel id="nChannels" origin="((1+${nCh})*pitch-pitch/2,pitch/4+(nChannels-1)*pitch+pitch/2)" size="(pitch,pitch/2)" rotation="0"/></readoutChannel></for>

//First strip is special (upper left corner)
<readoutChannel id="0">
<for variable="nPix" from="0" to="nChannels-1" step="1" >
<addPixel id="${nPix}" origin="((1)*pitch,pitch/4+${nPix}*pitch)" size="(pixelSize,pixelSize)" rotation="45" />
</for>
<addPixel id="nChannels" origin="((1)*pitch-pitch/2,pitch/4+(nChannels-1)*pitch+pitch/2)" size="(pitch,pitch/2)" rotation="0" />
<addPixel id="nChannels+1" origin="(pitch/2,pitch/4+(nChannels-1)*pitch+pitch)" size="(pitch/2,pitch/2)" rotation="180" triangle="true"/>
</readoutChannel>
<readoutChannel id="0"><for variable="nPix" from="0" to="nChannels-1" step="1"><addPixel id="${nPix}" origin="((1)*pitch,pitch/4+${nPix}*pitch)" size="(pixelSize,pixelSize)" rotation="45"/></for><addPixel id="nChannels" origin="((1)*pitch-pitch/2,pitch/4+(nChannels-1)*pitch+pitch/2)" size="(pitch,pitch/2)" rotation="0"/><addPixel id="nChannels+1" origin="(pitch/2,pitch/4+(nChannels-1)*pitch+pitch)" size="(pitch/2,pitch/2)" rotation="180" triangle="true"/></readoutChannel>

// Last strip is special
<readoutChannel id="nChannels-1" >
<for variable="nPix" from="0" to="nChannels-1" step="1" >
<addPixel id="${nPix}" origin="(nChannels*pitch,pitch/4+${nPix}*pitch)" size="(pixelSize,pixelSize)" rotation="45" />
<addPixel id="nChannels+${nPix}" origin="(nChannels*pitch,pitch/4+${nPix}*pitch)" size="(pitch/2,pitch)" rotation="0" />
</for>
<addPixel id="2*nChannels" origin="(nChannels*pitch-pitch/2,pitch/4+(nChannels-1)*pitch+pitch/2)" size="(pitch,pitch/2)" rotation="0" />
</readoutChannel>
<readoutChannel id="nChannels-1"><for variable="nPix" from="0" to="nChannels-1" step="1"><addPixel id="${nPix}" origin="(nChannels*pitch,pitch/4+${nPix}*pitch)" size="(pixelSize,pixelSize)" rotation="45"/><addPixel id="nChannels+${nPix}" origin="(nChannels*pitch,pitch/4+${nPix}*pitch)" size="(pitch/2,pitch)" rotation="0"/></for><addPixel id="2*nChannels" origin="(nChannels*pitch-pitch/2,pitch/4+(nChannels-1)*pitch+pitch/2)" size="(pitch,pitch/2)" rotation="0"/></readoutChannel>

// X-strips

// First strip is special
<readoutChannel id="nChannels" >
<addPixel id="0" origin="(0,0)" size="(pitch/2,3*pitch/4)" rotation="0" />
<for variable="nPix" from="0" to="nChannels-1" step="1" >
<addPixel id="${nPix}+1" origin="((0.5+${nPix})*pitch,pitch-pitch/4)" size="(pixelSize,pixelSize)" rotation="-135" triangle="true"/>
</for>
<addPixel id="nChannels+1" origin="(0,0)" size="(nChannels*pitch+pitch/2,pitch/4)" rotation="0" />
</readoutChannel>

<for variable="nCh" from="1" to="nChannels-2" step="1" >
<readoutChannel id="nChannels+${nCh}" >
<addPixel id="0" origin="(0,${nCh}*pitch-pitch/4)" size="(pitch/2,pitch)" rotation="0" />
<for variable="nPix" from="0" to="nChannels-1" step="1" >
<addPixel id="${nPix}+1" origin="((0.5+${nPix})*pitch,${nCh}*pitch-pitch/4)" size="(pixelSize,pixelSize)" rotation="45" />
</for>
</readoutChannel>
</for>
<readoutChannel id="nChannels"><addPixel id="0" origin="(0,0)" size="(pitch/2,3*pitch/4)" rotation="0"/><for variable="nPix" from="0" to="nChannels-1" step="1"><addPixel id="${nPix}+1" origin="((0.5+${nPix})*pitch,pitch-pitch/4)" size="(pixelSize,pixelSize)" rotation="-135" triangle="true"/></for><addPixel id="nChannels+1" origin="(0,0)" size="(nChannels*pitch+pitch/2,pitch/4)" rotation="0"/></readoutChannel>

<for variable="nCh" from="1" to="nChannels-2" step="1"><readoutChannel id="nChannels+${nCh}"><addPixel id="0" origin="(0,${nCh}*pitch-pitch/4)" size="(pitch/2,pitch)" rotation="0"/><for variable="nPix" from="0" to="nChannels-1" step="1"><addPixel id="${nPix}+1" origin="((0.5+${nPix})*pitch,${nCh}*pitch-pitch/4)" size="(pixelSize,pixelSize)" rotation="45"/></for></readoutChannel></for>

//Last strip is special (upper left corner)
<readoutChannel id="nChannels+nChannels-1" >
<addPixel id="0" origin="(0,pitch/4+(nChannels-1)*pitch+pitch/2)" size="(pitch/2,pitch/2)" rotation="0" triangle="true"/>
<addPixel id="1" origin="(0,(nChannels-1)*pitch-pitch/4)" size="(pitch/2,pitch)" rotation="0" />
<for variable="nPix" from="0" to="nChannels-1" step="1" >
<addPixel id="${nPix}+2" origin="((0.5+${nPix})*pitch,(nChannels-1)*pitch-pitch/4)" size="(pixelSize,pixelSize)" rotation="45" />
</for>
</readoutChannel>
<readoutChannel id="nChannels+nChannels-1"><addPixel id="0" origin="(0,pitch/4+(nChannels-1)*pitch+pitch/2)" size="(pitch/2,pitch/2)" rotation="0" triangle="true"/><addPixel id="1" origin="(0,(nChannels-1)*pitch-pitch/4)" size="(pitch/2,pitch)" rotation="0"/><for variable="nPix" from="0" to="nChannels-1" step="1"><addPixel id="${nPix}+2" origin="((0.5+${nPix})*pitch,(nChannels-1)*pitch-pitch/4)" size="(pixelSize,pixelSize)" rotation="45"/></for></readoutChannel>

</readoutModule>

Loading