Belle II Software development
read_svd_online_map.cc
1/**************************************************************************
2 * basf2 (Belle II Analysis Software Framework) *
3 * Author: The Belle II Collaboration *
4 * *
5 * See git log for contributors and copyright holders. *
6 * This file is licensed under LGPL-3.0, see LICENSE.md. *
7 **************************************************************************/
8#include <stdio.h>
9#include <svd/online/SVDOnlineToOfflineMap.h>
10#include <svd/dataobjects/SVDShaperDigit.h>
11#include <vxd/dataobjects/VxdID.h>
12
13int
14main(int argc, char** argv)
15{
16 if (argc != 2) {
17 printf("Hello! Hello!\n");
18 printf("Usage: %s filename.xml\n read filename.xml\n", argv[0]);
19 return 0;
20 }
21
23 short sample[6] = {0, 0, 0, 10000, 0, 0};
24 Belle2::SVDShaperDigit* digit = test.NewShaperDigit(129, 6, 119, sample, 100);
25 printf("Layer/Ladder/Sensor: %i/%i/%i ",
26 digit->getSensorID().getLayerNumber(),
28 digit->getSensorID().getSensorNumber());
29 printf("%s", digit->isUStrip() ? "u" : "v");
30 printf("-strip: %i ", digit->getCellID());
31 printf("MaxCharge: %f ", double(digit->getMaxADCCounts()));
32 //printf("Time: %i ", digit->getIndex());
33 printf("\n");
34
35 printf("Find (layer, ladder, sensor, side, strip) for (FADC, APV, channel)\n");
36 auto info = test.getSensorInfo(129, 6);
37 short strip = test.getStripNumber(119, info);
38 printf("Layer/Ladder/Sensor: %i/%i/%i ",
39 info.m_sensorID.getLayerNumber(),
40 info.m_sensorID.getLadderNumber(),
41 info.m_sensorID.getSensorNumber()
42 );
43 printf("%s", info.m_uSide ? "u" : "v");
44 printf("-strip: %i ", strip);
45 printf("\n");
46
47}
This class implements the methods to map raw SVD hits to basf2 SVD hits.
The SVD ShaperDigit class.
VxdID getSensorID() const
Get the sensor ID.
short int getCellID() const
Get strip ID.
bool isUStrip() const
Get strip direction.
int getMaxADCCounts() const
Get the ADC counts corresponding to the higher sample amplitude.
baseType getSensorNumber() const
Get the sensor id.
Definition: VxdID.h:100
baseType getLadderNumber() const
Get the ladder id.
Definition: VxdID.h:98
baseType getLayerNumber() const
Get the layer id.
Definition: VxdID.h:96