Back to home page

EIC code displayed by LXR

 
 

    


Warning, file /irt/delphes/scripts/delphes-etof.C was not indexed or was modified since last indexation (in which case cross-reference links may be missing, inaccurate or erroneous).

0001 
0002 //
0003 // Units are [mm], [GeV], [T], [ps];
0004 //
0005 // root -l delphes_etof.C
0006 //
0007 
0008 //#define _E_PI_SEPARATION_MODE_
0009 
0010 void delphes_etof( void )
0011 {
0012   //printf("%f\n", (1.0 - erf(1.5/(sqrt(2.)*1.0)))/2);
0013 
0014   auto etof = new DelphesConfigTOF("ETOF");
0015   //etof->UsePtMode();
0016 
0017   // Define particle mass hypotheses in ascending mass order; yes, there is no 
0018   // reason to overcomplicate things;
0019   //#ifdef _E_PI_SEPARATION_MODE_
0020   etof->AddMassHypothesis(-11);
0021   //#endif
0022   etof->AddMassHypothesis("pi+");
0023   //#ifndef _E_PI_SEPARATION_MODE_
0024   //etof->AddMassHypothesis("K+");
0025   //etof->AddMassHypothesis("proton");
0026   //#endif
0027 
0028   // Define t0 and detector time resolution is [ps];
0029   //etof->SetT0Resolution        (20.00);
0030   etof->SetT0Resolution        (25.00);
0031   //etof->SetDetectorResolution  (30.00);
0032   etof->SetDetectorResolution  (20.00);
0033   // dp/p ~ 0.02% * p + 0.5%; take the proposal draft TEMPLATE data; assume holds for Pt;
0034   //etof->SetMomentumResolution  (0.020, 0.500);
0035   // FIXME: assume ideal tracker for now;
0036   etof->SetMomentumResolution  (0.000, 0.000);
0037   // Units are [mm] throughout the code;
0038   etof->SetPathLengthResolution(1.000);
0039 
0040   // Installation radius in [mm]; constant magnetic field in [T];
0041   //etof->SetInstallationRadius  (500.0);
0042   //etof->SetMagneticField       (3.000);
0043   etof->SetInstallationDistance(1607.0);
0044 
0045   // eta and momentum range and binning; 
0046   etof->SetEtaRange     (-3.50, -1.60,  5);
0047   // Do not mind to use Pt rather than 1/Pt bins; [GeV/c];
0048   //#ifdef _E_PI_SEPARATION_MODE_
0049   etof->SetMomentumRange( 0.20,  2.00,  5);
0050   //#else
0051   //etof->SetMomentumRange( 0.22, 2.20,  10);
0052   //#endif
0053 
0054   // This input is sufficient to allocate the internal tables and calculate 
0055   // time of flight for various mass hypotheses;
0056   etof->DoSigmaCalculations();
0057   
0058   // This is again some generic stuff;
0059   //etof->Print();
0060   etof->WriteTcl();
0061   {
0062     auto fout = new TFile("ETOF.root", "RECREATE");
0063     etof->Write();
0064     fout->Close();
0065   }
0066   exit(0);
0067 } // delphes_etof()