FairRoot/PandaRoot
Public Member Functions | Private Attributes | List of all members
PndSttSingleStraw Class Reference

#include <PndSttSingleStraw.h>

Inheritance diagram for PndSttSingleStraw:

Public Member Functions

 PndSttSingleStraw ()
 
virtual ~PndSttSingleStraw ()
 
 ClassDef (PndSttSingleStraw, 1)
 
Double_t GetCDist (Int_t k)
 
Double_t GetCNele (Int_t k)
 
Double_t GetCNeleT (Int_t k)
 
Double_t GetTeleTime (Int_t k)
 
Double_t GetPulse (Int_t k)
 
Double_t GetPulseT (Int_t k)
 
Double_t GetWi ()
 
Double_t GetGasGain ()
 
Double_t GetXmax ()
 
Double_t GetDx ()
 
Double_t GetEmed ()
 
Double_t GetEmin ()
 
Double_t GetNcl ()
 
Double_t GetCsi ()
 
Double_t GetDelta ()
 
Double_t GetEmax ()
 
Double_t GetIAr ()
 
Int_t GetNNClus ()
 
Int_t GetNchann ()
 
Double_t GetPulseMax ()
 
Double_t GetGamma ()
 
Double_t GetBeta ()
 
Double_t GetpSTP ()
 
Double_t GetPulseTime ()
 
Double_t GetbPolya ()
 
Double_t GetSigUrb ()
 
Double_t GetNUrban ()
 
Double_t GetEup ()
 
Double_t GetAvUrb ()
 
Double_t GetXin ()
 
Double_t GetYin ()
 
Double_t GetZin ()
 
Double_t GetXout ()
 
Double_t GetYout ()
 
Double_t GetZout ()
 
Double_t GetRpath ()
 
TVector3 GetWDist (Int_t k)
 
void PutTrackXYZ (Double_t v1, Double_t v2, Double_t v3, Double_t v4, Double_t v5, Double_t v6)
 
void PutRpath (Double_t value)
 
void PutPolya (Double_t par)
 
void PutRadius (Double_t value)
 
void PutPress (Double_t value)
 
void PutWireXYZ (Double_t w1, Double_t w2, Double_t w3, Double_t w4, Double_t w5, Double_t w6)
 
Double_t PartToTime (Double_t Mass, Double_t Momentum, Double_t InOut[])
 
Double_t PartToADC ()
 
Double_t FastRec (Double_t TrueDcm, Int_t Flag)
 
Double_t FastPartToADC ()
 
void TConst (Double_t Radius, Double_t pSTP, Double_t ArP, Double_t CO2P)
 
void TInit (Double_t Mass, Double_t Momentum, Double_t InOut[])
 
Double_t StrawCharge ()
 
Int_t StrawSignal (Int_t nsteps)
 
Int_t StrawTime ()
 
Int_t StrawTot ()
 
Double_t TimnsToDiscm (Double_t time)
 
void TDirCos ()
 
Double_t TrueDist (Double_t Point[])
 
Double_t DiffLong (Double_t distcm)
 
Double_t DiffTran (Double_t distcm)
 
void Polya (Double_t bpar)
 
Double_t PolyaSamp ()
 
Double_t RRise (Double_t gamma)
 
Int_t Cluster ()
 
Int_t Eject ()
 
TVector3 WDistCalc (Double_t d)
 
Double_t Signal (Double_t t, Double_t t0)
 
Double_t STEloss ()
 
Double_t STUrban ()
 
Int_t TimeEle ()
 
Double_t DistEle (Double_t tns)
 

Private Attributes

std::vector< Double_tCDist
 
std::vector< Double_tCDistC
 
std::vector< Double_tCNele
 
std::vector< Double_tCNeleT
 
std::vector< Double_tTeleTime
 
std::vector< Double_tAmplSig
 
std::vector< Double_tPulse
 
std::vector< Double_tPulseT
 
std::vector< TVector3 > WDist
 
Double_t CumClus [21]
 
Double_t CH4Clus [20]
 
Double_t Wi
 
Double_t ArPerc
 
Double_t CO2Perc
 
Double_t CH4Perc
 
Double_t ArWPerc
 
Double_t CO2WPerc
 
Double_t CH4WPerc
 
Double_t pSTP
 
Double_t Radius
 
Int_t Field
 
Double_t AAr
 
Double_t ZAr
 
Double_t RhoAr
 
Double_t NclAr
 
Double_t EmedAr
 
Double_t EminAr
 
Double_t EmpAr
 
Double_t CsiAr
 
Double_t IAr
 
Double_t WiAr
 
Double_t Ncl
 
Double_t Ecl
 
Double_t Lcl
 
Double_t Ntote
 
Double_t GasGain
 
Double_t Cutoff
 
Double_t EmedCO2
 
Double_t EminCO2
 
Double_t EmpCO2
 
Double_t CsiCO2
 
Double_t ACO2
 
Double_t ZCO2
 
Double_t RhoCO2
 
Double_t ICO2
 
Double_t WiCO2
 
Double_t NclCO2
 
Double_t EmedCH4
 
Double_t EmpCH4
 
Double_t CsiCH4
 
Double_t EminCH4
 
Double_t ACH4
 
Double_t ZCH4
 
Double_t RhoCH4
 
Double_t ICH4
 
Double_t WiCH4
 
Double_t NclCH4
 
Double_t RhoMixCO2
 
Double_t RhoMixCH4
 
Double_t PZeta
 
Double_t piMass
 
Double_t PMass
 
Double_t PMom
 
Double_t Dx
 
Double_t eMass
 
Double_t prMass
 
Double_t Delta
 
Int_t CNumb
 
Double_t PEn
 
Double_t beta
 
Double_t gamma
 
Double_t Emed
 
Double_t Emin
 
Double_t Csi
 
Double_t Emax
 
Double_t Emp
 
Int_t NNClus
 
Double_t PolyaCum [100]
 
Double_t Xs [100]
 
Double_t Xin
 
Double_t Yin
 
Double_t Zin
 
Double_t Xout
 
Double_t Yout
 
Double_t Zout
 
Double_t Rpath
 
Int_t NPolya
 
Double_t Xmax
 
Double_t bPolya
 
Double_t Calpha
 
Double_t Cbeta
 
Double_t Cgamma
 
Double_t NUrban
 
Double_t SigUrb
 
Double_t Eup
 
Double_t AvUrb
 
Double_t Wx1
 
Double_t Wy1
 
Double_t Wz1
 
Double_t Wx2
 
Double_t Wy2
 
Double_t Wz2
 
Double_t Wp
 
Double_t Wq
 
Double_t Wr
 
Double_t PulseMax
 
Double_t PulseTime
 
Double_t PulseTime1
 
Double_t Thresh1
 
Double_t Thresh2
 
Double_t OffT
 
Int_t Nchann
 
Double_t Out1
 
Double_t Out4
 
Int_t Out2
 
Int_t Out3
 

Detailed Description

Definition at line 18 of file PndSttSingleStraw.h.

Constructor & Destructor Documentation

PndSttSingleStraw::PndSttSingleStraw ( )

Definition at line 105 of file PndSttSingleStraw.cxx.

105  {
106 
107  CNumb=0;
108  memset(CumClus,0,sizeof(CumClus));
109  memset(CH4Clus,0,sizeof(CH4Clus));
110  memset(PolyaCum,0,sizeof(PolyaCum));
111  memset(Xs,0,sizeof(Xs));
112 
113  // class constructor
114 
115  // clear
116  CNumb=0;
117  CDist.clear();
118  CDistC.clear();
119  CNele.clear();
120  CNeleT.clear();
121  TeleTime.clear();
122  AmplSig.clear();
123  Pulse.clear();
124  PulseT.clear();
125  WDist.clear();
126 }
Double_t PolyaCum[100]
std::vector< Double_t > CDist
std::vector< TVector3 > WDist
std::vector< Double_t > CNeleT
std::vector< Double_t > Pulse
std::vector< Double_t > CNele
std::vector< Double_t > PulseT
std::vector< Double_t > TeleTime
std::vector< Double_t > CDistC
std::vector< Double_t > AmplSig
virtual PndSttSingleStraw::~PndSttSingleStraw ( )
inlinevirtual

Definition at line 24 of file PndSttSingleStraw.h.

24 {};

Member Function Documentation

PndSttSingleStraw::ClassDef ( PndSttSingleStraw  ,
 
)
Int_t PndSttSingleStraw::Cluster ( )

Definition at line 536 of file PndSttSingleStraw.cxx.

References Double_t, and log().

536  {
537 
538  // calculate the number of clusters CNumb
539  // their distance CDist and
540  // their number of electrons CNele
541 
542  CNumb=0;
543  CDist.clear();
544  CDistC.clear();
545  CNele.clear();
546 
547  Double_t DisTot = 0;
548 
549  for(Int_t k=1; k<=1000; k++) {
550  // distance
551 
552  Double_t path = -Lcl*log(1-gRandom->Uniform()+0.000001);
553  DisTot+= path;
554  if(DisTot>Dx) break;
555  CNumb=k;
556  CDist.push_back(path);
557  CDistC.push_back(DisTot);
558  CNele.push_back((Double_t)Eject() );
559  }
560 
561  return CNumb;
562 }
std::vector< Double_t > CDist
friend F32vec4 log(const F32vec4 &a)
Definition: P4_F32vec4.h:110
Double_t
std::vector< Double_t > CNele
std::vector< Double_t > CDistC
Double_t PndSttSingleStraw::DiffLong ( Double_t  distcm)

Definition at line 1299 of file PndSttSingleStraw.cxx.

References Double_t.

1299  {
1300 
1301  // return the longitudinal diffusion
1302  // from cm to microns
1303  // MAGY GARFIELD Ar/CO2 90/10 1 bar (NTP) 20-7-2006
1304  //
1305  Double_t DiffMic;
1306 
1307  if(pSTP<1.9){
1308  if(Radius < 0.5){
1309  // 4 mm 1600 V 90/10
1310  DiffMic = 0.896 + 1387.*Distcm - 1.888e+04*pow(Distcm,2)
1311  + 1.799e+05*pow(Distcm,3) - 9.848e+05*pow(Distcm,4)
1312  + 3.009e+06*pow(Distcm,5) - 4.777e+06*pow(Distcm,6)
1313  + 3.074e+06*pow(Distcm,7);
1314  }
1315  else{
1316  // 5 mm 1600 V
1317  DiffMic = 1.537 + 1246.*Distcm - 1.357e+04*pow(Distcm,2)
1318  + 1.049e+05*pow(Distcm,3) - 4.755e+05*pow(Distcm,4)
1319  + 1.211e+06*pow(Distcm,5) - 1.6e+06*pow(Distcm,6)
1320  + 8.533e+05*pow(Distcm,7);
1321  }
1322  }
1323 
1324  else{
1325  // 2000V 5 mm 2 bar 80/20
1326  DiffMic = 2.135 +818.*Distcm - 1.044e+04*pow(Distcm,2)
1327  + 8.31e+04*pow(Distcm,3) - 3.492e+05*pow(Distcm,4)
1328  + 7.959e+05*pow(Distcm,5) - 9.378e+05*pow(Distcm,6)
1329  + 4.492e+05*pow(Distcm,7);
1330  }
1331  return DiffMic;
1332 }
Double_t
Double_t PndSttSingleStraw::DiffTran ( Double_t  distcm)

Definition at line 1336 of file PndSttSingleStraw.cxx.

References Double_t.

