# What will Sensor::GetSignal() give if multiple wires have same label

**URL:** <https://root-forum.cern.ch/t/what-will-sensor-getsignal-give-if-multiple-wires-have-same-label/50602>\
**Category:** Garfield++\
**Created:** [June 30, 2022, 2:52am UTC](https://root-forum.cern.ch/t/what-will-sensor-getsignal-give-if-multiple-wires-have-same-label/50602 "2022-06-30T02:52:01Z")\
**Posts on this page:** 9\
**Page:** 1

<div class="post-metadata">

**Author:** ![Crisps](https://root-forum.cern.ch/user_avatar/root-forum.cern.ch/crisps/32/39101_2.png) [@Crisps](https://root-forum.cern.ch/u/Crisps)\
**Post date:** [June 30, 2022, 2:52am UTC](https://root-forum.cern.ch/t/what-will-sensor-getsignal-give-if-multiple-wires-have-same-label/50602/1 "2022-06-30T02:52:02Z")

</div>

Hi, I was trying to use AvalancheMC to simulate signal on a sense wire, I set up 9 cells with 9 sense wires, and add them to Sensor with the same label “sense”.

```auto
Sensor::Addwire(some properties, "sense")
Sensor:Addwire(some properties, "field")
Sensor::AddReadout("sense")
Sensor::AddElectrode("sense")

```

When I tried to get signal after simulation I got no signal. I wonder which wire’s signal I will get if I use

```auto
ViewSignal::PlotSignal("sense",1)

```

And then I changed label to only use center sense wire like

```auto
Sensor::Addwire(some properties, "center_sense")
Sensor::Addwire(some properties, "sense")
Sensor:Addwire(some properties, "field")
Sensor::AddReadout("center_sense")
Sensor::AddElectrode("center_sense")

```

but I still got no signal. Where I did wrong?

---

<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:** [June 30, 2022, 4:45am UTC](https://root-forum.cern.ch/t/what-will-sensor-getsignal-give-if-multiple-wires-have-same-label/50602/2 "2022-06-30T04:45:25Z")

</div>

If you use the same label for multiple wires you will get the sum of the signals on these wires.

> [@Crisps](#):
>
> I still got no signal. Where I did wrong?

Can you provide more information (minimal working example)?

---

<div class="post-metadata">

**Author:** ![Crisps](https://root-forum.cern.ch/user_avatar/root-forum.cern.ch/crisps/32/39101_2.png) [@Crisps](https://root-forum.cern.ch/u/Crisps)\
**Post date:** [June 30, 2022, 11:34am UTC](https://root-forum.cern.ch/t/what-will-sensor-getsignal-give-if-multiple-wires-have-same-label/50602/3 "2022-06-30T11:34:32Z")

</div>

[xt\_simulation.zip](https://root-forum.cern.ch/uploads/short-url/7LmIVTCaYGQSfwpL2xN3ajXK3kJ.zip) (37.5 KB)  
Here you go, I didn’t convolute signal but maybe it doesn’t matter…

---

<div class="post-metadata">

**Author:** ![Crisps](https://root-forum.cern.ch/user_avatar/root-forum.cern.ch/crisps/32/39101_2.png) [@Crisps](https://root-forum.cern.ch/u/Crisps)\
**Post date:** [July 1, 2022, 1:50am UTC](https://root-forum.cern.ch/t/what-will-sensor-getsignal-give-if-multiple-wires-have-same-label/50602/4 "2022-07-01T01:50:16Z")

</div>

I just noticed I set the time window quite narrow, so I tried to widen it to 1000 ns but still got no signal.

---

<div class="post-metadata">

**Author:** ![Crisps](https://root-forum.cern.ch/user_avatar/root-forum.cern.ch/crisps/32/39101_2.png) [@Crisps](https://root-forum.cern.ch/u/Crisps)\
**Post date:** [July 1, 2022, 2:46am UTC](https://root-forum.cern.ch/t/what-will-sensor-getsignal-give-if-multiple-wires-have-same-label/50602/5 "2022-07-01T02:46:53Z")

</div>

Just another thing I forgot to mention…  
when simulating avalanche the output keep giving like

```auto
AvalancheMC::DriftLine: (-0.000965, -0.000795, -0.749725) is not in a valid drift region.

```

of generated electrons, and seems that these avalanched electrons are inside anode wire, which I don’t understand.

---

<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:** [July 1, 2022, 4:58am UTC](https://root-forum.cern.ch/t/what-will-sensor-getsignal-give-if-multiple-wires-have-same-label/50602/6 "2022-07-01T04:58:01Z")

</div>

Thanks for the additional information and thanks also for sending your code but I was hoping for a **minimal** example, not your full program/framework “as is” (which makes it much harder for me to debug). I can still try to take a look but I’m not sure when I’ll have the time to do that…

---

<div class="post-metadata">

**Author:** ![Crisps](https://root-forum.cern.ch/user_avatar/root-forum.cern.ch/crisps/32/39101_2.png) [@Crisps](https://root-forum.cern.ch/u/Crisps)\
**Post date:** [July 1, 2022, 5:56am UTC](https://root-forum.cern.ch/t/what-will-sensor-getsignal-give-if-multiple-wires-have-same-label/50602/7 "2022-07-01T05:56:23Z")

</div>

Sorry for this! I just noticed I somehow miss the wire ID so I actually didn’t set the wire to **Sensor::AddReadout()**.  
Such a dumb mistake, thank you anyway!

---

<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:** [July 1, 2022, 6:07am UTC](https://root-forum.cern.ch/t/what-will-sensor-getsignal-give-if-multiple-wires-have-same-label/50602/8 "2022-07-01T06:07:21Z")

</div>

No worries. Great that you managed to fix the issue!

---

<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:** [July 15, 2022, 6:07am UTC](https://root-forum.cern.ch/t/what-will-sensor-getsignal-give-if-multiple-wires-have-same-label/50602/9 "2022-07-15T06:07:40Z")

</div>

Closed on July 15, 2022, 6:07am UTC

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