rl->GetEvent(readEvent);
TClonesArray * digits = emcalLoader->Digits() ;
- digits->Delete() ;
+ digits->Delete() ; //JLK why is this created then deleted?
// Load Geometry
AliEMCALGeometry *geom = 0;
AliEMCALDigit * digit ;
AliEMCALDigit * curSDigit ;
- TClonesArray * ticks = new TClonesArray("AliEMCALTick",1000) ;
+ // TClonesArray * ticks = new TClonesArray("AliEMCALTick",1000) ;
//Put Noise contribution
for(absID = 0; absID < nEMC; absID++){ // Nov 30, 2006 by PAI; was from 1 to nEMC
if(absID==nextSig){
//Add SDigits from all inputs
- ticks->Clear() ;
- Int_t contrib = 0 ;
- Float_t a = digit->GetAmp() ;
- Float_t b = TMath::Abs( a /fTimeSignalLength) ;
+ // ticks->Clear() ;
+ //Int_t contrib = 0 ;
+
+ //Follow PHOS and comment out this timing model til a better one
+ //can be developed - JLK 28-Apr-2008
+
+ //Float_t a = digit->GetAmp() ;
+ //Float_t b = TMath::Abs( a /fTimeSignalLength) ;
//Mark the beginning of the signal
- new((*ticks)[contrib++]) AliEMCALTick(digit->GetTime(),0, b);
+ //new((*ticks)[contrib++]) AliEMCALTick(digit->GetTime(),0, b);
//Mark the end of the signal
- new((*ticks)[contrib++]) AliEMCALTick(digit->GetTime()+fTimeSignalLength, -a, -b);
+ //new((*ticks)[contrib++]) AliEMCALTick(digit->GetTime()+fTimeSignalLength, -a, -b);
+
+ // Calculate time as time of the largest digit
+ Float_t time = digit->GetTime() ;
+ Float_t eTime= digit->GetAmp() ;
// loop over input
for(i = 0; i< fInput ; i++){ //loop over (possible) merge sources
else
primaryoffset = i ;
curSDigit->ShiftPrimary(primaryoffset) ;
-
- a = curSDigit->GetAmp() ;
- b = a /fTimeSignalLength ;
- new((*ticks)[contrib++]) AliEMCALTick(curSDigit->GetTime(),0, b);
- new((*ticks)[contrib++]) AliEMCALTick(curSDigit->GetTime()+fTimeSignalLength, -a, -b);
+
+ //Remove old timing model - JLK 28-April-2008
+ //a = curSDigit->GetAmp() ;
+ //b = a /fTimeSignalLength ;
+ //new((*ticks)[contrib++]) AliEMCALTick(curSDigit->GetTime(),0, b);
+ //new((*ticks)[contrib++]) AliEMCALTick(curSDigit->GetTime()+fTimeSignalLength, -a, -b);
+ if(curSDigit->GetAmp()>eTime) {
+ eTime = curSDigit->GetAmp();
+ time = curSDigit->GetTime();
+ }
*digit = *digit + *curSDigit ; //add energies
amp *= static_cast<Float_t>(gRandom->Poisson(fMeanPhotonElectron)) / static_cast<Float_t>(fMeanPhotonElectron) ;
//calculate and set time
- Float_t time = FrontEdgeTime(ticks) ;
+ //New timing model needed - JLK 28-April-2008
+ //Float_t time = FrontEdgeTime(ticks) ;
digit->SetTime(time) ;
//Find next signal module
absID, amp, nextSig));
} // for(absID = 1; absID <= nEMC; absID++)
- ticks->Delete() ;
- delete ticks ;
+ //ticks->Delete() ;
+ //delete ticks ;
delete sdigArray ; //We should not delete its contents
AliEMCALRecParam* AliEMCALReconstructor::fgkRecParam = 0; // EMCAL rec. parameters
AliEMCALRawUtils* AliEMCALReconstructor::fgRawUtils = 0; // EMCAL raw utilities class
+AliEMCALClusterizer* AliEMCALReconstructor::fgClusterizer = 0; // EMCAL clusterizer class
TClonesArray* AliEMCALReconstructor::fgDigitsArr = 0; // shoud read just once at event
-
//____________________________________________________________________________
AliEMCALReconstructor::AliEMCALReconstructor()
: fDebug(kFALSE), fList(0), fGeom(0)
InitRecParam();
fgRawUtils = new AliEMCALRawUtils;
+ fgClusterizer = new AliEMCALClusterizerv1;
//To make sure we match with the geometry in a simulation file,
//let's try to get it first. If not, take the default geometry
if(fgDigitsArr && fgDigitsArr->GetEntries()) {
- AliEMCALClusterizerv1 clu;
- clu.SetInput(digitsTree);
- clu.SetOutput(clustersTree);
+ fgClusterizer->SetInput(digitsTree);
+ fgClusterizer->SetOutput(clustersTree);
+
if(Debug())
- clu.Digits2Clusters("deb all") ;
+ fgClusterizer->Digits2Clusters("deb all") ;
else
- clu.Digits2Clusters("") ;
+ fgClusterizer->Digits2Clusters("");
+
+ fgClusterizer->Clear();
}
+
}
//____________________________________________________________________________
// Works on the current event
// printf(" ## AliEMCALReconstructor::FillESD() is started ### \n ");
//return;
- const double timeScale = 1.e+11; // transition constant from sec to 0.01 ns
//######################################################
//#########Calculate trigger and set trigger info###########
// printf(" ## AliEMCALReconstructor::FillESD() is ended : ncl %i -> %i ### \n ",nClusters, nClustersNew);
}
+//__________________________________________________________________________
void AliEMCALReconstructor::ReadDigitsArrayFromTree(TTree *digitsTree) const
{
// See AliEMCALClusterizer::SetInput(TTree *digitsTree);
private:
Bool_t fDebug; //! verbosity controller
+
TList *fList; //! List of hists (only for trigger now)
AliEMCALGeometry *fGeom; // pointer to the EMCAL geometry
+ static AliEMCALClusterizer* fgClusterizer; // clusterizer
static AliEMCALRecParam* fgkRecParam; // reconstruction parameters for EMCAL
static AliEMCALRawUtils* fgRawUtils; // raw utilities class -
// only need one per reco
static TClonesArray* fgDigitsArr; // Array with EMCAL digits
- ClassDef(AliEMCALReconstructor,3) // Reconstruction algorithm class (Base Class)
+ ClassDef(AliEMCALReconstructor,5) // Reconstruction algorithm class (Base Class)
};