1336  {
1337 
1338  // return the transverse diffusion in microns
1339  // from cm to microns
1340  // MAGY GARFIELD Ar/CO2 90/10 1 bar (NTP) 20-7-2006
1341  //
1342  Double_t DiffMic;
1343 
1344  if(pSTP<1.9){
1345  if(Radius < 0.5){
1346  // 4 mm 1600 V 90/10
1347 // DiffMic = + 0.8513 + 1648.*Distcm - 1.085e+04*pow(Distcm,2)
1348 // + 7.38e+04*pow(Distcm,3) - 3.025e+05*pow(Distcm,4)
1349 // + 6.067e+05*pow(Distcm,5) - 4.643e+04*pow(Distcm,6);
1350  DiffMic = + 1.482 + 1529.*Distcm - 6755.*pow(Distcm,2)
1351  + 2.924e+04*pow(Distcm,3) - 0.9246e+05*pow(Distcm,4)
1352  + 1.548e+05*pow(Distcm,5) - 1.002e+05*pow(Distcm,6);
1353  }
1354  else{
1355  // 5 mm 1600 V 90/10
1356  DiffMic = + 1.482 + 1529.*Distcm - 6755.*pow(Distcm,2)
1357  + 2.924e+04*pow(Distcm,3) - 0.9246e+05*pow(Distcm,4)
1358  + 1.548e+05*pow(Distcm,5) - 1.002e+05*pow(Distcm,6);
1359  }
1360  }
1361  else{
1362 
1363  // 5 mm 2000 V 2 bar 80/20
1364  DiffMic = +2.094 + 1138.*Distcm - 7557.*pow(Distcm,2)
1365  + 2.968e+04*pow(Distcm,3) - 6.577e+04*pow(Distcm,4)
1366  + 7.581e+04*pow(Distcm,5) - 3.497e+04*pow(Distcm,6);
1367  }
1368  return DiffMic;
1369 }
Double_t
Double_t PndSttSingleStraw::DistEle ( Double_t  tns)

Definition at line 1373 of file PndSttSingleStraw.cxx.

References Double_t.

1373  {
1374 
1375  // dist in cm from time in ns for pSTP =1 and pSTP=2
1376  // utility routine for the >SINGLE< electron reconstruction
1377  //last update: A. Rotondi 20-7-2006
1378 
1379  Double_t drift;
1380 
1381  // 1 absolute atm (NTP) 20-7-2006 GARFIELd Ar/CO2 90/10 MAGY
1382  // ns --> cm
1383 
1384  time *= 0.001; // time in micro s
1385 
1386  if(pSTP < 2.) {
1387  if(Radius <0.5){
1388  // 1600 V 4 mm 90/10
1389  drift = 0.001629 + 6.194*time
1390  - 56.55*pow(time,2) + 355.8*pow(time,3)
1391  - 903.2*pow(time,4);
1392  }
1393  else{
1394  // 1600 V 5 mm 90/10
1395  drift = 0.003365 + 5.734*time
1396  - 41.88*pow(time,2) + 191.2*pow(time,3)
1397  - 333.4*pow(time,4) ;
1398  }
1399  }
1400 
1401  else {
1402 
1403  // 2 absolute atm 2000 V 5 mm 80/20 (1 bar overpressure)
1404 
1405  drift = 0.003365 + 7.056*time
1406  - 62.28*pow(time,2) + 306.1*pow(time,3)
1407  - 558.7*pow(time,4);
1408 
1409  }
1410  return drift; // in cm
1411 
1412 }
Double_t
Int_t PndSttSingleStraw::Eject ( )

Definition at line 566 of file PndSttSingleStraw.cxx.

References Double_t.

566  {
567  // find the number of electrons in a cluster
568  Int_t Inelect;
569  Double_t nelect=0.;
570 
571  nelect= TMath::BinarySearch(21,CumClus,gRandom->Uniform());
572  if(nelect<19) {
573  return Inelect = (Int_t) (nelect) +1;
574  }
575  else {
576  // long delta electron tail
577  return Inelect = (Int_t)(20./(1.03-gRandom->Uniform()));
578  }
579 }
Double_t
Double_t PndSttSingleStraw::FastPartToADC ( )

Definition at line 1153 of file PndSttSingleStraw.cxx.

References Double_t.

Referenced by PndSttHitProducerRealFast::Exec().

1153  {
1154 
1155  // return the energy loss (from the Urban distribution)
1156  // in the tube as charge signal
1157  // taking into account the Polya fluctuations
1158 
1159  Double_t ADCsignal=0.;
1160 
1161  // number of elecrons. Wi is the mean energy lost per free
1162  // electrn in eV
1163  Int_t NtotEle = (Int_t) (1.e+09 * STUrban()/Wi);
1164 
1165  for(Int_t j=1; j<= NtotEle; j++){
1166 
1167  ADCsignal += bPolya * GasGain * PolyaSamp();
1168 
1169  }
1170 
1171  return ADCsignal;
1172 }
Double_t
Double_t PndSttSingleStraw::FastRec ( Double_t  TrueDcm,
Int_t  Flag 
)

Definition at line 1176 of file PndSttSingleStraw.cxx.

References Double_t.

Referenced by PndSttHitProducerRealFast::Exec().

1176  {
1177 
1178  // having the true distance TrueDcm (cm) as input,
1179  // return the reconstructed distance (cm), in a fast
1180  // and approximated way
1181  // by sampling on the simulated reconstruction curve
1182  // When Press =2 and Flag=1 one uses the julich experimental data
1183  // A. Rotondi March 2007
1184  // When Press = 2 and Flag=2 one uses the juelich experimental data from COSY-TOF (Feb 2011)
1185  // When Press = 2 and Flag=3 one uses the juelich experimental data from the small setup
1186  // (Apr 2010)
1187 
1188 
1189  Double_t resmic;
1190 
1191  // 1 atm pressure
1192  if(pSTP < 1.9) {
1193  if(Radius < 0.45){
1194  if(TrueDcm < 0.38){
1195  resmic = 1.24506e+02 -1.80117e+02*TrueDcm
1196  +3.76905e+03*pow(TrueDcm,2) -4.63251e+04*pow(TrueDcm,3)
1197  +1.80068e+05*pow(TrueDcm,4) -2.21094e+05*pow(TrueDcm,5);
1198  }
1199  else resmic = 57.;
1200  }
1201  // radius > 0.4 cm
1202  else{
1203  // if(TrueDcm < 0.48){
1204  resmic = 1.53656e+02
1205  -5.07749e+03*TrueDcm
1206  +1.73707e+05*pow(TrueDcm,2)
1207  -2.72285e+06*pow(TrueDcm,3)
1208  +2.28719e+07*pow(TrueDcm,4)
1209  -1.12921e+08*pow(TrueDcm,5)
1210  +3.39427e+08*pow(TrueDcm,6)
1211  -6.12741e+08 *pow(TrueDcm,7)
1212  +6.12041e+08 *pow(TrueDcm,8)
1213  -2.60444e+08*pow(TrueDcm,9) ;
1214  // }
1215  // else resmic = 72.;
1216  }
1217  }
1218 
1219  // 2 atm pressure radius 5 cm
1220  else {
1221  if(Flag==0) {
1222  // data from simulation
1223  // if(TrueDcm < 0.48){
1224  resmic = +1.06966e+02
1225  -4.03073e+03 *TrueDcm
1226  +1.60851e+05 *pow(TrueDcm,2)
1227  -2.87722e+06 *pow(TrueDcm,3)
1228  +2.67581e+07 *pow(TrueDcm,4)
1229  -1.43397e+08 *pow(TrueDcm,5)
1230  +4.61046e+08 *pow(TrueDcm,6)
1231  -8.79170e+08 *pow(TrueDcm,7)
1232  +9.17095e+08 *pow(TrueDcm,8)
1233  -4.03253e+08 *pow(TrueDcm,9) ;
1234  // }
1235  // else resmic=30.;
1236  }
1237  else if (Flag==1) {
1238  // data from COSY-TOF (old)
1239  // if(TrueDcm < 0.48){
1240  resmic = +1.48048e+02
1241  -3.35951e+02*TrueDcm
1242  -1.87575e+03*pow(TrueDcm,2)
1243  +1.92910e+04*pow(TrueDcm,3)
1244  -6.90036e+04*pow(TrueDcm,4)
1245  +1.07960e+05*pow(TrueDcm,5)
1246  -5.90064e+04*pow(TrueDcm,6) ;
1247  // }
1248  // else resmic=65.;
1249  }
1250  else if (Flag==2) {
1251  // data from COSY-TOF (Feb 2011)
1252  // the parametrization comes from mm vs mm:
1253  // => TrueDcm must be in mm
1254  TrueDcm *= 10.; // cm -> mm
1255  // and resmic will be given in mm ...
1256 
1257  // old parametriz
1258  // resmic = +0.02152
1259  // +0.6764*TrueDcm
1260  // -1.008*pow(TrueDcm,2)
1261  // +0.7421*pow(TrueDcm,3)
1262  // -0.3036*pow(TrueDcm,4)
1263  // +0.06955*pow(TrueDcm,5)
1264  // -0.008327*pow(TrueDcm,6)
1265  // +0.0004049*pow(TrueDcm,7);
1266 
1267  // pol5 parametriz
1268  resmic = 0.188119
1269  + 0.00211993 * TrueDcm
1270  + 0.00336004 * pow(TrueDcm, 2)
1271  - 0.0103979 * pow(TrueDcm, 3)
1272  + 0.0033461 * pow(TrueDcm, 4)
1273  -0.000315764 * pow(TrueDcm, 5);
1274 
1275  // convert resmic to micron and TrueDcm to cm
1276  resmic *= 1000.;
1277  TrueDcm *= 0.1;
1278  }
1279  else {
1280  // data from juelich prototype
1281  resmic = 4.521331e-01
1282  -2.087216e-01 *10.*TrueDcm
1283  +4.911102e-02 *pow(10.*TrueDcm,2)
1284  -3.934728e-03 *pow(10.*TrueDcm,3);
1285  resmic = resmic*1000.;
1286  }
1287  }
1288 
1289  //real distance in cm
1290  Double_t rsim = gRandom->Gaus(TrueDcm, resmic*0.0001);
1291  if (rsim<0.) rsim = TrueDcm - TrueDcm*gRandom->Uniform(0.,1.);
1292  else if (rsim>0.5) rsim = TrueDcm + (0.5-TrueDcm)*gRandom->Uniform(0.,1.);
1293 
1294  return rsim;
1295 }
Double_t
Double_t PndSttSingleStraw::GetAvUrb ( )
inline

Definition at line 58 of file PndSttSingleStraw.h.

References AvUrb.

58 {return AvUrb;};
Double_t PndSttSingleStraw::GetBeta ( )
inline

Definition at line 51 of file PndSttSingleStraw.h.

References beta.

51 {return beta;};
Double_t PndSttSingleStraw::GetbPolya ( )
inline

Definition at line 54 of file PndSttSingleStraw.h.

References bPolya.

54 {return bPolya;};
Double_t PndSttSingleStraw::GetCDist ( Int_t  k)
inline

Definition at line 30 of file PndSttSingleStraw.h.

References CDist.

30 { return CDist[k];};
std::vector< Double_t > CDist
Double_t PndSttSingleStraw::GetCNele ( Int_t  k)
inline

Definition at line 31 of file PndSttSingleStraw.h.

References CNele.

31 { return CNele[k];};
std::vector< Double_t > CNele
Double_t PndSttSingleStraw::GetCNeleT ( Int_t  k)
inline

Definition at line 32 of file PndSttSingleStraw.h.

References CNeleT.

32 {return CNeleT[k];};
std::vector< Double_t > CNeleT
Double_t PndSttSingleStraw::GetCsi ( )
inline

