# Questions about the TrimSignal.c

**URL:** <https://root-forum.cern.ch/t/questions-about-the-trimsignal-c/48434>\
**Category:** Garfield++\
**Created:** [January 18, 2022, 1:06pm UTC](https://root-forum.cern.ch/t/questions-about-the-trimsignal-c/48434 "2022-01-18T13:06:24Z")\
**Posts on this page:** 6\
**Page:** 1

<div class="post-metadata">

**Author:** ![XiCheng](https://root-forum.cern.ch/letter_avatar_proxy/v4/letter/x/aca169/32.png) [@XiCheng](https://root-forum.cern.ch/u/XiCheng)\
**Post date:** [January 18, 2022, 1:06pm UTC](https://root-forum.cern.ch/t/questions-about-the-trimsignal-c/48434/1 "2022-01-18T13:06:24Z")

</div>

In the code below, the double ec is defined, but the ec is not used in the later procedure

```auto
 // Simulate an ion track.
  tr.NewTrack(0., 0., 0., 0., 0., 1., 0.);
  // Loop over the clusters.
  double xc, yc, zc, tc, ec, ekin;
  int ne = 0;
  while (tr.GetCluster(xc, yc, zc, tc, ne, ec, ekin)) {
    // Simulate electron and ion drift lines starting 
    // from the cluster position. 
    // Scale the induced current by the number of electron/ion pairs 
    // in the cluster.
    drift.SetElectronSignalScalingFactor(ne);
    drift.DriftElectron(xc, yc, zc, tc);
    drift.SetHoleSignalScalingFactor(ne);
    drift.DriftHole(xc, yc, zc, tc);
  }

```

---

<div class="post-metadata">

**Author:** ![couet](https://root-forum.cern.ch/user_avatar/root-forum.cern.ch/couet/32/12037_2.png) [@couet](https://root-forum.cern.ch/u/couet)\
**Post date:** [January 18, 2022, 2:16pm UTC](https://root-forum.cern.ch/t/questions-about-the-trimsignal-c/48434/2 "2022-01-18T14:16:29Z")

</div>

I think @hschindl can help you.

---

<div class="post-metadata">

**Author:** ![XiCheng](https://root-forum.cern.ch/letter_avatar_proxy/v4/letter/x/aca169/32.png) [@XiCheng](https://root-forum.cern.ch/u/XiCheng)\
**Post date:** [January 18, 2022, 2:36pm UTC](https://root-forum.cern.ch/t/questions-about-the-trimsignal-c/48434/3 "2022-01-18T14:36:04Z")

</div>

Thanks a lot ~~

---

<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:** [January 18, 2022, 4:15pm UTC](https://root-forum.cern.ch/t/questions-about-the-trimsignal-c/48434/4 "2022-01-18T16:15:30Z")

</div>

Yes, the function also returns the energy deposit in the cluster (`ec`) but that information is not used in this particular example.

---

<div class="post-metadata">

**Author:** ![XiCheng](https://root-forum.cern.ch/letter_avatar_proxy/v4/letter/x/aca169/32.png) [@XiCheng](https://root-forum.cern.ch/u/XiCheng)\
**Post date:** [January 22, 2022, 7:38am UTC](https://root-forum.cern.ch/t/questions-about-the-trimsignal-c/48434/5 "2022-01-22T07:38:14Z")

</div>

Ah, I know , Thanks a lot for your reply.

---

<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:** [February 5, 2022, 7:39am UTC](https://root-forum.cern.ch/t/questions-about-the-trimsignal-c/48434/6 "2022-02-05T07:39:04Z")

</div>

Closed on February 5, 2022, 7:39am UTC

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