3 #include "TGeoManager.h"
5 #include "TClonesArray.h"
19 std::vector<Double_t> timeValues;
20 std::vector<Double_t> timeValueErrors;
22 Int_t
count = 0, mcindex=-1;
26 if (pixelArray.size() == 1){
28 col = pixelArray[0]->GetPixelColumn() + ((Int_t)(pixelArray[0]->GetFE()%10)) *
fcols;
34 row = pixelArray[0]->GetPixelRow()+ (pixelArray[0]->GetFE()/10) *
frows;
41 std::cout <<
"GetCluster:col/row " << col <<
" " <<
row << std::endl;
44 for(Int_t mcI = 0; mcI<pixelArray[0]->GetNIndices();mcI++){
45 if (pixelArray[0]->GetIndex(mcI) > -1) {
46 mcindex = pixelArray[0]->GetIndex(mcI);
50 timeValues.push_back(pixelArray[0]->GetTimeStamp());
51 timeValueErrors.push_back(pixelArray[0]->GetTimeStampError());
56 for (UInt_t
i = 0;
i < pixelArray.size();
i++){
59 tempCol = pixelArray[
i]->GetPixelColumn() + (Int_t)(pixelArray[0]->GetFE()%10) *
fcols;
60 tempRow = pixelArray[
i]->GetPixelRow() + pixelArray[0]->GetFE()/10 *
frows;
64 timeValues.push_back(pixelArray[i]->GetTimeStamp());
65 timeValueErrors.push_back(pixelArray[i]->GetTimeStampError());
68 for(Int_t mcI = 0; mcI<pixelArray[
i]->GetNIndices();mcI++){
69 if (pixelArray[i]->GetIndex(mcI) > -1) {
70 mcindex = pixelArray[
i]->GetIndex(mcI);
89 std::cout <<
"Col: " << col <<
" Row: " <<
row << std::endl;
93 TVector3 locpos( col*
flx - offset.X(),
row*
fly - offset.Y(), 0);
100 locCov[2][2]=errZ*errZ/12;
102 TVector3 dpos(
sqrt(hitCov[0][0]),
sqrt(hitCov[1][1]),
sqrt(hitCov[2][2]));
109 for (UInt_t
t = 0;
t < timeValues.size();
t++){
110 meanTime += timeValues[
t] / (timeValueErrors[
t] * timeValueErrors[
t]);
111 sumVar += 1/(timeValueErrors[
t] * timeValueErrors[
t]);
119 PndSdsHit thehit(pixelArray[0]->GetDetID(),pixelArray[0]->GetSensorID(), pos, dpos, -1, charge, pixelArray.size(),mcindex);
121 thehit.SetTimeStamp(meanTime);
122 thehit.SetTimeStampError(1/sumVar);
130 TGeoHMatrix* transMat =
gGeoManager->GetCurrentMatrix();
139 TGeoVolume* actVolume =
gGeoManager->GetCurrentVolume();
140 TGeoBBox* actBox = (TGeoBBox*)(actVolume->GetShape());
142 result.SetX(actBox->GetDX());
143 result.SetY(actBox->GetDY());
144 result.SetZ(actBox->GetDZ());
friend F32vec4 sqrt(const F32vec4 &a)
PndMQSdsChargeWeightedPixelMapping()
PndSdsChargeConversion * fChargeConverter
TVector3 GetSensorDimensions(Int_t sensorID)
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.
PndSdsHit GetCluster(std::vector< PndSdsDigiPixel * > &pixelArray)
Main function of class to calculate the PndSdsHit out of the given PndSdsDigis.
TVector3 GetSensorDimensionsShortId(Int_t shortId)
TMatrixD LocalToMasterErrorsShortId(const TMatrixD &local, const Int_t &shortId)
Class to access the naming information of the MVD.
TVector3 LocalToMasterShortId(const TVector3 &local, const Int_t &shortId)
void SetCov(TMatrixD cov)
TGeoHMatrix GetTransformation(Int_t sensorID)
TMatrixT< double > TMatrixD