2 #include "TGeoManager.h"
4 #include "TClonesArray.h"
9 fChargeConverter(NULL),
17 fChargeConverter(NULL),
29 std::vector<Double_t> timeValues;
30 std::vector<Double_t> timeValueErrors;
32 Int_t
count = 0, mcindex=-1;
51 std::cout <<
"GetCluster:col/row " << col <<
" " <<
row << std::endl;
54 for(Int_t mcI = 0; mcI<
fDigiArray[0].GetNIndices();mcI++){
60 timeValues.push_back(
fDigiArray[0].GetTimeStamp());
61 timeValueErrors.push_back(
fDigiArray[0].GetTimeStampError());
74 timeValues.push_back(
fDigiArray[i].GetTimeStamp());
75 timeValueErrors.push_back(
fDigiArray[i].GetTimeStampError());
78 for(Int_t mcI = 0; mcI<
fDigiArray[
i].GetNIndices();mcI++){
99 std::cout <<
"Col: " << col <<
" Row: " <<
row << std::endl;
103 TVector3 locpos( col*
flx - offset.X(),
row*
fly - offset.Y(), 0);
110 locCov[2][2]=errZ*errZ/12;
112 TVector3 dpos(
sqrt(hitCov[0][0]),
sqrt(hitCov[1][1]),
sqrt(hitCov[2][2]));
119 for (UInt_t
t = 0;
t < timeValues.size();
t++){
120 meanTime += timeValues[
t] / (timeValueErrors[
t] * timeValueErrors[
t]);
121 sumVar += 1/(timeValueErrors[
t] * timeValueErrors[
t]);
131 thehit.SetTimeStamp(meanTime);
132 thehit.SetTimeStampError(1/sumVar);
140 TGeoHMatrix* transMat =
gGeoManager->GetCurrentMatrix();
149 TGeoVolume* actVolume =
gGeoManager->GetCurrentVolume();
150 TGeoBBox* actBox = (TGeoBBox*)(actVolume->GetShape());
152 result.SetX(actBox->GetDX());
153 result.SetY(actBox->GetDY());
154 result.SetZ(actBox->GetDZ());
PndSdsChargeWeightedPixelMapping()
friend F32vec4 sqrt(const F32vec4 &a)
TGeoManager * gGeoManager
TString GetPath(Int_t shortID)
for a given shortID the path is returned
virtual Double_t DigiValueToCharge(Double_t digi)=0
Converts a given digitized charge into charge in electrons.
TVector3 GetSensorDimensionsShortId(Int_t shortId)
PndSdsHit GetCluster(std::vector< PndSdsDigiPixel > pixelArray)
Main function of class to calculate the PndSdsHit out of the given PndSdsDigis.
TGeoHMatrix GetTransformation(Int_t sensorID)
TMatrixD LocalToMasterErrorsShortId(const TMatrixD &local, const Int_t &shortId)
Class to access the naming information of the MVD.
TVector3 GetSensorDimensions(Int_t sensorID)
std::vector< PndSdsDigiPixel > fDigiArray
TVector3 LocalToMasterShortId(const TVector3 &local, const Int_t &shortId)
void SetCov(TMatrixD cov)
PndSdsChargeConversion * fChargeConverter
TMatrixT< double > TMatrixD