virtual void SetTR(Bool_t ) = 0;
- virtual void SetSensChamber(Int_t ichamber) = 0;
- virtual void SetSensPlane(Int_t iplane) = 0;
- virtual void SetSensSector(Int_t isector) = 0;
- virtual void SetSensSector(Int_t isector, Int_t nsector) = 0;
-
- virtual Int_t GetSensChamber() const = 0;
- virtual Int_t GetSensPlane() const = 0;
- virtual Int_t GetSensSector() const = 0;
- virtual Int_t GetSensSectorRange() const = 0;
-
virtual void Hits2Digits();
virtual void Hits2SDigits();
virtual AliDigitizer* CreateDigitizer(AliRunDigitizer* manager) const;
Int_t fDrawTR; // Switches marking the TR photons in the display
Int_t fDisplayType; // Display type (0: normal, 1: detailed)
- ClassDef(AliTRD,8) // Transition Radiation Detector base class
+ ClassDef(AliTRD,9) // Transition Radiation Detector base class
};
///////////////////////////////////////////////////////////////////////////////
// //
// Creates and handles digits from TRD hits //
-// Author: C. Blume (C.Blume@gsi.de) //
+// Authors: C. Blume (blume@ikf.uni-frankfurt.de) //
+// C. Lippmann //
+// B. Vulpescu //
// //
// The following effects are included: //
// - Diffusion //
// The corresponding parameter can be adjusted via the various //
// Set-functions. If these parameters are not explicitly set, default //
// values are used (see Init-function). //
-// As an example on how to use this class to produce digits from hits //
-// have a look at the macro hits2digits.C //
-// The production of summable digits is demonstrated in hits2sdigits.C //
-// and the subsequent conversion of the s-digits into normal digits is //
-// explained in sdigits2digits.C. //
// //
///////////////////////////////////////////////////////////////////////////////
fEvent = nEvent;
// Import the Trees for the event nEvent in the file
- fRunLoader->GetEvent(fEvent);
+ //fRunLoader->GetEvent(fEvent);
AliLoader* loader = fRunLoader->GetLoader("TRDLoader");
if (!loader) {
Int_t track = hit->Track();
Int_t detector = hit->GetDetector();
Int_t plane = fGeo->GetPlane(detector);
- Int_t sector = fGeo->GetSector(detector);
Int_t chamber = fGeo->GetChamber(detector);
Float_t time0 = AliTRDgeometry::GetTime0(plane);
Int_t nColMax = padPlane->GetNcols();
Int_t inDrift = 1;
- // Don't analyze test hits and switched off detectors
- if ((CheckDetector(plane,chamber,sector)) &&
- (((Int_t) q) != 0)) {
+ // Don't analyze test hits
+ if (((Int_t) q) != 0) {
if (detector != detectorOld) {
Int_t nDigits = 0;
// Don't create noise in detectors that are switched off / not installed, etc.
- if ((CheckDetector(plane,chamber,sector)) &&
- (!calibration->GetChamberStatus(iDet))) {
+ if (!calibration->GetChamberStatus(iDet)) {
// Create the digits for this chamber
for (iRow = 0; iRow < nRowMax; iRow++ ) {
}
-//_____________________________________________________________________________
-Bool_t AliTRDdigitizer::CheckDetector(Int_t plane, Int_t chamber, Int_t sector)
-{
- //
- // Checks whether a detector is enabled
- //
-
- if ((fTRD->GetSensChamber() >= 0) &&
- (fTRD->GetSensChamber() != chamber)) return kFALSE;
- if ((fTRD->GetSensPlane() >= 0) &&
- (fTRD->GetSensPlane() != plane)) return kFALSE;
- if ( fTRD->GetSensSector() >= 0) {
- Int_t sens1 = fTRD->GetSensSector();
- Int_t sens2 = sens1 + fTRD->GetSensSectorRange();
- sens2 -= ((Int_t) (sens2 / AliTRDgeometry::Nsect()))
- * AliTRDgeometry::Nsect();
- if (sens1 < sens2) {
- if ((sector < sens1) || (sector >= sens2)) return kFALSE;
- }
- else {
- if ((sector < sens1) && (sector >= sens2)) return kFALSE;
- }
- }
-
- return kTRUE;
-
-}
-
//_____________________________________________________________________________
Bool_t AliTRDdigitizer::WriteDigits() const
{
private:
virtual Bool_t Init();
-
- virtual Bool_t CheckDetector(Int_t plane, Int_t chamber, Int_t sector);
ClassDef(AliTRDdigitizer,12) // Produces TRD-Digits
virtual void SetHits() { fHitsOn = 1; };
- void SetSensChamber(Int_t ) { };
- void SetSensPlane(Int_t ) { };
- void SetSensSector(Int_t ) { };
- void SetSensSector(Int_t ,Int_t) { };
void SetTR(Bool_t ) { };
- Int_t GetSensChamber() const { return 0; };
- Int_t GetSensPlane() const { return 0; };
- Int_t GetSensSector() const { return 0; };
- Int_t GetSensSectorRange() const { return 0; };
Bool_t GetTR() const { return 0; };
protected:
// Default constructor
//
- fSensSelect = 0;
- fSensPlane = -1;
- fSensChamber = -1;
- fSensSector = -1;
- fSensSectorRange = 0;
-
fDeltaE = NULL;
fDeltaG = NULL;
fTR = NULL;
// Standard constructor for Transition Radiation Detector version 1
//
- fSensSelect = 0;
- fSensPlane = -1;
- fSensChamber = -1;
- fSensSector = -1;
- fSensSectorRange = 0;
-
fDeltaE = NULL;
fDeltaG = NULL;
fTR = NULL;
// Copy function
//
- ((AliTRDv1 &) trd).fSensSelect = fSensSelect;
- ((AliTRDv1 &) trd).fSensPlane = fSensPlane;
- ((AliTRDv1 &) trd).fSensChamber = fSensChamber;
- ((AliTRDv1 &) trd).fSensSector = fSensSector;
- ((AliTRDv1 &) trd).fSensSectorRange = fSensSectorRange;
-
((AliTRDv1 &) trd).fTypeOfStepManager = fTypeOfStepManager;
((AliTRDv1 &) trd).fStepSize = fStepSize;
AliTRD::Init();
AliDebug(1,"Slow simulator\n");
- if (fSensSelect) {
- if (fSensPlane >= 0)
- AliInfo(Form("Only plane %d is sensitive",fSensPlane));
- if (fSensChamber >= 0)
- AliInfo(Form("Only chamber %d is sensitive",fSensChamber));
- if (fSensSector >= 0) {
- Int_t sens1 = fSensSector;
- Int_t sens2 = fSensSector + fSensSectorRange;
- sens2 -= ((Int_t) (sens2 / AliTRDgeometry::Nsect()))
- * AliTRDgeometry::Nsect();
- AliInfo(Form("Only sectors %d - %d are sensitive\n",sens1,sens2-1));
- }
- }
// Switch on TR simulation as default
if (!fTRon) {
}
-//_____________________________________________________________________________
-void AliTRDv1::SetSensPlane(Int_t iplane)
-{
- //
- // Defines the hit-sensitive plane (0-5)
- //
-
- if ((iplane < 0) || (iplane > 5)) {
- AliWarning(Form("Wrong input value:%d",iplane));
- AliWarning("Use standard setting");
- fSensPlane = -1;
- fSensSelect = 0;
- return;
- }
-
- fSensSelect = 1;
- fSensPlane = iplane;
-
-}
-
-//_____________________________________________________________________________
-void AliTRDv1::SetSensChamber(Int_t ichamber)
-{
- //
- // Defines the hit-sensitive chamber (0-4)
- //
-
- if ((ichamber < 0) || (ichamber > 4)) {
- AliWarning(Form("Wrong input value: %d",ichamber));
- AliWarning("Use standard setting");
- fSensChamber = -1;
- fSensSelect = 0;
- return;
- }
-
- fSensSelect = 1;
- fSensChamber = ichamber;
-
-}
-
-//_____________________________________________________________________________
-void AliTRDv1::SetSensSector(Int_t isector)
-{
- //
- // Defines the hit-sensitive sector (0-17)
- //
-
- SetSensSector(isector,1);
-
-}
-
-//_____________________________________________________________________________
-void AliTRDv1::SetSensSector(Int_t isector, Int_t nsector)
-{
- //
- // Defines a range of hit-sensitive sectors. The range is defined by
- // <isector> (0-17) as the starting point and <nsector> as the number
- // of sectors to be included.
- //
-
- if ((isector < 0) || (isector > 17)) {
- AliWarning(Form("Wrong input value <isector>: %d",isector));
- AliWarning("Use standard setting");
- fSensSector = -1;
- fSensSectorRange = 0;
- fSensSelect = 0;
- return;
- }
-
- if ((nsector < 1) || (nsector > 18)) {
- AliWarning(Form("Wrong input value <nsector>: %d",nsector));
- AliWarning("Use standard setting");
- fSensSector = -1;
- fSensSectorRange = 0;
- fSensSelect = 0;
- return;
- }
-
- fSensSelect = 1;
- fSensSector = isector;
- fSensSectorRange = nsector;
-
-}
-
//_____________________________________________________________________________
void AliTRDv1::StepManager()
{
// Check on selected volumes
Int_t addthishit = 1;
- if (fSensSelect) {
- if ((fSensPlane >= 0) && (pla != fSensPlane )) addthishit = 0;
- if ((fSensChamber >= 0) && (cha != fSensChamber)) addthishit = 0;
- if (fSensSector >= 0) {
- Int_t sens1 = fSensSector;
- Int_t sens2 = fSensSector + fSensSectorRange;
- sens2 -= ((Int_t) (sens2 / AliTRDgeometry::Nsect()))
- * AliTRDgeometry::Nsect();
- if (sens1 < sens2) {
- if ((sec < sens1) || (sec >= sens2)) addthishit = 0;
- }
- else {
- if ((sec < sens1) && (sec >= sens2)) addthishit = 0;
- }
- }
- }
// Add this hit
if (addthishit) {
// Check on selected volumes
Int_t addthishit = 1;
- if (fSensSelect) {
- if ((fSensPlane >= 0) && (pla != fSensPlane )) addthishit = 0;
- if ((fSensChamber >= 0) && (cha != fSensChamber)) addthishit = 0;
- if (fSensSector >= 0) {
- Int_t sens1 = fSensSector;
- Int_t sens2 = fSensSector + fSensSectorRange;
- sens2 -= ((Int_t) (sens2 / AliTRDgeometry::Nsect()))
- * AliTRDgeometry::Nsect();
- if (sens1 < sens2) {
- if ((sec < sens1) || (sec >= sens2)) addthishit = 0;
- }
- else {
- if ((sec < sens1) && (sec >= sens2)) addthishit = 0;
- }
- }
- }
// Add this hit
if (addthishit) {
// Check on selected volumes
Int_t addthishit = 1;
- if(fSensSelect) {
- if ((fSensPlane >= 0) && (pla != fSensPlane )) addthishit = 0;
- if ((fSensChamber >= 0) && (cha != fSensChamber)) addthishit = 0;
- if (fSensSector >= 0) {
- Int_t sens1 = fSensSector;
- Int_t sens2 = fSensSector + fSensSectorRange;
- sens2 -= ((Int_t) (sens2 / AliTRDgeometry::Nsect())) * AliTRDgeometry::Nsect();
- if (sens1 < sens2) {
- if ((sec < sens1) || (sec >= sens2)) addthishit = 0;
- }
- else {
- if ((sec < sens1) && (sec >= sens2)) addthishit = 0;
- }
- }
- }
if (!addthishit) return;
void SelectStepManager(Int_t t);
void SetStepSize(Double_t s) { fStepSize = s; };
- void SetSensPlane(Int_t iplane = 0);
- void SetSensChamber(Int_t ichamber = 0);
- void SetSensSector(Int_t isector);
- void SetSensSector(Int_t isector, Int_t nsector);
-
void SetTR(Bool_t kTRUE) { fTRon = kTRUE; };
- Int_t GetSensPlane() const { return fSensPlane; };
- Int_t GetSensChamber() const { return fSensChamber; };
- Int_t GetSensSector() const { return fSensSector; };
- Int_t GetSensSectorRange() const { return fSensSectorRange; };
-
Bool_t GetTR() const { return fTRon; };
AliTRDsim *GetTRDsim() const { return fTR; };
void *StepManagerEntity();
- Int_t fSensSelect; // Switch to select only parts of the detector
- Int_t fSensPlane; // Sensitive detector plane
- Int_t fSensChamber; // Sensitive detector chamber
- Int_t fSensSector; // Sensitive detector sector
- Int_t fSensSectorRange; // Sensitive detector range
-
Bool_t fTRon; // Switch for TR simulation
AliTRDsim *fTR; // TR simulator
Float_t fTrackLength0; // Save the track length at chamber entrance
Int_t fPrimaryTrackPid; // Save the id of the primary track
- ClassDef(AliTRDv1,4) // Transition Radiation Detector version 1 (slow simulator)
+ ClassDef(AliTRDv1,5) // Transition Radiation Detector version 1 (slow simulator)
};