42 double pointX = p->GetX();
43 double pointY = p->GetY();
44 double pointZ = p->GetZ();
45 double pointT = p->GetTime();
46 double pointE = p->GetEnergyLoss();
47 int detID = p->GetDetectorID();
54 TGeoNavigator* navigator = gGeoManager->GetCurrentNavigator();
55 navigator->cd(
"cave/SplitCalDetector_1");
56 TGeoVolume* caloVolume = navigator->GetCurrentVolume();
61 int isPrec, nL, nMx, nMy, nS;
62 Decoder(detID, isPrec, nL, nMx, nMy, nS);
64 SetIDs(isPrec, nL, nMx, nMy, nS);
66 TGeoNode* strip = caloVolume->GetNode(stripName.c_str());
68 const Double_t* stripCoordinatesLocal = strip->GetMatrix()->GetTranslation();
69 Double_t stripCoordinatesMaster[3] = {0.,0.,0.};
70 navigator->LocalToMaster(stripCoordinatesLocal, stripCoordinatesMaster);
72 TGeoBBox* box = (TGeoBBox*)strip->GetVolume()->GetShape();
73 double xHalfLength = box->GetDX();
74 double yHalfLength = box->GetDY();
75 double zHalfLength = box->GetDZ();
77 TGeoNode* passiveLayer = caloVolume->GetNode(
"ECALfilter_200000");
78 TGeoBBox* boxPassive = (TGeoBBox*)passiveLayer->GetVolume()->GetShape();
79 double zPassiveHalfLength = box->GetDZ();
103 if (isPrec==1)
SetXYZ(pointX,pointY,stripCoordinatesMaster[2]);
104 else SetXYZ(stripCoordinatesMaster[0], stripCoordinatesMaster[1], stripCoordinatesMaster[2]);
105 SetXYZErrors(xHalfLength,yHalfLength,2*(zHalfLength+zPassiveHalfLength));
127 int isPrec, nL, nMx, nMy, nS;
128 Decoder(encodedID, isPrec, nL, nMx, nMy, nS);
132 name =
"ECALdet_gas_";
135 }
else if (nL%2==0) {
136 name =
"stripGivingY_";
140 name =
"stripGivingX_";
144 name = name + std::to_string(
id);
151void splitcalHit::Decoder(std::string& encodedID,
int& isPrecision,
int& nLayer,
int& nModuleX,
int& nModuleY,
int& nStrip){
153 std::string subtring;
155 subtring = encodedID.substr(0, 1);
156 isPrecision = atoi(subtring.c_str());
158 subtring = encodedID.substr(1,3);
159 nLayer = atoi(subtring.c_str());
161 subtring = encodedID.substr(4,1);
162 nModuleX = atoi(subtring.c_str());
164 subtring = encodedID.substr(5,1);
165 nModuleY = atoi(subtring.c_str());
167 subtring = encodedID.substr(6,3);
168 nStrip = atoi(subtring.c_str());