Definition at line 43 of file PndSttSingleStraw.h.

References Csi.

43 {return Csi;};
Double_t PndSttSingleStraw::GetDelta ( )
inline

Definition at line 44 of file PndSttSingleStraw.h.

References Delta.

44 {return Delta;};
Double_t PndSttSingleStraw::GetDx ( )
inline

Definition at line 39 of file PndSttSingleStraw.h.

References Dx.

39 {return Dx;};
Double_t PndSttSingleStraw::GetEmax ( )
inline

Definition at line 45 of file PndSttSingleStraw.h.

References Emax.

45 {return Emax;};
Double_t PndSttSingleStraw::GetEmed ( )
inline

Definition at line 40 of file PndSttSingleStraw.h.

References Emed.

40 {return Emed;};
Double_t PndSttSingleStraw::GetEmin ( )
inline

Definition at line 41 of file PndSttSingleStraw.h.

References Emin.

41 {return Emin;};
Double_t PndSttSingleStraw::GetEup ( )
inline

Definition at line 57 of file PndSttSingleStraw.h.

References Eup.

57 {return Eup;};
Double_t PndSttSingleStraw::GetGamma ( )
inline

Definition at line 50 of file PndSttSingleStraw.h.

References gamma.

50 {return gamma;};
Double_t PndSttSingleStraw::GetGasGain ( )
inline

Definition at line 37 of file PndSttSingleStraw.h.

References GasGain.

37 {return GasGain;};
Double_t PndSttSingleStraw::GetIAr ( )
inline

Definition at line 46 of file PndSttSingleStraw.h.

References IAr.

46 {return IAr;};
Int_t PndSttSingleStraw::GetNchann ( )
inline

Definition at line 48 of file PndSttSingleStraw.h.

References Nchann.

48 {return Nchann;};
Double_t PndSttSingleStraw::GetNcl ( )
inline

Definition at line 42 of file PndSttSingleStraw.h.

References Ncl.

42 {return Ncl;};
Int_t PndSttSingleStraw::GetNNClus ( )
inline

Definition at line 47 of file PndSttSingleStraw.h.

References NNClus.

47 {return NNClus;};
Double_t PndSttSingleStraw::GetNUrban ( )
inline

Definition at line 56 of file PndSttSingleStraw.h.

References NUrban.

56 {return NUrban;};
Double_t PndSttSingleStraw::GetpSTP ( )
inline

Definition at line 52 of file PndSttSingleStraw.h.

References pSTP.

52 {return pSTP;};
Double_t PndSttSingleStraw::GetPulse ( Int_t  k)
inline

Definition at line 34 of file PndSttSingleStraw.h.

References Pulse.

34 {return Pulse[k];};
std::vector< Double_t > Pulse
Double_t PndSttSingleStraw::GetPulseMax ( )
inline

Definition at line 49 of file PndSttSingleStraw.h.

References PulseMax.

49 {return PulseMax;};
Double_t PndSttSingleStraw::GetPulseT ( Int_t  k)
inline

Definition at line 35 of file PndSttSingleStraw.h.

References PulseT.

35 {return PulseT[k];};
std::vector< Double_t > PulseT
Double_t PndSttSingleStraw::GetPulseTime ( )
inline

Definition at line 53 of file PndSttSingleStraw.h.

References PulseTime.

53 {return PulseTime;};
Double_t PndSttSingleStraw::GetRpath ( )
inline

Definition at line 67 of file PndSttSingleStraw.h.

References Rpath.

67 {return Rpath;};
Double_t PndSttSingleStraw::GetSigUrb ( )
inline

Definition at line 55 of file PndSttSingleStraw.h.

References SigUrb.

55 {return SigUrb;};
Double_t PndSttSingleStraw::GetTeleTime ( Int_t  k)
inline

Definition at line 33 of file PndSttSingleStraw.h.

References TeleTime.

33 {return TeleTime[k];};
std::vector< Double_t > TeleTime
TVector3 PndSttSingleStraw::GetWDist ( Int_t  k)
inline

Definition at line 69 of file PndSttSingleStraw.h.

References WDist.

69 {return WDist[k];};
std::vector< TVector3 > WDist
Double_t PndSttSingleStraw::GetWi ( )
inline

Definition at line 36 of file PndSttSingleStraw.h.

References Wi.

36 {return Wi*1.e-09;}; // in GeV
Double_t PndSttSingleStraw::GetXin ( )
inline

Definition at line 61 of file PndSttSingleStraw.h.

References Xin.

61 {return Xin;};
Double_t PndSttSingleStraw::GetXmax ( )
inline

Definition at line 38 of file PndSttSingleStraw.h.

References Xmax.

38 {return Xmax;};
Double_t PndSttSingleStraw::GetXout ( )
inline

Definition at line 64 of file PndSttSingleStraw.h.

References Xout.

64 {return Xout;};
Double_t PndSttSingleStraw::GetYin ( )
inline

Definition at line 62 of file PndSttSingleStraw.h.

References Yin.

62 {return Yin;};
Double_t PndSttSingleStraw::GetYout ( )
inline

Definition at line 65 of file PndSttSingleStraw.h.

References Yout.

65 {return Yout;};
Double_t PndSttSingleStraw::GetZin ( )
inline

Definition at line 63 of file PndSttSingleStraw.h.

References Zin.

63 {return Zin;};
Double_t PndSttSingleStraw::GetZout ( )
inline

Definition at line 66 of file PndSttSingleStraw.h.

References Zout.

66 {return Zout;};
Double_t PndSttSingleStraw::PartToADC ( )

Definition at line 1136 of file PndSttSingleStraw.cxx.

References Double_t.

Referenced by PndSttHitProducerRealFull::Exec().

1136  {
1137 
1138  // return the energy loss in the tube as charge signal
1139  // taking into account the Polya fluctuations
1140  Double_t ADCsignal=0.;
1141 
1142  for(Int_t j=1; j<= NNClus; j++){
1143 
1144  for(Int_t jc=1; jc<=(Int_t) CNeleT[j-1]; jc++)
1145  ADCsignal += bPolya * GasGain * PolyaSamp();
1146  }
1147 
1148  return ADCsignal;
1149 }
std::vector< Double_t > CNeleT
Double_t
Double_t PndSttSingleStraw::PartToTime ( Double_t  Mass,
Double_t  Momentum,
Double_t  InOut[] 
)

Definition at line 1119 of file PndSttSingleStraw.cxx.

Referenced by PndSttHitProducerRealFull::Exec().

1119  {
1120 
1121  // find the time of a particle of mass xPmass, momentum xPMom, with
1122  // input-output coordinate InOut[6]
1123  // Useful for MC pplication after a call to PutWireXYZ
1124 
1125  TInit(xPMass, xPMom, InOut); // start the event
1126  Out1 = StrawCharge(); // energy loss (GeV) to generate charge
1127  Out2 = StrawSignal(Nchann); // generate the straw signal
1128  Out3 = StrawTime(); // find the straw drift time PulseTime
1129  Out4 = StrawTot(); // find the time over threshold
1130 
1131  return PulseTime;
1132 }
Int_t StrawSignal(Int_t nsteps)
void TInit(Double_t Mass, Double_t Momentum, Double_t InOut[])
void PndSttSingleStraw::Polya ( Double_t  bpar)

Definition at line 616 of file PndSttSingleStraw.cxx.

References Double_t, dx, eps(), exp(), and i.

616  {
617 
618  // calculate the cumulative of the Polya distribution
619  // for samplig the gain fluctuations
620 
621  Double_t eps = 0.0001;
622  Double_t Dxx = 0.05, xx=0., x1,x2;
623  Double_t PMax;
624 
625  Double_t k=1./bpar -1.;
626 
627  // find Xmax
628 
629  PMax = eps * pow(k,k)*exp(-k);
630  Double_t value = 1.e+06;
631  Xmax =2*k;
632  while(value > PMax){
633  Xmax +=Dxx;
634  value = pow(Xmax,k)*exp(-Xmax);
635  }
636  Xmax += -0.5*Dxx;
637 
638 
639  // calculate the cumulative
640 
642  Xs[0]=0;
643  for(Int_t i=1; i<NPolya; i++){
644  x1 = xx;
645  xx += dx;
646  x2= xx;
647  Xs[i]=x2;
648  if(i>1)
649  PolyaCum[i] = PolyaCum[i-1] +
650  0.5*dx*(pow(x1,k)*exp(-x1) + pow(x2,k)*exp(-x2))/TMath::Gamma(k+1);
651  else
652  PolyaCum[i] = PolyaCum[i-1] +
653  0.5*dx* pow(x2,k)*exp(-x2)/TMath::Gamma(k+1);
654  }
655 
656  // adjust the normalization
657 
658  for(Int_t ii=0; ii<NPolya; ii++) PolyaCum[ii] /= PolyaCum[NPolya-1];
659 
660 }
friend F32vec4 exp(const F32vec4 &a)
Definition: P4_F32vec4.h:109
Int_t i
Definition: run_full.C:25
Double_t PolyaCum[100]
Double_t
double eps(TVector3 v1, TVector3 v2)
double dx
Double_t PndSttSingleStraw::PolyaSamp ( )

Definition at line 664 of file PndSttSingleStraw.cxx.

References Double_t, and n.

664  {
665 
666  // sampling a wire gain fluctuation in the gas
667 
668  Double_t xr = gRandom->Uniform();
669  Int_t n = TMath::BinarySearch(NPolya,PolyaCum,xr);
670  Double_t xsamp = Xmax;
671  if(n<NPolya-1){
672  xsamp= Xs[n] +
673  ((xr-PolyaCum[n])/(PolyaCum[n+1] - PolyaCum[n])) *(Xs[n+1]-Xs[n]);
674  }
675  return xsamp;
676 }
Double_t PolyaCum[100]
int n
Double_t
void PndSttSingleStraw::PutPolya ( Double_t  par)
inline

Definition at line 78 of file PndSttSingleStraw.h.

References bPolya, and par.

78 {bPolya=par;};
Double_t par[3]
void PndSttSingleStraw::PutPress ( Double_t  value)
inline

Definition at line 81 of file PndSttSingleStraw.h.

References pSTP.

81 {pSTP=value;};
void PndSttSingleStraw::PutRadius ( Double_t  value)
inline

Definition at line 80 of file PndSttSingleStraw.h.

References Radius.

80 {Radius=value;};
void PndSttSingleStraw::PutRpath ( Double_t  value)
inline

Definition at line 76 of file PndSttSingleStraw.h.

References Rpath.

76 {Rpath=value;};
void PndSttSingleStraw::PutTrackXYZ ( Double_t  v1,
Double_t  v2,
Double_t  v3,
Double_t  v4,
Double_t  v5,
Double_t  v6 
)
inline

Definition at line 73 of file PndSttSingleStraw.h.

References v1, v2, Xin, Xout, Yin, Yout, Zin, and Zout.

75  {Xin=v1; Yin=v2; Zin=v3; Xout=v4; Yout=v5; Zout=v6;};
TVector3 v1
Definition: bump_analys.C:40
TVector3 v2
Definition: bump_analys.C:40
void PndSttSingleStraw::PutWireXYZ ( Double_t  w1,
Double_t  w2,
Double_t  w3,
Double_t  w4,
Double_t  w5,
Double_t  w6 
)

Definition at line 264 of file PndSttSingleStraw.cxx.

Referenced by DrawIsochrones(), PndSttHitProducerRealFast::Exec(), PndSttHitProducerRealFull::Exec(), and PndSttHitProducerIdeal::Exec().

