 |
Belle II Software
release-05-01-25
|
12 #include <klm/eklm/modules/EKLMAlignmentAlongStrips/EKLMAlignmentAlongStripsCollectorModule.h>
15 #include <framework/gearbox/Unit.h>
16 #include <tracking/dataobjects/ExtHit.h>
30 m_TransformData(nullptr),
33 setDescription(
"Module for EKLM alignment along strip (data collection).");
53 t =
new TTree(
"calibration_data",
"");
55 registerObject<TTree>(
"calibration_data", t);
63 const HepGeom::Transform3D* tr;
66 std::multimap<int, ExtHit*> mapExtHit;
67 std::multimap<int, ExtHit*>::iterator it, it2, itLower, itUpper;
68 std::set<int> digitVolumes;
70 TTree* calibrationData = getObjectPtr<TTree>(
"calibration_data");
73 for (i = 0; i < n; i++) {
76 for (j = 0; j < n2; j++) {
77 if (extHits[j]->getDetectorID() != Const::EDetector::EKLM)
81 mapExtHit.insert(std::pair<int, ExtHit*>(extHits[j]->getCopyID(),
87 for (i = 0; i < n; i++) {
94 digitVolumes.insert(vol);
97 for (it = mapExtHit.begin(); it != mapExtHit.end();) {
101 }
while ((it != mapExtHit.end()) && (it->first == itLower->first));
103 if (digitVolumes.find(itLower->first) != digitVolumes.end())
106 for (it2 = itLower; it2 != itUpper; ++it2) {
107 extHit = it2->second;
112 hitGlobal.setX(hitPosition.X() /
Unit::mm * CLHEP::mm);
113 hitGlobal.setY(hitPosition.Y() /
Unit::mm * CLHEP::mm);
114 hitGlobal.setZ(hitPosition.Z() /
Unit::mm * CLHEP::mm);
122 hitLocal = (*tr) * hitGlobal;
130 calibrationData->Fill();
Calibration collector module base class.
size_t size() const
Get number of relations.
EKLM time calibration algorithm.
void setDescription(const std::string &description)
Sets the description of the module.
TVector3 getPosition() const
Get position of this extrapolation hit.
void stripNumberToElementNumbers(int stripGlobal, int *section, int *layer, int *sector, int *plane, int *strip) const
Get element numbers by strip global number.
~EKLMAlignmentAlongStripsCollectorModule()
Destructor.
struct EKLMAlignmentAlongStripsAlgorithm::Event * m_Event
Event.
#define REG_MODULE(moduleName)
Register the given module (without 'Module' suffix) with the framework.
@ c_ParallelProcessingCertified
This module can be run in parallel processing mode safely (All I/O must be done through the data stor...
void collect() override
This method is called for each event.
const EKLMElementNumbers * m_ElementNumbers
Element numbers.
int segmentGlobal
Segment global number.
EKLMAlignmentAlongStripsCollectorModule()
Constructor.
void setPropertyFlags(unsigned int propertyFlags)
Sets the flags for the module properties.
Store one Ext hit as a ROOT object.
Class for type safe access to objects that are referred to in relations.
Abstract base class for different kinds of events.
double getStripLength(int strip) const
Get strip length.
bool hitInEKLM(double z) const
Check if z coordinate may be in EKLM.
int section
Section number.
int segmentNumber(int section, int layer, int sector, int plane, int segment) const
Get segment number.
int stripNumber(int section, int layer, int sector, int plane, int strip) const
Get strip number.
void finish() override
This method is called at the end of the event processing.
StoreArray< KLMDigit > m_KLMDigits
EKLM digits.
float distSiPM
Distance from hit to the SiPM.
static constexpr int getNStripsSegment()
Get number of strips in a segment.
StoreArray< Track > m_Tracks
Tracks.
static const double mm
[millimeters]
Accessor to arrays stored in the data store.
const EKLM::GeometryData * m_GeoDat
Geometry data.
float distFarEnd
Distance from hit to the far end of the strip.
EKLM::TransformData * m_TransformData
Transformation data.
static const GeometryData & Instance(enum DataSource dataSource=c_Database, const GearDir *gearDir=nullptr)
Instantiation.
void prepare() override
Initializer.
int stripGlobal
Strip global number.