Belle II Software development

Modules

 pxd data objects
 
 pxd modules
 

Namespaces

namespace  Belle2::PXD
 Namespace to encapsulate code needed for simulation and reconstrucion of the PXD.
 

Classes

class  PXDAnalyticGainCalibrationAlgorithm
 Class implementing the PXD gain calibration algorithm. More...
 
class  PXDChargeCalibrationAlgorithm
 Class implementing the PXD median cluster charge calibration algorithm. More...
 
class  PXDClusterPositionCalibrationAlgorithm
 Class implementing the PXD cluster position calibration algorithm. More...
 
class  PXDDataMCGainCalibrationAlgorithm
 Class implementing the PXD median cluster charge calibration algorithm. More...
 
class  PXDGainCalibrationAlgorithm
 Class implementing the PXD gain calibration algorithm. More...
 
class  PXDHotPixelMaskCalibrationAlgorithm
 Class implementing PXD hot pixel masking calibration algorithm. More...
 
class  PXDValidationAlgorithm
 Class implementing the PXD calibration validation algorithm. More...
 
class  PXDClusterChargeMapPar
 The payload class for PXD cluster charge calibrations. More...
 
class  PXDClusterOffsetPar
 The class for PXD cluster position offset payload. More...
 
class  PXDClusterPositionErrorPar
 The payload class for PXD cluster position error. More...
 
class  PXDClusterPositionEstimatorPar
 The class for PXD cluster position lookup table payload. More...
 
class  PXDClusterShapeClassifierPar
 The class for PXD cluster shape classifier payload. More...
 
class  PXDClusterShapeIndexPar
 The class for PXD cluster shape index payload. More...
 
class  PXDDeadPixelPar
 The payload telling which PXD pixel is dead (=Readout system does not receive signals) More...
 
class  PXDdEdxPDFs
 Specialized class for holding the PXD dE/dx PDFs. More...
 
class  PXDDHHFirmwareVersionPar
 The payload stores the firmware version from the DHH, which has influence on the structure and content of the RawPXD package. More...
 
class  PXDGainMapPar
 The payload class for PXD gain corrections. More...
 
class  PXDGeometryPar
 The Class for VXD geometry. More...
 
class  PXDMaskedPixelPar
 The payload telling which PXD pixel to mask (ignore) More...
 
class  PXDOccupancyInfoPar
 The payload collecting some meta information from running the masking algorithm. More...
 
class  PXDSensorInfoPar
 The Class for VXD geometry. More...
 
class  PXDIgnoredPixelsMap
 This class provides a check for ignored (=cold, hot or otherwise deffective) pixels for the use in PXD data reconstruction. More...
 
class  PXDRecoHit
 PXDRecoHit - an extended form of PXDCluster containing geometry information. More...
 
class  PXDLocalDAQFile
 A class to manage I/O for a chain of blocked files. More...
 
class  PXD2TrackBase< T >
 Class PXD2TrackBase: Event data container for performance and calibration studies. More...
 
class  PXD2TrackEvent
 Class PXD2TrackEvent: Event data container for performance and calibration studies. More...
 

Functions

virtual bool setValues (const StoreArray< RecoTrack > &recoTracks, const std::string &recoTracksName="", const std::string &pxdInterceptsName="", const std::string &pxdTrackClustersName="PXDClustersFromTracks")
 Set values from RecoTrack collection.
 

Detailed Description

Function Documentation

◆ setValues()

bool setValues ( const StoreArray< RecoTrack > &  recoTracks,
const std::string &  recoTracksName = "",
const std::string &  pxdInterceptsName = "",
const std::string &  pxdTrackClustersName = "PXDClustersFromTracks" 
)
virtual

Set values from RecoTrack collection.

Parameters
recoTracksStoreArray of RecoTracks.
recoTracksNamename of the related array of RecoTracks.
pxdInterceptsNamename of the related array of PXDIntercepts.
pxdTrackClustersNamename of the related array of PXDClustersFromTracks.
Returns
setting status true for success.

Definition at line 104 of file PXD2TrackBase.h.