265  {
266  // get wire coordinates
267  Wx1=w1;
268  Wy1=w2;
269  Wz1=w3;
270 
271  Wx2=w4;
272  Wy2=w5;
273  Wz2=w6;
274 }
Double_t PndSttSingleStraw::RRise ( Double_t  gamma)

Definition at line 583 of file PndSttSingleStraw.cxx.

References Double_t, and lg.

583  {
584 
585  // interpolate the relativisic rise of the
586  // number of cluster per cm, starting from the one
587  // measured at the ionization minimum
588 
589  Double_t Rise;
590  Double_t lg = log10(gamma2);
591 
592  if(1.<=gamma2 && gamma2 <= 2.2){
593  Rise = -2.159*lg +1.7;
594  }
595  else if(2.2<=gamma2 && gamma2 <= 6.){
596  Rise = 1.;
597  }
598  else if(6.<=gamma2 && gamma2 <= 200.){
599  Rise = 0.302*lg + 0.765;
600  }
601  else if(200.<=gamma2 && gamma2 <= 1000.){
602  Rise = 0.1431*lg + 1.131;
603  }
604  else if(1000.<=gamma2){
605  Rise = 1.54;
606  }
607  else{
608  Rise= 1.7;
609  }
610 
611  return Rise;
612 }
TGeoVolume * lg
Double_t
Double_t PndSttSingleStraw::Signal ( Double_t  t,
Double_t  t0 
)

Definition at line 829 of file PndSttSingleStraw.cxx.

References Double_t, exp(), t0, and x.

829  {
830 
831  // electric signal at time t of a cluster arriving at t0
832  Double_t elesig;
833  //Double_t A = 1.03e-03; //[R.K. 01/2017] unused variable?
834  //Double_t B = 3.95; //[R.K. 01/2017] unused variable?
835  //Double_t C = 0.228; //[R.K. 01/2017] unused variable?
836  //Double_t D = -3.839e-02; //[R.K. 01/2017] unused variable?
837  //Double_t E = 1.148e-03; //[R.K. 01/2017] unused variable?
838 
839  Double_t x= t - t0;
840  //if(x>0) elesig = A*exp(B*log(x)-C*x)*(1+D*x+E*x*x); // Sokolov Signal
841  if(x>0) elesig =pow(2.*x/10.,2)*exp(-2.*x/10.); // Wirtz signal
842  else elesig = 0.;
843 
844  return elesig;
845 }
friend F32vec4 exp(const F32vec4 &a)
Definition: P4_F32vec4.h:109
Int_t t0
Definition: hist-t7.C:106
Double_t
Double_t x
TTree * t
Definition: bump_analys.C:13
Double_t PndSttSingleStraw::STEloss ( )

Definition at line 389 of file PndSttSingleStraw.cxx.

389  {
390  return gRandom->Landau(Emp*Dx,Csi*Dx); // in GeV
391 }
Double_t PndSttSingleStraw::StrawCharge ( )

Definition at line 492 of file PndSttSingleStraw.cxx.

References Double_t, and jj.

492  {
493 
494  // sampling of the ionization energy loss, number of
495  // primary electrons and their wire distances for each track
496  // energy loss in GeV
497 
498  // clear
499  Double_t TotEnEle = 0., ClusEner=0., Ecurr;
500  CNeleT.clear();
501  WDist.clear();
502 
503  // threshold for delta rays (>1.5 KeV from NIM A301(1991)202)
504  // total energy released by the electrons
505  //Number of cluster in the length
506  NNClus = Cluster(); // set vectors CDist CDistC e CNele
507  // calculation of total energy released by the electrons
508  for(Int_t j=1;j<=NNClus;j++){
509  ClusEner = 0.;
510  for(Int_t jj=1; jj<=(Int_t)(CNele.at(j-1)); jj++){
511  Ecurr = Wi;
512  TotEnEle += Ecurr;
513  ClusEner += Ecurr;
514  }
515 
516  // effective number of electrons per cluster
517  CNeleT.push_back(int(ClusEner/Wi));
518  }
519 
520  // record the distance from the wire of any electron
521  // adding the diffusion effects
522  Int_t owfl =0;
523  for(Int_t k=1; k<=NNClus; k++) {
524  for (Int_t kk=0; kk<(Int_t)CNeleT.at(k-1); kk++) {
525  if(owfl > (Int_t) Cutoff) break;
526  owfl++;
527  WDist.push_back(WDistCalc(CDistC.at(k-1)));
528  }
529  }
530 
531  return TotEnEle*1.e-09; // in Gev
532 }
TVector3 WDistCalc(Double_t d)
std::vector< TVector3 > WDist
std::vector< Double_t > CNeleT
Double_t
std::vector< Double_t > CNele
std::vector< Double_t > CDistC
Int_t PndSttSingleStraw::StrawSignal ( Int_t  nsteps)

Definition at line 849 of file PndSttSingleStraw.cxx.

References Double_t, jj, nsteps, and sin().

849  {
850 
851  // creation of nstep values of
852  // the straw global Pulse (sum on all clusters)
853  // return the number of primary electrons
854 
855  PulseMax=0;
856  Pulse.clear();
857  PulseT.clear();
858  AmplSig.clear();
859 
860  Int_t neltot = TimeEle(); // creation and size of TeleTime (electron times)
861 
862  Double_t Tmax = 1.e-25;
863  for(Int_t k=0; k< neltot; k++) if(Tmax<TeleTime.at(k)) Tmax=TeleTime.at(k);
864  Tmax += 100.;
865 
866  Double_t Dt = Tmax/nsteps; // number of steps of the signal
867 
868  //AmplSig is the amplitude of each electron
869 
870  for(Int_t j=0; j< neltot; j++){
871  AmplSig.push_back(bPolya*PolyaSamp());
872  }
873 
874  // creation of the signal Pulse(PulseT) time in ns
875  for(Int_t j=0; j< nsteps; j++){
876  Double_t te = j*Dt;
877  Double_t sumele=0.;
878  for(Int_t jj=0; jj< neltot; jj++){
879  Double_t te0 = TeleTime.at(jj);
880  sumele += AmplSig.at(jj)*Signal(te,te0);
881  }
882 
883  Pulse.push_back(sumele);
884  PulseT.push_back(te);
885  }
886 
887  // add a random noise (3% of maximum) plus
888  // a 1% of 200 ns periodic signal
889 
890  Double_t Pmax = 1.e-25;
891  for(Int_t k=0; k<(Int_t)Pulse.size(); k++)
892  if(Pmax<Pulse.at(k)) Pmax=Pulse.at(k);
893 
894  for(Int_t k=0; k<(Int_t)Pulse.size(); k++){
895  Pulse.at(k) += 0.03*Pmax*gRandom->Uniform()
896  + 0.01*Pmax*(sin(6.28*PulseT.at(k)/120.));
897  // if(Pulse[k]<0) Pulse[k] *= -1.;
898  }
899 
900  PulseMax=Pmax;
901 
902  // set variable threshold for the signals (constant fraction)
903  // Thresh1=0.05*Pmax;
904  // Thresh2=0.15*Pmax;
905 
906  return neltot;
907 }
friend F32vec4 sin(const F32vec4 &a)
Definition: P4_F32vec4.h:111
double nsteps
Definition: dedx_bands.C:15
Double_t Signal(Double_t t, Double_t t0)
Double_t
std::vector< Double_t > Pulse
std::vector< Double_t > PulseT
std::vector< Double_t > TeleTime
std::vector< Double_t > AmplSig
Int_t PndSttSingleStraw::StrawTime ( )

Definition at line 911 of file PndSttSingleStraw.cxx.

911  {
912 
913  // simulate the discrimination of the straw signal
914  // and give the time
915  // discriminator technique: set 2 threshold, select the first one
916  // (the low one) only if the second one is fired (FINUDA system)
917 
918 
919  PulseTime=0.;
920 
921  Int_t ind=0;
922  Int_t flag1=0;
923  Int_t flag2=1;
924 
925  for(Int_t k=0; k<(Int_t) Pulse.size(); k++){
926  if(flag1==0 && Pulse[k]>Thresh1) {
927  flag1=1;
928  ind=k;
929  }
930 
931 // if(Pulse[k]<Thresh1) {flag1=0; ind=0;} // reset if signal decreases
932 
933 // if(flag1==1 && Pulse[k]>Thresh2) {
934 // flag2=1;
935 // break;
936 // }
937 
938  }
939  if(flag1==1 && flag2==1) PulseTime=PulseT.at(ind)-OffT; // time in ns;
940 
941  return ind;
942 }
std::vector< Double_t > Pulse
std::vector< Double_t > PulseT
Int_t PndSttSingleStraw::StrawTot ( )

Definition at line 946 of file PndSttSingleStraw.cxx.

946  {
947 
948  // simulate the discrimination of the straw signal
949  // and give the time window over threshold of the signal
950  // return the integer difference between the two memory locations
951  // and set the two times PulseTime and PulseTime1
952 
953 
954  PulseTime=0.;
955  PulseTime1=0.;
956 
957  Int_t ind=0, ind1=0;
958  Int_t flag1=0;
959  Int_t flag2=1;
960 
961  for(Int_t k=0; k<(Int_t) Pulse.size(); k++){
962  if(flag1==0 && Pulse[k]>Thresh1) {
963  flag1=1;
964  ind=k;
965  }
966 
967  // find the second threshold
968  if(Pulse[k]>Thresh1)ind1=k;
969  }
970  if(flag1==1 && flag2==1) PulseTime=PulseT.at(ind);
971  PulseTime1 = PulseT.at(ind1);
972 
973  return ind1-ind;
974 }
std::vector< Double_t > Pulse
std::vector< Double_t > PulseT
Double_t PndSttSingleStraw::STUrban ( )

Definition at line 394 of file PndSttSingleStraw.cxx.

References Cu, Double_t, f1, f2, CAMath::Log(), CAMath::Nint(), and CAMath::Sqrt().

