// Initialize the TRD detector
AliTRDv1 *trd = new AliTRDv1("TRD","TRD slow simulator");
+ trd->SetHitTypeStandard();
// Needed for some material properties
trd->CreateMaterials();
// Select the gas mixture (0: 97% Xe + 3% isobutane, 1: 85% Xe + 15% CO2)
trd->SetGasMix(1);
- // Get the pointer to the geometry object
- AliTRDgeometry *geometry = trd->GetGeometry();
-
- // The number of timebins
- geometry->SetNTimeBin(30);
-
- // The additional timebins before and after the drift region
- geometry->SetExpandTimeBin(5,15);
+ // Define the parameter object
+ // If no external parameter object is defined,
+ // default parameter will be used
+ AliTRDparameter *parameter = new AliTRDparameter("TRDparameter"
+ ,"TRD parameter class");
+
+ parameter->SetADCthreshold(0);
+ parameter->SetNTimeBin(30); // The number of timebins
+ parameter->SetExpandTimeBin(5,15); // The additional timebins
// Switch on TR production
AliTRDsim *trdsim = trd->CreateTR();
// The digitizer
AliTRDdigitizer *digitizer = new AliTRDdigitizer("TRDdigitizer","Digitizer class");
+
+ digitizer->SetParameter(parameter);
digitizer->SetSimple();
- digitizer->SetGasGain(3200.); // GEANT + new Ermilova spectrum
- digitizer->SetChipGain(6.1);
- digitizer->SetNoise(1000.);
- digitizer->SetADCinRange(1000.);
- digitizer->SetADCoutRange(1023.);
- digitizer->SetADCthreshold(0);
digitizer->InitDetector();
- //digitizer->SetTimeResponse(0);
- //digitizer->SetVerbose(1);
// The event generator
AliTRDsimpleGen *generator = simple->GetGenerator();
generator->SetMomentum(3.0,3.0);
generator->SetPdg(11); // Electrons
- //generator->SetPdg(211); // Pions
//_____________________________________________________________________________
//
//_____________________________________________________________________________
//
- Int_t timeMax = geometry->GetTimeTotal();
- Int_t adcRange = ((Int_t) digitizer->GetADCoutRange());
+ Int_t timeMax = parameter->GetTimeTotal();
+ Int_t adcRange = ((Int_t) parameter->GetADCoutRange());
TH1F *hQ = new TH1F("hQ" ,"Charge per hit (all)" ,100,0.0,1000.0);
TH1F *hQdedx = new TH1F("hQdedx","Charge per hit (dedx)",100,0.0,1000.0);
// Number of events (tracks)
Int_t nEvent = 10000;
- Float_t x0 = geometry->GetTime0(0) - AliTRDgeometry::DrThick();
+ Float_t x0 = parameter->GetTime0(0) - AliTRDgeometry::DrThick();
TClonesArray *hitsArray = trd->Hits();
**************************************************************************/
/*
-$Log$
+$Log$
+Revision 1.1 2001/11/06 17:19:41 cblume
+Add detailed geometry and simple simulator
+
*/
///////////////////////////////////////////////////////////////////////////////
#include <stdlib.h>
#include <TRandom.h>
+#include <TMCProcess.h>
+
+#include "AliRun.h"
#include "AliTRDsimpleGen.h"
#include "AliTRDsimpleMC.h"
,fMomMax);
}
printf("\n");
+
+ // Add one dummy particle to the stack so that AddHit will work
+ Float_t mom[3] = { 0.0 };
+ Float_t vtx[3] = { 0.0 };
+ Float_t pol[3] = { 0.0 };
+ Int_t ntr = 0;
+ gAlice->SetTrack(0,-1,fPdg,mom,vtx,pol,0.0,kPPrimary,ntr);
+
}
Double_t p = fMomMax;
/*
$Log$
+Revision 1.5 2003/01/07 09:03:52 alibrary
+New TrackMomentum and Position without LorentzVectors
+
Revision 1.4 2002/11/21 22:38:47 alibrary
Removing AliMC and AliMCProcess
fTrackY = 0.0;
fTrackZ = 0.0;
- gAlice->SetCurrentTrack(-1);
+ gAlice->SetCurrentTrack(0);
}
// Track Momentum
//
- px = fTrackPx;
- py = fTrackPy;
- pz = fTrackPz;
+ px = fTrackPx;
+ py = fTrackPy;
+ pz = fTrackPz;
etot = fTrackEtot;
}
Int_t volId = -1;
- if (strcmp(volName,"UL05") == 0) {
+ if (strcmp(volName,"UJ00") == 0) {
volId = kVolDrRg;
}
- else if (strcmp(volName,"UL06") == 0) {
+ else if (strcmp(volName,"UK00") == 0) {
volId = kVolAmRg;
}
- else if (strcmp(volName,"UCII") == 0) {
+ else if (strcmp(volName,"UC00") == 0) {
volId = kVolDrCh;
}
}
+//_____________________________________________________________________________
+const char *AliTRDsimpleMC::CurrentVolName() const
+{
+ //
+ // Check for the current volume
+ //
+
+ Char_t *volName = "UA00";
+
+ // Drift region
+ if ((fTrackX-fX0) < AliTRDgeometry::DrThick()) {
+ volName = "UJ00";
+ }
+ else if ((fTrackX-fX0) < (AliTRDgeometry::DrThick() +
+ AliTRDgeometry::AmThick())) {
+ volName = "UK00";
+ }
+
+ return volName;
+
+}
+
//_____________________________________________________________________________
Int_t AliTRDsimpleMC::CurrentVolOffID(Int_t off, Int_t ©No) const
{