fARD = ard ;
SetName("Default");
SetTitle("aliroot") ;
+ Init() ;
}
// This design avoids scanning over the list of digits to add
// contribution to new SDigits only.
- if( !AliPHOSGetter::GetInstance())
+ if( strcmp(GetName(), "") == 0 )
Init() ;
AliPHOSGetter * gime = AliPHOSGetter::GetInstance() ;
Int_t i;
for(i=0; i<input; i++){
sdigits = (TClonesArray *)sdigArray->At(i) ;
- if ( !sdigits->GetEntries() )
+ if ( !sdigits->GetEntriesFast() )
continue ;
Int_t curNext = ((AliPHOSDigit *)sdigits->At(0))->GetId() ;
if(curNext < nextSig)
curSDigit = (AliPHOSDigit*)((TClonesArray *)sdigArray->At(i))->At(index[i]) ;
else
curSDigit = 0 ;
+
//May be several digits will contribute from the same input
while(curSDigit && curSDigit->GetId() == absID){
//Shift primary to separate primaries belonging different inputs
curSDigit = 0 ;
}
}
-
+
//Find next signal module
+ nextSig = 200000 ;
for(i=0; i<input; i++){
sdigits = (TClonesArray *)sdigArray->At(i) ;
Int_t curNext = nextSig ;
//remove digits below thresholds
- for(absID = 0; absID < nEMC ; absID++){
- digit = (AliPHOSDigit*) digits->At(absID) ;
+ for(i = 0; i < nEMC ; i++){
+ digit = (AliPHOSDigit*) digits->At(i) ;
if(sDigitizer->Calibrate( digit->GetAmp() ) < fEMCDigitThreshold)
- digits->RemoveAt(absID) ;
+ digits->RemoveAt(i) ;
else
digit->SetTime(gRandom->Gaus(digit->GetTime(),fTimeResolution) ) ;
}
- for(absID = nEMC; absID < nCPV ; absID++)
- if(sDigitizer->Calibrate(((AliPHOSDigit*)digits->At(absID))->GetAmp()) < fCPVDigitThreshold)
- digits->RemoveAt(absID) ;
+
+ for(i = nEMC; i < nCPV ; i++)
+ if(sDigitizer->Calibrate(((AliPHOSDigit*)digits->At(i))->GetAmp()) < fCPVDigitThreshold)
+ digits->RemoveAt(i) ;
digits->Compress() ;
//loop over digits
AliPHOSDigit * digit;
- cout << "Digit Id Amplitude Index " << " Nprim " << " Primaries list " << endl;
+ cout << "EMC digits (with primaries): " << endl ;
+ cout << "Digit Id Amplitude Index Nprim Primaries list " << endl;
Int_t maxEmc = gime->PHOSGeometry()->GetNModules()*gime->PHOSGeometry()->GetNCristalsInModule() ;
Int_t index ;
- for (index = 0 ; (index < digits->GetEntries()) &&
+ for (index = 0 ; (index < digits->GetEntriesFast()) &&
(((AliPHOSDigit * ) digits->At(index))->GetId() <= maxEmc) ; index++) {
digit = (AliPHOSDigit * ) digits->At(index) ;
if(digit->GetNprimary() == 0) continue;
//loop over CPV digits
AliPHOSDigit * digit;
- cout << "Digit Id " << " Amplitude " << " Index " << " Nprim " << " Primaries list " << endl;
+ cout << "CPV digits: " << endl ;
+ cout << "Digit Id Amplitude Index Nprim Primaries list " << endl;
Int_t maxEmc = gime->PHOSGeometry()->GetNModules()*gime->PHOSGeometry()->GetNCristalsInModule() ;
Int_t index ;
- for (index = 0 ; index < digits->GetEntries(); index++) {
+ for (index = 0 ; index < digits->GetEntriesFast(); index++) {
digit = (AliPHOSDigit * ) digits->At(index) ;
if(digit->GetId() > maxEmc){
cout << setw(6) << digit->GetId() << " " << setw(10) << digit->GetAmp() << " "
// --- AliRoot header files ---
-#include "AliGenerator.h"
+ #include "AliGenerator.h"
#include "AliPHOSGeometry.h"
#include "AliPHOSEmcRecPoint.h"
#include "AliRun.h"
fCoreEnergy = 0 ;
fEnergyList = 0 ;
fTime = -1. ;
+ fLocPos.SetX(1000000.) ; //Local position should be evaluated
}
EvalElipsAxis(logWeight, digits) ;
EvalDispersion(logWeight, digits) ;
EvalCoreEnergy(logWeight, digits);
+ EvalTime(digits) ;
}
//____________________________________________________________________________
void AliPHOSEmcRecPoint::EvalLocalPosition(Float_t logWeight, TClonesArray * digits)
fLocPos.SetY(0.) ;
fLocPos.SetZ(z - depthz) ;
+ fLocPosM = 0 ;
}
//____________________________________________________________________________
// --- AliRoot header files ---
#include "AliRun.h"
#include "AliPHOSDigit.h"
+#include "AliPHOSGeometry.h"
#include "AliPHOSGetter.h"
#include "AliPHOSHit.h"
#include "AliPHOSSDigitizer.h"
return kFALSE ;
}
//__________________________________________________________________
+//__________________________________________________________________
void AliPHOSSDigitizer::PrintSDigits(Option_t * option)
{
// Prints list of digits produced in the current pass of AliPHOSDigitizer
+
AliPHOSGetter * gime = AliPHOSGetter::GetInstance() ;
TString sdname(GetName()) ;
sdname.Remove(sdname.Index(GetTitle())-1) ;
TClonesArray * sdigits = gime->SDigits(sdname.Data()) ;
- cout << "AliPHOSSDigitizer: event "<<gAlice->GetEvNumber() << endl ;
- cout << " Number of entries in SDigits list " << sdigits->GetEntriesFast() << endl ;
+ cout << "AliPHOSSDigitiser: event " << gAlice->GetEvNumber() << endl ;
+ cout << " Number of entries in SDigits list " << sdigits->GetEntriesFast() << endl ;
cout << endl ;
-
- fSDigitsInRun += sdigits->GetEntriesFast() ;
-
- if(strstr(option,"all")){// print all digits
+ if(strstr(option,"all")||strstr(option,"EMC")){
//loop over digits
AliPHOSDigit * digit;
- cout << "SDigit Id " << " Amplitude " << " Index " << " Nprim " << " Primaries list " << endl;
+ cout << "EMC sdigits " << endl ;
+ cout << "Digit Id Amplitude Index Nprim Primaries list " << endl;
+ Int_t maxEmc = gime->PHOSGeometry()->GetNModules()*gime->PHOSGeometry()->GetNCristalsInModule() ;
Int_t index ;
- for (index = 0 ; index < sdigits->GetEntries() ; index++) {
+ for (index = 0 ; (index < sdigits->GetEntriesFast()) &&
+ (((AliPHOSDigit * ) sdigits->At(index))->GetId() <= maxEmc) ; index++) {
digit = (AliPHOSDigit * ) sdigits->At(index) ;
- cout << setw(8) << digit->GetId() << " " << setw(3) << digit->GetAmp() << " "
- << setw(6) << digit->GetIndexInList() << " "
- << setw(5) << digit->GetNprimary() <<" ";
+ if(digit->GetNprimary() == 0) continue;
+ cout << setw(6) << digit->GetId() << " " << setw(10) << digit->GetAmp() << " "
+ << setw(6) << digit->GetIndexInList() << " "
+ << setw(5) << digit->GetNprimary() <<" ";
Int_t iprimary;
for (iprimary=0; iprimary<digit->GetNprimary(); iprimary++)
- cout << setw(5) << digit->GetPrimary(iprimary+1) << " ";
+ cout << setw(5) << digit->GetPrimary(iprimary+1) << " ";
cout << endl;
- }
+ }
+ cout << endl;
+ }
+
+ if(strstr(option,"all")||strstr(option,"CPV")){
+ //loop over CPV digits
+ AliPHOSDigit * digit;
+ cout << "CPV sdigits " << endl ;
+ cout << "Digit Id Amplitude Index Nprim Primaries list " << endl;
+ Int_t maxEmc = gime->PHOSGeometry()->GetNModules()*gime->PHOSGeometry()->GetNCristalsInModule() ;
+ Int_t index ;
+ for (index = 0 ; index < sdigits->GetEntriesFast(); index++) {
+ digit = (AliPHOSDigit * ) sdigits->At(index) ;
+ if(digit->GetId() > maxEmc){
+ cout << setw(6) << digit->GetId() << " " << setw(10) << digit->GetAmp() << " "
+ << setw(6) << digit->GetIndexInList() << " "
+ << setw(5) << digit->GetNprimary() <<" ";
+
+ Int_t iprimary;
+ for (iprimary=0; iprimary<digit->GetNprimary(); iprimary++)
+ cout << setw(5) << digit->GetPrimary(iprimary+1) << " ";
+ cout << endl;
+ }
+ }
}
+
}
//____________________________________________________________________________