394  {
395 
396 //
397 // energy loss in GeV from the Urbam distribution NIM A 362(1995)416
398 // Author: A. Rotondi December 2007
399 //
400 
401  Double_t Sig1Ar, Sig2Ar, Sig3Ar;
402  Double_t Sig1Mix, Sig2Mix, Sig3Mix;
403  Double_t Sig1CO2, Sig2CO2, Sig3CO2, IMix, nAr, nCO2;
404  Double_t f1, f2, e1, e2, e2f, ru, Cu, Cuc;
405  Double_t N1Mix, N2Mix, N3Mix, E1Mix, E2Mix, E3Mix, ZMix;
406  Double_t Sig21, Sig22, Sig23, Medd;
407 
408  Double_t eVGeV = 1.e-09;
409 
410  // ru= 0.6;
411  ru= 0.55;
412 
413  Cuc = 2.*PMass*beta*beta*gamma*gamma;
414 
415  // calculation for Argon
416  Cu = EmedAr;
417  f2 = 2./ZAr;
418  f1 = 1. -f2;
419  e2 = 10.*ZAr*ZAr*eVGeV;
420  e2f = TMath::Power(e2,f2);
421  e1 = TMath::Power(IAr/e2f,1./f1);
422  Sig1Ar = (1.-ru)*Cu*(f1/e1)*(TMath::Log(Cuc/e1) - beta*beta)/
423  (TMath::Log(Cuc/IAr) - beta*beta);
424  Sig2Ar = (1.-ru)*Cu*(f2/e2)*(TMath::Log(Cuc/e2) - beta*beta)/
425  (TMath::Log(Cuc/IAr) - beta*beta);
426  Sig3Ar = Cu*Emax*ru / (IAr*(Emax+IAr)*TMath::Log((Emax+IAr)/IAr));
427 
428  // Calculation for CO2
429  Cu = EmedCO2;
430  f2 = 2./ZCO2;
431  f1 = 1. -f2;
432  e2 = 10.*ZCO2*ZCO2*eVGeV;
433  e2f = TMath::Power(e2,f2);
434  e1 = TMath::Power(ICO2/e2f,1./f1);
435 
436  Sig1CO2 = (1.-ru)*Cu*(f1/e1)*(TMath::Log(Cuc/e1) - beta*beta)/
437  (TMath::Log(Cuc/ICO2) - beta*beta);
438  Sig2CO2 = (1.-ru)*Cu*(f2/e2)*(TMath::Log(Cuc/e2) - beta*beta)/
439  (TMath::Log(Cuc/ICO2) - beta*beta);
440  Sig3CO2 = Cu*Emax*ru / (ICO2*(Emax+ICO2)*TMath::Log((Emax+ICO2)/ICO2));
441 
442  // calculation for the mixture
443  nAr = ArWPerc * RhoMixCO2/AAr;
444  nCO2 = CO2WPerc * RhoMixCO2/ACO2;
445  IMix = TMath::Exp((nAr*ZAr*TMath::Log(IAr) + nCO2*ZCO2*TMath::Log(ICO2))/
446  (nAr*ZAr + nCO2*ZCO2));
447 
448  ZMix = ArWPerc*ZAr + CO2WPerc*ZCO2;
449  f2 = 2./ZMix;
450  f1 = 1. -f2;
451  E2Mix = 10.*ZMix*ZMix*eVGeV;
452  e2f = TMath::Power(E2Mix,f2);
453  E1Mix = TMath::Power(IMix/e2f,1./f1);
454 
455  Sig1Mix = Dx*RhoMixCO2*(ArWPerc*Sig1Ar/RhoAr + CO2WPerc*Sig1CO2/RhoCO2);
456  Sig2Mix = Dx*RhoMixCO2*(ArWPerc*Sig2Ar/RhoAr + CO2WPerc*Sig2CO2/RhoCO2);
457  Sig3Mix = Dx*RhoMixCO2*(ArWPerc*Sig3Ar/RhoAr + CO2WPerc*Sig3CO2/RhoCO2);
458 
459  NUrban = Sig1Mix+Sig2Mix+Sig3Mix; // total number of collisions (mean value)
460 
461  // Urban distribution calculation
462  N1Mix = gRandom->Poisson(Sig1Mix);
463  N2Mix = gRandom->Poisson(Sig2Mix);
464  N3Mix = gRandom->Poisson(Sig3Mix);
465 
466  Int_t N3 = TMath::Nint(N3Mix+gRandom->Uniform());
467 
468  E3Mix = 0.;
469  for(Int_t j=1;j<=N3;j++){
470  E3Mix += ((Emax+IMix)*IMix)/(IMix + Emax*(1.-gRandom->Uniform()));
471  }
472 
473  // variance calculation
474 
475  Eup = IMix/(1.-0.98*Emax/(Emax+IMix)); // 98% of the delta electron area (GeV)
476  Sig21 = IMix*(Emax+IMix)/Emax;
477  Medd = Sig21*TMath::Log(Eup/IMix);
478  Sig22 = Sig21*Eup - Medd*Medd;
479  Sig23 = Sig1Mix*E1Mix*E1Mix + Sig2Mix*E2Mix*E2Mix
480  + Sig3Mix*Medd*Medd + Sig3Mix*Sig22;
481 
482  AvUrb = Sig1Mix*E1Mix + Sig2Mix*E2Mix + Sig3Mix*Medd;
483 
484  SigUrb = TMath::Sqrt(Sig23);
485 
486  // return the energy lost in keV
487  return N1Mix*E1Mix + N2Mix*E2Mix + E3Mix; // in GeV
488 }
TF1 * f1
Definition: reco_analys2.C:50
static T Sqrt(const T &x)
Definition: PndCAMath.h:37
Double_t
#define Cu
static T Log(const T &x)
Definition: PndCAMath.h:40
TFile * f2
int Nint(float x)
Definition: PndCAMath.h:117
void PndSttSingleStraw::TConst ( Double_t  Radius,
Double_t  pSTP,
Double_t  ArP,
Double_t  CO2P 
)

Definition at line 129 of file PndSttSingleStraw.cxx.

References Double_t, and i.

Referenced by DrawIsochrones(), PndSttHitProducerRealFast::Exec(), and PndSttHitProducerRealFull::Exec().

129  {
130 
131  // set constants for the simulation
132  // Input
133  // P1 = tube absolute pressure pSTP
134  // R1 = tube radius Radius
135  // A1 = argon percentage ---> ArPerc
136  // C1 = CO2 percentage ---> C02Perc
137  //
138 
139  Radius = R1;
140  pSTP = P1;
141  Field = 1; // magnetic field as a default (to change use PutField)
142  // Input for the media (volume percentages)
143  ArPerc = A1;
144  CO2Perc = C1;
145 
146  // cluster dimensions in Ar and CO2 (experimantal values)
147 
148  // Double_t PClus[20] =
149  // {0., .656, .150, .064, .035, .0225, .0155, .0105, .0081,
150  // .0061, .0049, .0039, .0030, .0025, .0020, .0016, .0012,
151  // .00095, .00075, .00063}; // Fischle fit
152 
153  Double_t PClus[20] =
154  {0., .802, .0707, .020, .013, .008, .006, .005, .006,
155  .008, .009, .007, .0050, .0040, .0033, .0029, .0025,
156  .0023, .0022, .002}; // Lapique 1st calculation
157 
158  // Double_t PClus[20] =
159  // {0., .841, .0340, .021, .013, .008, .006, .004, .003,
160  // .008, .013, .008, .0050, .004, .0030, .0028, .0025,
161  // .0023, .0022, .002}; // Lapique 2nd calculation
162 
163  // Double_t PClus[20] =
164  // {0., .656, .150, .064, .035, .0225, .0155, .0105, .0081,
165  // .0061, .0049, .0039, .0030, .0025, .0020, .0016, .0012,
166  // .00080, .00059, .00045}; // Fischle empirical
167 
168  // PDouble_t Clus[20] =
169  // {0., .656, .148, .0649, .0337, .0244, .0141, .0078, .0095,
170  // .0063, .0062, .0042, .0028, .0018, .0023, .0017, .0014,
171  // .00060, .00050, .00063}; // Fischle exp
172 
173  Double_t CO2Clus[20] =
174  {0., .730, .162, .038, .020, .0110, .0147, .0060, .0084,
175  .0052, .0020, .0042, .0021, .0025, .0038, .0021, .0009,
176  .00013, .00064, .00048}; // Fischle exp
177 
178  // Double_t CH4Clus[20] =
179  // {0., .786, .120, .032, .013, .0098, .0055, .0057, .0027,
180  // .0029, .0020, .0016, .0013, .0010, .0012, .0006, .0005,
181  // .00042, .00037, .00033}; // Fischle exp
182 
183  CH4Perc = 0.07;
184 
185  // -----------------------------------------------------
186  // gain of the avalanche
187  // Ar/CO2 90/10 1 bar (NTP) MAGY GARFIELD 20-7-2006
188  // GasGain=100000.;
189  // Ar/CO2 90/10 2 bar (NTP) 1800 V experimental Juelich value
190  GasGain = 50000.;
191 
192  // argon ----------------------------------------------------
193  AAr = 39.948; // Argon (39.948)
194  ZAr = 18.0; // Argon (18)
195  RhoAr = pSTP*1.662*1.e-03; // g/cm3 (1.662 mg/cm3)
196  IAr = 188*1.e-09; // ionization potential (GeV) (188 eV)
197  WiAr = 27.0; // energy to create an ion pair (standard 26.7 eV)
198  NclAr = 25.; // cluster/cm in Argon
199  // CO2 -----------------------------------------------------
200  ACO2 = 44; // CO2
201  ZCO2 = 22.; // CO2
202  RhoCO2 = pSTP*1.842*1.e-03; // g/cm3 CO2 (1.842 mg/cm3)
203  ICO2 = 95.8*1.e-09; // ionization potential (GeV) (96 eV)
204  WiCO2 = 33.0; // energy to create an ion pair (33 eV)
205  NclCO2 = 35.5; // clusters/cm CO2 35.5
206  // Methane CH4 ---------------------------------------------------------
207  ACH4 = 16; // CO2 (39.948)
208  ZCH4 = 10.; // CO2 (18)
209  RhoCH4 = pSTP*0.71*1.e-03; // g/cm3 CO2 (0.71 mg/cm3)
210  ICH4 = 40.6*1.e-09; // ionization potential (GeV) (45 eV)
211  WiCH4 = 28.0; // energy to create an ion pair
212  NclCH4 = 25.0;
213  // Input for the media (weight percentages) ----------------------------
216 
217  // mixture densities ----------------------------------------------------
218  RhoMixCO2 = 1./((ArWPerc/RhoAr) + (CO2WPerc/RhoCO2));
219  RhoMixCH4 = 1./((ArWPerc/RhoAr) + (CH4WPerc/RhoCH4));
220 
221  //----------------------------------------------------------------------
222  // particles (Gev, energy losses in keV)
223  PZeta = 1; // projectile charge
224  piMass = 0.139; // particle mass (GeV)
225  eMass = 0.511/1000.; // electron mass (GeV) (0.511 MeV)
226  prMass = 0.93827; // proton mass (GeV)
227 
228  // ---------------------------------------------------------------------
229  // thresholds for the straw tubes (default values) see TInit for current values
230  Thresh1=10;
231  Thresh2=30;
232  // channels for the signal
233  Nchann = 500;
234 
235  // ---------------------------------------------Emin------------------------
236  NPolya= 100; // steps for the calculation of the Polya distributions
237  Xmax=0.; // Polya istribution is calculated between o and Xmax (see Polya)
238  bPolya = 0.4;
239  Polya(bPolya); // cumulative of the Polya distribution
240  // -----------------------------------------------------------------------
241 
242  // cumulative for the number of electron per cluster
243  Double_t Wnorm = (ArPerc*NclAr + CO2Perc*NclCO2);
244  CumClus[0]=(ArPerc*NclAr*PClus[0] + CO2Perc*NclCO2*CO2Clus[0])/Wnorm;
245 
246  for(Int_t i=1; i<=20; i++) {
247  CumClus[i]=(ArPerc*NclAr*PClus[i] + CO2Perc*NclCO2*CO2Clus[i])/Wnorm + CumClus[i-1];
248  }
249  CumClus[20]=1.;
250 
251  Double_t sum=0.;
252  for(Int_t i=0; i<=19; i++) {
253  sum += PClus[i];
254  // cout << "PClus["<<i<<"] = " << PClus[i] << endl;
255  }
256  // for(Int_t i=0;i<=20;i++) {
257  // cout << "CumClus["<<i<<"] = " << CumClus[i] << endl;
258  // }
259  // cout << "Sum of Probabilities = " << sum << endl;
260 
261 }
Int_t i
Definition: run_full.C:25
Double_t
void Polya(Double_t bpar)
void PndSttSingleStraw::TDirCos ( )

Definition at line 749 of file PndSttSingleStraw.cxx.

References sqrt().

749  {
750 
751  // director cosines of the track (called for each track)
752 
753  //path into the straw
754  Rpath = sqrt((Xout-Xin)*(Xout-Xin) +
755  (Yout-Yin)*(Yout-Yin) +
756  (Zout-Zin)*(Zout-Zin));
757 
758  //director cosines
759  Calpha = (Xout-Xin)/Rpath;
760  Cbeta = (Yout-Yin)/Rpath;
761  Cgamma = (Zout-Zin)/Rpath;
762 }
friend F32vec4 sqrt(const F32vec4 &a)
Definition: P4_F32vec4.h:29
Int_t PndSttSingleStraw::TimeEle ( )

