for(Int_t i = 0; i<fMaxDigit; i++) fDigitsList[i] = rp.fDigitsList[i];
for(Int_t i = 0; i<fMaxTrack; i++) fTracksList[i] = rp.fTracksList[i];
fClusterType = rp.fClusterType;
- fCoreEnergy = rp.fCoreEnergy;
- fDispersion = rp.fDispersion;
+ fCoreEnergy = rp.fCoreEnergy;
+ fDispersion = rp.fDispersion;
for(Int_t i = 0; i<fMaxDigit; i++) {
fEnergyList[i] = rp.fEnergyList[i];
- fTimeList[i] = rp.fTimeList[i];
- fAbsIdList[i] = rp.fAbsIdList[i];
+ fTimeList[i] = rp.fTimeList[i];
+ fAbsIdList[i] = rp.fAbsIdList[i];
}
fTime = rp.fTime;
fNExMax = rp.fNExMax;
}
//____________________________________________________________________________
-void AliEMCALRecPoint::AddDigit(AliEMCALDigit & digit, Float_t Energy, Bool_t shared)
+void AliEMCALRecPoint::AddDigit(AliEMCALDigit & digit, Float_t energy, Bool_t shared)
{
// Adds a digit to the RecPoint
// and accumulates the total amplitude and the multiplicity
if ( fMulDigit >= fMaxDigit ) { // increase the size of the lists
fMaxDigit*=2 ;
- Int_t * tempo = new Int_t[fMaxDigit];
- Float_t * tempoE = new Float_t[fMaxDigit];
- Float_t * tempoT = new Float_t[fMaxDigit];
- Int_t * tempoId = new Int_t[fMaxDigit];
+ Int_t * tempo = new Int_t[fMaxDigit];
+ Float_t * tempoE = new Float_t[fMaxDigit];
+ Float_t * tempoT = new Float_t[fMaxDigit];
+ Int_t * tempoId = new Int_t[fMaxDigit];
Int_t index ;
for ( index = 0 ; index < fMulDigit ; index++ ){
fDigitsList = tempo;
fEnergyList = tempoE;
- fTimeList = tempoT;
- fAbsIdList = tempoId;
+ fTimeList = tempoT;
+ fAbsIdList = tempoId;
} // if
fDigitsList[fMulDigit] = digit.GetIndexInList() ;
- fEnergyList[fMulDigit] = Energy ;
+ fEnergyList[fMulDigit] = energy ;
fTimeList[fMulDigit] = digit.GetTimeR() ;
fAbsIdList[fMulDigit] = digit.GetId();
fMulDigit++ ;
- fAmp += Energy ;
+ fAmp += energy ;
if(shared) fSharedCluster = kTRUE;
//}
//____________________________________________________________________________
-void AliEMCALRecPoint::EvalAll(Float_t logWeight,TClonesArray * digits)
+void AliEMCALRecPoint::EvalAll(Float_t logWeight,TClonesArray * digits, const Bool_t justClusters)
{
// Evaluates cluster parameters
// First calculate the index of digit with maximum amplitude and get
// the supermodule number where it sits.
+
fDigitIndMax = GetMaximalEnergyIndex();
fSuperModuleNumber = fGeomPtr->GetSuperModuleNumber(GetAbsIdMaxDigit());
EvalParents(digits);
//Called last because it sets the global position of the cluster?
- EvalLocal2TrackingCSTransform();
+ //Do not call it when recalculating clusters out of standard reconstruction
+ if(!justClusters) EvalLocal2TrackingCSTransform();
}
for(Int_t iDigit=0; iDigit<digits->GetEntries(); iDigit++) {
digit = dynamic_cast<AliEMCALDigit *>(digits->At(fDigitsList[iDigit])) ;
-
- dist = deff;
- //fGeomPtr->RelPosCellInSModule(digit->GetId(), idMax, dist, xyzi[0], xyzi[1], xyzi[2]);
- fGeomPtr->RelPosCellInSModule(digit->GetId(), dist, xyzi[0], xyzi[1], xyzi[2]);
-
- if(logWeight > 0.0) w = TMath::Max( 0., logWeight + TMath::Log( fEnergyList[iDigit] / fAmp ));
- else w = fEnergyList[iDigit]; // just energy
-
- if(w>0.0) {
- wtot += w ;
- nstat++;
- for(i=0; i<3; i++ ) {
- clXYZ[i] += (w*xyzi[i]);
- clRmsXYZ[i] += (w*xyzi[i]*xyzi[i]);
+ if(digit){
+ dist = deff;
+ //fGeomPtr->RelPosCellInSModule(digit->GetId(), idMax, dist, xyzi[0], xyzi[1], xyzi[2]);
+ fGeomPtr->RelPosCellInSModule(digit->GetId(), dist, xyzi[0], xyzi[1], xyzi[2]);
+
+ if(logWeight > 0.0) w = TMath::Max( 0., logWeight + TMath::Log( fEnergyList[iDigit] / fAmp ));
+ else w = fEnergyList[iDigit]; // just energy
+
+ if(w>0.0) {
+ wtot += w ;
+ nstat++;
+ for(i=0; i<3; i++ ) {
+ clXYZ[i] += (w*xyzi[i]);
+ clRmsXYZ[i] += (w*xyzi[i]*xyzi[i]);
+ }
}
- }
- }
+ }else AliError("Digit null");
+ }//loop
// cout << " wtot " << wtot << endl;
if ( wtot > 0 ) {
// xRMS = TMath::Sqrt(x2m - xMean*xMean);
for(Int_t iDigit=0; iDigit<digits->GetEntries(); iDigit++) {
digit = dynamic_cast<AliEMCALDigit *>(digits->At(iDigit));
-
- //geo->RelPosCellInSModule(digit->GetId(), idMax, deff, xyzi[0], xyzi[1], xyzi[2]);
- geo->RelPosCellInSModule(digit->GetId(), deff, xyzi[0], xyzi[1], xyzi[2]);
-
- if(w0 > 0.0) w = TMath::Max( 0., w0 + TMath::Log(ed[iDigit] / esum));
- else w = ed[iDigit]; // just energy
-
- if(w>0.0) {
- wtot += w ;
- nstat++;
- for(i=0; i<3; i++ ) {
- clXYZ[i] += (w*xyzi[i]);
+ if(digit){
+ //geo->RelPosCellInSModule(digit->GetId(), idMax, deff, xyzi[0], xyzi[1], xyzi[2]);
+ geo->RelPosCellInSModule(digit->GetId(), deff, xyzi[0], xyzi[1], xyzi[2]);
+
+ if(w0 > 0.0) w = TMath::Max( 0., w0 + TMath::Log(ed[iDigit] / esum));
+ else w = ed[iDigit]; // just energy
+
+ if(w>0.0) {
+ wtot += w ;
+ nstat++;
+ for(i=0; i<3; i++ ) {
+ clXYZ[i] += (w*xyzi[i]);
+ }
}
- }
- }
+ }else AliError("Digit null");
+ }//loop
// cout << " wtot " << wtot << endl;
if (wtot > 0) {
for(i=0; i<3; i++ ) {
// key = 0(gamma, default)
// != 0(electron)
const Double_t ca = 4.82; // shower max parameter - first guess; ca=TMath::Log(1000./8.07)
- const Double_t x0 = 1.23; // radiation lenght (cm)
Double_t tmax = 0.; // position of electromagnetic shower max in cm
+ Double_t x0 = 1.31; // radiation lenght (cm)
+ //If old geometry in use
+ if(!((fGeomPtr->GetEMCGeometry()->GetGeoName()).Contains("V1"))) x0 = 1.28;
+
if(e>0.1) {
tmax = TMath::Log(e) + ca;
if (key==0) tmax += 0.5;
TString message ;
message = "AliEMCALRecPoint:\n" ;
message += " digits # = " ;
- Info("Print", message.Data()) ;
+ AliInfo(message.Data()) ;
Int_t iDigit;
for(iDigit=0; iDigit<fMulDigit; iDigit++)
printf(" %d ", fDigitsList[iDigit] ) ;
printf("\n");
- Info("Print", " Energies = ") ;
+ AliInfo(" Energies = ") ;
for(iDigit=0; iDigit<fMulDigit; iDigit++)
printf(" %f ", fEnergyList[iDigit] ) ;
printf("\n");
- Info("Print", "\n Abs Ids = ") ;
+ AliInfo("\n Abs Ids = ") ;
for(iDigit=0; iDigit<fMulDigit; iDigit++)
printf(" %i ", fAbsIdList[iDigit] ) ;
printf("\n");
- Info("Print", " Primaries ") ;
+ AliInfo(" Primaries ") ;
for(iDigit = 0;iDigit < fMulTrack; iDigit++)
printf(" %d ", fTracksList[iDigit]) ;
message += " Core radius = %f" ;
message += " Number of primaries %d" ;
message += " Stored at position %d" ;
- Info("Print", message.Data(), fClusterType, fMulDigit, fAmp, fCoreEnergy, fCoreRadius, fMulTrack, GetIndexInList() ) ;
+ AliInfo(Form(message.Data(), fClusterType, fMulDigit, fAmp, fCoreEnergy, fCoreRadius, fMulTrack, GetIndexInList()) ) ;
}
//___________________________________________________________