]> git.uio.no Git - u/mrichter/AliRoot.git/commitdiff
Remove the sensitive chamber selection in hits and digits creation
authorcblume <cblume@f7af4fe6-9843-0410-8265-dc069ae4e863>
Thu, 10 Aug 2006 08:39:19 +0000 (08:39 +0000)
committercblume <cblume@f7af4fe6-9843-0410-8265-dc069ae4e863>
Thu, 10 Aug 2006 08:39:19 +0000 (08:39 +0000)
TRD/AliTRD.h
TRD/AliTRDdigitizer.cxx
TRD/AliTRDdigitizer.h
TRD/AliTRDv0.h
TRD/AliTRDv1.cxx
TRD/AliTRDv1.h

index 4ce094cda7f8bedf63745b3c0499e1b3b1dcf818..bff0a6cf3467746859e6dd06af8e65d3067f5210 100644 (file)
@@ -67,16 +67,6 @@ class AliTRD : public AliDetector {
 
   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; 
@@ -97,7 +87,7 @@ class AliTRD : public AliDetector {
   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
 
 };
 
index a08a1098f2492a7c5d9b6d678ef9fdbfda525fdf..0b28a76ad979ca61506e0465a7dfd22ca1cc674d 100644 (file)
@@ -18,7 +18,9 @@
 ///////////////////////////////////////////////////////////////////////////////
 //                                                                           //
 //  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.                                           //
 //                                                                           //
 ///////////////////////////////////////////////////////////////////////////////
 
@@ -452,7 +449,7 @@ Bool_t AliTRDdigitizer::Open(const Char_t *file, Int_t nEvent)
   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) {
@@ -680,7 +677,6 @@ Bool_t AliTRDdigitizer::MakeDigits()
       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);
 
@@ -690,9 +686,8 @@ Bool_t AliTRDdigitizer::MakeDigits()
       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) {
 
@@ -1004,8 +999,7 @@ Bool_t AliTRDdigitizer::MakeDigits()
     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++ ) {
@@ -1456,34 +1450,6 @@ Bool_t AliTRDdigitizer::SDigits2Digits()
 
 }
 
-//_____________________________________________________________________________
-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
 {
index 995f61eec6b617a432af9321e272a7bc1c3e9c05..d4fa591e445da0ddb0ff9e498a327f0564f23246 100644 (file)
@@ -110,8 +110,6 @@ class AliTRDdigitizer : public AliDigitizer {
  private:
     
   virtual Bool_t       Init();
-    
-  virtual Bool_t       CheckDetector(Int_t plane, Int_t chamber, Int_t sector);
 
   ClassDef(AliTRDdigitizer,12)               //  Produces TRD-Digits
 
index 0f28015e47ea2a1fb75544b4f2fe1225904672bb..d1242f076377bb2511b57402241354890bfbaad7 100644 (file)
@@ -30,16 +30,8 @@ class AliTRDv0 : public AliTRD {
 
   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:
index 53faf84319cdd62b9fee8f496f660cbdb1e339f1..21be50a20d1a58c521381b874e91a6788f427d48 100644 (file)
@@ -55,12 +55,6 @@ AliTRDv1::AliTRDv1():AliTRD()
   // Default constructor
   //
 
-  fSensSelect        =  0;
-  fSensPlane         = -1;
-  fSensChamber       = -1;
-  fSensSector        = -1;
-  fSensSectorRange   =  0;
-
   fDeltaE            = NULL;
   fDeltaG            = NULL;
   fTR                = NULL;
@@ -79,12 +73,6 @@ AliTRDv1::AliTRDv1(const char *name, const char *title)
   // Standard constructor for Transition Radiation Detector version 1
   //
 
-  fSensSelect        =  0;
-  fSensPlane         = -1;
-  fSensChamber       = -1;
-  fSensSector        = -1;
-  fSensSectorRange   =  0;
-
   fDeltaE            = NULL;
   fDeltaG            = NULL;
   fTR                = NULL;
@@ -140,12 +128,6 @@ void AliTRDv1::Copy(TObject &trd) const
   // 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;
 
@@ -293,19 +275,6 @@ void AliTRDv1::Init()
   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) {
@@ -333,90 +302,6 @@ void AliTRDv1::Init()
 
 }
 
-//_____________________________________________________________________________
-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()
 {
@@ -565,22 +450,6 @@ void AliTRDv1::StepManagerGeant()
 
       // 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) {
@@ -828,22 +697,6 @@ void AliTRDv1::StepManagerErmilova()
 
       // 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) {
@@ -992,21 +845,6 @@ void AliTRDv1::StepManagerFixedStep()
 
   // 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;
 
index 118300148ceb723b75fd3e830e2191550b08d5c9..06402198450a8f54309539559bedcdedefc45fe9 100644 (file)
@@ -45,18 +45,8 @@ class AliTRDv1 : public AliTRD {
           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;              };
 
@@ -64,12 +54,6 @@ class AliTRDv1 : public AliTRD {
 
   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
 
@@ -88,7 +72,7 @@ class AliTRDv1 : public AliTRD {
   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)
 
 };