Definition at line 766 of file PndSttSingleStraw.cxx.

References Double_t.

766  {
767 
768  TeleTime.clear();
769 
770  // calculate the arrival times (ns) for each electron in TeleTime
771  // from cm to ns <---------------------------------
772  // return the number of electrons
773  // Author:A. Rotondi 20-7-2006
774 
775  Int_t ido = WDist.size();
776  Double_t etime;
777 
778  // cutoff the total charge to 20 times the average
779  if(ido > (Int_t) Cutoff) ido = (Int_t) Cutoff;
780 
781  for(Int_t k=0; k<ido; k++) {
782  Double_t dst = WDist.at(k).Mag(); // distance in cm
783 
784  // space to time calculation from GARFIELD
785 
786  if(pSTP <1.9){
787  if(Radius<0.5){
788  // V=1600V diameter 4 mm 90/10
789  etime= -1.624e-05 + 0.1258*dst + 0.8079*pow(dst,2) -2.918*pow(dst,3)
790  + 10.33*pow(dst,4) -10.84*pow(dst,5);
791  etime*=1000.; // from micros to ns
792  }
793  else{
794  // V=1600V diameter 5 mm 90/10
795  etime= -6.763e-05 + 0.1471*dst +0.3625*pow(dst,2) +0.3876*pow(dst,3)
796  +1.04*pow(dst,4) -1.693*pow(dst,5);
797  etime*=1000.; // from micros to ns
798  }
799  }
800  else{
801  // 2.2 bar 2150 V, 5 mm, 90/10 and/or 80/20 wire 20 micron
802  // (may 2009 data)
803  if(Field==1 && CO2Perc <0.15){
804  etime= -1.569123e-03 + 2.228707e-01*dst -2.100147e-01*pow(dst,2)
805  +1.240429*pow(dst,3) -5.929662e-01*pow(dst,4);
806  etime=etime*1000.; // from micros to ns
807  }
808  else if(Field==1 && CO2Perc >0.15){
809  etime = -3.022419e-04 + 1.490671e-01*dst -1.947376e-01*pow(dst,2)
810  +2.764081e+00*pow(dst,3) -2.129739e+00*pow(dst,4);
811  etime=etime*1000.; // from micros to ns
812  }
813  //no magnetic field 90/10
814  else{
815  etime= -1.472305e-03 + 2.139223e-01*dst -5.835399e-02*pow(dst,2)
816  -6.727544e-02*pow(dst,3) +6.334636e-01*pow(dst,4);
817  etime=etime*1000.; // from micros to ns
818  }
819  }
820 
821  TeleTime.push_back(etime);
822  }
823 
824  return TeleTime.size();
825 }
std::vector< TVector3 > WDist
Double_t
std::vector< Double_t > TeleTime
Double_t PndSttSingleStraw::TimnsToDiscm ( Double_t  time)

Definition at line 1017 of file PndSttSingleStraw.cxx.

References Double_t.

Referenced by DrawIsochrones(), PndSttHitProducerRealFull::Exec(), and PndSttIsochroneDraw::Exec().

1017  {
1018 
1019  // distance in cm from time in ns for pSTP =1 and pSTP=2 atm
1020  // where the time is given by the threshold on the signal
1021  // utility routine for the track reconstruction
1022  // last update: A. Rotondi 24-5-2009
1023 
1024  Double_t drift;
1025 
1026 
1027  // 1 absolute atm (NTP) 20-7-2006 GARFIELd Ar/CO2 90/10 MAGY
1028  // ns --> mm
1029 
1030  if(pSTP < 1.9) {
1031  if(Radius < 0.5){
1032 
1033  drift = -0.0140 -1.37281e-01
1034  +5.13978e-02*time
1035  +7.65443e-05*pow(time,2)
1036  -9.53479e-06*pow(time,3)
1037  +1.19432e-07*pow(time,4)
1038  -6.19861e-10*pow(time,5)
1039  +1.35458e-12*pow(time,6)
1040  -1.10933e-15*pow(time,7);
1041  }
1042 
1043 
1044  else{
1045  // 1600 V 5 mm
1046  if(time < 120.){
1047 
1048  drift = 0.0300 -1.07377e-01
1049  +3.65134e-02*time
1050  +1.20909e-03*pow(time,2)
1051  -4.56678e-05*pow(time,3)
1052  +6.70207e-07*pow(time,4)
1053  -4.99204e-09*pow(time,5)
1054  +2.19079e-11*pow(time,6)
1055  -8.01791e-14*pow(time,7)
1056  +2.16778e-16*pow(time,8);
1057  }
1058  else{
1059 
1060  drift = 0.0300 -8.91701e-01
1061  +4.68487e-02*time
1062  +1.00902e-03*pow(time,2)
1063  -4.00359e-05*pow(time,3)
1064  +6.23768e-07*pow(time,4)
1065  -5.20556e-09*pow(time,5)
1066  +2.41502e-11*pow(time,6)
1067  -5.85450e-14*pow(time,7)
1068  +5.77250e-17*pow(time,8);
1069  }
1070  }
1071  }
1072 
1073  else {
1074  // 2 absolute atm 5 mm 2150 V 90/10 (1 bar overpressure may 2009)
1075  if(CO2Perc < 0.15){
1076  // constant fraction threshold 5% 5 ns offset
1077  // drift = -1.343144e-01
1078  // +5.101958e-02 *time
1079  // +9.116481e-05 *pow(time,2)
1080  // -5.787444e-06 *pow(time,3)
1081  // +5.015327e-08 *pow(time,4)
1082  // -1.624539e-10 *pow(time,5)
1083  // +1.414059e-13 *pow(time,6);
1084 
1085  // fixed threshold 5% with 10 ns offset 90/10 and 80/20 (may 2009)
1086  drift = 2.498729e-02
1087  -2.788627e-03 *time
1088  +3.997619e-03 *pow(time,2)
1089  -1.289555e-04 *pow(time,3)
1090  +2.101670e-06 *pow(time,4)
1091  -1.959622e-08 *pow(time,5)
1092  +1.053198e-10 *pow(time,6)
1093  -3.030411e-13 *pow(time,7)
1094  +3.609173e-16 *pow(time,8);
1095  }
1096  else{
1097  // fixed threshold 80/20
1098  drift = -4.843174e-02
1099  +4.859828e-03 *time
1100  +4.593485e-03 *pow(time,2)
1101  -1.677031e-04 *pow(time,3)
1102  +2.955270e-06 *pow(time,4)
1103  -2.996812e-08 *pow(time,5)
1104  +1.832841e-10 *pow(time,6)
1105  -6.678677e-13 *pow(time,7)
1106  +1.335729e-15 *pow(time,8)
1107  -1.128932e-18 *pow(time,9);
1108  }
1109  }
1110 
1111  drift = 0.1*drift;
1112  if(drift < 0.) drift=0.;
1113  return drift;
1114 
1115 }
Double_t
void PndSttSingleStraw::TInit ( Double_t  Mass,
Double_t  Momentum,
Double_t  InOut[] 
)

Definition at line 277 of file PndSttSingleStraw.cxx.

References Double_t, CAMath::Log(), log(), and sqrt().

Referenced by PndSttHitProducerRealFast::Exec().

277  {
278 
279  // initialization of the constants for each track and each straw
280  // transfer of data
281  // track geometrical quantities
282  Xin=InOut[0]; Yin=InOut[1]; Zin=InOut[2];
283  Xout=InOut[3]; Yout=InOut[4]; Zout=InOut[5];
284  PMass = xPMass;
285  PMom = xPMom;
286 
287  // path into the straw
288  Dx = sqrt((Xout-Xin)*(Xout-Xin) +
289  (Yout-Yin)*(Yout-Yin) +
290  (Zout-Zin)*(Zout-Zin));
291 
292  // clear
293  CNumb=0;
294  PulseMax=0;
295  PulseTime=0;
296  CDist.clear();
297  CDistC.clear();
298  CNele.clear();
299  CNeleT.clear();
300  WDist.clear();
301  TeleTime.clear();
302  AmplSig.clear();
303  Pulse.clear();
304  PulseT.clear();
305 
306  // ---------------------------------------------------------------------
307 
308  // initialization of the constants
309  // maximum energy transfer Emax (GeV) and related quantities
310 
311  PEn = sqrt(PMom*PMom + PMass*PMass); // particle energy GeV
312  beta = PMom/PEn;
313  gamma = 1/sqrt(1.-beta*beta);
314  Double_t begam = beta*gamma; // local
315  Double_t mratio = eMass/PMass; // local
316 
317  // calculation of the polarization Sternheimer factor for Argon
318  Double_t ms = 2.80;
319  Double_t Xst = log10(begam*sqrt(pSTP));
320  Double_t Cs =-11.92;
321  Double_t X1 = 4;
322  Double_t Xo = 1.96;
323  Double_t as = 0.389;
324  Delta=0;
325  if(Xo <= Xst && Xst <= X1) Delta = 4.6051702*Xst +Cs +as*pow(X1-Xst,ms);
326  else if(X1< Xst) Delta = 4.6051702*Xst +Cs;
327  if(Delta < 0) Delta=0;
328 
329  // calculation of other typical quantites
330 
331  Emax = (1.022*begam*begam/(1.+2.*gamma*mratio+mratio*mratio))/1000.; // GeV
332 
333  CsiAr = 0.5*0.3071*PZeta*PZeta*ZAr*RhoAr/(beta*beta*AAr)*1e-03; //GeV
334  Double_t fact = 2.*eMass*beta*beta*gamma*gamma*Emax/(IAr*IAr);
335  EmedAr = 2.*CsiAr*(0.5*TMath::Log(fact)-beta*beta - 0.5*Delta); // GeV/cm
336  EminAr = pSTP*2.70*1.e-06; // GeV/cm (2.5 keV)
337  // most prob energy (GeV)
338  EmpAr = EmedAr + CsiAr*(0.422784 + beta*beta + log(CsiAr/Emax));
339 
340  CsiCO2 = 0.5*0.3071*PZeta*PZeta*ZCO2*RhoCO2/(beta*beta*ACO2)*1e-03; //GeV
341  fact = 2.*eMass*beta*beta*gamma*gamma*Emax/(ICO2*ICO2);
342  EmedCO2 = 2.*CsiCO2*(0.5*TMath::Log(fact)-beta*beta - 0.5*Delta); // GeV/cm
343  EminCO2 = pSTP*3.60*1.e-06; // GeV/cm (2.5 keV)
344  // most prob energy (GeV)
345  EmpCO2 = EmedCO2 + CsiCO2*(0.422784 + beta*beta + log(CsiCO2/Emax));
346 
347  Csi = RhoMixCO2 * ((ArWPerc*CsiAr/RhoAr) + (CO2WPerc*CsiCO2/RhoCO2));;
349  Emin = RhoMixCO2 * ((ArWPerc*EminAr/RhoAr) + (CO2WPerc*EminCO2/RhoCO2));
351 
352  // mean weighted interaction
354  // number of clusters
355  Double_t nAr = ArWPerc * RhoMixCO2/AAr;
356  Double_t nCO2 = CO2WPerc * RhoMixCO2/ACO2;
357  //Ncl=pSTP*((ArPerc*NclAr)+(CO2Perc*NclCO2))*Emed/Emin; // <--- Cluster/cm
358  Ncl=pSTP*((nAr*NclAr+nCO2*NclCO2)/(nAr+nCO2))*Emed/Emin; // <--- Cluster/cm
359 
360  Lcl=1./Ncl; // mean free path between clusters (cm)
361  Ecl = 2.8; // mean number of electrons per clusters (def 2.8)
362  Cutoff = Ncl*Ecl*40; // limit to the number of primary electrons (*20)
363  Ntote = Ecl*Ncl; // total mean number of electrons per cm
364 
365  // ---------------------------------------------------------------------
366  // thresholds for the straw tubes (current values)
367  // total number of electrons * scaling factor (max of signal x electron=1)
368 
369  Thresh1 = 0.5*Ncl*Ecl* 0.05; // default 0.5*Ncl*Ecl* 0.05;
370  Thresh2 = 0.5*Ncl*Ecl* 0.10; // default 0.5*Ncl*Ecl* 0.10;
371  OffT = 10.; // 10.; // time offset in ns for trheshold calibration;
372 
373  // -----------------------------------------------------------------------
374 
375  TDirCos(); // director cosine of the track
376 
377  // control prints
378  // cout<<" Dx "<<Dx<<" Csi "<<Csi*1.e+09<<" Emax MeV "<<
379  // Emax*1.e+03<<" PMass "<<PMass<<" gamma "<<
380  // gamma<<endl;
381  // cout<<" RRise "<<RRise(gamma)<<endl;
382  // cout<<" Thresh1 = "<<Thresh1<<" Thresh2 = "<<Thresh2<<endl;
383 }
friend F32vec4 sqrt(const F32vec4 &a)
Definition: P4_F32vec4.h:29
std::vector< Double_t > CDist
friend F32vec4 log(const F32vec4 &a)
Definition: P4_F32vec4.h:110
std::vector< TVector3 > WDist
std::vector< Double_t > CNeleT
Double_t
std::vector< Double_t > Pulse
std::vector< Double_t > CNele
std::vector< Double_t > PulseT
static T Log(const T &x)
Definition: PndCAMath.h:40
std::vector< Double_t > TeleTime
std::vector< Double_t > CDistC
std::vector< Double_t > AmplSig
Double_t PndSttSingleStraw::TrueDist ( Double_t  Point[])

