Belle II Software  release-08-01-10
Collaboration diagram for pxd:

Modules

 pxd data objects
 
 pxd modules
 

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  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. More...
 

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 105 of file PXD2TrackBase.h.

110  {
111  // Exactly 2 tracks
112  //if(recoTracks.size() != 2) return false;
113  if (!recoTracks.isValid() or recoTracks.getEntries() != 2) return false;
114 
115  // Valid Tracks
116  auto track1Ptr = recoTracks[0]->getRelated<Track>("Tracks");
117  auto track2Ptr = recoTracks[1]->getRelated<Track>("Tracks");
118  if (!track1Ptr or !track2Ptr) return false;
119 
120  // Valid trackFitResults
121  auto tfr1Ptr = track1Ptr->getTrackFitResultWithClosestMass(Const::pion);
122  auto tfr2Ptr = track2Ptr->getTrackFitResultWithClosestMass(Const::pion);
123  if (!tfr1Ptr or !tfr2Ptr) return false;
124 
125  // Valid P Values
126  if (tfr1Ptr->getPValue() <= 0 or tfr2Ptr->getPValue() <= 0) return false;
127 
128  // Opposite charges
129  if (tfr1Ptr->getChargeSign() * tfr2Ptr->getChargeSign() >= 0) return false;
130 
131  // Setup Rave vertex fitter
132  auto bField = BFieldManager::getFieldInTesla(ROOT::Math::XYZVector(0, 0, 0)).Z();
133  B2DEBUG(20, "B Field = " << bField << " T");
135  analysis::RaveVertexFitter rvf;
136  try {
137  rvf.addTrack(tfr1Ptr);
138  rvf.addTrack(tfr2Ptr);
139  } catch (...) {
140  B2DEBUG(20, "Adding tracks to RaveVertexFitter failed.");
141  return false;
142  }
143  if (rvf.fit() == 0) return false;
144  // get vertex from fitting
145  auto vertex = rvf.getPos();
146  // Reset RAVE
148 
149  // Set vertex
150  m_vx = vertex.X();
151  m_vy = vertex.Y();
152  m_vz = vertex.Z();
153  B2DEBUG(20, "Vertex = (" << m_vx
154  << ", " << m_vy
155  << ", " << m_vz
156  << ")");
157 
158  // Set track containers
159  DBObjPtr<BeamSpot> beamSpotDB; // beam spot is required to correct d0/z0
160  auto ip = ROOT::Math::XYZVector(beamSpotDB->getIPPosition());
161  if (tfr1Ptr->getChargeSign() > 0) {
162  m_track_p.setValues(*recoTracks[0], ip, recoTracksName, pxdInterceptsName, pxdTrackClustersName);
163  m_track_m.setValues(*recoTracks[1], ip, recoTracksName, pxdInterceptsName, pxdTrackClustersName);
164  } else {
165  m_track_p.setValues(*recoTracks[1], ip, recoTracksName, pxdInterceptsName, pxdTrackClustersName);
166  m_track_m.setValues(*recoTracks[0], ip, recoTracksName, pxdInterceptsName, pxdTrackClustersName);
167  }
168  return true;
169  }
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:652
float m_vy
Position of the vertex in y.
Definition: PXD2TrackBase.h:96
float m_vz
Position of the vertex in z.
Definition: PXD2TrackBase.h:97
T m_track_m
Track with the negative charge.
Definition: PXD2TrackBase.h:99
float m_vx
Position of the vertex in x.
Definition: PXD2TrackBase.h:95
T m_track_p
Track with the positive charge.
Definition: PXD2TrackBase.h:98
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