Hi,
I am designing TPC using Garfield and installing sensor for it.
However, even though I used fSensorDrift->AddComponent(fComponentConstantDrift);
to attach component to sensor, sensor does not have same electric field to component.
This is electric field setting for component and a series of process to output it.
251 fComponentConstantDrift = new Garfield::ComponentConstant();
252 fComponentConstantDrift-SetMedium(fMediumMagboltzDrift);
253 fComponentConstantDrift->SetElectricField(-440, 0, 0);
324 std::cout << “====== E field Output (Component) ======” << std::endl;
325 fComponentConstantDrift->ElectricField(8, 0, 0, ex, ey, ez, v, medium, status);
326 std::cout << “Drift Zone Centre (8, 0, 0)” << std::endl;
327 std::cout << “Ex = " << ex << " V/cm” << std::endl;
328 std::cout << “Ey = " << ey << " V/cm” << std::endl;
329 std::cout << “Ez = " << ez << " V/cm” << std::endl;
330 fComponentConstantItf->ElectricField(17.05, 0, 0, ex, ey, ez, v, medium, status);
331 std::cout << “Interface Zone Centre (17.05, 0, 0)” << std::endl;
332 std::cout << “Ex = " << ex << " V/cm” << std::endl;
333 std::cout << “Ey = " << ey << " V/cm” << std::endl;
334 std::cout << “Ez = " << ez << " V/cm” << std::endl;
335 fComponentConstantEL->ElectricField(18.455, 0, 0, ex, ey, ez, v, medium, status);
336 std::cout << “EL Zone Centre (18.455, 0, 0)” << std::endl;
337 std::cout << “Ex = " << ex << " V/cm” << std::endl;
338 std::cout << “Ey = " << ey << " V/cm” << std::endl;
339 std::cout << “Ez = " << ez << " V/cm” << std::endl;
325 ====== E field Output (Component) ======
326 Drift Zone Centre (8, 0, 0)
327 Ex = -440 V/cm
328 Ey = 0 V/cm
329 Ez = 0 V/cm
330 Interface Zone Centre (17.05, 0, 0)
331 Ex = -471 V/cm
332 Ey = 0 V/cm
333 Ez = 0 V/cm
334 EL Zone Centre (18.455, 0, 0)
335 Ex = -14000 V/cm
336 Ey = 0 V/cm
337 Ez = 0 V/cm
while this is sensor setting that is not showing electric field in component.
254 fSensorDrift = new Garfield::Sensor();
255 fSensorDrift->Clear();
256 fSensorDrift->AddComponent(fComponentConstantDrift);
257 fSensorDrift->SetArea(0, 16, -6, 6, -6, 6);
258 fSensorDrift->SetTimeWindow(0., 2e5, 40000);
346 std::cout << “====== E field Output (Sensor) ======” << std::endl;
347 fSensorDrift->ElectricField(8, 0, 0, ex, ey, ez, v, medium, status);
348 std::cout << “Drift Zone Centre (8, 0, 0)” << std::endl;
349 std::cout << “Ex = " << ex << " V/cm” << std::endl;
350 std::cout << “Ey = " << ey << " V/cm” << std::endl;
351 std::cout << “Ez = " << ez << " V/cm” << std::endl;
352 fSensorItf->ElectricField(17.05, 0, 0, ex, ey, ez, v, medium, status);
353 std::cout << “Interface Zone Centre (17.05, 0, 0)” << std::endl;
354 std::cout << “Ex = " << ex << " V/cm” << std::endl;
355 std::cout << “Ey = " << ey << " V/cm” << std::endl;
356 std::cout << “Ez = " << ez << " V/cm” << std::endl;
357 fSensorEL->ElectricField(18.455, 0, 0, ex, ey, ez, v, medium, status);
358 std::cout << “EL Zone Centre (18.455, 0, 0)” << std::endl;
359 std::cout << “Ex = " << ex << " V/cm” << std::endl;
360 std::cout << “Ey = " << ey << " V/cm” << std::endl;
361 std::cout << “Ez = " << ez << " V/cm” << std::endl;
342 ====== E field Output (Sensor) ======
343 Drift Zone Centre (8, 0, 0)
344 Ex = 0 V/cm
345 Ey = 0 V/cm
346 Ez = 0 V/cm
347 Interface Zone Centre (17.05, 0, 0)
348 Ex = 0 V/cm
349 Ey = 0 V/cm
350 Ez = 0 V/cm
351 EL Zone Centre (18.455, 0, 0)
352 Ex = 0 V/cm
353 Ey = 0 V/cm
354 Ez = 0 V/cm
Is there any problem in my source code? I attached my whole code for this process and am looking forward to receiving your answer!
GarfieldPhysics.cc (18.2 KB)