Definition at line 978 of file PndSttSingleStraw.cxx.

References CAMath::Abs(), Double_t, p1, p2, and sqrt().

Referenced by PndSttHitProducerRealFast::Exec(), and PndSttHitProducerIdeal::Exec().

978  {
979  // service routine that finds the distance in cm from the wire
980  // by knowing the wire coordinates (class variables)
981  // and the input-output points Point[6]
982 
983 
984  Double_t truedist = 0;
985 
986  // wire director cosines
987  Double_t Wlength = sqrt( (Wx2-Wx1)*(Wx2-Wx1) +
988  (Wy2-Wy1)*(Wy2-Wy1) +
989  (Wz2-Wz1)*(Wz2-Wz1) );
990  Wp = (Wx2-Wx1)/Wlength;
991  Wq = (Wy2-Wy1)/Wlength;
992  Wr = (Wz2-Wz1)/Wlength;
993 
994  // director cosines of the given track
995  Double_t Modu = sqrt( (Point[3]*Point[0])*(Point[3]*Point[0]) +
996  (Point[4]*Point[1])*(Point[4]*Point[1]) +
997  (Point[5]*Point[2])*(Point[5]*Point[2]) );
998  Double_t dcx = (Point[3]-Point[0])/Modu;
999  Double_t dcy = (Point[4]-Point[1])/Modu;
1000  Double_t dcz = (Point[5]-Point[2])/Modu;
1001 
1002  //distance formula
1003  Double_t p1 = (Point[0]-Wx1)*(dcy*Wr-dcz*Wq);
1004  Double_t p2 =-(Point[1]-Wy1)*(dcx*Wr-dcz*Wp);
1005  Double_t p3 = (Point[2]-Wz1)*(dcx*Wq-dcy*Wp);
1006  Double_t Det = p1+p2+p3;
1007  Double_t Disc = sqrt( (dcy*Wr-dcz*Wq)*(dcy*Wr-dcz*Wq) +
1008  (dcz*Wp-dcx*Wr)*(dcz*Wp-dcx*Wr) +
1009  (dcx*Wq-dcy*Wp)*(dcx*Wq-dcy*Wp) );
1010  if(Disc >0) truedist = TMath::Abs(Det/Disc);
1011 
1012  return truedist; // distance in cm
1013 }
friend F32vec4 sqrt(const F32vec4 &a)
Definition: P4_F32vec4.h:29
static T Abs(const T &x)
Definition: PndCAMath.h:39
Double_t
TPad * p2
Definition: hist-t7.C:117
TPad * p1
Definition: hist-t7.C:116
TVector3 PndSttSingleStraw::WDistCalc ( Double_t  d)

Definition at line 680 of file PndSttSingleStraw.cxx.

References Double_t, and sqrt().

680  {
681 
682  // calculation of the distance of the cluster from the wire
683  // DisTot is the cluster distance from the track entrance
684  // diffusion effects are considered
685 
686  // wire director cosines
687 
688  Double_t Wlength = sqrt( (Wx2-Wx1)*(Wx2-Wx1) +
689  (Wy2-Wy1)*(Wy2-Wy1) +
690  (Wz2-Wz1)*(Wz2-Wz1) );
691  Wp = (Wx2-Wx1)/Wlength;
692  Wq = (Wy2-Wy1)/Wlength;
693  Wr = (Wz2-Wz1)/Wlength;
694 
695  // current track coordinates
696  Double_t xcor = Calpha * DisTot + Xin;
697  Double_t ycor = Cbeta * DisTot + Yin;
698  Double_t zcor = Cgamma * DisTot + Zin;
699 
700  // cross product VV1= (wire x track) for the distance
701  Double_t XX1 = Wr*(ycor-Wy1) - Wq*(zcor-Wz1);
702  Double_t YY1 = Wp*(zcor-Wz1) - Wr*(xcor-Wx1);
703  Double_t ZZ1 = Wq*(xcor-Wx1) - Wp*(ycor-Wy1);
704 
705  // vector for the 3-D distance from the wire (from wire x VV1)
706  Double_t XX = Wq*ZZ1 - Wr*YY1;
707  Double_t YY = Wr*XX1 - Wp*ZZ1;
708  Double_t ZZ = Wp*YY1 - Wq*XX1;
709  //cout<<" XYZ "<<XX<<" "<<YY<<" "<<ZZ<<endl;
710  Double_t DDistcm = sqrt(XX*XX + YY*YY +ZZ*ZZ);
711 
712  //director cosines of the distance vector
713  Double_t cosx = XX/DDistcm;
714  Double_t cosy = YY/DDistcm;
715  Double_t cosz = ZZ/DDistcm;
716 
717  // sampling of the diffusion
718  //Double_t DDist = DDistcm*10.; // distance in mm
719 
720  // longitudinal coefficient of diffusion (GARFIELD) cm --> micron
721  // MAGY Ar/CO2 90/10 20-7-2006 GARFIELD
722  Double_t SigL = DiffLong(DDistcm);
723  // ... in cm
724  SigL *= 1.e-04; // in cm
725 
726  // tranverse coefficient (GARFIELD) cm--> micron
727  // MAGY Ar/CO2 90/10 20-7-2006 GARFIELD
728  Double_t SigT = DiffTran(DDistcm);
729  SigT *= 1.e-04; // in cm
730 
731  // sampling of Longitudinal and Transverse diffusion
732  Double_t difL = gRandom->Gaus(0.,SigL);
733  Double_t difT = gRandom->Gaus(0.,SigT);
734 
735  // vector addition to the distance
736  // the transverse component has the same dir cos of the wire
737  XX += difL*cosx + difT*Wp;
738  YY += difL*cosy + difT*Wq;
739  ZZ += difL*cosz + difT*Wr;
740  //cout<<" XYZ+ dif "<<XX<<" "<<YY<<" "<<ZZ<<endl;
741  //cout<<" --------------------------------------------------- "<<endl;
742  TVector3 TDist(XX,YY,ZZ);
743 
744  return TDist;
745 }
friend F32vec4 sqrt(const F32vec4 &a)
Definition: P4_F32vec4.h:29
Double_t DiffLong(Double_t distcm)
Double_t
Double_t DiffTran(Double_t distcm)

Member Data Documentation

Double_t PndSttSingleStraw::AAr
private

Definition at line 171 of file PndSttSingleStraw.h.

Double_t PndSttSingleStraw::ACH4
private

Definition at line 205 of file PndSttSingleStraw.h.

Double_t PndSttSingleStraw::ACO2
private

Definition at line 193 of file PndSttSingleStraw.h.

std::vector<Double_t> PndSttSingleStraw::AmplSig
private

Definition at line 150 of file PndSttSingleStraw.h.

Double_t PndSttSingleStraw::ArPerc
private

Definition at line 166 of file PndSttSingleStraw.h.

Double_t PndSttSingleStraw::ArWPerc
private

Definition at line 167 of file PndSttSingleStraw.h.

Double_t PndSttSingleStraw::AvUrb
private

Definition at line 254 of file PndSttSingleStraw.h.

Referenced by GetAvUrb().

Double_t PndSttSingleStraw::beta
private

Definition at line 233 of file PndSttSingleStraw.h.

Referenced by GetBeta().

Double_t PndSttSingleStraw::bPolya
private

Definition at line 249 of file PndSttSingleStraw.h.

Referenced by GetbPolya(), and PutPolya().

Double_t PndSttSingleStraw::Calpha
private

Definition at line 250 of file PndSttSingleStraw.h.

Double_t PndSttSingleStraw::Cbeta
private

Definition at line 250 of file PndSttSingleStraw.h.

std::vector<Double_t> PndSttSingleStraw::CDist
private

Definition at line 150 of file PndSttSingleStraw.h.

Referenced by GetCDist().

std::vector<Double_t> PndSttSingleStraw::CDistC
private

Definition at line 150 of file PndSttSingleStraw.h.

Double_t PndSttSingleStraw::Cgamma
private

Definition at line 250 of file PndSttSingleStraw.h.

Double_t PndSttSingleStraw::CH4Clus[20]
private

Definition at line 162 of file PndSttSingleStraw.h.

Double_t PndSttSingleStraw::CH4Perc
private

Definition at line 166 of file PndSttSingleStraw.h.

Double_t PndSttSingleStraw::CH4WPerc
private

Definition at line 167 of file PndSttSingleStraw.h.

std::vector<Double_t> PndSttSingleStraw::CNele
private

Definition at line 150 of file PndSttSingleStraw.h.

Referenced by GetCNele().

std::vector<Double_t> PndSttSingleStraw::CNeleT
private

Definition at line 150 of file PndSttSingleStraw.h.

Referenced by GetCNeleT().

Int_t PndSttSingleStraw::CNumb
private

Definition at line 225 of file PndSttSingleStraw.h.

Double_t PndSttSingleStraw::CO2Perc
private

Definition at line 166 of file PndSttSingleStraw.h.

Double_t PndSttSingleStraw::CO2WPerc
private

Definition at line 167 of file PndSttSingleStraw.h.

Double_t PndSttSingleStraw::Csi
private

Definition at line 237 of file PndSttSingleStraw.h.

Referenced by GetCsi().

Double_t PndSttSingleStraw::CsiAr
private

Definition at line 179 of file PndSttSingleStraw.h.

Double_t PndSttSingleStraw::CsiCH4
private

Definition at line 203 of file PndSttSingleStraw.h.

