# Questions about ViewSignal Class

**URL:** <https://root-forum.cern.ch/t/questions-about-viewsignal-class/55129>\
**Category:** Garfield++\
**Created:** [June 1, 2023, 10:02am UTC](https://root-forum.cern.ch/t/questions-about-viewsignal-class/55129 "2023-06-01T10:02:03Z")\
**Posts on this page:** 4\
**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:** [June 1, 2023, 10:02am UTC](https://root-forum.cern.ch/t/questions-about-viewsignal-class/55129/1 "2023-06-01T10:02:03Z")

</div>

The following codes are from ViewSignal.hh

```auto
 // Colours.
  short m_colTotal = kBlue + 3;
  short m_colElectrons = kOrange - 3;
  short m_colIons = kRed + 1;

```

This is the induction signal diagram I draw.

 ![image](https://root-forum.cern.ch/uploads/default/original/3X/6/e/6eeea351bfce28d1ab8909eec666ddd337fbd62d.png)  
In my program, signal is caused by negative ion and the curve should be red. However, I get an orange one which means it is caused by electrons. Besides,the red curve is close to 0. I am very confused about this.  
**Does the ViewSignal class consider signals caused by negative ion ?**

This is the driftline I got，and I set **driftView-\>SetColourIons(kBlue);**

 ![image](https://root-forum.cern.ch/uploads/default/original/3X/f/b/fba28d22dab81d90fb83cc372c567484c6c52226.png)

---

<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 1, 2023, 4:06pm UTC](https://root-forum.cern.ch/t/questions-about-viewsignal-class/55129/2 "2023-06-01T16:06:58Z")

</div>

Yes, that’s a bit confusing. What’s called “electron current” in the `Sensor` class and the `ViewSignal` class is actually the current induced by all particles with negative charge (i. e. electrons and negative ions), and the “ion current” is the signal induced by positively charged particles (ions/holes).

---

<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:** [June 2, 2023, 12:45am UTC](https://root-forum.cern.ch/t/questions-about-viewsignal-class/55129/3 "2023-06-02T00:45:37Z")

</div>

Thanks a lot for your reply，I understand it.

---

<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:** [June 16, 2023, 12:45am UTC](https://root-forum.cern.ch/t/questions-about-viewsignal-class/55129/4 "2023-06-16T00:45:46Z")

</div>

Closed on June 16, 2023, 12:45am UTC

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