109 {
110 // Exactly 2 tracks
111 //if(recoTracks.size() != 2) return false;
112 if (!recoTracks.isValid() or recoTracks.getEntries() != 2) return false;
113
114 // Valid Tracks
115 auto track1Ptr = recoTracks[0]->getRelated<Track>("Tracks");
116 auto track2Ptr = recoTracks[1]->getRelated<Track>("Tracks");
117 if (!track1Ptr or !track2Ptr) return false;
118
119 // Valid trackFitResults
120 auto tfr1Ptr = track1Ptr->getTrackFitResultWithClosestMass(Const::pion);
121 auto tfr2Ptr = track2Ptr->getTrackFitResultWithClosestMass(Const::pion);
122 if (!tfr1Ptr or !tfr2Ptr) return false;
123
124 // Valid P Values
125 if (tfr1Ptr->getPValue() <= 0 or tfr2Ptr->getPValue() <= 0) return false;
126
127 // Opposite charges
128 if (tfr1Ptr->getChargeSign() * tfr2Ptr->getChargeSign() >= 0) return false;
129
130 // Setup Rave vertex fitter
131 auto bField = BFieldManager::getFieldInTesla(ROOT::Math::XYZVector(0, 0, 0)).Z();
132 B2DEBUG(20, "B Field = " << bField << " T");
134 analysis::RaveVertexFitter rvf;
135 try {
136 rvf.addTrack(tfr1Ptr);
137 rvf.addTrack(tfr2Ptr);
138 } catch (...) {
139 B2DEBUG(20, "Adding tracks to RaveVertexFitter failed.");
140 return false;
141 }
142 if (rvf.fit() == 0) return false;
143 // get vertex from fitting
144 auto vertex = rvf.getPos();
145 // Reset RAVE
147
148 // Set vertex
149 m_vx = vertex.X();
150 m_vy = vertex.Y();
151 m_vz = vertex.Z();
152 B2DEBUG(20, "Vertex = (" << m_vx
153 << ", " << m_vy
154 << ", " << m_vz
155 << ")");
156
157 // Set track containers
158 DBObjPtr<BeamSpot> beamSpotDB; // beam spot is required to correct d0/z0
159 auto ip = ROOT::Math::XYZVector(beamSpotDB->getIPPosition());
160 if (tfr1Ptr->getChargeSign() > 0) {
161 m_track_p.setValues(*recoTracks[0], ip, recoTracksName, pxdInterceptsName, pxdTrackClustersName);
162 m_track_m.setValues(*recoTracks[1], ip, recoTracksName, pxdInterceptsName, pxdTrackClustersName);
163 } else {
164 m_track_p.setValues(*recoTracks[1], ip, recoTracksName, pxdInterceptsName, pxdTrackClustersName);
165 m_track_m.setValues(*recoTracks[0], ip, recoTracksName, pxdInterceptsName, pxdTrackClustersName);
166 }
167 return true;
168 }
static ROOT::Math::XYZVector getFieldInTesla(const ROOT::Math::XYZVector &pos)
return the magnetic field at a given position in Tesla.
Definition: BFieldManager.h:61
static const ChargedStable pion
charged pion particle
Definition: Const.h:661
float m_vy
Position of the vertex in y.
Definition: PXD2TrackBase.h:95
float m_vz
Position of the vertex in z.
Definition: PXD2TrackBase.h:96
T m_track_m
Track with the negative charge.
Definition: PXD2TrackBase.h:98
float m_vx
Position of the vertex in x.
Definition: PXD2TrackBase.h:94
T m_track_p
Track with the positive charge.
Definition: PXD2TrackBase.h:97
bool isValid() const
Check wether the array was registered.
Definition: StoreArray.h:288
int getEntries() const
Get the number of objects in the array.
Definition: StoreArray.h:216
static void initialize(int verbosity=1, double MagneticField=1.5)
Set everything up so everything needed for vertex fitting is there.
Definition: RaveSetup.cc:33
static RaveSetup * getInstance()
get the pointer to the instance to get/set any of options stored in RaveSetup
Definition: RaveSetup.h:43
void reset()
frees memory allocated by initialize().
Definition: RaveSetup.cc:58