20.1. SVD Reconstruction

The SVD reconstruction starts with SVDShaperDigits and SVDEventInfo, SVDClusters are created on both sides of the sensors and then combined into SVDSpacePoints.

Several algorithms are available for cluster charge, time and position reconstruction, and they are specified as parameters of the SVDClusterizer module (chargeAlgorithm{3/6}Samples, timeAlgorithm{3/6}Samples, positionAlgorithm{3/6}Samples).

Use the following python function if you want to add the SVD reconstruction to your steering file:

svd.__init__.add_svd_reconstruction(path, isROIsimulation=False, createRecoDigits=False, applyMasking=False)[source]

Adds the SVD reconstruction to the path.

Reconstruction starts with SVDShaperDigits and SVDEventInfo and provides SVDClusters and SVDSpacePoints.

Parameters
  • path – add the modules to this basf2 path.

  • isROIsimulation – SVD reconstruction can be run during simulation in order to simulate the PXD Data Reduction with ROI finding.

  • createRecoDigits – if True, SVDRecoDigits are created.

  • applyMasking – if True, hot strips found in SVDHotStripsCalibration are masked.

20.1.1. Clustering

The first step of reconstruction after unpacking (or simulation) is the clustering, i.e. grouping adjacent strips into RawCluster. All acquired strips are good for clustering since the minimum value of SNR corresponds to the online zero-suppression cut: SNR > 3. A RawCluster is promoted to SVDCluster if there is at least one strip in the cluster with SNR > 5. The parameters for clustering are stored in the SVDClustering DBObject.

20.1.2. Cluster Charge Reconstruction

The cluster charge is a measurement of the charge released in the sensor by the charged particle, and collected on one side of the sensor.

The default algorithm used to compute cluster charge is the MaxSample: the highest strip sample for each strip in the cluster represents the strip charge (in ADC). This value is converted in \(e^{-}\) using the SVDPulseShapeCalibrations DBObject. The cluster charge is computed as the sum of the strips charges in \(e^{-}\).

We have two alternative algorithms to compute the cluster charge that can be selected by setting the SVDClusterizer parameter chargeAlgorithm{3/6}Samples:

  1. SumSamples: the strip charge is evaluated as the sum of the 6 samples in ADC, converted in \(e^{-}\) with the help of the SVDPulseShapeCalibrations DBObject and then the cluster charge is the computed as the sum of the strip charges.

  2. ELS3: first, all strips in the cluster are summed sample by sample. Then, the 3 best consecutive summed-samples are found with the MaxSum algorithm and the maximum \(A\) of the theoretical CR-RC waveform (with \(\tau = 55\ \rm ns\)):

    \[a(t) = A \frac{t-t_{\rm raw}}{\tau}\exp{\left(1 - \frac{t-t_{\rm raw}}{\tau}\right)}\]

    is computed with a simple system of equations:

    \[A = \frac{(e_{\tau}^{-1} - e_{\tau}^{3}) a_{1} + (2+e_{\tau}^{2})a_{2} - (1+2e_{\tau}^{2})a_{0}}{\Delta t/\tau \exp{(1+t_{\rm raw}/\tau)}(1+4e_{\tau}^{2}+e_{\tau}^{4})}\]

    where \(e_{\tau} = e^{- \frac{\Delta t}{\tau}}\), \(\Delta t \simeq 31.44\) ns is the sampling period of the APV readout chip, \(t_{\rm raw}\) is the raw ELS3 time, and \(a_{j}\) is the amplitude of j-th summed-sample.

    Finally the charge is converted in \(e^{-}\) with the the SVDPulseShapeCalibrations DBObject.

See also

All three algorithms are implemented in the svd/reconstruction/SVDClusterCharge class.

The MaxSum Algorithm:

  1. find the two consecutive samples for which \((a_{i} + a_{i+1})\) represents the maximum, where \(a_{j}\) is the amplitude of j-th sample.

  2. the three chosen samples are: \(a_{i-1}, a_{i}, a_{i+1}\), with \(i-1 = FF\), the FirstFrame.

  3. in case in which \(i = 0\), the three chosen samples are \(a_0 , a_1 , a_2\) with \(FF=0\).

20.1.3. Cluster Time Reconstruction

The cluster time is a measurement of the time of the hit (with respect to the trigger signal).

The default algorithm used to compute cluster time is the CoG3: first, all strips in the cluster are summed sample by sample, and the 3 best consecutive summed-samples are determined using the MaxSum algorithm. Then, the raw cluster time is the average of the 3 best summed-samples time with the sample charge:

\[t_{\rm cluster}^{\rm raw} = \Delta t \cdot \frac{\sum_{i=0}^{i<3}i\ a_i}{\sum_{i=0}^{i<3} a_i}.\]

where the \(\Delta t \simeq 31.44\) ns is the sampling period of the APV readout chip and \(a_{j}\) is the amplitude of j-th summed-sample.

The raw time is finally calibrated with a third order polynomial stored in the SVDCoG3SampleTimeCalibration DBObject, see Hit Time Calibration for more details on the calibration.

We have two alternative algorithms to compute the cluster time that can be selected by setting the SVDClusterizer parameter timeAlgorithm{3/6}Samples.

  1. CoG6: the cluster time is the average of the strips time weighted with the strip charge. The raw strip time is computed as the average of the sample time weighted with the sample amplitude:

    \[t_{\rm strip}^{\rm raw} = \Delta t \cdot \frac{\sum_{i=0}^{i<6}i\ a_i}{\sum_{i=0}^{i<6} a_i}.\]

    where the \(\Delta t \simeq 31.44\) ns is the sampling period of the APV readout chip and \(a_{j}\) is the amplitude of j-th sample. The raw strip time is calibrated with a third order polynomial stored in the SVDCoGTimeCalibration DBObject.

  2. ELS3: as for CoG3, all strips in the cluster are summed sample by sample and the MaxSum algorithm is applied, and then the raw cluster time is computed with a simple system of equations as \(t_{\rm raw}\) of the theoretical CR-RC waveform:

    \[t_{\rm cluster}^{\rm raw} = - \Delta t \cdot \frac{2e_{\tau}^{4} + w e_{\tau}^{2}}{1 - e_{\tau}^{4}-w(2+e_{\tau}^{2})}\]

    where \(e_{\tau} = e^{- \frac{\Delta t}{\tau}}\), \(\Delta t \simeq 31.44\) ns is the sampling period of the APV readout chip, \(w = \frac{a_{0}-2 e_{\tau}^{-2} a_{2}}{2a_{0} + e_{\tau}^{-1} a_{1}}\) and \(a_{j}\) is the amplitude of j-th summed-sample.

    The raw time is finally calibrated with a third order polynomial stored in the SVDELS3SampleTimeCalibration DBObject.

See also

All three algorithms are implemented in the svd/reconstruction/SVDClusterTime class.

Note

The hit time expressed in the trigger reference \(t_{\rm hit}\) is:

\[t_{\rm hit} = f(t_{\rm raw}) + r_{\rm shift} + \frac{\Delta t}{4} \cdot (3 - TB + 4\ FF)\]

where \(f(t_{\rm raw})\) is the calibrated time, \(r_{\rm shift}\) is the relative shift among 3-sample and 6-sample event (= 0 in 6-sample events), \(\Delta t \simeq 31.44\) ns is the sampling period of the APV readout chip, \(TB\) is the TriggerBin and \(FF\) is the FirstFrame.

20.1.4. Cluster Position Reconstruction

The algorithm to determine the cluster position depends on the cluster size, i.e. the number of strips forming the cluster.

For one-strip clusters the position is the position of the strip, i.e. the position of the center of the readout implant.

For more-than-one strip clusters we have two algorithms:

  1. center-of-gravity CoG, the cluster position is computed averaging the strip position weighted with the strip charge:

\[x_{\rm cluster} = \frac{\sum_{\rm strips} x_i S_i}{\sum_{\rm strips} S_i}.\]

where \(x_i\) is the strip position and \(S_i\) is the strip charge.

  1. analog-head-tail AHT:

\[x_{\rm cluster} = \frac{1}{2} \left[x_{\rm head} + x_{\rm tail} + p \frac{S_{\rm head} - S_{\rm tail}}{S_{\rm center}} \right].\]

