The signal from each of the strips is processed by the APV25 resulting in a waveform of six samples at 24 ns intervals.  In hps-java, the six samples are encapsulated within a RawTrackerHit object along with an identifier describing the channel the signal emerged from.  The channel ID's range from 0-639 arranged as described here.  

All RawTrackerHits in an event are stored in a collection, SvtRawTrackerHits, which can be accessed as follows:

String rawTrackerHitCollectionName = "SVTRawTrackerHits";
List<RawTrackerHit> rawHits = event.get(RawTrackerHit.class, rawTrackerHitCollectionName);

Accessing the information associated with a raw hit is simple as shown in the following example

for (RawTrackerHit rawHit : rawHits) { 
	
	// Access the sensor associated with the raw hit
	HpsSiSensor sensor = (HpsSiSensor) rawHit.getDetectorElement();
	
	// Retrieve the channel ID of the raw hit
	int channel = rawHit.getIdentifierFieldValue("strip");
} 

The six samples emerging from each channel are processed by the driver RawTrackerHitFitterDriver.  The six samples are fit using a 4-pole function and the results are encapsulated by the class ShapeFitParameters.  A relation between the raw hit and the fit results is also constructed that allows access to the fit results using the raw hit itself.  The following example shows how these collections are used to retrieve the shape fit parameters

// Get the list of fitted hits from the event
private String fittedHitsCollectionName = "SvtFittedRawTrackerHits";
List<LCRelation> fittedHits = event.get(LCRelation.class, fittedHitsCollectionName);
 
// Map the fitted hits to their corresponding raw hits
Map<RawTrackerHit, LCRelation> fittedRawTrackerHitMap = new HashMap<RawTrackerHit, LCRelation>();
        
for (LCRelation fittedHit : fittedHits) { 
    fittedRawTrackerHitMap.put(FittedRawTrackerHit.getRawTrackerHit(fittedHit), fittedHit);	
}
 
for (RawTrackerHit rawHit : rawHits) { 
	
	// Get the hit amplitude
	double amplitude = FittedRawTrackerHit.getAmp(fittedRawTrackerHitMap.get(rawHit));
	
	// Get the t0 of the hit
	double t0 = FittedRawTrackerHit.getT0(fittedRawTrackerHitMap.get(rawHit));
}
  • No labels