Unexpexted signal shape of MDT tube

Dear experts,

I am working on the simulation for a MDT tube.And I useTrackHeed' and 'DriftLineRKFmodule. I expext the shape of the signal (without convolution) should have a rising edge sharper than falling edge but actually not. Could you help me to figure it out?

  // Make a sensor.
  Sensor sensor;
  // sensor.EnableDebugging();
  sensor.AddComponent(&fm);
  sensor.AddElectrode(&fm,"s");
  sensor.SetArea(
    -1, -1, 0,
    1, 1, 30
  );
  const double tmax = 2000;
  const double tmin = 200;
  const unsigned int nbins = 80000;
  const double tstep = (tmax-tmin)/nbins;
  sensor.SetTimeWindow(tmin, tstep, nbins);
  // Set the delta reponse function.
  if (!readTransferFunction(sensor)) return 0;
  sensor.ClearSignal();
  TrackHeed track;
  track.SetParticle("muon");
  track.SetEnergy(0.5e9);
  track.SetSensor(&sensor);

  // // RKF integration.
  DriftLineRKF drift(&sensor);
  drift.SetGainFluctuationsPolya(0., 20000.);
  drift.EnableIonTail();

 TCanvas* cD = nullptr;
  ViewDrift driftView;
  constexpr bool plotDrift = true;
  if (plotDrift) {
    cD = new TCanvas("cD", "", 600, 600);
    driftView.SetCanvas(cD);
    drift.EnablePlotting(&driftView);
    track.EnablePlotting(&driftView);
    // cD->SaveAs("tubedrift.png")
  }
 
  TCanvas* cS = nullptr;
  TCanvas* cS1 = nullptr;

  constexpr bool plotSignal = true;
  if (plotSignal) {
    cS = new TCanvas("cS", "", 3200, 2400);
    cS1 = new TCanvas("cS1", "", 3200, 2400);
  }


  
  const double x0 = rTrack;
  const double y0 = -sqrt(rTube * rTube - rTrack * rTrack);
  const unsigned int nTracks = 5;

  for (unsigned int j = 0; j < nTracks; ++j) {
    std::ofstream outfile_cluster_time;
    TString cluster_time_filename;
    cluster_time_filename.Form("cluster_time_%d.txt",j);
    outfile_cluster_time.open(data_path+cluster_time_filename, std::ios::out);
    sensor.ClearSignal();
    track.NewTrack(x0, y0, 15, 0, 0, 1, 0);
    for (const auto& cluster : track.GetClusters()) {
      double tmin = std::numeric_limits<double>::max();
      for (const auto& electron : cluster.electrons) {
        drift.DriftElectron(electron.x, electron.y, electron.z, electron.t);
        
        double xf = 0., yf = 0., zf = 0., tf = 0.;
        int stat = 0;
        drift.GetEndPoint(xf, yf, zf, tf, stat);
        tmin = std::min(tmin, tf);
        drift.DriftIon(electron.x, electron.y, electron.z, electron.t);
        // std::cout<<electron.e<<std::endl;
      }
      outfile_cluster_time << tmin  << "\n";
    }
    if (plotDrift) {
      cD->Clear();
      // cmp.PlotCell(cD);
      ViewFEMesh* meshView = new ViewFEMesh(&fm);
      meshView->SetArea(-1,-1,0,1,1,30);
      meshView->SetCanvas(cD);
      // x-z projection.
      meshView->SetPlane(0, 0, 1, 0, 0, 0);
      meshView->SetFillMesh(true);
      // Set the color of the kapton and the metal.
      meshView->SetColor(1, kYellow + 3);
      meshView->SetColor(2, kGray);
      meshView->EnableAxes();
      meshView->Plot();
      // cd->SaveAs("Mesh.png");
      constexpr bool twod = true;
      constexpr bool drawaxis = false;
      driftView.Plot(twod, drawaxis);
      cD->SaveAs("tubedrift.png");
    }
    // sensor.ConvoluteSignals();
    int nt = 0;
    if (!sensor.ComputeThresholdCrossings(-0.5, "s", nt)) continue;
    if (plotSignal){

      std::cout<<"print signal"<<std::endl;
      ViewSignal signalView;
      signalView.SetCanvas(cS);
      // signalView.EnableLegend();
      signalView.SetSensor(&sensor);
      signalView.PlotSignal("s","tei");
      sensor.PlotSignal("s", cS1,"t");
      TString fig1_name;
      fig1_name.Form("te_noCon_thr0_%d.png",j);
      TString fig2_name;
      fig2_name.Form("t_noCon_thr0_%d.png",j);
      cS->SaveAs(data_path+fig1_name);
      cS1->SaveAs(data_path+fig2_name);
    }

1 Like

Hi,
I guess you are referring to the signal induced by the electrons (the “spikes” in your plot)? What shape would you expect?

Hi, it refers to the spike. I think the rising edge should be steeper than falling edge.
Thank you so much!

Dear @Linnuo can you provide a piece of code that reproduce the problem? Maybe you are not plotting the ion tails. Did you load the ion drift velocity. Can you try to plot the electron signal and ion signal separately?
greets
Piet

Dear Piet,

Thank you so much. I rechecked the configuration and find that my geometry has some problem and electric field near the wire is not high enough to got the avalanche. Now I have solved it.

Best,
Linnuo

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