# How to set the SetTimeWindow's time to microsecond

**URL:** <https://root-forum.cern.ch/t/how-to-set-the-settimewindows-time-to-microsecond/48323>\
**Category:** Garfield++\
**Created:** [January 10, 2022, 8:10am UTC](https://root-forum.cern.ch/t/how-to-set-the-settimewindows-time-to-microsecond/48323 "2022-01-10T08:10:31Z")\
**Posts on this page:** 8\
**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 10, 2022, 8:10am UTC](https://root-forum.cern.ch/t/how-to-set-the-settimewindows-time-to-microsecond/48323/1 "2022-01-10T08:10:32Z")

</div>

the parameters units are all about nanosecond, but the sampling time about the detector is about 100 microsecond.So how can I set the range from 0 to 100 microsecond in the X axis.

![image](https://root-forum.cern.ch/uploads/default/original/3X/7/6/76419ea218253a59c5abf681c2dee99013a8ef12.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:** [January 10, 2022, 8:25am UTC](https://root-forum.cern.ch/t/how-to-set-the-settimewindows-time-to-microsecond/48323/2 "2022-01-10T08:25:11Z")

</div>

100 μs = 100000 ns

---

<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 10, 2022, 9:04am UTC](https://root-forum.cern.ch/t/how-to-set-the-settimewindows-time-to-microsecond/48323/3 "2022-01-10T09:04:21Z")

</div>

Hi,  
Thanks for your reply  
how to set the nTimeBins, I don’t know which value is suitable, and dose the nTimeBins mean the gap between two times?  
 ![image](https://root-forum.cern.ch/uploads/default/original/3X/a/6/a6a4384e29669315fe96382bc7fb2b5211824828.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:** [January 10, 2022, 9:17am UTC](https://root-forum.cern.ch/t/how-to-set-the-settimewindows-time-to-microsecond/48323/4 "2022-01-10T09:17:41Z")

</div>

No, `nTimeBins` is the number of time steps/intervals (as you can also see from the screenshot of the doxygen documentation in your previous post).

---

<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 10, 2022, 12:26pm UTC](https://root-forum.cern.ch/t/how-to-set-the-settimewindows-time-to-microsecond/48323/5 "2022-01-10T12:26:11Z")

</div>

Hi,  
Thanks a lot for your reply  
Can I think the interval as a dead time?  
I have deleted the code about the drift line and the change the time window, but the current is still a line along the X axis.

 ![image](https://root-forum.cern.ch/uploads/default/original/3X/8/e/8eadc9c94d9bfe29cb0e56b3093955cd21ef486d.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:** [January 10, 2022, 12:47pm UTC](https://root-forum.cern.ch/t/how-to-set-the-settimewindows-time-to-microsecond/48323/6 "2022-01-10T12:47:37Z")

</div>

> [@](#):
>
> Can I think the interval as a dead time?

No. The calculation of the induced current is done in fixed-width time bins.The point of the function `SetTimeWindow` is to set the time range within which the calculation of the induced current is done and the bin width. Please try to read the available documentation on the website (e. g. [Signals |&nbsp;Garfield++](https://garfieldpp.web.cern.ch/garfieldpp/examples/signals/)) or the user guide.

> [@](#):
>
> but the current is still a line along the X axis.

There might be an issue with your weighting field map. Can you attach it? I will try to take a look but I’m not sure when I’ll be able to do that.

---

<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 10, 2022, 1:05pm UTC](https://root-forum.cern.ch/t/how-to-set-the-settimewindows-time-to-microsecond/48323/7 "2022-01-10T13:05:13Z")

</div>

Hi,  
Thanks a lot for your reply  
I will send the weight1.lis files to your email, and Thanks a lot for your help.

---

<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:** [January 24, 2022, 1:05pm UTC](https://root-forum.cern.ch/t/how-to-set-the-settimewindows-time-to-microsecond/48323/8 "2022-01-24T13:05:18Z")

</div>

Closed on January 24, 2022, 1:05pm UTC

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