Belle II Software  release-08-01-10
SVDROIGeometry.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 
9 
10 #include <tracking/svdROIFinder/SVDROIGeometry.h>
11 #include <framework/logging/Logger.h>
12 #include <vxd/geometry/GeoCache.h>
13 #include <vxd/geometry/SensorInfoBase.h>
14 
15 #include <set>
16 
17 using namespace Belle2;
18 
19 
21 {
22 
23 }
24 
26 {
27 
28 }
29 
30 void
32  double tolerancePhi)
33 {
34 
36 
37  std::set<Belle2::VxdID> svdLayers = geoCache.getLayers(VXD::SensorInfoBase::SVD);
38  std::set<Belle2::VxdID>::iterator itSvdLayers = svdLayers.begin();
39 
40  // while (itSvdLayers != svdLayers.end()) {
41  //in DESY TB the EUDET telescope planes have been associated to SVD layer 7, we do not want ROIs there, therefore:
42  while ((itSvdLayers != svdLayers.end()) && (itSvdLayers->getLayerNumber() != 7)) {
43 
44  std::set<Belle2::VxdID> svdLadders = geoCache.getLadders(*itSvdLayers);
45  std::set<Belle2::VxdID>::iterator itSvdLadders = svdLadders.begin();
46 
47  while (itSvdLadders != svdLadders.end()) {
48 
49  std::set<Belle2::VxdID> svdSensors = geoCache.getSensors(*itSvdLadders);
50  std::set<Belle2::VxdID>::iterator itSvdSensors = svdSensors.begin();
51 
52  while (itSvdSensors != svdSensors.end()) {
53  B2DEBUG(20, " svd sensor info " << *itSvdSensors);
54 
55  ROIDetPlane plane(*itSvdSensors, toleranceZ, tolerancePhi);
56  genfit::SharedPlanePtr sharedPlane(new ROIDetPlane(plane));
57  plane.setSharedPlanePtr(sharedPlane);
58 
59  m_planeList.push_back(plane);
60 
61  ++itSvdSensors;
62  }
63  ++itSvdLadders;
64  }
65  ++itSvdLayers;
66  }
67 
68  B2DEBUG(20, "just filled the plane list with " << m_planeList.size() << "planes");
69 };
70 
71 
72 void
73 SVDROIGeometry::appendSelectedPlanes(std::list<ROIDetPlane>* selectedPlanes, ROOT::Math::XYZVector recoTrackPosition, int layer)
74 {
75 
76 
77  std::list<ROIDetPlane>::iterator itPlanes = m_planeList.begin();
78 
79  B2DEBUG(20, " ..-append Planes, checking " << m_planeList.size() << " planes");
80 
81  while (itPlanes != m_planeList.end()) {
82 
83  if (itPlanes->isSensorInRange(recoTrackPosition, layer))
84  selectedPlanes->push_back(*itPlanes);
85 
86  ++itPlanes;
87 
88  }
89 
90  B2DEBUG(20, " ..--list of sensor IDs of the selected planes for this track:");
91  itPlanes = selectedPlanes->begin();
92  while (itPlanes != selectedPlanes->end()) {
93  B2DEBUG(20, " " << (itPlanes->getVxdID()));
94  ++itPlanes;
95  }
96 
97 }
98 
ROIDetPlane describes the plane containing a sensor.
Definition: ROIDetPlane.h:26
void appendSelectedPlanes(std::list< ROIDetPlane > *selectedPlanes, ROOT::Math::XYZVector recoTrackPosition, int layer)
appends the interesting planes
SVDROIGeometry()
Constructor.
void fillPlaneList(double toleranceZ, double tolerancePhi)
fill the list of planes
~SVDROIGeometry()
Destructor.
std::list< ROIDetPlane > m_planeList
list of planes
Class to faciliate easy access to sensor information of the VXD like coordinate transformations or pi...
Definition: GeoCache.h:39
static GeoCache & getInstance()
Return a reference to the singleton instance.
Definition: GeoCache.cc:214
Abstract base class for different kinds of events.
std::shared_ptr< genfit::DetPlane > SharedPlanePtr
Shared Pointer to a DetPlane.