Belle II Software development
CDCRecoTrackFilterModule.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#include "cdc/modules/cdcRecoTrackFilter/CDCRecoTrackFilterModule.h"
10#include <tracking/dataobjects/RecoHitInformation.h>
11
12using namespace std;
13using namespace Belle2;
14using namespace CDC;
15
16REG_MODULE(CDCRecoTrackFilter);
17
19{
20 setPropertyFlags(c_ParallelProcessingCertified); // specify this flag if you need parallel processing
21 setDescription("use this module to exclude Layers in fitting, after TrackFinding");
22 addParam("RecoTracksColName", m_recoTrackArrayName, "Name of collection to hold Belle2::RecoTrack", std::string(""));
23 addParam("ExcludeSLayer", m_excludeSLayer, "Super layers (0-8) not used in the fitting", std::vector<unsigned short> {});
24 addParam("ExcludeICLayer", m_excludeICLayer, "layers (0-55) not used in the fitting", std::vector<unsigned short> {});
25}
26
28{
29}
30
32{
34}
35
37{
38}
39
41{
42 // Loop over Recotracks
43 int nTr = m_RecoTracks.getEntries();
44 for (int i = 0; i < nTr; ++i) {
45 const RecoTrack* track = m_RecoTracks[i];
46 for (const RecoHitInformation::UsedCDCHit* cdchit : track->getCDCHitList()) {
47 WireID wireid(cdchit->getID());
48 unsigned short slay = wireid.getISuperLayer();
49 unsigned short iclay = wireid.getICLayer();
50 for (unsigned short j = 0; j < m_excludeSLayer.size(); ++j) {
51 if (slay == m_excludeSLayer.at(j)) {
52 track->getRecoHitInformation(cdchit)->setUseInFit(false);
53 }
54 }
55
56 for (unsigned short j = 0; j < m_excludeICLayer.size(); ++j) {
57 if (iclay == m_excludeICLayer.at(j)) {
58 track->getRecoHitInformation(cdchit)->setUseInFit(false);
59 }
60 }
61
62 }//end of track
63 }//end RecoTrack array
64}//End Event
66{
67}
68
70{
71}
72
Class containing the result of the unpacker in raw data and the result of the digitizer in simulation...
Definition: CDCHit.h:40
std::string m_recoTrackArrayName
Belle2::RecoTrack StoreArray name.
void initialize() override
Initializes the Module.
void event() override
Event action (main routine).
void terminate() override
Termination action.
std::vector< unsigned short > m_excludeSLayer
Super layers (0-8) not used in the track fitting.
void beginRun() override
Begin run action.
std::vector< unsigned short > m_excludeICLayer
IClayers (0-55) not used in the track fitting.
StoreArray< RecoTrack > m_RecoTracks
Tracks.
Base class for Modules.
Definition: Module.h:72
void setDescription(const std::string &description)
Sets the description of the module.
Definition: Module.cc:214
void setPropertyFlags(unsigned int propertyFlags)
Sets the flags for the module properties.
Definition: Module.cc:208
@ c_ParallelProcessingCertified
This module can be run in parallel processing mode safely (All I/O must be done through the data stor...
Definition: Module.h:80
This is the Reconstruction Event-Data Model Track.
Definition: RecoTrack.h:79
Class to identify a wire inside the CDC.
Definition: WireID.h:34
void addParam(const std::string &name, T &paramVariable, const std::string &description, const T &defaultValue)
Adds a new parameter to the module.
Definition: Module.h:559
#define REG_MODULE(moduleName)
Register the given module (without 'Module' suffix) with the framework.
Definition: Module.h:649
Abstract base class for different kinds of events.
STL namespace.