Double_t PndSttSingleStraw::CsiCO2
private

Definition at line 192 of file PndSttSingleStraw.h.

Double_t PndSttSingleStraw::CumClus[21]
private

Definition at line 162 of file PndSttSingleStraw.h.

Double_t PndSttSingleStraw::Cutoff
private

Definition at line 187 of file PndSttSingleStraw.h.

Double_t PndSttSingleStraw::Delta
private

Definition at line 224 of file PndSttSingleStraw.h.

Referenced by GetDelta().

Double_t PndSttSingleStraw::Dx
private

Definition at line 221 of file PndSttSingleStraw.h.

Referenced by GetDx().

Double_t PndSttSingleStraw::Ecl
private

Definition at line 183 of file PndSttSingleStraw.h.

Double_t PndSttSingleStraw::eMass
private

Definition at line 222 of file PndSttSingleStraw.h.

Double_t PndSttSingleStraw::Emax
private

Definition at line 238 of file PndSttSingleStraw.h.

Referenced by GetEmax().

Double_t PndSttSingleStraw::Emed
private

Definition at line 235 of file PndSttSingleStraw.h.

Referenced by GetEmed().

Double_t PndSttSingleStraw::EmedAr
private

Definition at line 176 of file PndSttSingleStraw.h.

Double_t PndSttSingleStraw::EmedCH4
private

Definition at line 201 of file PndSttSingleStraw.h.

Double_t PndSttSingleStraw::EmedCO2
private

Definition at line 189 of file PndSttSingleStraw.h.

Double_t PndSttSingleStraw::Emin
private

Definition at line 236 of file PndSttSingleStraw.h.

Referenced by GetEmin().

Double_t PndSttSingleStraw::EminAr
private

Definition at line 177 of file PndSttSingleStraw.h.

Double_t PndSttSingleStraw::EminCH4
private

Definition at line 204 of file PndSttSingleStraw.h.

Double_t PndSttSingleStraw::EminCO2
private

Definition at line 190 of file PndSttSingleStraw.h.

Double_t PndSttSingleStraw::Emp
private

Definition at line 239 of file PndSttSingleStraw.h.

Double_t PndSttSingleStraw::EmpAr
private

Definition at line 178 of file PndSttSingleStraw.h.

Double_t PndSttSingleStraw::EmpCH4
private

Definition at line 202 of file PndSttSingleStraw.h.

Double_t PndSttSingleStraw::EmpCO2
private

Definition at line 191 of file PndSttSingleStraw.h.

Double_t PndSttSingleStraw::Eup
private

Definition at line 253 of file PndSttSingleStraw.h.

Referenced by GetEup().

Int_t PndSttSingleStraw::Field
private

Definition at line 170 of file PndSttSingleStraw.h.

Double_t PndSttSingleStraw::gamma
private

Definition at line 234 of file PndSttSingleStraw.h.

Referenced by GetGamma().

Double_t PndSttSingleStraw::GasGain
private

Definition at line 186 of file PndSttSingleStraw.h.

Referenced by GetGasGain().

Double_t PndSttSingleStraw::IAr
private

Definition at line 180 of file PndSttSingleStraw.h.

Referenced by GetIAr().

Double_t PndSttSingleStraw::ICH4
private

Definition at line 208 of file PndSttSingleStraw.h.

Double_t PndSttSingleStraw::ICO2
private

Definition at line 196 of file PndSttSingleStraw.h.

Double_t PndSttSingleStraw::Lcl
private

Definition at line 184 of file PndSttSingleStraw.h.

Int_t PndSttSingleStraw::Nchann
private

Definition at line 266 of file PndSttSingleStraw.h.

Referenced by GetNchann().

Double_t PndSttSingleStraw::Ncl
private

Definition at line 182 of file PndSttSingleStraw.h.

Referenced by GetNcl().

Double_t PndSttSingleStraw::NclAr
private

Definition at line 174 of file PndSttSingleStraw.h.

Double_t PndSttSingleStraw::NclCH4
private

Definition at line 210 of file PndSttSingleStraw.h.

Double_t PndSttSingleStraw::NclCO2
private

Definition at line 198 of file PndSttSingleStraw.h.

Int_t PndSttSingleStraw::NNClus
private

Definition at line 240 of file PndSttSingleStraw.h.

Referenced by GetNNClus().

Int_t PndSttSingleStraw::NPolya
private

Definition at line 247 of file PndSttSingleStraw.h.

Double_t PndSttSingleStraw::Ntote
private

Definition at line 185 of file PndSttSingleStraw.h.

Double_t PndSttSingleStraw::NUrban
private

Definition at line 251 of file PndSttSingleStraw.h.

Referenced by GetNUrban().

Double_t PndSttSingleStraw::OffT
private

Definition at line 265 of file PndSttSingleStraw.h.

Double_t PndSttSingleStraw::Out1
private

Definition at line 271 of file PndSttSingleStraw.h.

Int_t PndSttSingleStraw::Out2
private

Definition at line 272 of file PndSttSingleStraw.h.

Int_t PndSttSingleStraw::Out3
private

Definition at line 272 of file PndSttSingleStraw.h.

Double_t PndSttSingleStraw::Out4
private

Definition at line 271 of file PndSttSingleStraw.h.

Double_t PndSttSingleStraw::PEn
private

Definition at line 232 of file PndSttSingleStraw.h.

Double_t PndSttSingleStraw::piMass
private

Definition at line 218 of file PndSttSingleStraw.h.

Double_t PndSttSingleStraw::PMass
private

Definition at line 219 of file PndSttSingleStraw.h.

Double_t PndSttSingleStraw::PMom
private

Definition at line 220 of file PndSttSingleStraw.h.

Double_t PndSttSingleStraw::PolyaCum[100]
private

Definition at line 245 of file PndSttSingleStraw.h.

Double_t PndSttSingleStraw::prMass
private

Definition at line 223 of file PndSttSingleStraw.h.

Double_t PndSttSingleStraw::pSTP
private

Definition at line 168 of file PndSttSingleStraw.h.

Referenced by GetpSTP(), and PutPress().

std::vector<Double_t> PndSttSingleStraw::Pulse
private

Definition at line 151 of file PndSttSingleStraw.h.

Referenced by GetPulse().

Double_t PndSttSingleStraw::PulseMax
private

Definition at line 261 of file PndSttSingleStraw.h.

Referenced by GetPulseMax().

std::vector<Double_t> PndSttSingleStraw::PulseT
private

Definition at line 151 of file PndSttSingleStraw.h.

Referenced by GetPulseT().

Double_t PndSttSingleStraw::PulseTime
private

Definition at line 262 of file PndSttSingleStraw.h.

Referenced by GetPulseTime().

Double_t PndSttSingleStraw::PulseTime1
private

Definition at line 262 of file PndSttSingleStraw.h.

Double_t PndSttSingleStraw::PZeta
private

Definition at line 217 of file PndSttSingleStraw.h.

Double_t PndSttSingleStraw::Radius
private

Definition at line 169 of file PndSttSingleStraw.h.

Referenced by PutRadius().

Double_t PndSttSingleStraw::RhoAr
private

Definition at line 173 of file PndSttSingleStraw.h.

Double_t PndSttSingleStraw::RhoCH4
private

Definition at line 207 of file PndSttSingleStraw.h.

Double_t PndSttSingleStraw::RhoCO2
private

Definition at line 195 of file PndSttSingleStraw.h.

Double_t PndSttSingleStraw::RhoMixCH4
private

Definition at line 213 of file PndSttSingleStraw.h.

Double_t PndSttSingleStraw::RhoMixCO2
private

Definition at line 212 of file PndSttSingleStraw.h.

Double_t PndSttSingleStraw::Rpath
private

Definition at line 246 of file PndSttSingleStraw.h.

Referenced by GetRpath(), and PutRpath().

Double_t PndSttSingleStraw::SigUrb
private

Definition at line 252 of file PndSttSingleStraw.h.

Referenced by GetSigUrb().

std::vector<Double_t> PndSttSingleStraw::TeleTime
private

Definition at line 150 of file PndSttSingleStraw.h.

Referenced by GetTeleTime().

Double_t PndSttSingleStraw::Thresh1
private

Definition at line 263 of file PndSttSingleStraw.h.

Double_t PndSttSingleStraw::Thresh2
private

Definition at line 264 of file PndSttSingleStraw.h.

std::vector<TVector3> PndSttSingleStraw::WDist
private

Definition at line 152 of file PndSttSingleStraw.h.

Referenced by GetWDist().

Double_t PndSttSingleStraw::Wi
private

Definition at line 165 of file PndSttSingleStraw.h.

Referenced by GetWi().

Double_t PndSttSingleStraw::WiAr
private

Definition at line 181 of file PndSttSingleStraw.h.

Double_t PndSttSingleStraw::WiCH4
private

Definition at line 209 of file PndSttSingleStraw.h.

Double_t PndSttSingleStraw::WiCO2
private

Definition at line 197 of file PndSttSingleStraw.h.

Double_t PndSttSingleStraw::Wp
private

Definition at line 260 of file PndSttSingleStraw.h.

Double_t PndSttSingleStraw::Wq
private

Definition at line 260 of file PndSttSingleStraw.h.

Double_t PndSttSingleStraw::Wr
private

Definition at line 260 of file PndSttSingleStraw.h.

Double_t PndSttSingleStraw::Wx1
private

Definition at line 259 of file PndSttSingleStraw.h.

Double_t PndSttSingleStraw::Wx2
private

Definition at line 259 of file PndSttSingleStraw.h.

Double_t PndSttSingleStraw::Wy1
private

Definition at line 259 of file PndSttSingleStraw.h.

Double_t PndSttSingleStraw::Wy2
private

Definition at line 259 of file PndSttSingleStraw.h.

Double_t PndSttSingleStraw::Wz1
private

Definition at line 259 of file PndSttSingleStraw.h.

Double_t PndSttSingleStraw::Wz2
private

Definition at line 259 of file PndSttSingleStraw.h.

Double_t PndSttSingleStraw::Xin
private

Definition at line 246 of file PndSttSingleStraw.h.

Referenced by GetXin(), and PutTrackXYZ().

Double_t PndSttSingleStraw::Xmax
private

Definition at line 248 of file PndSttSingleStraw.h.

Referenced by GetXmax().

Double_t PndSttSingleStraw::Xout
private

Definition at line 246 of file PndSttSingleStraw.h.

Referenced by GetXout(), and PutTrackXYZ().

Double_t PndSttSingleStraw::Xs[100]
private

Definition at line 245 of file PndSttSingleStraw.h.

Double_t PndSttSingleStraw::Yin
private

Definition at line 246 of file PndSttSingleStraw.h.

Referenced by GetYin(), and PutTrackXYZ().

Double_t PndSttSingleStraw::Yout
private

Definition at line 246 of file PndSttSingleStraw.h.

Referenced by GetYout(), and PutTrackXYZ().

Double_t PndSttSingleStraw::ZAr
private

Definition at line 172 of file PndSttSingleStraw.h.

Double_t PndSttSingleStraw::ZCH4
private

Definition at line 206 of file PndSttSingleStraw.h.

Double_t PndSttSingleStraw::ZCO2
private

Definition at line 194 of file PndSttSingleStraw.h.

Double_t PndSttSingleStraw::Zin
private

Definition at line 246 of file PndSttSingleStraw.h.

Referenced by GetZin(), and PutTrackXYZ().

Double_t PndSttSingleStraw::Zout
private

Definition at line 246 of file PndSttSingleStraw.h.

Referenced by GetZout(), and PutTrackXYZ().


The documentation for this class was generated from the following files: