new data member: fDebug=kFALSE by default. Setter and Getter defined in the base...
authormasera <masera@f7af4fe6-9843-0410-8265-dc069ae4e863>
Mon, 3 Nov 2003 17:03:27 +0000 (17:03 +0000)
committermasera <masera@f7af4fe6-9843-0410-8265-dc069ae4e863>
Mon, 3 Nov 2003 17:03:27 +0000 (17:03 +0000)
ITS/AliITSsimulation.cxx
ITS/AliITSsimulation.h
ITS/AliITSsimulationSDD.cxx
ITS/AliITSsimulationSPD.cxx
ITS/AliITSsimulationSSD.cxx

index 576abdbe290e4118b6d155b823c7dc3bb6285638..f8b301f369a685725cb2c9eb574c7e6ca1a55c9a 100644 (file)
@@ -27,6 +27,7 @@ AliITSsimulation::AliITSsimulation(){
     fpList        = 0;
     fModule       = 0;
     fEvent        = 0;
+    SetDebug(kFALSE);
 }
 //__________________________________________________________________________
 AliITSsimulation::~AliITSsimulation(){
index 1bcda08712dd8cae71c667fb3e4cf0689a49b99e..4b02971a6c829ab55706be826641933eb8d9ac88 100644 (file)
@@ -75,9 +75,11 @@ class AliITSsimulation : public TObject {
     virtual void SetMap(AliITSpList *p){fpList = p;} // Sets fpList, the map.
     virtual void ClearMap(){fpList->ClearMap();} // Clear fpList, map.
     virtual void SetModuleNumber(Int_t mod){fModule=mod;} // Set Module number
-    virtual Int_t GetModuleNumber(){return fModule;}// Gets Module number
+    virtual Int_t GetModuleNumber()const {return fModule;}// Gets Module number
     virtual void SetEventNumber(Int_t evnt){fEvent=evnt;} // Set Event number
-    virtual Int_t GetEventNumber(){return fEvent;}// Gets Event number
+    virtual Int_t GetEventNumber()const {return fEvent;}// Gets Event number
+    virtual Bool_t GetDebug() const {return fDebug;}
+    virtual void SetDebug(Bool_t db = kTRUE) {fDebug = db;}
 
  protected:
     AliITSresponse      *fResponse;       //! response
@@ -85,8 +87,9 @@ class AliITSsimulation : public TObject {
     AliITSpList         *fpList;          //!
     Int_t                fModule;         //!
     Int_t                fEvent;          //!
+    Bool_t               fDebug;          //  debug flag
 
-  ClassDef(AliITSsimulation,1)  // Simulation base class 
+  ClassDef(AliITSsimulation,2)  // Simulation base class 
     
 };
 
index c2e6d0b38976df6e98a38a9ac018c7959960d484..903488620db0a7fd6e93dc01fd8fbb61adbfdb78 100644 (file)
@@ -136,7 +136,7 @@ void FastFourierTransform(AliITSetfSDD *alisddetf,Double_t *real,
     return;
 }
 //______________________________________________________________________
-AliITSsimulationSDD::AliITSsimulationSDD(){
+AliITSsimulationSDD::AliITSsimulationSDD() {
     // Default constructor
 
     fResponse      = 0;
@@ -204,6 +204,7 @@ AliITSsimulationSDD::AliITSsimulationSDD(AliITSsegmentation *seg,
     fMaxNofSamples = 0;
     fITS           = 0;
     fTreeB         = 0;
+    SetDebug(kFALSE);
 
     Init((AliITSsegmentationSDD*)seg,(AliITSresponseSDD*)resp);
 }
@@ -528,10 +529,12 @@ void AliITSsimulationSDD::HitsToAnalogDigits( AliITSmodule *mod ) {
         // continue if the particle did not lose energy
         // passing through detector
         if (!depEnergy) {
+         if(GetDebug()){ 
             Warning("HitsToAnalogDigits", 
                     "fTrack = %d hit=%d module=%d This particle has"
                     " passed without losing energy!",
                     itrack,ii,mod->GetIndex());
+         }
             continue;
         } // end if !depEnergy
 
@@ -542,11 +545,13 @@ void AliITSsimulationSDD::HitsToAnalogDigits( AliITSmodule *mod ) {
         if(drPath < 0) drPath = -drPath;
         drPath = sddLength-drPath;
         if(drPath < 0) {
+         if(GetDebug()){ // this should be fixed at geometry level
             Warning("HitsToAnalogDigits",
                     "negative drift path drPath=%e sddLength=%e dxL[0]=%e "
                     "xL[0]=%e",
                     drPath,sddLength,dxL[0],xL[0]);
-            continue;
+         }
+         continue;
         } // end if drPath < 0
 
         // Compute number of segments to brake step path into
@@ -573,9 +578,11 @@ void AliITSsimulationSDD::HitsToAnalogDigits( AliITSmodule *mod ) {
             driftPath = sddLength-driftPath;
             detector  = 2*(hitDetector-1) + iWing;
             if(driftPath < 0) {
+              if(GetDebug()){ // this should be fixed at geometry level
                 Warning("HitsToAnalogDigits","negative drift path "
                         "driftPath=%e sddLength=%e avDrft=%e dxL[0]=%e "
                         "xL[0]=%e",driftPath,sddLength,avDrft,dxL[0],xL[0]);
+             }
                 continue;
             } // end if driftPath < 0
 
index e53090fc13f52465c8af406fc77cc7db624df722..02f5fc3221b99be7fbb0f1e1a176d284b79c5696 100644 (file)
@@ -70,6 +70,7 @@ AliITSsimulationSPD::AliITSsimulationSPD(AliITSsegmentation *seg,
     fSegmentation = 0;
     fHis          = 0;
     fMapA2        = 0;
+    SetDebug(kFALSE);
 
 /*
     fThresh       = 0.;
index b6729a35292ceab95d48c320547bc5dac1825b2b..2ab39887b7eb5ba9a4ea423e9cf8761efda24209 100644 (file)
@@ -72,6 +72,7 @@ AliITSsimulationSSD::AliITSsimulationSSD(AliITSsegmentation *seg,
     fDifConst[0] = fDifConst[1] = 0.0;
     fDriftVel[0] = fDriftVel[1] = 0.0;
     fMapA2   = 0;
+    SetDebug(kFALSE);
 //    fpList    = 0;
     Init((AliITSsegmentationSSD*)seg,(AliITSresponseSSD*)resp);
 }