# Problems about SetPeriodicity in ComponentAnalyticField

**URL:** <https://root-forum.cern.ch/t/problems-about-setperiodicity-in-componentanalyticfield/54446>\
**Category:** Garfield++\
**Created:** [April 12, 2023, 6:18am UTC](https://root-forum.cern.ch/t/problems-about-setperiodicity-in-componentanalyticfield/54446 "2023-04-12T06:18:42Z")\
**Posts on this page:** 5\
**Page:** 1

<div class="post-metadata">

**Author:** ![zql21](https://root-forum.cern.ch/user_avatar/root-forum.cern.ch/zql21/32/33487_2.png) [@zql21](https://root-forum.cern.ch/u/zql21)\
**Post date:** [April 12, 2023, 6:18am UTC](https://root-forum.cern.ch/t/problems-about-setperiodicity-in-componentanalyticfield/54446/1 "2023-04-12T06:18:42Z")

</div>

在Examples/AliceTPC中，the periodicity (wire spacing) (both in sense wires and cathode wires)is same(0.25cm).As the following code shows

```auto
constexpr double period = 0.25;
cmpe.SetPeriodicityX(period);
cmpi.SetPeriodicityX(period);

```

If I want to set the wire spacing between the sense wire is 0.2cm ( PeriodicityX ), the wire spacing between the cathode wires is 0.3cm ( PeriodicityX ), how should I modify the code?

---

<div class="post-metadata">

**Author:** ![bellenot](https://root-forum.cern.ch/user_avatar/root-forum.cern.ch/bellenot/32/29217_2.png) [@bellenot](https://root-forum.cern.ch/u/bellenot)\
**Post date:** [April 12, 2023, 6:22am UTC](https://root-forum.cern.ch/t/problems-about-setperiodicity-in-componentanalyticfield/54446/2 "2023-04-12T06:22:27Z")

</div>

I’m sure @hschindl will be able to help you

---

<div class="post-metadata">

**Author:** ![hschindl](https://root-forum.cern.ch/letter_avatar_proxy/v4/letter/h/977dab/32.png) [@hschindl](https://root-forum.cern.ch/u/hschindl)\
**Post date:** [April 12, 2023, 9:48am UTC](https://root-forum.cern.ch/t/problems-about-setperiodicity-in-componentanalyticfield/54446/3 "2023-04-12T09:48:52Z")

</div>

Hi,  
the function `SetPeriodicityX` sets the periodic length of the geometry as a whole, which is not necessarily the same as the wire spacing. In your case you could define an elementary cell that has two cathode wires and three sense wires, and a periodicity of 0.6 cm.

---

<div class="post-metadata">

**Author:** ![zql21](https://root-forum.cern.ch/user_avatar/root-forum.cern.ch/zql21/32/33487_2.png) [@zql21](https://root-forum.cern.ch/u/zql21)\
**Post date:** [April 12, 2023, 10:31am UTC](https://root-forum.cern.ch/t/problems-about-setperiodicity-in-componentanalyticfield/54446/4 "2023-04-12T10:31:59Z")

</div>

got it！ thank you very much.

---

<div class="post-metadata">

**Author:** ![system](https://root-forum.cern.ch/uploads/default/original/3X/e/f/efe4f24398fd8ffeb76bccb6ecc46d9d9c003376.png) [@system](https://root-forum.cern.ch/u/system)\
**Post date:** [April 26, 2023, 10:32am UTC](https://root-forum.cern.ch/t/problems-about-setperiodicity-in-componentanalyticfield/54446/5 "2023-04-26T10:32:29Z")

</div>

Closed on April 26, 2023, 10:32am UTC

This topic was automatically closed 14 days after the last reply. New replies are no longer allowed.
