/* History of cvs commits:
*
* $Log$
+ * Revision 1.116 2007/10/10 09:05:10 schutz
+ * Changing name QualAss to QA
+ *
+ * Revision 1.115 2007/08/22 09:20:50 hristov
+ * Updated QA classes (Yves)
+ *
* Revision 1.114 2007/08/07 14:12:03 kharlov
* Quality assurance added (Yves Schutz)
*
// --- AliRoot header files ---
#include "AliMagF.h"
#include "AliPHOS.h"
-#include "AliPHOSGetter.h"
+#include "AliPHOSLoader.h"
#include "AliRun.h"
#include "AliPHOSDigitizer.h"
#include "AliPHOSSDigitizer.h"
#include "AliDAQ.h"
#include "AliPHOSRawDecoder.h"
#include "AliPHOSRawDigiProducer.h"
-#include "AliPHOSQualAssChecker.h"
+#include "AliPHOSQAChecker.h"
+#include "AliPHOSRecoParam.h"
+#include "AliPHOSSimParam.h"
ClassImp(AliPHOS)
{
// convert digits of the current event to raw data
+ if(AliPHOSSimParam::GetInstance()->IsEDigitizationOn()){
+ AliError("Energy digitization should be OFF if use Digits2Raw") ;
+ }
+
AliPHOSLoader * loader = dynamic_cast<AliPHOSLoader*>(fLoader) ;
// get the digits
return;
}
+ // get mapping from OCDB
+ const TObjArray* maps = AliPHOSRecoParam::GetMappings();
+ if(!maps) AliFatal("Cannot retrieve ALTRO mappings!!");
+
// some digitization constants
const Float_t kThreshold = 0.001; // skip digits below 1 MeV
const Int_t kAdcThreshold = 1; // Lower ADC threshold to write to raw data
// loop over digits (assume ordered digits)
for (Int_t iDigit = 0; iDigit < digits->GetEntries(); iDigit++) {
AliPHOSDigit* digit = dynamic_cast<AliPHOSDigit *>(digits->At(iDigit)) ;
+
+ // Skip small energy below treshold
if (digit->GetEnergy() < kThreshold)
continue;
+ // Skip CPV digits
+ if (digit->GetId() > geom->GetNModules() * geom->GetNCristalsInModule())
+ continue;
+
Int_t relId[4];
geom->AbsToRelNumbering(digit->GetId(), relId);
Int_t module = relId[0];
path += iRCU;
path += ".data";
- mapping[iDDL] = new AliCaloAltroMapping(path.Data());
+ mapping[iDDL] = (AliAltroMapping*)maps->At(iRCU);
buffer[iDDL] = new AliAltroBuffer(fileName.Data(),mapping[iDDL]);
buffer[iDDL]->WriteDataHeader(kTRUE, kFALSE); //Dummy;
}
relId[0]-1,relId[3]-1,relId[2]-1));
// if a signal is out of time range, write only trailer
if (digit->GetTimeR() > pulse->GetRawFormatTimeMax()*0.5 ) {
- AliInfo("Signal is out of time range.\n");
+ AliDebug(2,"Signal is out of time range.\n");
buffer[iDDL]->FillBuffer(0);
buffer[iDDL]->FillBuffer(pulse->GetRawFormatTimeBins() ); // time bin
buffer[iDDL]->FillBuffer(3); // bunch length
buffer[iDDL]->Flush();
buffer[iDDL]->WriteDataHeader(kFALSE, kFALSE);
delete buffer[iDDL];
- if (mapping[iDDL]) delete mapping[iDDL];
+ //if (mapping[iDDL]) delete mapping[iDDL];
}
}