From: hristov Date: Fri, 7 Apr 2006 08:42:00 +0000 (+0000) Subject: Follow AliAlignObj framework and remove AliPHOSAlignData (Yu.Kharlov) X-Git-Url: http://git.uio.no/git/?p=u%2Fmrichter%2FAliRoot.git;a=commitdiff_plain;h=8569848649c024a39bf29f9ab31fd96a31db7f41 Follow AliAlignObj framework and remove AliPHOSAlignData (Yu.Kharlov) --- diff --git a/PHOS/AliPHOS.cxx b/PHOS/AliPHOS.cxx index 01bbdca7176..661308d301b 100644 --- a/PHOS/AliPHOS.cxx +++ b/PHOS/AliPHOS.cxx @@ -16,6 +16,9 @@ /* History of cvs commits: * * $Log$ + * Revision 1.95 2006/03/14 19:40:41 kharlov + * Remove De-digitizing of raw data and digitizing the raw data fit + * * Revision 1.94 2006/03/07 18:56:25 kharlov * CDB is passed via environment variable * @@ -94,25 +97,10 @@ AliPHOS::AliPHOS(const char* name, const char* title): AliDetector(name, title) { // ctor : title is used to identify the layout - // Check if CDB_PATH is defined and take alignment data from CDB - AliPHOSAlignData* alignda = 0; - if (gSystem->Getenv("CDB_PATH")) { - TString cdbPath = gSystem->Getenv("CDB_PATH"); - AliCDBStorage *cdbStorage = AliCDBManager::Instance()->GetStorage(cdbPath); - if (cdbStorage != NULL) { - alignda = - (AliPHOSAlignData*)(cdbStorage->Get("PHOS/Alignment/Geometry",0)->GetObject()); - if(AliLog::GetGlobalDebugLevel()>0) alignda->Print(); - } - else { - Fatal("AliPHOS", "No CDB storage at the path %s", cdbPath.Data()) ; - } - } - fHighCharge = 8.2 ; // adjusted for a high gain range of 5.12 GeV (10 bits) fHighGain = 6.64 ; fHighLowGainFactor = 16. ; // adjusted for a low gain range of 82 GeV (10 bits) - fLowGainOffset = GetGeometry(alignda)->GetNModules() + 1 ; + fLowGainOffset = GetGeometry()->GetNModules() + 1 ; // offset added to the module id to distinguish high and low gain data } @@ -438,7 +426,7 @@ void AliPHOS::Digits2Raw() // get the digitizer loader->LoadDigitizer(); -// AliPHOSDigitizer * digitizer = dynamic_cast(loader->Digitizer()) ; + AliPHOSDigitizer * digitizer = dynamic_cast(loader->Digitizer()) ; // get the geometry AliPHOSGeometry* geom = GetGeometry(); @@ -456,15 +444,6 @@ void AliPHOS::Digits2Raw() Int_t adcValuesLow[fkTimeBins]; Int_t adcValuesHigh[fkTimeBins]; -// AliPHOSCalibData* calib=0; - -// //retrieve calibration database -// if(AliCDBManager::Instance()->IsDefaultStorageSet()){ -// AliCDBEntry *entry = (AliCDBEntry*) AliCDBManager::Instance()->GetDefaultStorage() -// ->Get("PHOS/GainFactors_and_Pedestals/Calibration",gAlice->GetRunNumber()); -// calib = (AliPHOSCalibData*) entry->GetObject(); -// } - // loop over digits (assume ordered digits) for (Int_t iDigit = 0; iDigit < digits->GetEntries(); iDigit++) { AliPHOSDigit* digit = dynamic_cast(digits->At(iDigit)) ; @@ -512,16 +491,8 @@ void AliPHOS::Digits2Raw() } else { Double_t energy = 0 ; Int_t module = relId[0]; -// Int_t column = relId[3]; -// Int_t row = relId[2]; if ( digit->GetId() <= geom->GetNModules() * geom->GetNCristalsInModule()) { -// if(calib) -// energy = digit->GetAmp()*calib->GetADCchannelEmc(module,column,row) + -// calib->GetADCpedestalEmc(module,column,row); -// else -// energy=digit->GetAmp()*digitizer->GetEMCchannel()+digitizer->GetEMCpedestal(); -// } - energy=digit->GetAmp(); + energy=digit->GetAmp()*digitizer->GetEMCchannel() + digitizer->GetEMCpedestal(); } else { // energy = digit->GetAmp()*digitizer->GetCPVchannel()+digitizer->GetCPVpedestal(); @@ -529,9 +500,9 @@ void AliPHOS::Digits2Raw() } Bool_t lowgain = RawSampledResponse(digit->GetTimeR(), energy, adcValuesHigh, adcValuesLow) ; - if (lowgain) + if (lowgain) buffer->WriteChannel(relId[3], relId[2], module + fLowGainOffset, - GetRawFormatTimeBins(), adcValuesLow, kThreshold); + GetRawFormatTimeBins(), adcValuesLow , kThreshold); else buffer->WriteChannel(relId[3], relId[2], module, GetRawFormatTimeBins(), adcValuesHigh, kThreshold); @@ -605,6 +576,10 @@ Bool_t AliPHOS::RawSampledResponse(Double_t dtime, Double_t damp, Int_t * adcH, { // for a start time dtime and an amplitude damp given by digit, // calculates the raw sampled response AliPHOS::RawResponseFunction + // Input: dtime - signal start time + // damp - signal amplitude (energy) + // Output: adcH - array[fkTimeBins] of 10-bit samples for high-gain channel + // adcL - array[fkTimeBins] of 10-bit samples for low-gain channel const Int_t kRawSignalOverflow = 0x3FF ; Bool_t lowGain = kFALSE ; diff --git a/PHOS/AliPHOS.h b/PHOS/AliPHOS.h index 4a2f4cff5c3..33b1c79e371 100644 --- a/PHOS/AliPHOS.h +++ b/PHOS/AliPHOS.h @@ -7,6 +7,9 @@ /* History of cvs commits: * * $Log$ + * Revision 1.66 2006/03/24 21:39:33 schutz + * Modification needed to include PHOS in the global trigger framework + * * Revision 1.65 2006/03/07 18:56:25 kharlov * CDB is passed via environment variable * @@ -43,7 +46,6 @@ class TRandom ; #include "AliLog.h" #include "AliPHOSGeometry.h" #include "AliPHOSTrigger.h" -class AliPHOSAlignData; class AliPHOS : public AliDetector { @@ -70,8 +72,6 @@ public: virtual void FinishRun() {;} virtual AliPHOSGeometry * GetGeometry() const {return AliPHOSGeometry::GetInstance(GetTitle(),"") ; } - virtual AliPHOSGeometry * GetGeometry(AliPHOSAlignData *alignda) const - {return AliPHOSGeometry::GetInstance(GetTitle(),"",alignda) ; } virtual void Hits2SDigits(); virtual Int_t IsVersion(void) const = 0 ; @@ -113,7 +113,8 @@ protected: Double_t fHighLowGainFactor ; // high to low gain factor for the raw RO signal Int_t fLowGainOffset ; // to separate high from low gain in the DDL static Int_t fgOrder ; // order of the gamma function for the RO signal - static const Int_t fkTimeBins = 256 ; // number of sampling bins of the raw RO signal +// static const Int_t fkTimeBins = 256 ; // number of sampling bins of the raw RO signal + static const Int_t fkTimeBins = 64 ; // number of sampling bins of the raw RO signal static Double_t fgTimeMax ; // maximum sampled time of the raw RO signal static Double_t fgTimePeak ; // peaking time of the raw RO signal static Double_t fgTimeTrigger ; // time of the trigger for the RO signal diff --git a/PHOS/AliPHOSGeometry.cxx b/PHOS/AliPHOSGeometry.cxx index 273a6862009..3677999be3d 100644 --- a/PHOS/AliPHOSGeometry.cxx +++ b/PHOS/AliPHOSGeometry.cxx @@ -45,7 +45,6 @@ ClassImp(AliPHOSGeometry) // these initialisations are needed for a singleton AliPHOSGeometry * AliPHOSGeometry::fgGeom = 0 ; Bool_t AliPHOSGeometry::fgInit = kFALSE ; -AliPHOSAlignData * AliPHOSGeometry::fgAlignData = 0 ; //____________________________________________________________________________ AliPHOSGeometry::AliPHOSGeometry() { @@ -83,16 +82,8 @@ void AliPHOSGeometry::Init(void) fgInit = kTRUE ; - // YK 23.02.2006 - if(fgAlignData != NULL) { - // Number of modules is read from Alignment DB if exists - fNModules = fgAlignData->GetNModules(); - } - else { - // Number of modules is fixed if Alignment DB does not exist - fNModules = 5; - fAngle = 20; - } + fNModules = 5; + fAngle = 20; fGeometryEMCA = new AliPHOSEMCAGeometry(); @@ -119,39 +110,22 @@ void AliPHOSGeometry::Init(void) fRotMatrixArray = new TObjArray(fNModules) ; - // YK 23.02.2006 - if(fgAlignData) { - // Geometry parameters are read from Alignment DB if exists - - for (Int_t iModule=0; iModuleGetModuleCenter(iModule,iXYZ); - fModuleAngle[iModule][iXYZ][0] = - fgAlignData->GetModuleAngle(iModule,iXYZ,0); - fModuleAngle[iModule][iXYZ][1] = - fgAlignData->GetModuleAngle(iModule,iXYZ,1); - } - } - } - else { - // Geometry parameters are calculated if Alignment DB does not exist + // Geometry parameters are calculated - SetPHOSAngles(); - Double_t const kRADDEG = 180.0 / TMath::Pi() ; - Float_t r = GetIPtoOuterCoverDistance() + fPHOSParams[3] - GetCPVBoxSize(1) ; - for (Int_t iModule=0; iModuleSetDefaultStorage("local://$ALICE_ROOT"); + + AliCDBMetaData *md= new AliCDBMetaData(); + md->SetResponsible("Yuri Kharlov"); + md->SetComment("Alignment objects for ideal geometry, i.e. applying them to TGeo has to leave geometry unchanged"); + AliCDBId id("PHOS/Align/Data",0,0); + CDB->Put(array,id, md); +} + + + + +