where \(p\) is the readout pitch, \(x_{\rm head/tail}\) (\(S_{\rm head/tail}\)) are the position (charge) of the two strips at the edge of the cluster and \(S_{\rm center}\) is the average strip charge after removing the strips at the edge, \(S_{\rm center} = \frac{S_{\rm tot} - S_{\rm head} - S_{\rm tail}}{\rm size - 2}\) with \(S_{\rm tot}\) is the total cluster charge.

The available algorithms to determine the strip charge for the position computation are the same available for clusters, strips are considered as one-strip clusters. To choose the strip charge reconstruction algorithm for cluster position computation use the SVDClusterizer parameter stripChargeAlgorithm{3/6}Samples. The default algorithm is the MaxSample.

In the current default reconstruction the CoG is used for cluster size > 1 (AHT is not used). Indeed, the SVDClusterizer supports the following position reconstruction algorithms (that can be passed as string, see the SVDClusterizer parameter positionAlgorithm{3/6}Samples parameter)

  1. CoGOnly (current default): the CoG is used for all cluster sizes \(\ge2\) (AHT is not used), error scale factors (= 1 for data and MC) are stored in SVDCoGOnlyErrorScaleFactors.

  2. OldDefault: CoG for cluster size = 2 and AHT for cluster sizes > 2 (error scale factors stored in SVDOldDefaultErrorScaleFactors

Note

For CoGOnly, position errors are stored SVDCoGOnlyPositionError.

See also

All algorithms are implemented in the svd/reconstruction/SVDClusterPosition class.

20.1.5. Creation of Clusters in disabled-APV regions

In case one or more APV readout chips are disabled during data taking, a fake cluster is created in the middle of the region in order not to loose the information of the hit on the other side of the sensor. For more details see SVDMissingAPVsClusterCreator.

20.1.6. SpacePoint Creation

All clusters on one side of each sensor are combined with all clusters on the other side. Certain combinations of clusters can be excluded based on the hit time, the two available cuts are:

  1. exclude SpacePoints in which at least one cluster has hit time below a certain threshold:

    \[t_{u/v} > t_{\rm min}\]
  2. exclude SpacePoints in which at least one cluster has hit time far in time w.r.t. trigger (t=0) above a certain threshold:

    \[|t_{u/v}| < t_{\rm max}\]
  3. exclude SpacePoints in which the time difference of the two clusters exceeds a certain threshold:

    \[|t_u - t_v| < \Delta t_{\rm max}\]

The choice of the cut and of the threshold is stored in the SVDHitTimeSelection.

SpacePoints are not created if they exceed a certain threshold defined in the numMaxSpacePoints parameter of the SVDSpacePointCreator

20.1.7. Strip Reconstruction (Optional)

The SVDRecoDigitCreator reconstructs raw strips, creating one SVDRecoDigit for each SVDShaperDigit.

Strip reconstruction is not called in the default SVD reconstruction. It is anyway necessary for DQM or other performance studies. Use the following python function if you want to add the SVD strip reconstruction to your steering file:

svd.__init__.add_svd_create_recodigits(path, recocreatorName='SVDRecoDigitCreator', shaperDigitsName='')[source]

Adds the strip reconstruction to the path.

Produce SVDRecoDigits from SVDShaperDigits.

Parameters
  • path – add the modules to this basf2 path.

  • recocreatorName – name of the module.

  • shaperDigitsName – name of the SVDShaperDigits StoreArray.

The charge and time algorithm available for clusters are also available for strips (considered as one-strip clusters). To choose the algorithm use the SVDRecoDigitCreator parameter chargeAlgorithm{3/6}Samples, timeAlgorithm{3/6}Samples.

20.1.8. Reconstruction Modules

This is a list of the svd modules used for reconstruction.

SVDClusterizer

This module produces SVDClusters from SVDShaperDigits, providing 1-D hit position, charge and time on SVD sensors.

Package

svd

Library

libsvdReconstruction.so

Parameters
  • AdjacentSN (float, default=3.0)

    minimum SNR for strips to be considered for clustering. Overwritten by the dbobject, unless you set useDB = False.

  • ClusterSN (float, default=0.0)

    minimum value of the SNR of the cluster. Overwritten by the dbobject, unless you set useDB = False.

  • Clusters (str, default=’’)

    SVDCluster collection name.

  • MCParticles (str, default=’’)

    MCParticles collection name.

  • SVDTrueHits (str, default=’’)

    TrueHit collection name.

  • SeedSN (float, default=5.0)

    minimum SNR for strips to be considered as cluster seed. Overwritten by the dbobject, unless you set useDB = False.

  • ShaperDigits (str, default=’’)

    SVDShaperDigits collection name.

  • chargeAlgorithm3Samples (str, default=’not set’)

    cluster-charge reconstruction algorithm for 3-sample DAQ mode: MaxSample (default), SumSamples, ELS3 = 3-sample ELS. Overwritten by the dbobject, unless you set useDB = False.

  • chargeAlgorithm6Samples (str, default=’not set’)

    cluster-charge reconstruction algorithm for 6-sample DAQ mode: MaxSample (default), SumSamples, ELS3 = 3-sample ELS. Overwritten by the dbobject, unless you set useDB = False.

  • positionAlgorithm3Samples (str, default=’not set’)

    cluster-position reconstruction algorithm for 3-sample DAQ mode: old (default), CoGOnly. Overwritten by the dbobject, unless you set useDB = False.

  • positionAlgorithm6Samples (str, default=’not set’)

    cluster-position reconstruction algorithm for 6-sample DAQ mode: old (default), CoGOnly. Overwritten by the dbobject, unless you set useDB = False.

  • returnClusterRawTime (bool, default=False)

    if True, returns the raw cluster time (to be used for time calibration).

  • stripChargeAlgorithm3Samples (str, default=’not set’)

    strip-charge reconstruction algorithm used for cluster position reconstruction for the 3-sample DAQ mode: dontdo = not done, MaxSample, SumSamples, ELS3 = 3-sample ELS. Overwritten by the dbobject, unless you set useDB = False.

  • stripChargeAlgorithm6Samples (str, default=’not set’)

    strip-charge reconstruction algorithm used for cluster position reconstruction for the 6-sample DAQ mode: dontdo = not done, MaxSample, SumSamples, ELS3 = 3-sample ELS. Overwritten by the dbobject, unless you set useDB = False.

  • stripTimeAlgorithm3Samples (str, default=’not set’)

    strip-time reconstruction algorithm used for cluster position reconstruction for the 3-sample DAQ mode: dontdo = not done (default), CoG6 = 6-sample CoG, CoG3 = 3-sample CoG, ELS3 = 3-sample ELS. Overwritten by the dbobject, unless you set useDB = False.

  • stripTimeAlgorithm6Samples (str, default=’not set’)

    strip-time reconstruction algorithm used for cluster position reconstruction for the 6-sample DAQ mode: dontdo = not done (default), CoG6 = 6-sample CoG, CoG3 = 3-sample CoG, ELS3 = 3-sample ELS. Overwritten by the dbobject, unless you set useDB = False.

  • timeAlgorithm3Samples (str, default=’not set’)

    cluster-time reconstruction algorithm for the 3-sample DAQ mode: CoG6 = 6-sample CoG, CoG3 = 3-sample CoG (default), ELS3 = 3-sample ELS. Overwritten by the dbobject, unless you set useDB = False.

  • timeAlgorithm6Samples (str, default=’not set’)

    cluster-time reconstruction algorithm for the 6-sample DAQ mode: CoG6 = 6-sample CoG (default), CoG3 = 3-sample CoG, ELS3 = 3-sample ELS. Overwritten by the dbobject, unless you set useDB = False.

  • useDB (bool, default=True)

    if False, use clustering and reconstruction configuration module parameters

SVDMissingAPVsClusterCreator

This module produces clusters in the middle of a region read by a disabled APV. It can be run only after the SVDClusterizer because it does not register the SVDClusters StoreArray in the DataStore, but only add clusters.

Package

svd

Library

libsvdReconstruction.so

Parameters
  • Clusters (str, default=’’)

    SVDCluster collection name

  • SNR (float, default=15.0)

    fake-cluster SNR

  • charge (float, default=20000.0)

    fake-cluster charge (in e-)

  • firstFrame (int, default=0)

    first frame, needed to build the fake-cluster

  • nFakeClusters (int, default=4)

    number of fake clusters equally distributed in the dead area

  • seedCharge (float, default=10000.0)

    fake-cluster seed charge (in e-)

  • size (int, default=128)

    fake-cluster size

  • time (float, default=0.0)

    fake-cluster time

  • timeError (float, default=10.0)

    fake-cluster time error

SVDRecoDigitCreator

This module reconstructs SVDShaperDigit in SVDRecoDigit, i.e. calibrated strip with reconstructed charge and time.

Package

svd

Library

libsvdReconstruction.so

Parameters
  • Clusters (str, default=’’)

    SVDCluster collection name.

  • RecoDigits (str, default=’’)

    SVDRecoDigits collection name.

  • ShaperDigits (str, default=’’)

    SVDShaperDigits collection name.

  • chargeAlgorithm3Samples (str, default=’inRecoDBObject’)

    choose charge algorithm for 3-sample DAQ mode: MaxSample (default), SumSamples, ELS3 = 3-sample ELS

  • chargeAlgorithm6Samples (str, default=’inRecoDBObject’)

    choose charge algorithm for 6-sample DAQ mode: MaxSample (default), SumSamples, ELS3 = 3-sample ELS

  • timeAlgorithm3Samples (str, default=’inRecoDBObject’)

    strip-time reconstruction algorithm for the 3-sample DAQ mode: CoG6 = 6-sample CoG, CoG3 = 3-sample CoG (default), ELS3 = 3-sample ELS

  • timeAlgorithm6Samples (str, default=’inRecoDBObject’)

    strip-time reconstruction algorithm for the 6-sample DAQ mode: CoG6 = 6-sample CoG (default), CoG3 = 3-sample CoG, ELS3 = 3-sample ELS

  • useDB (bool, default=True)

    if false use clustering and reconstruction configuration module parameters

SVDSpacePointCreator

Imports Clusters of the SVD detector and converts them to spacePoints.

Package

svd

Library

libsvdSpacePointCreator.so

Parameters
  • EventLevelTrackingInfoName (str, default=’’)

    EventLevelTrackingInfo collection name

  • MinClusterTime (float, default=-20.0)

    clusters with time below this value are not considered to make spacePoints.

  • NameOfInstance (str, default=’’)

    allows the user to set an identifier for this module. Usefull if one wants to use several instances of that module

  • OnlySingleClusterSpacePoints (bool, default=False)

    standard is false. If activated, the module will not try to find combinations of U and V clusters for the SVD any more

  • SVDClusters (str, default=’’)

    SVDCluster collection name

  • SpacePoints (str, default=’SVDSpacePoints’)

    SpacePoints collection name

  • inputPDF (str, default=’/data/svd/spacePointQICalibration.root’)

    Path containing pdf root file

  • numMaxSpacePoints (unsigned int, default=70000)

    Maximum number of SpacePoints allowed in an event, above this threshold no SpacePoint will be created

  • useLegacyNaming (bool, default=True)

    Use old PDF name convention?

  • useQualityEstimator (bool, default=False)

    Standard is true. If turned off spacepoints will not be assigned a quality in their pairing.

SVDUnpacker

Produce SVDShaperDigits from RawSVD. NOTE: only zero-suppressed mode is currently supported!

Package

svd

Library

libsvdUnpacker.so

Parameters
  • FADCTriggerNumberOffset (int, default=0)

    number to be added to the FADC trigger number to match the main trigger number

  • PrintRawData (bool, default=False)

    Printing Raw data words for debugging

  • SVDEventInfo (str, default=’’)

    Name of the SVDEventInfo object

  • UnpackerErrorRate (int, default=1000)

    Unpacker will print one error every UnpackerErrorRate

  • badMappingFatal (bool, default=False)

    Throw B2FATAL if there’s a wrong payload in the database

  • killDigitsFromUpsetAPVs (bool, default=False)

    Delete digits from upset APVs

  • rawSVDListName (str, default=’’)

    Name of the raw SVD List

  • shutUpFTBError (int, default=-1)

    if >0 is the number of reported FTB header ERRORs before quiet operations. If <0 full log produced.

  • silentlyAppend (bool, default=False)

    Append digits to a pre-existing non-empty storeArray

  • softwarePipelineAddressEmulation (bool, default=True)

    Estimate emulated pipeline address

  • svdDAQDiagnosticsListName (str, default=’’)

    Name of the DAQDiagnostics list

  • svdShaperDigitListName (str, default=’’)

    Name of the SVDShaperDigits list