10#include <arich/modules/arichReconstruction/ARICHReconstructorModule.h>
14#include <mdst/dataobjects/Track.h>
15#include <tracking/dataobjects/ExtHit.h>
16#include <mdst/dataobjects/MCParticle.h>
17#include <arich/dataobjects/ARICHAeroHit.h>
18#include <arich/dataobjects/ARICHLikelihood.h>
19#include <arich/dataobjects/ARICHTrack.h>
20#include <arich/dataobjects/ARICHHit.h>
23#include <framework/datastore/DataStore.h>
24#include <framework/datastore/StoreArray.h>
27#include <framework/gearbox/Unit.h>
28#include <framework/gearbox/Const.h>
29#include <framework/logging/Logger.h>
53 setDescription(
"This module calculates the ARICHLikelihood values for all particle id. hypotheses, for all tracks that enter ARICH in the event.");
60 "Resolution of track position on aerogel plane (for additional smearing of MC tracks)", 1.0 *
Unit::mm);
62 "Resolution of track direction angle on aerogel plane (for additional smearing of MC tracks)", 2.0 *
Unit::mrad);
64 addParam(
"storePhotons",
m_storePhot,
"Set to 1 to store reconstructed photon information (Ch. angle,...)", 0);
65 addParam(
"useAlignment",
m_align,
"Use ARICH global position alignment constants",
true);
129 const TrackFitResult* fitResult = track.getTrackFitResultWithClosestMass(hypothesis);
131 B2ERROR(
"No TrackFitResult for " << hypothesis.
getPDGCode());
144 const ExtHit* arich2ndHit = NULL;
145 const ExtHit* arichWinHit = NULL;
147 for (
unsigned i = 0; i < extHits.size(); i++) {
148 const ExtHit* extHit = extHits[i];
153 extHit->
getCopyID() == 12345) {
continue;}
154 if (extHit->
getCopyID() == 6789) { arich2ndHit = extHit;
continue;}
155 arichWinHit = extHit;
164 if (arichWinHit) arichTrack->setHapdWindowHit(arichWinHit);
168 if (!arichTrack)
continue;
176 track.addRelationTo(like);
210 if (
m_inputTrackType == 0) { B2DEBUG(100,
"ARICHReconstructorModule: track infromation is taken from mdst Tracks.");}
211 else B2DEBUG(100,
"ARICHReconstructorModule: track information is taken from MC (ARICHAeroHit).");
Datastore class that holds information on track parameters at the entrance in aerogel.
This is a class to store ARICH likelihoods in the datastore.
Internal ARICH track reconstruction.
void useMirrorAlignment(bool align)
Use mirror alignment or not.
StoreArray< ARICHAeroHit > m_aeroHits
Aerogel hits.
ARICHReconstruction * m_ana
Class with reconstruction tools.
bool m_alignMirrors
Whether alignment constants for mirrors are used.
int m_inputTrackType
Input tracks from the tracking (0) or from MCParticles>AeroHits (1).
bool m_align
Whether alignment constants are used for global->local track transformation.
StoreArray< ARICHTrack > m_ARICHTracks
ARICH tracks.
double m_trackAngleResolution
Track direction resolution; simulation smearing.
StoreArray< ARICHLikelihood > m_ARICHLikelihoods
Likelihoods.
StoreArray< ARICHHit > m_ARICHHits
ARICH hits.
StoreArray< Track > m_Tracks
Tracks.
int m_storePhot
If == 1, individual reconstruced photon information (Cherenkov angle,...) is stored in ARICHTrack.
StoreArray< ExtHit > m_ExtHits
Extrapolation hits.
double m_trackPositionResolution
Track position resolution; simulation smearing.
Datastore class that holds position and momentum information of tracks that hit ARICH.
Provides a type-safe way to pass members of the chargedStableSet set.
int getPDGCode() const
PDG code.
EDetector
Enum for identifying the detector components (detector and subdetector).
static const ChargedStable pion
charged pion particle
Store one Ext hit as a ROOT object.
int getPdgCode() const
Get PDG code of this extrapolation's hypothesis.
ExtHitStatus getStatus() const
Get state of extrapolation at this hit.
int getCopyID() const
Get detector-element ID of sensitive element within detector.
Const::EDetector getDetectorID() const
Get detector ID of this extrapolation hit.
ROOT::Math::XYZVector getMomentum() const
Get momentum at this extrapolation hit.
A Class to store the Monte Carlo particle information.
void setDescription(const std::string &description)
Sets the description of the module.
void setPropertyFlags(unsigned int propertyFlags)
Sets the flags for the module properties.
@ c_ParallelProcessingCertified
This module can be run in parallel processing mode safely (All I/O must be done through the data stor...
Class for type safe access to objects that are referred to in relations.
void addRelationTo(const RelationsInterface< BASE > *object, float weight=1.0, const std::string &namedRelation="") const
Add a relation from this object to another object (with caching).
T * getRelated(const std::string &name="", const std::string &namedRelation="") const
Get the object to or from which this object has a relation.
bool isOptional(const std::string &name="")
Tell the DataStore about an optional input.
Accessor to arrays stored in the data store.
Values of the result of a track fit with a given particle hypothesis.
Class that bundles various TrackFitResults.
static const double mm
[millimeters]
static const double mrad
[millirad]
void setTrackPositionResolution(double pRes)
Sets track position resolution (from tracking).
int likelihood2(ARICHTrack &arichTrack, const StoreArray< ARICHHit > &arichHits, ARICHLikelihood &arichLikelihood)
Computes the value of identity likelihood function for different particle hypotheses.
void initialize()
Read geometry parameters from xml and initialize class members.
virtual void initialize() override
Initialize the Module.
virtual void event() override
Event processor.
void setTrackAngleResolution(double aRes)
Sets track direction resolution (from tracking).
virtual ~ARICHReconstructorModule()
Destructor.
virtual void beginRun() override
Called when entering a new run.
void printModuleParams()
Print module parameters.
void transformTrackToLocal(ARICHTrack &arichTrack, bool align)
Transforms track parameters from global Belle2 to ARICH local frame.
int smearTrack(ARICHTrack &arichTrack)
Smears track parameters ("simulate" the uncertainties of tracking).
ARICHReconstructorModule()
Constructor.
void addParam(const std::string &name, T ¶mVariable, const std::string &description, const T &defaultValue)
Adds a new parameter to the module.
#define REG_MODULE(moduleName)
Register the given module (without 'Module' suffix) with the framework.
Abstract base class for different kinds of events.