#include "AliITSsimulationSPD.h"
#include "AliLog.h"
#include "AliRun.h"
-#include "AliCDBEntry.h"
-#include "AliCDBLocal.h"
//#define DEBUG
// Modified by D. Elia, G.E. Bruno, H. Tydesjo
// Fast diffusion code by Bjorn S. Nilsen
// March-April 2006
+// October 2007: GetCalibrationObjects() removed
//
// Version: 0
// Written by Boris Batyunya
fCoupling=1;
} // end if
- // Get the calibration objects for each module(ladder)
- GetCalibrationObjects(0); //RunNr 0 hard coded for now
-
}
//______________________________________________________________________
AliITSsimulationSPD::~AliITSsimulationSPD(){
//______________________________________________________________________
AliITSsimulationSPD::AliITSsimulationSPD(const
AliITSsimulationSPD
- &s) : AliITSsimulation(s){
+ &s) : AliITSsimulation(s),
+fHis(s.fHis),
+fSPDname(s.fSPDname),
+fCoupling(s.fCoupling){
// Copy Constructor
// Inputs:
// AliITSsimulationSPD &s The original class for which
// none.
// Return:
- *this = s;
- return;
}
//______________________________________________________________________
AliITSsimulationSPD& AliITSsimulationSPD::operator=(const
return *this;
}
-
-//______________________________________________________________________
-void AliITSsimulationSPD::GetCalibrationObjects(Int_t RunNr) {
- // Gets the calibration objects for each module (ladder)
- // Inputs:
- // RunNr: hard coded to RunNr=0 for now
- // Outputs:
- // none.
- // Return:
- // none.
-
- AliCDBManager* man = AliCDBManager::Instance();
-
- AliCDBEntry *entrySPD=0;
- entrySPD = man->Get("ITS/Calib/CalibSPD", RunNr);
-
- if(!entrySPD){
- AliWarning("Cannot find SPD calibration entry in default storage! Using local storage $ALICE_ROOT");
- AliCDBStorage *localStor =
- AliCDBManager::Instance()->GetStorage("local://$ALICE_ROOT");
- entrySPD = localStor->Get("ITS/Calib/CalibSPD", RunNr);
- if(!entrySPD){
- AliFatal("Cannot find SPD calibration entry!");
- return;
- }
- }
-
- TObjArray *respSPD = (TObjArray *)entrySPD->GetObject();
- if ((! respSPD)) {
- AliFatal("Cannot get data from SPD database entry!");
- return;
- }
- for (Int_t mod=0; mod<240; mod++) {
- fCalObj[mod] = (AliITSCalibrationSPD*) respSPD->At(mod);
- }
-}
-
//______________________________________________________________________
void AliITSsimulationSPD::InitSimulationModule(Int_t module, Int_t event){
// This function creates maps to build the list of tracks for each
sigz=sig*fda;
SpreadChargeAsym(x,z,ix,iz,el,sigx,sigz,idtrack,h);
} // end if st>0.0
+
+ } // Loop over all hits h
+
// Coupling
switch (fCoupling) {
default:
} // end for i
break;
} // end switch
- } // Loop over all hits h
if(GetDebug(2))Info("HitToSDigit","Finished fCoupling=%d",fCoupling);
}
//______________________________________________________________________
sigz=sig*fda;
//SpreadCharge(x,z,ix,iz,el,sig,idtrack,h);
SpreadChargeAsym(x,z,ix,iz,el,sigx,sigz,idtrack,h);
- // cout << "sigx sigz " << sigx << " " << sigz << endl; // dom
+// cout << "sigx sigz " << sigx << " " << sigz << endl; // dom
} // end for i // End Integrate over t
else { // st == 0.0 deposit it at this point
x = x0;
sigz=sig*fda;
SpreadChargeAsym(x,z,ix,iz,el,sigx,sigz,idtrack,h);
} // end if st>0.0
+
+ } // Loop over all hits h
+
// Coupling
switch (fCoupling) {
default:
} // end for i
break;
} // end switch
- } // Loop over all hits h
if(GetDebug(2))Info("HitToSDigit","Finished fCoupling=%d",fCoupling);
}
//______________________________________________________________________
// none.
Int_t moduleNr = mod->GetIndex();
- Int_t nrDead = fCalObj[moduleNr]->GetNrDead();
+ AliITSCalibrationSPD* calObj = (AliITSCalibrationSPD*) GetCalibrationModel(moduleNr);
+
+ Int_t nrDead = calObj->GetNrBad();
+// cout << "Module --> " << moduleNr << endl; // dom
+// cout << "nr of dead " << nrDead << endl; // dom
for (Int_t i=0; i<nrDead; i++) {
- GetMap()->DeleteHit(fCalObj[moduleNr]->GetDeadColAt(i),fCalObj[moduleNr]->GetDeadRowAt(i));
+ GetMap()->DeleteHit(calObj->GetBadColAt(i),calObj->GetBadRowAt(i));
+// cout << "dead index " << i << endl; // dom
+// cout << "col row --> " << calObj->GetDeadColAt(i) << " " << calObj->GetDeadRowAt(i) << endl; // dom
}
}
//______________________________________________________________________
Int_t j,ix,iz;
Double_t electronics;
Double_t sig;
- const Int_t knmaxtrk=AliITSdigitSPD::GetNTracks();
+ const Int_t knmaxtrk=AliITSdigit::GetNTracks();
static AliITSdigitSPD dig;
AliITSCalibrationSPD* res = (AliITSCalibrationSPD*)GetCalibrationModel(fDetType->GetITSgeom()->GetStartSPD());
if(GetDebug(1)) Info("FrompListToDigits","()");
// Debugging ...
// cout << "Threshold --> " << GetThreshold() << endl; // dom
-// cout << "Couplings --> " << couplC << " " << couplR << endl; //dom
-
+// cout << "Couplings --> " << couplC << " " << couplR << endl; // dom
if(GetDebug(3)) Info("SetCouplingOld","(col=%d,row=%d,ntrack=%d,idhit=%d) "
"Calling SetCoupling couplC=%e couplR=%e",