AliTRDtrackV1 *track = (AliTRDtrackV1*)GetUserData();
AliInfo(Form("Clusters[%d]", track->GetNumberOfClusters()));
- AliTRDrecoParam *rec = 0x0;
- if(!(rec = AliTRDReconstructor::RecoParam())){
+ const AliTRDrecoParam *rec = 0x0;
+ if(!(rec = AliTRDReconstructor::GetRecoParam())){
AliWarning("TRD reco param missing.");
return;
}
- rec->SetPIDMethod(AliTRDrecoParam::kLQPID);
+ // rec->SetPIDMethod(AliTRDrecoParam::kLQPID);
track->CookPID();
printf("PIDLQ : "); for(int is=0; is<AliPID::kSPECIES; is++) printf("%s[%5.2f] ", AliPID::ParticleName(is), 1.E2*track->GetPID(is)); printf("\n");
- rec->SetPIDMethod(AliTRDrecoParam::kNNPID);
- track->CookPID();
- printf("PIDNN : "); for(int is=0; is<AliPID::kSPECIES; is++) printf("%s[%5.2f] ", AliPID::ParticleName(is), 1.E2*track->GetPID(is)); printf("\n");
+ // rec->SetPIDMethod(AliTRDrecoParam::kNNPID);
+ // track->CookPID();
+ // printf("PIDNN : "); for(int is=0; is<AliPID::kSPECIES; is++) printf("%s[%5.2f] ", AliPID::ParticleName(is), 1.E2*track->GetPID(is)); printf("\n");
}
map->Add(new TObjString("fAliceBeamEnergy"),new TObjString("14000"));
else map->Add(new TObjString("fAliceBeamEnergy"),new TObjString("5500"));
map->Add(new TObjString("fAliceBeamType"),new TObjString(system));
- map->Add(new TObjString("fNumberOfDetectors"),new TObjString("15"));
- map->Add(new TObjString("fDetectorMask"),new TObjString("1048575"));
- map->Add(new TObjString("fLHCPeriod"),new TObjString("LHC07a"));
+ map->Add(new TObjString("fNumberOfDetectors"),new TObjString("21"));
+ map->Add(new TObjString("fDetectorMask"),new TObjString("1074790399"));
+ map->Add(new TObjString("fLHCPeriod"),new TObjString("LHC08c"));
//DCS
map->Add(new TObjString("fLHCState"),new TObjString("test"));
map->Add(new TObjString("fAliceBeamEnergy"),new TObjString(ParseConfig("fAliceBeamEnergy")));
map->Add(new TObjString("fAliceBeamType"),new TObjString(system));
map->Add(new TObjString("fNumberOfDetectors"),new TObjString(ParseConfig("fNumberOfDetectors")));
- map->Add(new TObjString("fDetectorMask"),new TObjString("1048575"));
- map->Add(new TObjString("fLHCPeriod"),new TObjString("LHC07a"));
+ map->Add(new TObjString("fDetectorMask"),new TObjString("1074790399"));
+ map->Add(new TObjString("fLHCPeriod"),new TObjString("LHC08c"));
//DCS
map->Add(new TObjString("fLHCState"),new TObjString("0"));
#include "TClonesArray.h"
#include "AliPHOSGeometry.h"
#include "AliPHOSDigit.h"
-#include "AliPHOSRecoParamEmc.h"
+#include "AliPHOSRecoParam.h"
ClassImp(AliHLTPHOSClusterizer);
}
void
-AliHLTPHOSClusterizer::SetRecoParameters(AliPHOSRecoParamEmc* params)
+AliHLTPHOSClusterizer::SetRecoParameters(AliPHOSRecoParam* params)
{
//see header file for documentation
- fEmcClusteringThreshold = params->GetClusteringThreshold();
- fEmcMinEnergyThreshold = params->GetMinE();
- fLogWeight = params->GetLogWeight();
+ fEmcClusteringThreshold = params->GetEMCClusteringThreshold();
+ fEmcMinEnergyThreshold = params->GetEMCMinE();
+ fLogWeight = params->GetEMCLogWeight();
}
void
class TClonesArray;
class AliPHOSDigit;
-class AliPHOSRecoParamEmc;
+class AliPHOSRecoParam;
/**
* @class AliHLTPHOSClusterizer
/** Set reco parameters */
- void SetRecoParameters(AliPHOSRecoParamEmc* recoPars);
+ void SetRecoParameters(AliPHOSRecoParam* recoPars);
/** Set emc clustering threshold */
void SetEmcClusteringThreshold(Float_t threshold) { fEmcClusteringThreshold = threshold; }
//AliTPCRecoParam * tpcRecoParam = AliTPCRecoParam::GetLowFluxParam();
AliTPCRecoParam * tpcRecoParam = AliTPCRecoParam::GetHLTParam();
if(tpcRecoParam) {
- AliTPCReconstructor::SetRecoParam(tpcRecoParam);
+ AliTPCReconstructor tpcReconstructor;
+ tpcReconstructor.SetRecoParam(tpcRecoParam);
}
// TPC geometry parameters
return -1;
}
- AliTRDReconstructor::SetRecoParam(fRecoParam);
+ AliTRDReconstructor reconstructor; reconstructor.SetRecoParam(fRecoParam);
// init the raw data type to be used...
// the switch here will become obsolete as soon as the data structures is fixed
AliTRDrecoParam *fPars = AliTRDrecoParam::GetLowFluxParam();
fPars->SetSeeding(kTRUE);
fPars->SetStreamLevel(0);
- AliTRDReconstructor::SetRecoParam(fPars);
+ AliTRDReconstructor reconstructor; reconstructor.SetRecoParam(fPars);
fTracker = new AliTRDtracker(fGeometryFile);
//fTracker = new AliTRDtracker(fGeometryFile);
}
// no debug stream -> no debug files! on HLT
fRecoParam->SetStreamLevel(0);
- AliTRDReconstructor::SetRecoParam(fRecoParam);
+ AliTRDReconstructor reconstructor; reconstructor.SetRecoParam(fRecoParam);
// geometry:
// for some unknown at this point reason (30th of April 2008)
AliCDBEntry *entryPedestalSSD = AliCDBManager::Instance()->Get("ITS/Calib/PedestalSSD");
AliCDBEntry *entryGainSSD = AliCDBManager::Instance()->Get("ITS/Calib/GainSSD");
AliCDBEntry *entryBadChannelsSSD = AliCDBManager::Instance()->Get("ITS/Calib/BadChannelsSSD");
- // Entry for the AliITSRecoParam object
- AliCDBEntry *entryRP = AliCDBManager::Instance()->Get("ITS/Calib/RecoParam/");
AliCDBEntry *entry2SPD = AliCDBManager::Instance()->Get("ITS/Calib/RespSPD");
AliCDBEntry *entry2SDD = AliCDBManager::Instance()->Get("ITS/Calib/RespSDD");
AliCDBEntry *entry2SSD = AliCDBManager::Instance()->Get("ITS/Calib/RespSSD");
if(!cacheStatus)entry2SSD->SetObject(NULL);
entry2SSD->SetOwner(kTRUE);
- if(!AliITSReconstructor::GetRecoParam()){
- if(!entryRP) AliFatal("Calibration object (RecoParam) retrieval from OCDB failed! Hint: as an alternative you can set it in your reconstruction macro ");
- AliITSRecoParam *rp = (AliITSRecoParam*)entryRP->GetObject();
- if(!cacheStatus)entryRP->SetObject(NULL);
- entryRP->SetOwner(kTRUE);
- AliITSReconstructor::SetRecoParam(rp);
- }
- else {
- AliWarning("AliITSRecoParam object has been already set in AliITSReconstructor. The OCDB instance will not be used\n");
- }
-
-
// DB entries are deleted. In this way metadeta objects are deleted as well
if(!cacheStatus){
delete entrySPD;
ClassImp(AliITSReconstructor)
-AliITSRecoParam *AliITSReconstructor::fgRecoParam =0; // reconstruction parameters
//___________________________________________________________________________
AliITSReconstructor::AliITSReconstructor() : AliReconstructor(),
AliITSReconstructor::~AliITSReconstructor(){
// destructor
delete fItsPID;
- // if(!fgRecoParam) delete fgRecoParam;
if(fDetTypeRec) delete fDetTypeRec;
}
//______________________________________________________________________
fDetTypeRec->SetITSgeom(geom);
fDetTypeRec->SetDefaults();
- if(fgRecoParam) {
- fgRecoParam->PrintParameters();
- } else {
- AliWarning("AliITSRecoParam has not been set");
- }
-
return;
}
AliESDEvent* esd) const
{FillESD((TTree*)NULL, clustersTree, esd);}
- static void SetRecoParam(AliITSRecoParam * param){ fgRecoParam = param;}
- static const AliITSRecoParam* GetRecoParam(){ return fgRecoParam;}
+ static const AliITSRecoParam* GetRecoParam() { return dynamic_cast<const AliITSRecoParam*>(AliReconstructor::GetRecoParam(0)); }
private:
//data
- static AliITSRecoParam *fgRecoParam; // reconstruction parameters
AliITSpidESD *fItsPID; // Pid for ITS
AliITSDetTypeRec *fDetTypeRec; // reconstructor
- ClassDef(AliITSReconstructor, 5) // class for the ITS reconstruction
+ ClassDef(AliITSReconstructor, 6) // class for the ITS reconstruction
};
#endif
#include "AliMUONPreClusterFinder.h"
#include "AliMUONPreClusterFinderV2.h"
#include "AliMUONPreClusterFinderV3.h"
-#include "AliMUONRecoParam.h"
#include "AliMUONSimpleClusterServer.h"
#include "AliMUONTracker.h"
#include "AliMUONTriggerCircuit.h"
#include "AliMpCDB.h"
#include "AliMpConstants.h"
-#include "AliRecoParam.h"
#include "AliRawReader.h"
#include "AliCDBManager.h"
#include "AliCodeTimer.h"
ClassImp(AliMUONReconstructor)
/// \endcond
-AliMUONRecoParam* AliMUONReconstructor::fgRecoParam = 0x0; // reconstruction parameters
-
//_____________________________________________________________________________
AliMUONReconstructor::AliMUONReconstructor() :
AliReconstructor(),
delete fClusterStore;
}
-//_____________________________________________________________________________
-const AliMUONRecoParam* AliMUONReconstructor::GetRecoParam()
-{
- /// get reconstruction parameters
-
- // initialize reconstruction parameters if not already done
- if (!fgRecoParam) {
- cout<<"W-AliMUONReconstructor::GetRecoParam: Reconstruction parameters not initialized - Use default one"<<endl;
- fgRecoParam = AliMUONRecoParam::GetLowFluxParam();
- }
-
- return fgRecoParam;
-}
-
//_____________________________________________________________________________
void
AliMUONReconstructor::Calibrate(AliMUONVDigitStore& digitStore) const
class AliMUONVTriggerStore;
class TClonesArray;
+#include "AliDetectorRecoParam.h"
+#include "AliMUONRecoParam.h"
+
class AliMUONReconstructor : public AliReconstructor
{
public:
virtual AliTracker* CreateTracker() const;
- static void SetRecoParam(AliMUONRecoParam* recoParam) {fgRecoParam = recoParam;}
- static const AliMUONRecoParam* GetRecoParam();
+ static const AliMUONRecoParam* GetRecoParam() { return dynamic_cast<const AliMUONRecoParam*>(AliReconstructor::GetRecoParam(7)); }
static AliMUONVClusterFinder* CreateClusterFinder(const char* clusterFinderType);
mutable AliMUONVTrackStore* fTrackStore; //!< Track container
mutable AliMUONVClusterStore* fClusterStore; //!< cluster store (when not in combined tracking mode)
- static AliMUONRecoParam* fgRecoParam; //!< parameters used to tune the MUON reconstruction
-
- ClassDef(AliMUONReconstructor,7) // Implementation of AliReconstructor
+ ClassDef(AliMUONReconstructor,8) // Implementation of AliReconstructor
};
#endif
#include "AliPHOSRawDecoder.h"
#include "AliPHOSRawDigiProducer.h"
#include "AliPHOSQAChecker.h"
-#include "AliPHOSRecoParamEmc.h"
+#include "AliPHOSRecoParam.h"
#include "AliPHOSSimParam.h"
-#include "AliPHOSCpvRawWrite.h"
ClassImp(AliPHOS)
}
// get mapping from OCDB
- const TObjArray* maps = AliPHOSRecoParamEmc::GetMappings();
+ const TObjArray* maps = AliPHOSRecoParam::GetMappings();
if(!maps) AliFatal("Cannot retrieve ALTRO mappings!!");
// some digitization constants
Float_t eMax=-333;
//!!!for debug!!!
- TObjArray *cpvDigitsAll = new TObjArray();
- TClonesArray *cpvDigitsModule;
- Int_t *nCPVdigits = new Int_t[geom->GetNModules()];
- Int_t module;
- for (module=0; module<geom->GetNModules(); module++) {
- cpvDigitsAll->Add(new TClonesArray("AliPHOSDigit",100));
- nCPVdigits[module] = 0;
- }
-
// 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);
- module = relId[0];
-
- // Fill TObjArray of TClonesArray's with CPV digits per module
- if (digit->GetId() > geom->GetNModules() * geom->GetNCristalsInModule()) {
- cpvDigitsModule = (TClonesArray*)cpvDigitsAll->At(module-1);
- new((*cpvDigitsModule)[nCPVdigits[module-1]++])
- AliPHOSDigit(-1,digit->GetId(),digit->GetAmp(),digit->GetTime());
- continue;
- }
-
+ Int_t module = relId[0];
// Begin FIXME
if (relId[1] != 0)
modMax,colMax,rowMax,eMax));
delete pulse;
-
- for (module=0; module<geom->GetNModules(); module++) {
- AliDebug(2,Form("Number of CPV digits in module %d: %d/%d",
- module,
- ((TClonesArray*)cpvDigitsAll->At(module))->GetEntriesFast(),
- nCPVdigits[module]));
- }
- AliPHOSCpvRawWrite *cpvRaw = new AliPHOSCpvRawWrite();
- cpvRaw->WriteRaw(cpvDigitsAll);
- delete cpvRaw;
loader->UnloadDigits();
}
{
// default ctor (to be used mainly by Streamer)
- InitParameters() ;
fDefaultInit = kTRUE ;
}
{
// ctor with the indication of the file where header Tree and digits Tree are stored
- InitParameters() ;
Init() ;
fDefaultInit = kFALSE ;
}
fNumberOfCpvClusters = 0 ;
fNumberOfEmcClusters = 0 ;
- const AliPHOSRecoParam* parEmc = AliPHOSReconstructor::GetRecoParamEmc();
- if(!parEmc) AliFatal("Reconstruction parameters for EMC not set!");
+ const AliPHOSRecoParam* recoParam = AliPHOSReconstructor::GetRecoParam();
+ if(!recoParam) AliFatal("Reconstruction parameters are not set!");
- const AliPHOSRecoParam* parCpv = AliPHOSReconstructor::GetRecoParamCpv();
- if(!parCpv) AliFatal("Reconstruction parameters for CPV not set!");
-
- fCpvClusteringThreshold = parCpv->GetClusteringThreshold();
- fEmcClusteringThreshold = parEmc->GetClusteringThreshold();
+ fCpvClusteringThreshold = recoParam->GetEMCClusteringThreshold();
+ fEmcClusteringThreshold = recoParam->GetCPVClusteringThreshold();
- fEmcLocMaxCut = parEmc->GetLocalMaxCut();
- fCpvLocMaxCut = parCpv->GetLocalMaxCut();
+ fEmcLocMaxCut = recoParam->GetEMCLocalMaxCut();
+ fCpvLocMaxCut = recoParam->GetCPVLocalMaxCut();
- fW0 = parEmc->GetLogWeight();
- fW0CPV = parCpv->GetLogWeight();
+ fW0 = recoParam->GetEMCLogWeight();
+ fW0CPV = recoParam->GetCPVLogWeight();
fEmcTimeGate = 1.e-6 ;
- fEcoreRadius = parEmc->GetEcoreRadius();
+ fEcoreRadius = recoParam->GetEMCEcoreRadius();
- fToUnfold = parEmc->ToUnfold() ;
+ fToUnfold = recoParam->EMCToUnfold() ;
fWrite = kTRUE ;
}
Int_t index ;
//Evaluate position, dispersion and other RecPoint properties..
Int_t nEmc = fEMCRecPoints->GetEntriesFast();
- Float_t emcMinE= AliPHOSReconstructor::GetRecoParamEmc()->GetMinE(); //Minimal digit energy
+ Float_t emcMinE= AliPHOSReconstructor::GetRecoParam()->GetEMCMinE(); //Minimal digit energy
TVector3 fakeVtx(0.,0.,0.) ;
for(index = 0; index < nEmc; index++){
AliPHOSEmcRecPoint * rp =
AliPHOSClusterizerv1() ;
AliPHOSClusterizerv1(AliPHOSGeometry *geom);
virtual ~AliPHOSClusterizerv1() ;
+
+ void InitParameters() ;
virtual Int_t AreNeighbours(AliPHOSDigit * d1, AliPHOSDigit * d2)const ;
// Checks if digits are in neighbour cells
Bool_t FindFit(AliPHOSEmcRecPoint * emcRP, AliPHOSDigit ** MaxAt, Float_t * maxAtEnergy,
Int_t NPar, Float_t * FitParametres) const; //Used in UnfoldClusters, calls TMinuit
void Init() ;
- void InitParameters() ;
virtual void MakeUnfolding() ;
void UnfoldCluster(AliPHOSEmcRecPoint * iniEmc,Int_t Nmax,
const Int_t modMax = 5 ;
rawReader->Reset() ;
AliPHOSRawDecoder decoder(rawReader);
- decoder.SubtractPedestals(AliPHOSReconstructor::GetRecoParamEmc()->SubtractPedestals());
+ decoder.SubtractPedestals(AliPHOSReconstructor::GetRecoParam()->EMCSubtractPedestals());
Int_t count = 0 ;
while (decoder.NextDigit()) {
Int_t module = decoder.GetModule() ;
//Fill prepared histograms with Raw digit properties
rawReader->Reset() ;
AliPHOSRawDecoder * decoder ;
- if(strcmp(AliPHOSReconstructor::GetRecoParamEmc()->DecoderVersion(),"v1")==0)
+ if(strcmp(AliPHOSReconstructor::GetRecoParam()->EMCDecoderVersion(),"v1")==0)
decoder=new AliPHOSRawDecoderv1(rawReader);
else
- if(strcmp(AliPHOSReconstructor::GetRecoParamEmc()->DecoderVersion(),"v2")==0)
+ if(strcmp(AliPHOSReconstructor::GetRecoParam()->EMCDecoderVersion(),"v2")==0)
decoder=new AliPHOSRawDecoderv2(rawReader);
else
decoder=new AliPHOSRawDecoder(rawReader);
- decoder->SubtractPedestals(AliPHOSReconstructor::GetRecoParamEmc()->SubtractPedestals());
+ decoder->SubtractPedestals(AliPHOSReconstructor::GetRecoParam()->EMCSubtractPedestals());
Double_t lgEtot=0. ;
Double_t hgEtot=0. ;
Int_t lgNtot=0 ;
AliPHOSCalibData * AliPHOSRawDigiProducer::fgCalibData = 0 ;
//--------------------------------------------------------------------------------------
-AliPHOSRawDigiProducer::AliPHOSRawDigiProducer():TObject(),
- fEmcMinE(0.),fCpvMinE(0.),fSampleQualityCut(1.),
- fEmcCrystals(0),fGeom(0),fPulseGenerator(0){
-
+AliPHOSRawDigiProducer::AliPHOSRawDigiProducer():
+ TObject(),
+ fEmcMinE(0.),
+ fCpvMinE(0.),
+ fSampleQualityCut(1.),
+ fEmcCrystals(0),
+ fGeom(0),
+ fPulseGenerator(0)
+{
+ // Default constructor
}
//--------------------------------------------------------------------------------------
-AliPHOSRawDigiProducer::AliPHOSRawDigiProducer(const AliPHOSRecoParam* parEmc, const AliPHOSRecoParam* parCpv):TObject(),
- fEmcMinE(0.),fCpvMinE(0.),fSampleQualityCut(1.),fEmcCrystals(0),fGeom(0),fPulseGenerator(0){
+AliPHOSRawDigiProducer::AliPHOSRawDigiProducer(const AliPHOSRecoParam* recoParam):
+ TObject(),
+ fEmcMinE(0.),
+ fCpvMinE(0.),
+ fSampleQualityCut(1.),
+ fEmcCrystals(0),
+ fGeom(0),
+ fPulseGenerator(0)
+{
+ // Constructor takes paramerters from recoParam
- if(!parEmc) AliFatal("Reconstruction parameters for EMC not set!");
- if(!parCpv) AliFatal("Reconstruction parameters for CPV not set!");
+ if(!recoParam) AliFatal("Reconstruction parameters are not set!");
- fEmcMinE = parEmc->GetMinE();
- fCpvMinE = parCpv->GetMinE();
+ fEmcMinE = recoParam->GetEMCMinE();
+ fCpvMinE = recoParam->GetCPVMinE();
- fSampleQualityCut = parEmc->GetSampleQualityCut() ;
+ fSampleQualityCut = recoParam->GetEMCSampleQualityCut() ;
fGeom=AliPHOSGeometry::GetInstance() ;
if(!fGeom) fGeom = AliPHOSGeometry::GetInstance("IHEP");
GetCalibrationParameters() ;
}
//--------------------------------------------------------------------------------------
-AliPHOSRawDigiProducer::AliPHOSRawDigiProducer(const AliPHOSRawDigiProducer &dp):TObject(),
- fEmcMinE(0.),fCpvMinE(0.),fSampleQualityCut(1.),fEmcCrystals(0),fGeom(0),fPulseGenerator(0){
+AliPHOSRawDigiProducer::AliPHOSRawDigiProducer(const AliPHOSRawDigiProducer &dp):
+ TObject(),
+ fEmcMinE(0.),
+ fCpvMinE(0.),
+ fSampleQualityCut(1.),
+ fEmcCrystals(0),
+ fGeom(0),
+ fPulseGenerator(0)
+{
+ // Copy constructor
fEmcMinE = dp.fEmcMinE ;
fCpvMinE = dp.fCpvMinE ;
fGeom = dp.fGeom ;
}
//--------------------------------------------------------------------------------------
-AliPHOSRawDigiProducer& AliPHOSRawDigiProducer::operator= (const AliPHOSRawDigiProducer &dp){
+AliPHOSRawDigiProducer& AliPHOSRawDigiProducer::operator= (const AliPHOSRawDigiProducer &dp)
+{
+ // Assign operator
+
if(&dp == this) return *this;
fEmcMinE = dp.fEmcMinE ;
return *this;
}
//--------------------------------------------------------------------------------------
-AliPHOSRawDigiProducer::~AliPHOSRawDigiProducer(){
- if(fPulseGenerator) delete fPulseGenerator ;
- fPulseGenerator=0 ;
+AliPHOSRawDigiProducer::~AliPHOSRawDigiProducer()
+{
+ // Desctructor
+ if(fPulseGenerator) delete fPulseGenerator ;
+ fPulseGenerator=0 ;
}
//--------------------------------------------------------------------------------------
void AliPHOSRawDigiProducer::MakeDigits(TClonesArray *digits, AliPHOSRawDecoder* decoder)
if(energy<=baseLine) //in ADC channels
continue ;
- //remove digits with bas shape. Decoder should calculate quality so that
+ //remove digits with bad shape. Decoder should calculate quality so that
//in default case quality [0,1], while larger values of quality mean somehow
//corrupted samples, 999 means obviously corrupted sample.
//It is difficult to fit samples with overflow (even setting cut on overflow values)
public:
AliPHOSRawDigiProducer() ;
- AliPHOSRawDigiProducer(const AliPHOSRecoParam* parEmc, const AliPHOSRecoParam* parCpv) ;
+ AliPHOSRawDigiProducer(const AliPHOSRecoParam* recoParam) ;
AliPHOSRawDigiProducer(const AliPHOSRawDigiProducer &dp);
AliPHOSRawDigiProducer& operator= (const AliPHOSRawDigiProducer &dp);
Float_t fCpvMinE ; // minimum energy of digit to be included into cluster
Float_t fSampleQualityCut; // Cut on sample shapes: 0: no samples; 1: default parameterization; 999: accept even obviously bad
- Int_t fEmcCrystals ; // number of EMC crystalls
+ Int_t fEmcCrystals ; // number of EMC crystals
AliPHOSGeometry * fGeom ; //! PHOS geometry
- static AliPHOSCalibData * fgCalibData ; //! Calibration database if aval.
- AliPHOSPulseGenerator * fPulseGenerator ; //! Class with pulse parameters
+ static AliPHOSCalibData * fgCalibData ; //! Calibration database if avalable
+ AliPHOSPulseGenerator * fPulseGenerator ; //! Class with pulse shape parameters
ClassDef(AliPHOSRawDigiProducer,2)
};
// Author: Boris Polichtchouk.
// --- AliRoot header files ---
+#include "AliCDBManager.h"
+#include "AliCDBEntry.h"
#include "AliPHOSRecoParam.h"
ClassImp(AliPHOSRecoParam)
+TObjArray* AliPHOSRecoParam::fgkMaps =0; //ALTRO mappings
+
//-----------------------------------------------------------------------------
AliPHOSRecoParam::AliPHOSRecoParam() :
AliDetectorRecoParam(),
- fClusteringThreshold(9999),
- fLocMaxCut(9999),
- fMinE(9999),
- fW0(9999),
- fSampleQualityCut(1.),
- fEcoreRadius(3.),
- fEcore2ESD(kFALSE),
- fSubtractPedestals(kTRUE),
- fUnfold(kTRUE),
- fDecoderVersion("")
+ fEMCClusteringThreshold(0.2),
+ fEMCLocMaxCut(0.03),
+ fEMCMinE(0.01),
+ fEMCW0(4.5),
+ fEMCSampleQualityCut(1.),
+ fEMCEcoreRadius(3.),
+ fEMCEcore2ESD(kFALSE),
+ fEMCSubtractPedestals(kTRUE),
+ fEMCUnfold(kTRUE),
+ fEMCDecoderVersion(""),
+ fCPVClusteringThreshold(0.0),
+ fCPVLocMaxCut(0.03),
+ fCPVMinE(0.0),
+ fCPVW0(4.0),
+ fCPVUnfold(kTRUE)
{
//Default constructor.
}
//-----------------------------------------------------------------------------
AliPHOSRecoParam::AliPHOSRecoParam(const AliPHOSRecoParam& ):
AliDetectorRecoParam(),
- fClusteringThreshold(9999),
- fLocMaxCut(9999),
- fMinE(9999),
- fW0(9999),
- fSampleQualityCut(1.),
- fEcoreRadius(3.),
- fEcore2ESD(kFALSE),
- fSubtractPedestals(kTRUE),
- fUnfold(kTRUE),
- fDecoderVersion("")
+ fEMCClusteringThreshold(0.2),
+ fEMCLocMaxCut(0.03),
+ fEMCMinE(0.01),
+ fEMCW0(4.5),
+ fEMCSampleQualityCut(1.),
+ fEMCEcoreRadius(3.),
+ fEMCEcore2ESD(kFALSE),
+ fEMCSubtractPedestals(kTRUE),
+ fEMCUnfold(kTRUE),
+ fEMCDecoderVersion(""),
+ fCPVClusteringThreshold(0.0),
+ fCPVLocMaxCut(0.03),
+ fCPVMinE(0.0),
+ fCPVW0(4.0),
+ fCPVUnfold(kTRUE)
{
//Copy constructor.
}
//Assignment operator.
if(this != &recoParam) {
- fClusteringThreshold = recoParam.fClusteringThreshold;
- fLocMaxCut = recoParam.fLocMaxCut;
- fMinE = recoParam.fMinE;
- fW0 = recoParam.fW0;
- fSampleQualityCut = recoParam.fSampleQualityCut ;
- fEcoreRadius = recoParam.fEcoreRadius ;
- fSubtractPedestals = recoParam.fSubtractPedestals;
- fUnfold = recoParam.fUnfold;
- fDecoderVersion = recoParam.fDecoderVersion ;
+ fEMCClusteringThreshold = recoParam.fEMCClusteringThreshold;
+ fEMCLocMaxCut = recoParam.fEMCLocMaxCut;
+ fEMCMinE = recoParam.fEMCMinE;
+ fEMCW0 = recoParam.fEMCW0;
+ fEMCSampleQualityCut = recoParam.fEMCSampleQualityCut;
+ fEMCEcoreRadius = recoParam.fEMCEcoreRadius;
+ fEMCEcore2ESD = recoParam.fEMCEcore2ESD;
+ fEMCSubtractPedestals = recoParam.fEMCSubtractPedestals;
+ fEMCUnfold = recoParam.fEMCUnfold;
+ fEMCDecoderVersion = recoParam.fEMCDecoderVersion;
+ fCPVClusteringThreshold = recoParam.fCPVClusteringThreshold;
+ fCPVLocMaxCut = recoParam.fCPVLocMaxCut;
+ fCPVMinE = recoParam.fCPVMinE;
+ fCPVW0 = recoParam.fCPVW0;
+ fCPVUnfold = recoParam.fCPVUnfold;
}
return *this;
}
+
+//-----------------------------------------------------------------------------
+AliPHOSRecoParam* AliPHOSRecoParam::GetDefaultParameters()
+{
+ //Default parameters for the reconstruction
+
+ AliPHOSRecoParam* params = new AliPHOSRecoParam();
+ return params;
+}
+
+//-----------------------------------------------------------------------------
+const TObjArray* AliPHOSRecoParam::GetMappings()
+{
+ //Returns array of AliAltroMappings for RCU0..RCU3.
+ //If not found, read it from OCDB.
+
+ //Quick check as follows:
+ // root [0] AliCDBManager::Instance()->SetDefaultStorage("local://$ALICE_ROOT");
+ // root [1] AliCDBManager::Instance()->SetRun(1);
+ // root [2] TObjArray* maps = AliPHOSRecoParam::GetMappings();
+ // root [3] maps->Print();
+
+ if(fgkMaps) return fgkMaps;
+
+ AliCDBEntry* entry = AliCDBManager::Instance()->Get("PHOS/Calib/Mapping");
+ if(entry)
+ fgkMaps = (TObjArray*)entry->GetObject();
+
+ return fgkMaps;
+
+}
AliPHOSRecoParam& operator = (const AliPHOSRecoParam& recoParam);
virtual ~AliPHOSRecoParam() {}
- Float_t GetClusteringThreshold() const { return fClusteringThreshold; }
- Float_t GetLocalMaxCut() const { return fLocMaxCut; }
- Float_t GetMinE() const { return fMinE; }
- Float_t GetLogWeight() const { return fW0; }
- Float_t GetSampleQualityCut() const { return fSampleQualityCut; }
- Float_t GetEcoreRadius() const { return fEcoreRadius; }
- Bool_t Ecore2ESD() const { return fEcore2ESD; }
- Bool_t SubtractPedestals() const { return fSubtractPedestals; }
- Bool_t ToUnfold() const { return fUnfold; }
- const char* DecoderVersion() const { return fDecoderVersion.Data();}
-
- void SetClusteringThreshold(Float_t cluth) { fClusteringThreshold=cluth; }
- void SetLocalMaxCut(Float_t cut) { fLocMaxCut =cut; }
- void SetMinE(Float_t minE) { fMinE =minE; }
- void SetLogWeight(Float_t w) { fW0 =w; }
- void SetSampleQualityCut(Float_t qu) { fSampleQualityCut =qu; }
- void SetEcoreRadius(Float_t rCore) { fEcoreRadius =rCore; }
- void SetEcore2ESD(Bool_t ecore) { fEcore2ESD =ecore; }
- void SetSubtractPedestals(Bool_t subtract) { fSubtractPedestals =subtract;}
- void SetDecoderVersion(const char* version="v1"){fDecoderVersion =version ;}
- void SetUnfolding(Bool_t toUnfold=kFALSE) {fUnfold =toUnfold;}
+ Float_t GetEMCClusteringThreshold() const { return fEMCClusteringThreshold; }
+ Float_t GetEMCLocalMaxCut() const { return fEMCLocMaxCut; }
+ Float_t GetEMCMinE() const { return fEMCMinE; }
+ Float_t GetEMCLogWeight() const { return fEMCW0; }
+ Float_t GetEMCSampleQualityCut() const { return fEMCSampleQualityCut; }
+ Float_t GetEMCEcoreRadius() const { return fEMCEcoreRadius; }
+ Bool_t EMCEcore2ESD() const { return fEMCEcore2ESD; }
+ Bool_t EMCSubtractPedestals() const { return fEMCSubtractPedestals; }
+ Bool_t EMCToUnfold() const { return fEMCUnfold; }
+ const char* EMCDecoderVersion() const { return fEMCDecoderVersion.Data();}
+
+ Float_t GetCPVClusteringThreshold() const { return fCPVClusteringThreshold; }
+ Float_t GetCPVLocalMaxCut() const { return fCPVLocMaxCut; }
+ Float_t GetCPVMinE() const { return fCPVMinE; }
+ Float_t GetCPVLogWeight() const { return fCPVW0; }
+ Bool_t CPVToUnfold() const { return fCPVUnfold; }
+
+ void SetEMCClusteringThreshold(Float_t cluth) { fEMCClusteringThreshold=cluth; }
+ void SetEMCLocalMaxCut(Float_t cut) { fEMCLocMaxCut =cut; }
+ void SetEMCMinE(Float_t minE) { fEMCMinE =minE; }
+ void SetEMCLogWeight(Float_t w) { fEMCW0 =w; }
+ void SetEMCSampleQualityCut(Float_t qu) { fEMCSampleQualityCut =qu; }
+ void SetEMCEcoreRadius(Float_t rCore) { fEMCEcoreRadius =rCore; }
+ void SetEMCEcore2ESD(Bool_t ecore) { fEMCEcore2ESD =ecore; }
+ void SetEMCSubtractPedestals(Bool_t subtract) { fEMCSubtractPedestals =subtract;}
+ void SetEMCDecoderVersion(const char* version="v1"){ fEMCDecoderVersion =version ;}
+ void SetEMCUnfolding(Bool_t toUnfold=kFALSE) { fEMCUnfold =toUnfold;}
+
+ void SetCPVClusteringThreshold(Float_t cluth) { fCPVClusteringThreshold=cluth; }
+ void SetCPVLocalMaxCut(Float_t cut) { fCPVLocMaxCut =cut; }
+ void SetCPVMinE(Float_t minE) { fCPVMinE =minE; }
+ void SetCPVLogWeight(Float_t w) { fCPVW0 =w; }
+ void SetCPVUnfolding(Bool_t toUnfold=kFALSE) { fCPVUnfold =toUnfold;}
+
+ static AliPHOSRecoParam* GetDefaultParameters();
+ static const TObjArray* GetMappings();
protected:
- Float_t fClusteringThreshold; // Min.digit energy to start a new cluster, in GeV
- Float_t fLocMaxCut; // Min.energy difference between two local maxima, in GeV
- Float_t fMinE; // Min.E in the digits list associated with rec.point, in GeV
- Float_t fW0; // Log.weight to evaluate a local coordinate of rec.point
- Float_t fSampleQualityCut; // Cut on pusle shape fit quality
- Float_t fEcoreRadius; // Radius within which the core energy is calculated, in cm
- Bool_t fEcore2ESD; // true if Ecore is stored in ESD instead of Etot
- Bool_t fSubtractPedestals; // true if pedestal should be subtracted (in non-ZS)
- Bool_t fUnfold; // true if overlapped clusters should be unfolded
- TString fDecoderVersion ; // AliPHOSRawDecoder version
-
- ClassDef(AliPHOSRecoParam,5)
+ Float_t fEMCClusteringThreshold; // EMC: Min.digit energy to start a new cluster, in GeV
+ Float_t fEMCLocMaxCut; // EMC: Min.energy difference between two local maxima, in GeV
+ Float_t fEMCMinE; // EMC: Min.E in the digits list associated with rec.point, in GeV
+ Float_t fEMCW0; // EMC: Log.weight to evaluate a local coordinate of rec.point
+ Float_t fEMCSampleQualityCut; // EMC: Cut on pulse shape fit quality
+ Float_t fEMCEcoreRadius; // EMC: Radius within which the core energy is calculated, in cm
+ Bool_t fEMCEcore2ESD; // EMC: true if Ecore is stored in ESD instead of Etot
+ Bool_t fEMCSubtractPedestals; // EMC: true if pedestal should be subtracted (in non-ZS)
+ Bool_t fEMCUnfold; // EMC: true if overlapped clusters should be unfolded
+ TString fEMCDecoderVersion ; // EMC: AliPHOSRawDecoder version
+
+ Float_t fCPVClusteringThreshold; // CPV: Min.digit energy to start a new cluster, in GeV
+ Float_t fCPVLocMaxCut; // CPV: Min.energy difference between two local maxima, in GeV
+ Float_t fCPVMinE; // CPV: Min.E in the digits list associated with rec.point, in GeV
+ Float_t fCPVW0; // CPV: Log.weight to evaluate a local coordinate of rec.point
+ Bool_t fCPVUnfold; // CPV: true if overlapped clusters should be unfolded
+
+ static TObjArray* fgkMaps; // ALTRO mappings for RCU0..RCU3
+
+ ClassDef(AliPHOSRecoParam,6)
};
#endif
#include "AliPHOSPIDv1.h"
#include "AliPHOSTracker.h"
#include "AliRawReader.h"
+#include "AliCDBEntry.h"
+#include "AliCDBManager.h"
#include "AliPHOSTrigger.h"
#include "AliPHOSGeometry.h"
-#include "AliPHOSRecoParam.h"
-#include "AliPHOSRecoParamEmc.h"
-#include "AliPHOSRecoParamCpv.h"
#include "AliPHOSDigit.h"
#include "AliPHOSTrackSegment.h"
#include "AliPHOSEmcRecPoint.h"
ClassImp(AliPHOSReconstructor)
Bool_t AliPHOSReconstructor::fgDebug = kFALSE ;
-AliPHOSRecoParam* AliPHOSReconstructor::fgkRecoParamEmc =0; // EMC rec. parameters
-AliPHOSRecoParam* AliPHOSReconstructor::fgkRecoParamCpv =0; // CPV rec. parameters
TClonesArray* AliPHOSReconstructor::fgDigitsArray = 0; // Array of PHOS digits
TObjArray* AliPHOSReconstructor::fgEMCRecPoints = 0; // Array of EMC rec.points
fGeom(NULL),fClusterizer(NULL),fTSM(NULL),fPID(NULL)
{
// ctor
-
- if (!fgkRecoParamEmc) {
- AliWarning("The Reconstruction parameters for EMC nonitialized - Used default one");
- fgkRecoParamEmc = AliPHOSRecoParamEmc::GetEmcDefaultParameters();
- }
-
- if (!fgkRecoParamCpv) {
- AliWarning("The Reconstruction parameters for CPV nonitialized - Used default one");
- fgkRecoParamCpv = AliPHOSRecoParamCpv::GetCpvDefaultParameters();
- }
-
fGeom = AliPHOSGeometry::GetInstance("IHEP","");
fClusterizer = new AliPHOSClusterizerv1 (fGeom);
fTSM = new AliPHOSTrackSegmentMakerv1(fGeom);
// segment maker needs access to the AliESDEvent object to retrieve the tracks reconstructed by
// the global tracking.
+ fClusterizer->InitParameters();
fClusterizer->SetInput(digitsTree);
fClusterizer->SetOutput(clustersTree);
if ( Debug() )
Int_t *primList = emcRP->GetPrimaries(primMult);
Float_t energy;
- if (fgkRecoParamEmc->Ecore2ESD())
+ if (GetRecoParam()->EMCEcore2ESD())
energy = emcRP->GetCoreEnergy();
else
energy = rp->Energy();
AliPHOSRawDecoder * dc ;
- const TObjArray* maps = AliPHOSRecoParamEmc::GetMappings();
+ const TObjArray* maps = AliPHOSRecoParam::GetMappings();
if(!maps) AliFatal("Cannot retrieve ALTRO mappings!!");
AliAltroMapping *mapping[4];
mapping[i] = (AliAltroMapping*)maps->At(i);
}
- if(strcmp(fgkRecoParamEmc->DecoderVersion(),"v1")==0)
+ if (strcmp(GetRecoParam()->EMCDecoderVersion(),"v1")==0)
dc=new AliPHOSRawDecoderv1(rawReader,mapping);
- else
- if(strcmp(fgkRecoParamEmc->DecoderVersion(),"v2")==0)
- dc=new AliPHOSRawDecoderv2(rawReader,mapping);
- else
- dc=new AliPHOSRawDecoder(rawReader,mapping);
+ else if (strcmp(GetRecoParam()->EMCDecoderVersion(),"v2")==0)
+ dc=new AliPHOSRawDecoderv2(rawReader,mapping);
+ else
+ dc=new AliPHOSRawDecoder(rawReader,mapping);
- dc->SubtractPedestals(fgkRecoParamEmc->SubtractPedestals());
+ dc->SubtractPedestals(GetRecoParam()->EMCSubtractPedestals());
TClonesArray *digits = new TClonesArray("AliPHOSDigit",1);
digits->SetName("DIGITS");
Int_t bufsize = 32000;
digitsTree->Branch("PHOS", &digits, bufsize);
- AliPHOSRawDigiProducer pr(fgkRecoParamEmc,fgkRecoParamCpv);
+ AliPHOSRawDigiProducer pr(GetRecoParam());
pr.MakeDigits(digits,dc);
delete dc ;
#include <Riostream.h>
#include "AliReconstructor.h"
-#include "AliPHOSRecoParamEmc.h"
-#include "AliPHOSRecoParamCpv.h"
+#include "AliPHOSRecoParam.h"
+// #include "AliPHOSRecoParamEmc.h"
+// #include "AliPHOSRecoParamCpv.h"
class AliPHOSDigitizer ;
class AliPHOSClusterizer ;
class AliPHOSClusterizerv1 ;
return *this ;
}
- static void SetRecoParamEmc(AliPHOSRecoParam * param){ fgkRecoParamEmc = param;}
- static void SetRecoParamCpv(AliPHOSRecoParam * param){ fgkRecoParamCpv = param;}
-
- static const AliPHOSRecoParam* GetRecoParamEmc(){
- if (!fgkRecoParamEmc) {
- cerr<<"The Reconstruction parameters for EMC nonitialized - Used default one"<<endl;
- fgkRecoParamEmc = AliPHOSRecoParamEmc::GetEmcDefaultParameters();
- }
- return fgkRecoParamEmc;
- }
- static const AliPHOSRecoParam* GetRecoParamCpv(){
- if (!fgkRecoParamCpv) {
- cerr<<"The Reconstruction parameters for CPV nonitialized - Used default one"<<endl;
- fgkRecoParamCpv = AliPHOSRecoParamCpv::GetCpvDefaultParameters();
- }
- return fgkRecoParamCpv;
- }
+ static const AliPHOSRecoParam* GetRecoParam() {
+ return dynamic_cast<const AliPHOSRecoParam*>(AliReconstructor::GetRecoParam(4)); }
private:
static Bool_t fgDebug ; //! verbosity controller
- static AliPHOSRecoParam *fgkRecoParamEmc; // reconstruction parameters for EMC
- static AliPHOSRecoParam *fgkRecoParamCpv; // reconstruction parameters for EMC
AliPHOSGeometry *fGeom; // pointer to the PHOS geometry
AliPHOSClusterizerv1 *fClusterizer; //! PHOS clusterizer
AliPHOSTrackSegmentMaker *fTSM; //! PHOS TrackSegmentMaker
static TClonesArray *fgDigitsArray; //! Array of PHOS digits
static TObjArray *fgEMCRecPoints; //! Array of EMC rec.points
- ClassDef(AliPHOSReconstructor,7) // PHOS Reconstruction class
+ ClassDef(AliPHOSReconstructor,8) // PHOS Reconstruction class
};
#pragma link C++ class AliPHOSTrackSegment+;
#pragma link C++ class AliPHOSRecoParam+;
-#pragma link C++ class AliPHOSRecoParamEmc+;
-#pragma link C++ class AliPHOSRecoParamCpv+;
#pragma link C++ class AliPHOSSimParam+;
#pragma link C++ class AliPHOSConTableDB+;
#pragma link C++ class AliPHOSImpact+;
#pragma link C++ class AliPHOSTrigger+;
-#pragma link C++ class AliPHOSCpvRawWrite+;
#endif
AliPHOSEmcRecPoint.cxx \
AliPHOSCpvRecPoint.cxx AliPHOSTrackSegment.cxx \
AliPHOSRecoParam.cxx \
- AliPHOSRecoParamEmc.cxx \
- AliPHOSRecoParamCpv.cxx \
AliPHOSImpact.cxx \
AliPHOSTrigger.cxx \
- AliPHOSSimParam.cxx \
- AliPHOSCpvRawWrite.cxx
+ AliPHOSSimParam.cxx
HDRS:= $(SRCS:.cxx=.h)
5
};
+const char* AliDAQ::fgkOfflineModuleName[AliDAQ::kNDetectors] = {
+ "ITS",
+ "ITS",
+ "ITS",
+ "TPC",
+ "TRD",
+ "TOF",
+ "HMPID",
+ "PHOS",
+ "CPV",
+ "PMD",
+ "MUON",
+ "MUON",
+ "FMD",
+ "T0",
+ "VZERO",
+ "ZDC",
+ "ACORDE",
+ "CTP",
+ "EMCAL",
+ "",
+ "HLT"
+};
+
+const char* AliDAQ::fgkOnlineName[AliDAQ::kNDetectors] = {
+ "SPD",
+ "SDD",
+ "SSD",
+ "TPC",
+ "TRD",
+ "TOF",
+ "HMP",
+ "PHS",
+ "CPV",
+ "PMD",
+ "MCH",
+ "MTR",
+ "FMD",
+ "T00",
+ "V00",
+ "ZDC",
+ "ACO",
+ "TRI",
+ "EMC",
+ "TST",
+ "HLT"
+};
+
AliDAQ::AliDAQ(const AliDAQ& source) :
TObject(source)
{
{
// Print the DAQ configuration
// for all the detectors
- printf("====================================================================\n"
- "| ALICE Data Acquisition Configuration |\n"
- "====================================================================\n"
- "| Detector ID | Detector Name | DDL Offset | # of DDLs | # of LDCs |\n"
- "====================================================================\n");
+ printf("===================================================================================================\n"
+ "| ALICE Data Acquisition Configuration |\n"
+ "===================================================================================================\n"
+ "| Detector ID | Detector Name | DDL Offset | # of DDLs | # of LDCs | Online Name | AliRoot Module |\n"
+ "===================================================================================================\n");
for(Int_t iDet = 0; iDet < kNDetectors; iDet++) {
- printf("|%11d |%13s |%10d |%9d |%9.1f |\n",
- iDet,DetectorName(iDet),DdlIDOffset(iDet),NumberOfDdls(iDet),NumberOfLdcs(iDet));
+ printf("|%11d |%13s |%10d |%9d |%9.1f |%11s |%14s |\n",
+ iDet,DetectorName(iDet),DdlIDOffset(iDet),NumberOfDdls(iDet),NumberOfLdcs(iDet),
+ OnlineName(iDet),OfflineModuleName(iDet));
}
- printf("====================================================================\n");
+ printf("===================================================================================================\n");
}
-const char *AliDAQ::ListOfTriggeredDetectors(Int_t detectorPattern)
+const char *AliDAQ::ListOfTriggeredDetectors(UInt_t detectorPattern)
{
// Returns a string with the list of
// active detectors. The input is the
return detList.Data();
}
+UInt_t AliDAQ::DetectorPattern(const char *detectorList)
+{
+ // Returns a 32-bit word containing the
+ // the detector pattern corresponding to a given
+ // list of detectors
+ UInt_t pattern = 0;
+ TString detList = detectorList;
+ for(Int_t iDet = 0; iDet < (kNDetectors-1); iDet++) {
+ TString det = fgkDetectorName[iDet];
+ if((detList.CompareTo(det) == 0) ||
+ detList.BeginsWith(det) ||
+ detList.EndsWith(det) ||
+ detList.Contains( " "+det+" " )) pattern |= (1 << iDet) ;
+ }
+
+ // HLT
+ TString hltDet = fgkDetectorName[kNDetectors-1];
+ if((detList.CompareTo(hltDet) == 0) ||
+ detList.BeginsWith(hltDet) ||
+ detList.EndsWith(hltDet) ||
+ detList.Contains( " "+hltDet+" " )) pattern |= (1 << kHLTId) ;
+
+ return pattern;
+}
+
+const char *AliDAQ::OfflineModuleName(const char *detectorName)
+{
+ // Returns the name of the offline module
+ // for a given detector (online naming convention)
+ Int_t detectorID = DetectorID(detectorName);
+ if (detectorID < 0)
+ return "";
+
+ return OfflineModuleName(detectorID);
+}
+
+const char *AliDAQ::OfflineModuleName(Int_t detectorID)
+{
+ // Returns the name of the offline module
+ // for a given detector (online naming convention)
+ if (detectorID < 0 || detectorID >= kNDetectors) {
+ AliErrorClass(Form("Invalid detector index: %d (%d -> %d) !",detectorID,0,kNDetectors-1));
+ return "";
+ }
+
+ return fgkOfflineModuleName[detectorID];
+}
+
+const char *AliDAQ::OnlineName(const char *detectorName)
+{
+ // Returns the name of the online detector name (3 characters)
+ // for a given detector
+ Int_t detectorID = DetectorID(detectorName);
+ if (detectorID < 0)
+ return "";
+
+ return OnlineName(detectorID);
+}
+
+const char *AliDAQ::OnlineName(Int_t detectorID)
+{
+ // Returns the name of the online detector name (3 characters)
+ // for a given detector
+ if (detectorID < 0 || detectorID >= kNDetectors) {
+ AliErrorClass(Form("Invalid detector index: %d (%d -> %d) !",detectorID,0,kNDetectors-1));
+ return "";
+ }
+
+ return fgkOnlineName[detectorID];
+}
+
static void PrintConfig();
- static const char *ListOfTriggeredDetectors(Int_t detectorPattern);
+ static const char *ListOfTriggeredDetectors(UInt_t detectorPattern);
+ static UInt_t DetectorPattern(const char *detectorList);
+
+ static const char *OfflineModuleName(const char *detectorName);
+ static const char *OfflineModuleName(Int_t detectorID);
+
+ static const char *OnlineName(const char *detectorName);
+ static const char *OnlineName(Int_t detectorID);
enum {
kNDetectors = 21, // Number of detectors
static const char *fgkDetectorName[kNDetectors]; // Detector names
static Int_t fgkNumberOfDdls[kNDetectors]; // Number of DDLs per detector
static Float_t fgkNumberOfLdcs[kNDetectors]; // Number of LDCs per detector (not fixed - used only for the raw data simulation)
+ static const char* fgkOfflineModuleName[kNDetectors]; // Names of the offline modules corresponding to the detectors
+ static const char* fgkOnlineName[kNDetectors]; // Online (DAQ/ECS) detector names
- ClassDef(AliDAQ, 2) // ALICE DAQ Configuration class
+ ClassDef(AliDAQ, 3) // ALICE DAQ Configuration class
};
#endif
TBranch* branch = tree->GetBranch( name );
if( branch == 0x0 ) {
AliDebug( 1, "Creating new branch" );
- branch = tree->Branch( name, &(this->fClassMask), "fClassMask/l" );
+ branch = tree->Branch( name, &(this->fClassMask), "fClassMask/l:fClusterMask/i" );
branch->SetAutoDelete( kFALSE );
}
else {
}
else {
// Load one and only one trigger descriptor from CDB
- AliInfo( "GETTING TRIGGER DESCRIPTORS FROM CDB!!!" );
+ AliInfo( "Getting trigger configuration from OCDB!" );
AliCDBPath path( "GRP", "CTP", "Config" );
{
// Check trigger conditions and create the trigger class
// and trigger cluster masks
+ fClassMask = 0;
+ fClusterMask = 0;
if (fConfiguration) {
const TObjArray& classesArray = fConfiguration->GetClasses();
Int_t nclasses = classesArray.GetEntriesFast();
AliTriggerClass* trclass = (AliTriggerClass*)classesArray.At( j );
trclass->Trigger( fConfiguration->GetInputs(), fConfiguration->GetFunctions() );
fClassMask |= trclass->GetValue();
- if (trclass->GetStatus())
- fClusterMask |= (trclass->GetCluster())->GetClusterMask();
+ if (trclass->GetStatus()) {
+ AliTriggerCluster *trclust = trclass->GetCluster();
+ fClusterMask |= AliDAQ::DetectorPattern(trclust->GetDetectorsInCluster());
+ }
}
}
return fClassMask;
}
//_____________________________________________________________________________
-TString AliCentralTrigger::GetTriggeredDetectors() const
+Bool_t AliCentralTrigger::CheckTriggeredDetectors() const
{
// Check the trigger mask, finds which trigger classes
// have been fired, load the corresponding trigger clusters and
// finally makes a list of the detectors that have been readout
- // for each particular event
+ // for each particular event. This list is then compared to the
+ // one stored in fClusterMask. Return value:
+ // true = two lists are equal
+ // false = two lists are not equal meaning wrong trigger config
+ // is loaded.
if (!fConfiguration) {
- AliError("The trigger confiration has not yet been loaded!");
- return "";
- }
-
- // Now loop over the trigger classes
- const TObjArray& classesArray = fConfiguration->GetClasses();
- Int_t nclasses = classesArray.GetEntriesFast();
- UChar_t clustMask = 0;
- for( Int_t j=0; j<nclasses; j++ ) {
- AliTriggerClass* trclass = (AliTriggerClass*)classesArray.At( j );
- if (trclass->GetMask() & fClassMask) { // class was fired
- AliTriggerCluster *clust = trclass->GetCluster();
- clustMask |= clust->GetClusterMask();
- }
+ AliError("The trigger confiration has not yet been loaded! Cross-check is not possible!");
+ return kFALSE;
}
+ else {
- // Compare the stored cluster mask with the one
- // that we get from trigger classes
- // To be enables after we store the cluster mask in the trigger tree
- // if (clustMask != fClusterMask)
- // AliError(Form("Wrong cluster mask from trigger classes (%x), expecting (%x)!",(UInt_t)clustMask,(UInt_t)fClusterMask));
-
- // Now loop over clusters and produce the string
- // with the triggered detectors
- TString trigDets;
- const TObjArray& clustArray = fConfiguration->GetClusters();
- Int_t nclust = clustArray.GetEntriesFast();
- for( Int_t i=0; i<nclust; i++ ) {
- AliTriggerCluster* clust = (AliTriggerCluster*)clustArray.At( i );
- if (clustMask & clust->GetClusterMask()) { // the cluster was fired
- TString detStr = clust->GetDetectorsInCluster();
- TObjArray* det = detStr.Tokenize(" ");
- Int_t ndet = det->GetEntriesFast();
- for( Int_t j=0; j<ndet; j++ ) {
- TString &detj = ((TObjString*)det->At(j))->String();
- if((trigDets.CompareTo(detj) == 0) ||
- trigDets.BeginsWith(detj) ||
- trigDets.EndsWith(detj) ||
- trigDets.Contains( " "+detj+" " )) continue;
- trigDets.Append( " " );
- trigDets.Append( detj );
+ // Make a cross-check so that to exclude wrong trigger configuration used
+ // Loop over the trigger classes
+ UInt_t clusterMask = 0;
+ const TObjArray& classesArray = fConfiguration->GetClasses();
+ Int_t nclasses = classesArray.GetEntriesFast();
+ for( Int_t j=0; j<nclasses; j++ ) {
+ AliTriggerClass* trclass = (AliTriggerClass*)classesArray.At( j );
+ if (trclass->GetMask() & fClassMask) { // class was fired
+ AliTriggerCluster *trclust = trclass->GetCluster();
+ clusterMask |= AliDAQ::DetectorPattern(trclust->GetDetectorsInCluster());
}
}
+ // Compare the stored cluster mask with the one
+ // that we get from trigger classes
+ // To be enables after we store the cluster mask in the trigger tree
+ if (clusterMask != fClusterMask) {
+ AliError(Form("Wrong cluster mask from trigger classes (%x), expecting (%x)! Loaded trigger configuration is possibly wrong!",
+ (UInt_t)clusterMask,(UInt_t)fClusterMask));
+ return kFALSE;
+ }
}
- return trigDets;
+ return kTRUE;
}
// Getters
TString GetDetectors();
ULong64_t GetClassMask() const { return fClassMask; }
- UChar_t GetClusterMask() const { return fClusterMask; }
+ UInt_t GetClusterMask() const { return fClusterMask; }
AliTriggerConfiguration* GetConfiguration() { return fConfiguration; }
TObjArray* GetFiredClasses() const;
void Print( const Option_t* opt ="" ) const;
- TString GetTriggeredDetectors() const;
+ Bool_t CheckTriggeredDetectors() const;
+
+ // Setters to be used in case raw data when the trigger information
+ // is read from the event header
+ void SetClassMask(ULong64_t mask) { fClassMask = mask; }
+ void SetClusterMask(UInt_t mask) { fClusterMask = mask; }
protected:
ULong64_t fClassMask; // UID ( bitwise OR of conditions mask )
- UChar_t fClusterMask; // UID ( bitwise OR of clusters mask )
+ UInt_t fClusterMask; // UID ( bitwise OR of clusters mask - detector pattern)
AliTriggerConfiguration* fConfiguration; // Trigger Configuration used
private:
AliCentralTrigger( const AliCentralTrigger& ctp ); // Implemented
AliCentralTrigger& operator=( const AliCentralTrigger& ctp ); // Not implemented
- ClassDef( AliCentralTrigger, 3 ) // class for running the Central Trigger Processor
+ ClassDef( AliCentralTrigger, 5 ) // class for running the Central Trigger Processor
};
// Base Class for detector Reconstruction Parameters //
// //
//
-// AliDetectorRecoParam are identified according name
+// AliDetectorRecoParam are identified according fEventSpecie - event specie(s)
+// for which the object is valid.
// The owner of the AliDetectorRecoParam is the AliRecoParam
// More than one RecoParam per recon can be registered.
//
AliDetectorRecoParam::AliDetectorRecoParam():
- TNamed()
+ TNamed(),
+ fEventSpecie(0)
{
//
// default constructor
AliDetectorRecoParam::~AliDetectorRecoParam(){
//
- // default destructor
+ // destructor
//
}
#include "TNamed.h"
+#include "AliRecoParam.h"
+
class AliDetectorRecoParam : public TNamed
{
virtual ~AliDetectorRecoParam();
void Print(Option_t */*option*/) const {Dump();}
-protected:
+ Int_t GetEventSpecie() const { return fEventSpecie; }
+ void SetEventSpecie(Int_t specie) { fEventSpecie = specie; }
+ void SetAsDefault() { fEventSpecie |= AliRecoParam::kDefault; }
+ Bool_t IsDefault() const { return (fEventSpecie & AliRecoParam::kDefault); }
+
+private:
+ Int_t fEventSpecie; // Event specie for which the reco-param object is valid
- ClassDef(AliDetectorRecoParam, 2)
+ ClassDef(AliDetectorRecoParam, 3)
};
//////////////////////////////////////////////////////////////////////////////
// Class AliEventInfo //
-// Container class for all the information related to LHCstate, run and //
-// event types, trigger mask and trigger clusters. //
-// It is used in order to provide the detector's AliRecoParam objects with//
-// the necessary information so that they can decide which instance of //
-// AliDetectorRecoParam to use in reconstruction one particular event. //
+// Container class for all the information related to //
+// event type, trigger mask and trigger clusters. //
+// It is used together with AliRunInfo in order to provide the detector's //
+// AliRecoParam object with //
+// the necessary information so that it can decide which instance of //
+// AliDetectorRecoParam objects to use in reconstruction one particular //
+// event. //
// //
// cvetan.cheshkov@cern.ch 12/06/2008 //
//////////////////////////////////////////////////////////////////////////////
//______________________________________________________________________________
AliEventInfo::AliEventInfo():
TObject(),
- fLHCState("UNKNOWN"),
- fBeamType("UNKNOWN"),
- fRunType("UNKNOWN"),
- fActiveDetectors(""),
fEventType(0),
fTriggerClasses(""),
fTriggerMask(0),
}
//______________________________________________________________________________
-AliEventInfo::AliEventInfo(const char *lhcState, const char *beamType, const char *runType, const char *activeDetectors):
+AliEventInfo::AliEventInfo(UInt_t evType,
+ const char *classes,
+ ULong64_t mask,
+ const char *cluster,
+ const char *decision):
TObject(),
- fLHCState(lhcState),
- fBeamType(beamType),
- fRunType(runType),
- fActiveDetectors(activeDetectors),
- fEventType(0),
- fTriggerClasses(""),
- fTriggerMask(0),
- fTriggerCluster(""),
- fHLTDecision("")
+ fEventType(evType),
+ fTriggerClasses(classes),
+ fTriggerMask(mask),
+ fTriggerCluster(cluster),
+ fHLTDecision(decision)
{
// constructor
// ...
//______________________________________________________________________________
AliEventInfo::AliEventInfo(const AliEventInfo &evInfo):
TObject(evInfo),
- fLHCState(evInfo.fLHCState),
- fBeamType(evInfo.fBeamType),
- fRunType(evInfo.fRunType),
- fActiveDetectors(evInfo.fActiveDetectors),
fEventType(evInfo.fEventType),
fTriggerClasses(evInfo.fTriggerClasses),
fTriggerMask(evInfo.fTriggerMask),
if(this==&evInfo) return *this;
((TObject *)this)->operator=(evInfo);
- fLHCState = evInfo.fLHCState;
- fBeamType = evInfo.fBeamType;
- fRunType = evInfo.fRunType;
- fActiveDetectors = evInfo.fActiveDetectors;
fEventType = evInfo.fEventType;
fTriggerClasses = evInfo.fTriggerClasses;
fTriggerMask = evInfo.fTriggerMask;
{
// Reset the contents
// ...
-// fLHCState = "UNKNOWN";
-// fRunType = "UNKNOWN";
-// fBeamType = "UNKNOWN";
-// fActiveDetectors = "";
fEventType = 0;
fTriggerClasses = "";
fTriggerMask = 0;
//////////////////////////////////////////////////////////////////////////////
// Class AliEventInfo //
-// Container class for all the information related to LHCstate, run and //
-// event types, trigger mask and trigger clusters. //
-// It is used in order to provide the detector's AliRecoParam objects with//
-// the necessary information so that they can decide which instance of //
-// AliDetectorRecoParam to use in reconstruction one particular event. //
+// Container class for all the information related to //
+// event type, trigger mask and trigger clusters. //
+// It is used together with AliRunInfo in order to provide the detector's //
+// AliRecoParam object with //
+// the necessary information so that it can decide which instance of //
+// AliDetectorRecoParam objects to use in reconstruction one particular //
+// event. //
// //
// cvetan.cheshkov@cern.ch 12/06/2008 //
//////////////////////////////////////////////////////////////////////////////
public:
AliEventInfo();
- AliEventInfo(const char *lhcState,
- const char *beamType,
- const char *runType,
- const char *activeDetectors);
+ AliEventInfo(UInt_t evType,
+ const char *classes,
+ ULong64_t mask,
+ const char *cluster,
+ const char *decision);
virtual ~AliEventInfo() {}
void SetEventType(UInt_t evType) { fEventType = evType; }
- void SetTriggerClasses(const char *classes) { fTriggerClasses.SetString(classes); }
+ void SetTriggerClasses(const char *classes) { fTriggerClasses = classes; }
void SetTriggerMask(ULong64_t mask) { fTriggerMask = mask; }
- void SetTriggerCluster(const char *cluster) { fTriggerCluster.SetString(cluster); }
- void SetHLTDecision(const char *decision) { fHLTDecision.SetString(decision); }
+ void SetTriggerCluster(const char *cluster) { fTriggerCluster = cluster; }
+ void SetHLTDecision(const char *decision) { fHLTDecision = decision; }
virtual void Print(Option_t */*option=""*/) const { Dump(); }
- const char *GetLHCState() const { return fLHCState.GetString().Data(); }
- const char *GetBeamType() const { return fBeamType.GetString().Data(); }
- const char *GetRunType() const { return fRunType.GetString().Data(); }
- const char *GetActiveDetectors() const { return fActiveDetectors.GetString().Data(); }
UInt_t GetEventType() const { return fEventType; }
- const char *GetTriggerClasses() const { return fTriggerClasses.GetString().Data(); }
+ const char *GetTriggerClasses() const { return fTriggerClasses.Data(); }
ULong64_t GetTriggerMask() const { return fTriggerMask; }
- const char *GetTriggerCluster() const { return fTriggerCluster.GetString().Data(); }
- const char *GetHLTDecision() const { return fHLTDecision.GetString().Data(); }
+ const char *GetTriggerCluster() const { return fTriggerCluster.Data(); }
+ const char *GetHLTDecision() const { return fHLTDecision.Data(); }
AliEventInfo(const AliEventInfo &evInfo);
AliEventInfo& operator= (const AliEventInfo& evInfo);
void Reset();
+
private:
- TObjString fLHCState; // state of the machine as provided by DCS and DAQ log-book (per run)
- TObjString fBeamType; // beam type for Alice
- TObjString fRunType; // run type accoring to ECS (per run)
- TObjString fActiveDetectors;// list of active detectors (per run)
UInt_t fEventType; // event type as defined by DAQ (start_of_*,calibration,physics etc) (per event)
- TObjString fTriggerClasses; // list of fired trigger classes (per event)
+ TString fTriggerClasses; // list of fired trigger classes (per event)
ULong64_t fTriggerMask; // trigger mask as received from DAQ or CTP raw-data payload (per event)
- TObjString fTriggerCluster; // list of detectors that have been read out (per event)
- TObjString fHLTDecision; // string describing the HLT decision (per event)
+ TString fTriggerCluster; // list of detectors that have been read out (per event)
+ TString fHLTDecision; // string describing the HLT decision (per event)
- ClassDef(AliEventInfo,2) // Event info class
+ ClassDef(AliEventInfo,3) // Event info class
};
#endif
#include "AliCDBEntry.h"
#include "AliCDBManager.h"
#include "AliCDBStorage.h"
-#include "AliEventInfo.h"
+#include "AliRunInfo.h"
#include "AliLog.h"
#include "AliModule.h"
#include "AliQA.h"
AliQAChecker::AliQAChecker(const char* name, const char* title) :
TNamed(name, title),
fDataFile(0x0),
- fEventInfo(0x0),
- fEventInfoOwner(kFALSE),
+ fRunInfo(0x0),
+ fRunInfoOwner(kFALSE),
fRefFile(0x0),
fFoundDetectors(".")
{
AliQAChecker::AliQAChecker(const AliQAChecker& qac) :
TNamed(qac),
fDataFile(qac.fDataFile),
- fEventInfo(qac.fEventInfo),
- fEventInfoOwner(kFALSE),
+ fRunInfo(qac.fRunInfo),
+ fRunInfoOwner(kFALSE),
fRefFile(qac.fRefFile),
fFoundDetectors(qac.fFoundDetectors)
{
AliQAChecker::~AliQAChecker()
{
// clean up
- if (fEventInfo)
- delete fEventInfo ;
+ if (fRunInfo)
+ delete fRunInfo ;
delete [] fCheckers ;
AliQA::Close() ;
}
} else if (refStorage.Contains(AliQA::GetLabLocalOCDB()) || refStorage.Contains(AliQA::GetLabAliEnOCDB())) {
AliCDBManager* man = AliCDBManager::Instance() ;
if ( strcmp(AliQA::GetRefDataDirName(), "") == 0 ) { // the name of the last level of the directory is not set (RUNTYPE)
- // Get it from EventInfo
- if (!fEventInfo) // not yet set, get the info from GRP
- LoadEventInfoFromGRP() ;
- AliQA::SetQARefDataDirName(fEventInfo->GetRunType()) ;
+ // Get it from RunInfo
+ if (!fRunInfo) // not yet set, get the info from GRP
+ LoadRunInfoFromGRP() ;
+ AliQA::SetQARefDataDirName(fRunInfo->GetRunType()) ;
}
if ( ! man->GetLock() ) {
man->SetDefaultStorage(AliQA::GetQARefStorage()) ;
}
//_____________________________________________________________________________
-void AliQAChecker::LoadEventInfoFromGRP()
+void AliQAChecker::LoadRunInfoFromGRP()
{
AliCDBManager* man = AliCDBManager::Instance() ;
AliCDBEntry* entry = man->Get(AliQA::GetGRPPath().Data());
if (!beamType) {
AliWarning(Form("%s entry: missing value for the LHC state ! Using UNKNOWN", AliQA::GetGRPPath().Data()));
}
+ TObjString *beamEnergyStr=
+ dynamic_cast<TObjString*>(data->GetValue("fAliceBeamEnergy"));
+ if (!beamEnergyStr) {
+ AliWarning(Form("%s entry: missing value for the beam energy ! Using 0", AliQA::GetGRPPath().Data()));
+ }
TObjString *runType=
dynamic_cast<TObjString*>(data->GetValue("fRunType"));
if (!runType) {
TObjString *activeDetectors=
dynamic_cast<TObjString*>(data->GetValue("fDetectorMask"));
if (!activeDetectors) {
- AliWarning(Form("%s entry: missing value for the detector mask ! Using ALL", AliQA::GetGRPPath().Data()));
+ AliWarning(Form("%s entry: missing value for the detector mask ! Using 1074790399", AliQA::GetGRPPath().Data()));
}
- fEventInfo = new AliEventInfo(lhcState ? lhcState->GetString().Data() : "UNKNOWN",
- beamType ? beamType->GetString().Data() : "UNKNOWN",
- runType ? runType->GetString().Data() : "UNKNOWN",
- activeDetectors ? activeDetectors->GetString().Data() : "ALL");
- fEventInfoOwner = kTRUE ;
+ fRunInfo = new AliRunInfo(lhcState ? lhcState->GetString().Data() : "UNKNOWN",
+ beamType ? beamType->GetString().Data() : "UNKNOWN",
+ beamEnergyStr ? beamEnergyStr->GetString().Atof() : 0,
+ runType ? runType->GetString().Data() : "UNKNOWN",
+ activeDetectors ? activeDetectors->GetString().Atoi() : 1074790399);
+ fRunInfoOwner = kTRUE ;
}
//_____________________________________________________________________________
#include "AliQA.h"
class AliCDBEntry ;
-class AliEventInfo ;
+class AliRunInfo ;
class AliQACheckerBase ;
class AliQAChecker: public TNamed {
virtual Bool_t Run(const char * fileName = NULL) ;
virtual Bool_t Run(AliQA::DETECTORINDEX_t det, AliQA::TASKINDEX_t task, TObjArray * list);
- void SetEventInfo(AliEventInfo * ei) {fEventInfo = ei;}
+ void SetRunInfo(AliRunInfo * ei) {fRunInfo = ei;}
private:
- void LoadEventInfoFromGRP() ;
+ void LoadRunInfoFromGRP() ;
static AliQAChecker *fgQAChecker ; // pointer to the instance of the singleton
TFile * fDataFile ; //! Data file to check
- AliEventInfo * fEventInfo ; //! Event info object
- Bool_t fEventInfoOwner; //! owns fEventInfo or not
+ AliRunInfo * fRunInfo ; //! Event info object
+ Bool_t fRunInfoOwner; //! owns fRunInfo or not
TFile * fRefFile ; //! Reference Data file
TString fFoundDetectors ; //! detectors for which the Quality assurance could be done
AliQACheckerBase * fCheckers[AliQA::kNDET] ; //! list of detectors checkers
#include "AliLog.h"
#include "AliRecoParam.h"
-
ClassImp(AliRecoParam)
AliRecoParam::AliRecoParam():
- TNamed("",""),
- fRecoParamArray(0)
-{
- // Default constructor
- // ...
-}
-
-AliRecoParam::AliRecoParam(const char *detector):
- TNamed(detector,detector),
- fRecoParamArray(0)
+ TObject(),
+ fEventSpecie(kDefault)
{
// Default constructor
// ...
+ for(Int_t iDet = 0; iDet < kNDetectors; iDet++)
+ fDetRecoParams[iDet] = NULL;
+ for(Int_t iSpecie = 0; iSpecie < kNSpecies; iSpecie++) {
+ for(Int_t iDet = 0; iDet < kNDetectors; iDet++) {
+ fDetRecoParamsIndex[iSpecie][iDet] = -1;
+ }
+ }
}
AliRecoParam::~AliRecoParam(){
// Destructor
// ...
// Delete the array with the reco-param objects
- if (fRecoParamArray){
- fRecoParamArray->Delete();
- delete fRecoParamArray;
+ for(Int_t iDet = 0; iDet < kNDetectors; iDet++) {
+ if (fDetRecoParams[iDet]){
+ fDetRecoParams[iDet]->Delete();
+ delete fDetRecoParams[iDet];
+ }
}
}
//
// Print reconstruction setup
//
- printf("AliRecoParam object for %s\n",GetName());
- if (!fRecoParamArray) return;
- Int_t nparam = fRecoParamArray->GetEntriesFast();
- for (Int_t iparam=0; iparam<nparam; iparam++){
- AliDetectorRecoParam * param = (AliDetectorRecoParam *)fRecoParamArray->At(iparam);
- if (!param) continue;
- param->Print(option);
+ for(Int_t iDet = 0; iDet < kNDetectors; iDet++) {
+ if (fDetRecoParams[iDet]){
+ printf("AliDetectorRecoParam objects for detector %d\n",iDet);
+ Int_t nparam = fDetRecoParams[iDet]->GetEntriesFast();
+ for (Int_t iparam=0; iparam<nparam; iparam++){
+ AliDetectorRecoParam * param = (AliDetectorRecoParam *)fDetRecoParams[iDet]->At(iparam);
+ if (!param) continue;
+ param->Print(option);
+ }
+ }
+ else {
+ printf("No AliDetectorRecoParam objects specified for detector %d\n",iDet);
+ }
}
}
-AliDetectorRecoParam *AliRecoParam::GetRecoParam(const AliEventInfo &/*evInfo*/) const {
- // To be implemented by the detectors
- // Here we return the last AliDetectorRecoParam!!
- if (!fRecoParamArray) return NULL;
- if (fRecoParamArray->GetEntriesFast() != 1)
- AliWarning(Form("Method not implemented by the detector %s, using the last AliDetectorRecoParam !",GetName()));
+void AliRecoParam::SetEventSpecie(const AliRunInfo */*runInfo*/, const AliEventInfo &/*evInfo*/)
+{
+ // To be implemented
+ // Here we return always kDefault!!
+ fEventSpecie = kDefault;
+}
+
+const AliDetectorRecoParam *AliRecoParam::GetDetRecoParam(Int_t iDet) const
+{
+ // Return AliDetectorRecoParam object for a given detector
+ // according to the event specie provided as an argument
+ if (!fDetRecoParams[iDet]) return NULL;
+ if (fDetRecoParams[iDet]->GetEntries() == 0) return NULL;
+
+ for(Int_t iBit = 0; iBit < kNSpecies; iBit++) {
+ if (fEventSpecie & (1 << iBit)) {
+ if (fDetRecoParamsIndex[iBit][iDet] >= 0)
+ return (AliDetectorRecoParam *)fDetRecoParams[iDet]->At(fDetRecoParamsIndex[iBit][iDet]);
+ else
+ return (AliDetectorRecoParam *)fDetRecoParams[iDet]->At(fDetRecoParamsIndex[0][iDet]);
+ }
+ }
- return (AliDetectorRecoParam *)fRecoParamArray->Last();
+ // Default one
+ AliError(Form("Invalid event specie: %d!",fEventSpecie));
+ return (AliDetectorRecoParam *)fDetRecoParams[iDet]->At(fDetRecoParamsIndex[0][iDet]);
}
-void AliRecoParam::AddRecoParam(AliDetectorRecoParam* param){
+void AliRecoParam::AddDetRecoParam(Int_t iDet, AliDetectorRecoParam* param)
+{
// Add an instance of reco params object into
- // the fRecoParamArray
- //
- if (!fRecoParamArray) fRecoParamArray = new TObjArray;
- fRecoParamArray->AddLast(param);
+ // the fDetRecoParams for detector iDet
+ // Updates the fDetRecoParams index
+ if (!fDetRecoParams[iDet]) fDetRecoParams[iDet] = new TObjArray;
+ fDetRecoParams[iDet]->AddLast(param);
+ Int_t index = fDetRecoParams[iDet]->GetLast();
+
+ // Index
+ Int_t specie = param->GetEventSpecie();
+ for(Int_t iBit = 0; iBit < kNSpecies; iBit++) {
+ if (specie & (1 << iBit)) {
+ fDetRecoParamsIndex[iBit][iDet] = index;
+ }
+ }
+}
+
+Bool_t AliRecoParam::AddDetRecoParamArray(Int_t iDet, TObjArray* parArray)
+{
+ // Add an array of reconstruction parameter objects
+ // for a given detector
+ // Basic check on the consistency of the array
+ Bool_t defaultFound = kFALSE;
+ for(Int_t i = 0; i < parArray->GetEntriesFast(); i++) {
+ AliDetectorRecoParam *par = (AliDetectorRecoParam*)parArray->At(i);
+ if (!par) continue;
+ if (par->IsDefault()) defaultFound = kTRUE;
+ }
+
+ fDetRecoParams[iDet] = parArray;
+
+ return defaultFound;
}
///////////////////////////////////////////////////////////////////////////////
// //
-// Base Class for Detector reconstruction parameters //
+// Steering Class for reconstruction parameters //
// Revision: cvetan.cheshkov@cern.ch 12/06/2008 //
-// Its structure has been revised and it is interfaced to AliEventInfo. //
+// Its structure has been revised and it is interfaced to AliRunInfo and //
+// AliEventInfo. //
// //
///////////////////////////////////////////////////////////////////////////////
-#include "TNamed.h"
+#include "TObject.h"
+
class AliDetectorRecoParam;
+class AliRunInfo;
class AliEventInfo;
-class AliRecoParam : public TNamed
+class AliRecoParam : public TObject
{
public:
AliRecoParam();
- AliRecoParam(const char *detector);
virtual ~AliRecoParam();
//
- virtual void Print(Option_t *option="") const;
- TObjArray *GetAllRecoParams() const { return fRecoParamArray; }
- virtual AliDetectorRecoParam *GetRecoParam(const AliEventInfo &/*evInfo*/) const;
- void AddRecoParam(AliDetectorRecoParam* param);
-
-protected:
+ enum {
+ kNSpecies = 5, // number of event species
+ kNDetectors = 15 // number of detectors
+ };
+ enum EventSpecie_t {kDefault = 1,
+ kLowMult = 2,
+ kHighMult = 4,
+ kCosmic = 8,
+ kCalib = 16};
- TObjArray *fRecoParamArray; //array with reconstruction-parameter objects
+ virtual void Print(Option_t *option="") const;
+ const TObjArray *GetDetRecoParamArray(Int_t iDet) const { return fDetRecoParams[iDet]; }
+ void SetEventSpecie(const AliRunInfo*/*runInfo*/, const AliEventInfo &/*evInfo*/);
+ EventSpecie_t GetEventSpecie() const { return fEventSpecie; }
+ const AliDetectorRecoParam *GetDetRecoParam(Int_t iDet) const;
+ void AddDetRecoParam(Int_t iDet, AliDetectorRecoParam* param);
+ Bool_t AddDetRecoParamArray(Int_t iDet, TObjArray* parArray);
private:
AliRecoParam(const AliRecoParam&); // Not implemented
AliRecoParam& operator=(const AliRecoParam&); // Not implemented
- ClassDef(AliRecoParam, 2)
+ Int_t fDetRecoParamsIndex[kNSpecies][kNDetectors]; //!index to fDetRecoParams arrays
+ TObjArray *fDetRecoParams[kNDetectors]; //!array with reconstruction-parameter objects for all detectors
+ EventSpecie_t fEventSpecie; //!current event specie
+
+ ClassDef(AliRecoParam, 3)
};
#include "AliMagWrapCheb.h"
+#include "AliDetectorRecoParam.h"
+#include "AliRunInfo.h"
+#include "AliEventInfo.h"
+
+#include "AliDAQ.h"
+
ClassImp(AliReconstruction)
fLoadAlignData("ALL"),
fESDPar(""),
fUseHLTData(),
+ fRunInfo(NULL),
+ fEventInfo(),
fRunLoader(NULL),
fRawReader(NULL),
fParentRawReader(NULL),
+ fRecoParam(),
+
fVertexer(NULL),
fDiamondProfile(NULL),
fDiamondProfileTPC(NULL),
fLoadAlignData(rec.fLoadAlignData),
fESDPar(rec.fESDPar),
fUseHLTData(rec.fUseHLTData),
+ fRunInfo(NULL),
+ fEventInfo(),
fRunLoader(NULL),
fRawReader(NULL),
fParentRawReader(NULL),
+ fRecoParam(),
+
fVertexer(NULL),
fDiamondProfile(NULL),
fDiamondProfileTPC(NULL),
fOptions.Add(new TNamed(detector, option));
}
+//_____________________________________________________________________________
+void AliReconstruction::SetRecoParam(const char* detector, AliDetectorRecoParam *par)
+{
+ // Set custom reconstruction parameters for a given detector
+ // Single set of parameters for all the events
+ for (Int_t iDet = 0; iDet < fgkNDetectors; iDet++) {
+ if(!strcmp(detector, fgkDetectorName[iDet])) {
+ par->SetAsDefault();
+ fRecoParam.AddDetRecoParam(iDet,par);
+ break;
+ }
+ }
+
+}
+
//_____________________________________________________________________________
Bool_t AliReconstruction::SetFieldMap(Float_t l3Current, Float_t diCurrent, Float_t factor, const char *path) {
//------------------------------------------------
return kFALSE;
}
+ TObjString *lhcState=
+ dynamic_cast<TObjString*>(fGRPData->GetValue("fLHCState"));
+ if (!lhcState) {
+ AliError("GRP/GRP/Data entry: missing value for the LHC state ! Using UNKNOWN");
+ }
+
+ TObjString *beamType=
+ dynamic_cast<TObjString*>(fGRPData->GetValue("fAliceBeamType"));
+ if (!beamType) {
+ AliError("GRP/GRP/Data entry: missing value for the beam type ! Using UNKNOWN");
+ }
+
+ TObjString *beamEnergyStr=
+ dynamic_cast<TObjString*>(fGRPData->GetValue("fAliceBeamEnergy"));
+ if (!beamEnergyStr) {
+ AliError("GRP/GRP/Data entry: missing value for the beam energy ! Using 0");
+ }
+
+ TObjString *runType=
+ dynamic_cast<TObjString*>(fGRPData->GetValue("fRunType"));
+ if (!runType) {
+ AliError("GRP/GRP/Data entry: missing value for the run type ! Using UNKNOWN");
+ }
+
+ TObjString *activeDetectors=
+ dynamic_cast<TObjString*>(fGRPData->GetValue("fDetectorMask"));
+ if (!activeDetectors) {
+ AliError("GRP/GRP/Data entry: missing value for the detector mask ! Using 1074790399");
+ }
+
+ fRunInfo = new AliRunInfo(lhcState ? lhcState->GetString().Data() : "UNKNOWN",
+ beamType ? beamType->GetString().Data() : "UNKNOWN",
+ beamEnergyStr ? beamEnergyStr->GetString().Atof() : 0,
+ runType ? runType->GetString().Data() : "UNKNOWN",
+ activeDetectors ? activeDetectors->GetString().Atoi() : 1074790399);
+
+ // Process the list of active detectors
+ if (activeDetectors && activeDetectors->GetString().IsDigit()) {
+ UInt_t detMask = activeDetectors->GetString().Atoi();
+ fRunLocalReconstruction = MatchDetectorList(fRunLocalReconstruction,detMask);
+ fRunTracking = MatchDetectorList(fRunTracking,detMask);
+ fFillESD = MatchDetectorList(fFillESD,detMask);
+ }
+
+ AliInfo("===================================================================================");
+ AliInfo(Form("Running local reconstruction for detectors: %s",fRunLocalReconstruction.Data()));
+ AliInfo(Form("Running tracking for detectors: %s",fRunTracking.Data()));
+ AliInfo(Form("Filling ESD for detectors: %s",fFillESD.Data()));
+ AliInfo("===================================================================================");
//*** Dealing with the magnetic field map
if (AliTracker::GetFieldMap()) {
if (!InitGRP()) return kFALSE;
+ // Read the reconstruction parameters from OCDB
+ if (!InitRecoParams()) {
+ if (fStopOnError) {
+ CleanUp();
+ return kFALSE;
+ }
+ }
+ AliSysInfo::AddStamp("ReadRecoParam");
ftVertexer = new AliVertexerTracks(AliTracker::GetBz());
if(fDiamondProfile && fMeanVertexConstraint) ftVertexer->SetVtxStart(fDiamondProfile);
AliInfo(Form("processing event %d", iEvent));
+ // Fill Event-info object
+ GetEventInfo();
+ fRecoParam.SetEventSpecie(fRunInfo,fEventInfo);
+
//Start of cycle for the in-loop QA
if (fInLoopQA) {
if (fRunQA) {
}
}
+ fEventInfo.Reset();
+ for (Int_t iDet = 0; iDet < fgkNDetectors; iDet++) {
+ if (fReconstructor[iDet])
+ fReconstructor[iDet]->SetRecoParam(NULL);
+ }
+
return kTRUE;
}
AliInfo("Filling trigger information into the ESD");
- AliCentralTrigger *aCTP = NULL;
-
if (fRawReader) {
AliCTPRawStream input(fRawReader);
if (!input.Next()) {
- AliWarning("No valid CTP (trigger) DDL raw data is found ! The trigger mask will be taken from the event header, trigger cluster mask will be empty !");
- ULong64_t mask = (((ULong64_t)fRawReader->GetTriggerPattern()[1]) << 32) +
- fRawReader->GetTriggerPattern()[0];
- esd->SetTriggerMask(mask);
- esd->SetTriggerCluster(0);
- }
- else {
- esd->SetTriggerMask(input.GetClassMask());
- esd->SetTriggerCluster(input.GetClusterMask());
- }
-
- aCTP = new AliCentralTrigger();
- TString configstr("");
- if (!aCTP->LoadConfiguration(configstr)) { // Load CTP config from OCDB
- AliError("No trigger configuration found in OCDB! The trigger classes information will no be stored in ESD!");
- delete aCTP;
- return kFALSE;
- }
- }
- else {
- AliRunLoader *runloader = AliRunLoader::GetRunLoader();
- if (runloader) {
- if (!runloader->LoadTrigger()) {
- aCTP = runloader->GetTrigger();
- esd->SetTriggerMask(aCTP->GetClassMask());
- esd->SetTriggerCluster(aCTP->GetClusterMask());
- }
- else {
- AliWarning("No trigger can be loaded! The trigger information is not stored in the ESD !");
- return kFALSE;
- }
+ AliWarning("No valid CTP (trigger) DDL raw data is found ! The trigger info is taken from the event header!");
}
else {
- AliError("No run loader is available! The trigger information is not stored in the ESD !");
- return kFALSE;
+ if (esd->GetTriggerMask() != input.GetClassMask())
+ AliError(Form("Invalid trigger pattern found in CTP raw-data: %llx %llx",
+ input.GetClassMask(),esd->GetTriggerMask()));
+ if (esd->GetOrbitNumber() != input.GetOrbitID())
+ AliError(Form("Invalid orbit id found in CTP raw-data: %x %x",
+ input.GetOrbitID(),esd->GetOrbitNumber()));
+ if (esd->GetBunchCrossNumber() != input.GetBCID())
+ AliError(Form("Invalid bunch-crossing id found in CTP raw-data: %x %x",
+ input.GetBCID(),esd->GetBunchCrossNumber()));
}
- }
-
- // Now fill the trigger class names into AliESDRun object
- AliTriggerConfiguration *config = aCTP->GetConfiguration();
- if (!config) {
- AliError("No trigger configuration has been found! The trigger classes information will not be stored in ESD!");
- if (fRawReader) delete aCTP;
- return kFALSE;
- }
- const TObjArray& classesArray = config->GetClasses();
- Int_t nclasses = classesArray.GetEntriesFast();
- for( Int_t j=0; j<nclasses; j++ ) {
- AliTriggerClass* trclass = (AliTriggerClass*)classesArray.At( j );
- Int_t trindex = (Int_t)TMath::Log2(trclass->GetMask());
- esd->SetTriggerClass(trclass->GetName(),trindex);
+ // Here one has to add the filling of trigger inputs and
+ // interaction records
+ // ...
}
-
- if (fRawReader) delete aCTP;
return kTRUE;
}
{
// get the reconstructor object and the loader for a detector
- if (fReconstructor[iDet]) return fReconstructor[iDet];
+ if (fReconstructor[iDet]) {
+ if (fRecoParam.GetDetRecoParamArray(iDet) && !AliReconstructor::GetRecoParam(iDet)) {
+ const AliDetectorRecoParam *par = fRecoParam.GetDetRecoParam(iDet);
+ fReconstructor[iDet]->SetRecoParam(par);
+ }
+ return fReconstructor[iDet];
+ }
// load the reconstructor object
TPluginManager* pluginManager = gROOT->GetPluginManager();
}
}
+ if (fRecoParam.GetDetRecoParamArray(iDet) && !AliReconstructor::GetRecoParam(iDet)) {
+ const AliDetectorRecoParam *par = fRecoParam.GetDetRecoParam(iDet);
+ reconstructor->SetRecoParam(par);
+ }
return reconstructor;
}
delete fTracker[iDet];
fTracker[iDet] = NULL;
}
+ if (fRunInfo) delete fRunInfo;
+ fRunInfo = NULL;
+
delete fVertexer;
fVertexer = NULL;
return kTRUE;
}
-
+//_____________________________________________________________________________
+Bool_t AliReconstruction::InitRecoParams()
+{
+ // The method accesses OCDB and retrieves all
+ // the available reco-param objects from there.
+
+ Bool_t isOK = kTRUE;
+
+ for (Int_t iDet = 0; iDet < fgkNDetectors; iDet++) {
+
+ if (fRecoParam.GetDetRecoParamArray(iDet)) {
+ AliInfo(Form("Using custom reconstruction parameters for detector %s",fgkDetectorName[iDet]));
+ continue;
+ }
+
+ AliDebug(1, Form("Loading RecoParam objects for detector: %s",fgkDetectorName[iDet]));
+
+ AliCDBPath path(fgkDetectorName[iDet],"Calib","RecoParam");
+ AliCDBEntry *entry=AliCDBManager::Instance()->Get(path.GetPath());
+ if(!entry){
+ AliWarning(Form("Couldn't find RecoParam entry in OCDB for detector %s",fgkDetectorName[iDet]));
+ isOK = kFALSE;
+ }
+ else {
+ TObject *recoParamObj = entry->GetObject();
+ if (dynamic_cast<TObjArray*>(recoParamObj)) {
+ // The detector has a normal TobjArray of AliDetectorRecoParam objects
+ // Registering them in AliRecoParam
+ fRecoParam.AddDetRecoParamArray(iDet,dynamic_cast<TObjArray*>(recoParamObj));
+ }
+ else if (dynamic_cast<AliDetectorRecoParam*>(recoParamObj)) {
+ // The detector has only onse set of reco parameters
+ // Registering it in AliRecoParam
+ AliInfo(Form("Single set of reco parameters found for detector %s",fgkDetectorName[iDet]));
+ dynamic_cast<AliDetectorRecoParam*>(recoParamObj)->SetAsDefault();
+ fRecoParam.AddDetRecoParam(iDet,dynamic_cast<AliDetectorRecoParam*>(recoParamObj));
+ }
+ else {
+ AliError(Form("No valid RecoParam object found in the OCDB for detector %s",fgkDetectorName[iDet]));
+ isOK = kFALSE;
+ }
+ entry->SetOwner(0);
+ }
+ }
+
+ return isOK;
+}
+
+//_____________________________________________________________________________
+Bool_t AliReconstruction::GetEventInfo()
+{
+ // Fill the event info object
+ // ...
+ AliCodeTimerAuto("")
+
+ AliCentralTrigger *aCTP = NULL;
+ if (fRawReader) {
+ fEventInfo.SetEventType(fRawReader->GetType());
+
+ ULong64_t mask = fRawReader->GetClassMask();
+ fEventInfo.SetTriggerMask(mask);
+ UInt_t clmask = fRawReader->GetDetectorPattern()[0];
+ fEventInfo.SetTriggerCluster(AliDAQ::ListOfTriggeredDetectors(clmask));
+
+ aCTP = new AliCentralTrigger();
+ TString configstr("");
+ if (!aCTP->LoadConfiguration(configstr)) { // Load CTP config from OCDB
+ AliError("No trigger configuration found in OCDB! The trigger configuration information will not be used!");
+ delete aCTP;
+ return kFALSE;
+ }
+ aCTP->SetClassMask(mask);
+ aCTP->SetClusterMask(clmask);
+ }
+ else {
+ fEventInfo.SetEventType(AliRawEventHeaderBase::kPhysicsEvent);
+
+ if (fRunLoader && (!fRunLoader->LoadTrigger())) {
+ aCTP = fRunLoader->GetTrigger();
+ fEventInfo.SetTriggerMask(aCTP->GetClassMask());
+ fEventInfo.SetTriggerCluster(AliDAQ::ListOfTriggeredDetectors(aCTP->GetClusterMask()));
+ }
+ else {
+ AliWarning("No trigger can be loaded! The trigger information will not be used!");
+ return kFALSE;
+ }
+ }
+
+ AliTriggerConfiguration *config = aCTP->GetConfiguration();
+ if (!config) {
+ AliError("No trigger configuration has been found! The trigger configuration information will not be used!");
+ if (fRawReader) delete aCTP;
+ return kFALSE;
+ }
+
+ TString trclasses;
+ ULong64_t trmask = fEventInfo.GetTriggerMask();
+ const TObjArray& classesArray = config->GetClasses();
+ Int_t nclasses = classesArray.GetEntriesFast();
+ for( Int_t iclass=0; iclass < nclasses; iclass++ ) {
+ AliTriggerClass* trclass = (AliTriggerClass*)classesArray.At(iclass);
+ if (trclass) {
+ Int_t trindex = (Int_t)TMath::Log2(trclass->GetMask());
+ fesd->SetTriggerClass(trclass->GetName(),trindex);
+ if (trmask & (1 << trindex)) {
+ trclasses += " ";
+ trclasses += trclass->GetName();
+ trclasses += " ";
+ }
+ }
+ }
+ fEventInfo.SetTriggerClasses(trclasses);
+
+ if (!aCTP->CheckTriggeredDetectors()) {
+ if (fRawReader) delete aCTP;
+ return kFALSE;
+ }
+
+ if (fRawReader) delete aCTP;
+
+ // We have to fill also the HLT decision here!!
+ // ...
+
+ return kTRUE;
+}
+
+const char *AliReconstruction::MatchDetectorList(const char *detectorList, UInt_t detectorMask)
+{
+ // Match the detector list found in the rec.C or the default 'ALL'
+ // to the list found in the GRP (stored there by the shuttle PP which
+ // gets the information from ECS)
+ static TString resultList;
+ TString detList = detectorList;
+
+ resultList = "";
+
+ for(Int_t iDet = 0; iDet < (AliDAQ::kNDetectors-1); iDet++) {
+ if ((detectorMask >> iDet) & 0x1) {
+ TString det = AliDAQ::OfflineModuleName(iDet);
+ if ((detList.CompareTo("ALL") == 0) ||
+ detList.BeginsWith("ALL ") ||
+ detList.EndsWith(" ALL") ||
+ detList.Contains(" ALL ") ||
+ (detList.CompareTo(det) == 0) ||
+ detList.BeginsWith(det) ||
+ detList.EndsWith(det) ||
+ detList.Contains( " "+det+" " )) {
+ if (!resultList.EndsWith(det + " ")) {
+ resultList += det;
+ resultList += " ";
+ }
+ }
+ }
+ }
+
+ // HLT
+ if ((detectorMask >> AliDAQ::kHLTId) & 0x1) {
+ TString hltDet = AliDAQ::OfflineModuleName(AliDAQ::kNDetectors-1);
+ if ((detList.CompareTo("ALL") == 0) ||
+ detList.BeginsWith("ALL ") ||
+ detList.EndsWith(" ALL") ||
+ detList.Contains(" ALL ") ||
+ (detList.CompareTo(hltDet) == 0) ||
+ detList.BeginsWith(hltDet) ||
+ detList.EndsWith(hltDet) ||
+ detList.Contains( " "+hltDet+" " )) {
+ resultList += hltDet;
+ }
+ }
+
+ return resultList.Data();
+
+}
class TList;
class AliQADataMakerSteer;
class TMap;
+class AliRecoParam;
+class AliDetectorRecoParam;
+class AliRunInfo;
+#include "AliEventInfo.h"
+#include "AliRecoParam.h"
class AliReconstruction: public TNamed {
public:
void SetNumberOfEventsPerFile(UInt_t nEvents)
{fNumberOfEventsPerFile = nEvents;};
void SetOption(const char* detector, const char* option);
+ void SetRecoParam(const char* detector, AliDetectorRecoParam *par);
void SetRunLocalReconstruction(const char* detectors) {
fRunLocalReconstruction = detectors;};
// Plane Efficiency Evaluation
void SetRunPlaneEff(Bool_t flag=kFALSE) {fRunPlaneEff = flag;}
+ enum {
+ fgkNDetectors = 15 // number of detectors
+ };
+ static Int_t GetDetIndex(const char * detector);
+
private:
AliReconstruction(const AliReconstruction& rec);
AliReconstruction& operator = (const AliReconstruction& rec);
void FillRawDataErrorLog(Int_t iEvent, AliESDEvent* esd);
//Quality Assurance
- Int_t GetDetIndex(const char * detector);
const Int_t GetQACycles(const char * detector) { return fQACycles[GetDetIndex(detector)] ; }
void CheckQA() ;
Bool_t InitAliEVE();
void RunAliEVE();
+ Bool_t InitRecoParams(); // init the array with the reconstruciton parameters
+ Bool_t GetEventInfo(); // fill the event info inside the event loop
+
+ const char *MatchDetectorList(const char *detectorList, UInt_t detectorMask);
+
//*** Magnetic field map settings *******************
Bool_t fUniformField; // uniform field tracking flag
AliMagF *fForcedFieldMap; // independent, not GRP, field map
TString fLoadAlignData; // Load alignment data from CDB for these detectors
TString fESDPar; // String where the esd.par is stored, will be attached to the tree
TString fUseHLTData; // Detectors for which the HLT data is used as input
+ AliRunInfo* fRunInfo; // an object which contains essential global conditions information
+ AliEventInfo fEventInfo; // an object which contains essential event information
AliRunLoader* fRunLoader; //! current run loader object
AliRawReader* fRawReader; //! current raw data reader
AliRawReader* fParentRawReader; //! parent raw data reader in case of AliRawReaderHLT
- static const Int_t fgkNDetectors = 15; //! number of detectors
static const char* fgkDetectorName[fgkNDetectors]; //! names of detectors
AliReconstructor* fReconstructor[fgkNDetectors]; //! array of reconstructor objects
+ AliRecoParam fRecoParam; //! container for the reco-param objects for detectors
AliLoader* fLoader[fgkNDetectors]; //! detector loaders
AliVertexer* fVertexer; //! vertexer for ITS
AliTracker* fTracker[fgkNDetectors]; //! trackers
Bool_t fIsNewRunLoader; // galice.root created from scratch (real raw data case)
Bool_t fRunAliEVE; // Run AliEVE or not
- ClassDef(AliReconstruction, 24) // class for running the reconstruction
+ ClassDef(AliReconstruction, 25) // class for running the reconstruction
};
#endif
#include "AliLog.h"
#include "AliReconstructor.h"
+#include <TClass.h>
#include <TString.h>
ClassImp(AliReconstructor)
+const AliDetectorRecoParam* AliReconstructor::fgRecoParam[AliReconstruction::fgkNDetectors] = {NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL};
//_____________________________________________________________________________
void AliReconstructor::ConvertDigits(AliRawReader* /*rawReader*/,
detName.Remove(detName.Index("Reconstructor"));
return detName.Data();
}
+
+//_____________________________________________________________________________
+void AliReconstructor::SetRecoParam(const AliDetectorRecoParam *par)
+{
+ // To be implemented by the detectors.
+ // As soon as we manage to remove the static members
+ // and method in the detector reconstructors, we will
+ // implemented this method in the base class and remove
+ // the detectors implementations.
+ Int_t iDet = AliReconstruction::GetDetIndex(GetDetectorName());
+
+ if (iDet >= 0)
+ fgRecoParam[iDet] = par;
+ else
+ AliError(Form("Invalid detector index for (%s)",GetDetectorName()));
+
+ return;
+}
+
+//_____________________________________________________________________________
+const AliDetectorRecoParam* AliReconstructor::GetRecoParam(Int_t iDet)
+{
+ // Get the current reconstruciton parameters
+ // for a given detector
+ if (iDet >= 0 && iDet < AliReconstruction::fgkNDetectors)
+ return fgRecoParam[iDet];
+ else {
+ AliErrorClass(Form("Invalid detector index (%d)",iDet));
+ return NULL;
+ }
+}
class AliVertexer;
class AliTracker;
class AliESDEvent;
+class AliDetectorRecoParam;
+#include "AliReconstruction.h"
class AliReconstructor: public TObject {
public:
void SetOption(Option_t* option) {fOption = option;};
virtual Option_t* GetOption() const {return fOption.Data();};
+ void SetRecoParam(const AliDetectorRecoParam *par);
+ static const AliDetectorRecoParam* GetRecoParam(Int_t iDet);
+
private:
- TString fOption; //! option for reconstruction
+ TString fOption; //! option for reconstruction
+ static const AliDetectorRecoParam* fgRecoParam[AliReconstruction::fgkNDetectors]; //! event reconstruction parameters for all detectors
ClassDef(AliReconstructor, 0) // base class for reconstruction algorithms
};
--- /dev/null
+/**************************************************************************
+ * Copyright(c) 1998-1999, ALICE Experiment at CERN, All rights reserved. *
+ * *
+ * Author: The ALICE Off-line Project. *
+ * Contributors are mentioned in the code where appropriate. *
+ * *
+ * Permission to use, copy, modify and distribute this software and its *
+ * documentation strictly for non-commercial purposes is hereby granted *
+ * without fee, provided that the above copyright notice appears in all *
+ * copies and that both the copyright notice and this permission notice *
+ * appear in the supporting documentation. The authors make no claims *
+ * about the suitability of this software for any purpose. It is *
+ * provided "as is" without express or implied warranty. *
+ **************************************************************************/
+
+//////////////////////////////////////////////////////////////////////////////
+// Class AliRunInfo //
+// Container class for all the information related to LHCstate, run type, //
+// active detectors, beam energy etc. //
+// It is used together with the AliEventInfo in order to provide //
+// the AliRecoParam object with //
+// the necessary information so that it can decide which instance of //
+// AliDetectorRecoParam objects to use in reconstruction one particular //
+// event. //
+// //
+// cvetan.cheshkov@cern.ch 12/06/2008 //
+//////////////////////////////////////////////////////////////////////////////
+
+#include "AliRunInfo.h"
+
+ClassImp(AliRunInfo)
+
+//______________________________________________________________________________
+AliRunInfo::AliRunInfo():
+ TObject(),
+ fLHCState("UNKNOWN"),
+ fBeamType("UNKNOWN"),
+ fBeamEnergy(0),
+ fRunType("UNKNOWN"),
+ fActiveDetectors(0)
+{
+ // default constructor
+ // ...
+}
+
+//______________________________________________________________________________
+AliRunInfo::AliRunInfo(const char *lhcState,
+ const char *beamType,
+ Float_t beamEnergy,
+ const char *runType,
+ UInt_t activeDetectors):
+ TObject(),
+ fLHCState(lhcState),
+ fBeamType(beamType),
+ fBeamEnergy(beamEnergy),
+ fRunType(runType),
+ fActiveDetectors(activeDetectors)
+{
+ // constructor
+ // ...
+}
+
+//______________________________________________________________________________
+AliRunInfo::AliRunInfo(const AliRunInfo &evInfo):
+ TObject(evInfo),
+ fLHCState(evInfo.fLHCState),
+ fBeamType(evInfo.fBeamType),
+ fBeamEnergy(evInfo.fBeamEnergy),
+ fRunType(evInfo.fRunType),
+ fActiveDetectors(evInfo.fActiveDetectors)
+{
+ // Copy constructor
+ // ...
+}
+
+//_____________________________________________________________________________
+AliRunInfo &AliRunInfo::operator =(const AliRunInfo& evInfo)
+{
+ // assignment operator
+ // ...
+ if(this==&evInfo) return *this;
+ ((TObject *)this)->operator=(evInfo);
+
+ fLHCState = evInfo.fLHCState;
+ fBeamType = evInfo.fBeamType;
+ fBeamEnergy = evInfo.fBeamEnergy;
+ fRunType = evInfo.fRunType;
+ fActiveDetectors = evInfo.fActiveDetectors;
+
+ return *this;
+}
--- /dev/null
+#ifndef ALIRUNINFO_H
+#define ALIRUNINFO_H
+/* Copyright(c) 1998-1999, ALICE Experiment at CERN, All rights reserved. *
+ * See cxx source for full Copyright notice */
+
+//////////////////////////////////////////////////////////////////////////////
+// Class AliRunInfo //
+// Container class for all the information related to LHCstate, run type, //
+// active detectors, beam energy etc. //
+// It is used together with the AliEventInfo in order to provide //
+// the AliRecoParam object with //
+// the necessary information so that it can decide which instance of //
+// AliDetectorRecoParam objects to use in reconstruction one particular //
+// event. //
+// //
+// cvetan.cheshkov@cern.ch 12/06/2008 //
+//////////////////////////////////////////////////////////////////////////////
+
+#include <TObject.h>
+#include <TObjString.h>
+
+#include "AliDAQ.h"
+
+class AliRunInfo : public TObject {
+
+ public:
+ AliRunInfo();
+ AliRunInfo(const char *lhcState,
+ const char *beamType,
+ Float_t beamEnergy,
+ const char *runType,
+ UInt_t activeDetectors);
+ virtual ~AliRunInfo() {}
+
+ virtual void Print(Option_t */*option=""*/) const { Dump(); }
+
+ const char *GetLHCState() const { return fLHCState.Data(); }
+ const char *GetBeamType() const { return fBeamType.Data(); }
+ const char *GetRunType() const { return fRunType.Data(); }
+ UInt_t GetDetectorMask() const { return fActiveDetectors; }
+ const char *GetActiveDetectors() const { return AliDAQ::ListOfTriggeredDetectors(fActiveDetectors); }
+
+ AliRunInfo(const AliRunInfo &evInfo);
+ AliRunInfo& operator= (const AliRunInfo& evInfo);
+
+ private:
+
+ TString fLHCState; // state of the machine as provided by DCS and DAQ log-book (per run)
+ TString fBeamType; // beam type for Alice
+ Float_t fBeamEnergy; // beam energy (in GeV)
+ TString fRunType; // run type accoring to ECS (per run)
+ UInt_t fActiveDetectors;// list of active detectors (per run)
+
+ ClassDef(AliRunInfo,1) // Run info class
+};
+
+#endif
if (!runLoader->LoadTrigger()) {
AliCentralTrigger *aCTP = runLoader->GetTrigger();
if (aCTP->GetClassMask() == 0) continue;
- detClust = aCTP->GetTriggeredDetectors();
+ detClust = AliDAQ::ListOfTriggeredDetectors(aCTP->GetClusterMask());
AliInfo(Form("List of detectors to be read out: %s",detClust.Data()));
}
"HLT"
};
-const char* AliTriggerInput::fgkOfflineModuleName[AliDAQ::kNDetectors] = {
- "ITS",
- "ITS",
- "ITS",
- "TPC",
- "TRD",
- "TOF",
- "HMPID",
- "PHOS",
- "CPV",
- "PMD",
- "MUON",
- "MUON",
- "FMD",
- "T0",
- "VZERO",
- "ZDC",
- "ACORDE",
- "CTP",
- "EMCAL",
- "",
- "HLT"
-};
-
//_____________________________________________________________________________
AliTriggerInput::AliTriggerInput( TString name, TString det, UChar_t level, Int_t signature, Char_t number ):
TNamed( name.Data(), det.Data() ),
// Get the detector module name (in AliRoot simulation sense)
TString name = "";
if (fDetectorId >= 0 && fDetectorId < AliDAQ::kNDetectors)
- name = fgkOfflineModuleName[(Int_t)fDetectorId];
+ name = AliDAQ::OfflineModuleName((Int_t)fDetectorId);
else
AliError(Form("Invalid detector Id (%d)",(Int_t)fDetectorId));
static Bool_t fgkIsTriggerDetector[AliDAQ::kNDetectors]; // List of trigger detectors
static const char* fgkCTPDetectorName[AliDAQ::kNDetectors];
- static const char* fgkOfflineModuleName[AliDAQ::kNDetectors];
protected:
ULong64_t fMask; // Trigger ID mask (1 bit)
ULong64_t fValue; // Trigger Signal (0 = false, > 1 = true = fMask )
Bool_t fIsActive; // Is trigger input active (during simulation)
// void fDectParameterTable; //-> link to detector parameter table????
- ClassDef( AliTriggerInput, 3 ) // Define a Trigger Input
+ ClassDef( AliTriggerInput, 4 ) // Define a Trigger Input
};
#pragma link C++ class AliTriggerRunScalers+;
#pragma link C++ class AliGRPPreprocessor+;
+#pragma link C++ class AliRunInfo+;
#pragma link C++ class AliEventInfo+;
#pragma link C++ class AliRelAlignerKalman+;
AliDetectorRecoParam.cxx \
AliPlaneEff.cxx \
AliTriggerRunScalers.cxx AliGRPPreprocessor.cxx \
-AliEventInfo.cxx \
+AliRunInfo.cxx AliEventInfo.cxx \
AliRelAlignerKalman.cxx
ClassImp(AliTPCReconstructor)
-AliTPCRecoParam * AliTPCReconstructor::fgkRecoParam =0; // reconstruction parameters
Int_t AliTPCReconstructor::fgStreamLevel = 0; // stream (debug) level
//_____________________________________________________________________________
AliTPCReconstructor::~AliTPCReconstructor()
{
- if (fgkRecoParam) delete fgkRecoParam;
if (fClusterer) delete fClusterer;
}
return param;
}
-
-
-
-
-const AliTPCRecoParam* AliTPCReconstructor::GetRecoParam(){
- //
- // Get reconstruction parameters
- //
-
- if (!fgkRecoParam) {
- //
- // 1. try to get reco parameters from OCDB
- //
- fgkRecoParam = AliTPCcalibDB::Instance()->GetRecoParam(0);
- //Info("","Reconstruction parameters from OCDB used");
- //
- // 2. If not initialized take default
- //
- if (!fgkRecoParam){
- fgkRecoParam = AliTPCRecoParam::GetHighFluxParam();
- //Error("","Default reconstruction parameters used");
- }
- }
-
- return fgkRecoParam;
-}
AliESDEvent* esd) const
{FillESD((TTree*)NULL,(TTree*)NULL,esd);}
- static void SetRecoParam(AliTPCRecoParam * param) { fgkRecoParam = param;}
- static const AliTPCRecoParam* GetRecoParam();
+ static const AliTPCRecoParam* GetRecoParam() { return dynamic_cast<const AliTPCRecoParam*>(AliReconstructor::GetRecoParam(1)); }
//
- static Double_t GetCtgRange() { return fgkRecoParam->GetCtgRange();}
- static Double_t GetMaxSnpTracker(){ return fgkRecoParam->GetMaxSnpTracker();}
- static Double_t GetMaxSnpTrack() { return fgkRecoParam->GetMaxSnpTrack();}
+ static Double_t GetCtgRange() { return GetRecoParam()->GetCtgRange();}
+ static Double_t GetMaxSnpTracker(){ return GetRecoParam()->GetMaxSnpTracker();}
+ static Double_t GetMaxSnpTrack() { return GetRecoParam()->GetMaxSnpTrack();}
static Int_t StreamLevel() { return fgStreamLevel;}
static void SetStreamLevel(Int_t level) { fgStreamLevel = level;}
private:
AliTPCParam* GetTPCParam() const;
- static AliTPCRecoParam * fgkRecoParam; // reconstruction parameters
static Int_t fgStreamLevel; // flag for streaming - for TPC reconstruction
AliTPCclustererMI* fClusterer; // TPC clusterer
fPedestals(0),
fTemperature(0),
fMapping(0),
- fRecoParamArray(0),
fParam(0),
fClusterParam(0)
{
fPedestals(0),
fTemperature(0),
fMapping(0),
- fRecoParamArray(0),
fParam(0),
fClusterParam(0)
fTemperature = (AliTPCSensorTempArray*)entry->GetObject();
}
-
- entry = GetCDBEntry("TPC/Calib/RecoParam");
- if (entry){
- entry->SetOwner(kTRUE);
- fRecoParamArray = (TObjArray*)(entry->GetObject());
- }
-
-
entry = GetCDBEntry("TPC/Calib/Parameters");
if (entry){
//if (fPadNoise) delete fPadNoise;
delete[] mapNames;
}
}
-
-
-AliTPCRecoParam * AliTPCcalibDB::GetRecoParam(Int_t */*eventtype*/){
- //
- //
- //
- if (!fRecoParamArray){
- return 0; // back compatible sollution
- };
-
- AliTPCRecoParam * param = (AliTPCRecoParam*)fRecoParamArray->At(0);
- return param;
-
-}
class AliTPCParam;
class AliTPCAltroMapping;
class AliTPCClusterParam;
-class AliTPCRecoParam;
//class AliCDBStorage;
class AliTPCcalibDB : public TObject
AliTPCParam* GetParameters(){return fParam;}
AliTPCAltroMapping ** GetMapping(){ return fMapping;}
AliTPCClusterParam *GetClusterParam(){ return fClusterParam;}
- AliTPCRecoParam * GetRecoParam(Int_t *eventtype);
//
static void CreateObjectList(const Char_t *filename, TObjArray *calibObjects);
static void MakeTree(const char * fileName, TObjArray * array, const char * mapFileName = 0, AliTPCCalPad* outlierPad = 0, Float_t ltmFraction = 0.9);
AliTPCCalPad* fPedestals; // Pedestal calibration entry
AliTPCSensorTempArray* fTemperature; // Temperature calibration entry
AliTPCAltroMapping **fMapping; // Altro mapping
- TObjArray * fRecoParamArray; // reconstruction parameters
//
//
AliTPCParam * fParam; // TPC parameters
ClassImp(AliTRDReconstructor)
-AliTRDrecoParam* AliTRDReconstructor::fgRecoParam = 0x0;
-
//_____________________________________________________________________________
AliTRDReconstructor::~AliTRDReconstructor() {
- if(fgRecoParam) delete fgRecoParam;
}
#include "AliReconstructor.h"
class AliRawReader;
-class AliTRDrecoParam;
+
+#include "AliDetectorRecoParam.h"
+#include "AliTRDrecoParam.h"
+
class AliTRDReconstructor: public AliReconstructor
{
virtual void Reconstruct(AliRawReader *rawReader, TTree *clusterTree) const;
virtual void Reconstruct(TTree *digitsTree, TTree *clusterTree) const;
- static AliTRDrecoParam *RecoParam() { return fgRecoParam; }
virtual AliTracker *CreateTracker() const;
virtual void FillESD(AliRawReader */*rawReader*/, TTree *clusterTree, AliESDEvent *esd) const
, esd); }
virtual void FillESD(TTree *digitsTree, TTree *clusterTree, AliESDEvent *esd) const;
- static void SetRecoParam(AliTRDrecoParam *reco) { fgRecoParam = reco; }
-
-
- private:
-
- static AliTRDrecoParam *fgRecoParam; // Reconstruction parameters
+ static const AliTRDrecoParam* GetRecoParam() { return dynamic_cast<const AliTRDrecoParam*>(AliReconstructor::GetRecoParam(2)); }
ClassDef(AliTRDReconstructor,0) // Class for the TRD reconstruction
fX += cl->GetX(); \r
\r
// Debug Streaming\r
- if(AliTRDtrackerV1::DebugStreamer() && AliTRDReconstructor::RecoParam()->GetStreamLevel() >= 3){\r
+ if(AliTRDtrackerV1::DebugStreamer() && AliTRDReconstructor::GetRecoParam()->GetStreamLevel() >= 3){\r
TTreeSRedirector &cstream = *AliTRDtrackerV1::DebugStreamer();\r
cstream << "BuildIndices"\r
<< "Plane=" << fPlane\r
//End_Html\r
//\r
\r
- if(!AliTRDReconstructor::RecoParam()){\r
+ if(!AliTRDReconstructor::GetRecoParam()){\r
AliError("Reconstruction parameters not initialized.");\r
return;\r
}\r
if(Layer == 0){\r
cond[0] = cl->GetY(); // center: y-Direction\r
cond[1] = cl->GetZ(); // center: z-Direction\r
- cond[2] = AliTRDReconstructor::RecoParam()->GetMaxPhi() * (cl->GetX() - GetX()) + 1.0; // deviation: y-Direction\r
- cond[3] = AliTRDReconstructor::RecoParam()->GetMaxTheta() * (cl->GetX() - GetX()) + 1.0; // deviation: z-Direction\r
+ cond[2] = AliTRDReconstructor::GetRecoParam()->GetMaxPhi() * (cl->GetX() - GetX()) + 1.0; // deviation: y-Direction\r
+ cond[3] = AliTRDReconstructor::GetRecoParam()->GetMaxTheta() * (cl->GetX() - GetX()) + 1.0; // deviation: z-Direction\r
} else {\r
cond[0] = cl->GetY() + phi * (GetX() - cl->GetX()); \r
cond[1] = cl->GetZ() + theta * (GetX() - cl->GetX());\r
- cond[2] = AliTRDReconstructor::RecoParam()->GetRoad0y() + phi;\r
- cond[3] = AliTRDReconstructor::RecoParam()->GetRoad0z();\r
+ cond[2] = AliTRDReconstructor::GetRecoParam()->GetRoad0y() + phi;\r
+ cond[3] = AliTRDReconstructor::GetRecoParam()->GetRoad0z();\r
}\r
}\r
\r
// successfull) by the help of the method FindNearestCluster\r
\r
\r
- Double_t maxroad = AliTRDReconstructor::RecoParam()->GetRoad2y();\r
- Double_t maxroadz = AliTRDReconstructor::RecoParam()->GetRoad2z();\r
+ Double_t maxroad = AliTRDReconstructor::GetRecoParam()->GetRoad2y();\r
+ Double_t maxroadz = AliTRDReconstructor::GetRecoParam()->GetRoad2z();\r
\r
Int_t index = SearchNearestCluster(cond[0],cond[1],maxroad,maxroadz);\r
AliTRDcluster *returnCluster = 0x0;\r
fRawVersion = AliTRDfeeParam::Instance()->GetRAWversion();
- // retrive reco params
- AliTRDrecoParam *rec = 0x0;
- if (!(rec = AliTRDReconstructor::RecoParam())){
- if(!(rec = trd->GetRecoParam(0))){
- AliInfo("Using default RecoParams = LowFluxParam.");
- rec = AliTRDrecoParam::GetLowFluxParam();
- }
- AliTRDReconstructor::SetRecoParam(rec);
- }
}
AliFatal("Could not get calibration object");
}
- // retrive reco params
- AliTRDrecoParam *rec = 0x0;
- if (!(rec = AliTRDReconstructor::RecoParam())){
- if(!(rec = trd->GetRecoParam(0))){
- AliInfo("Using default RecoParams = LowFluxParam.");
- rec = AliTRDrecoParam::GetLowFluxParam();
- }
- AliTRDReconstructor::SetRecoParam(rec);
- }
-
fDigitsManager->CreateArrays();
fRawVersion = AliTRDfeeParam::Instance()->GetRAWversion();
// tracklet writing
- if (AliTRDReconstructor::RecoParam()->IsTrackletWriteEnabled()){
+ if (AliTRDReconstructor::GetRecoParam()->IsTrackletWriteEnabled()){
TString evfoldname = AliConfig::GetDefaultEventFolderName();
fRunLoader = AliRunLoader::GetRunLoader(evfoldname);
fDigitsManager->SetUseDictionaries(fAddLabels);
// tracklet container for raw tracklet writing
- if (!fTrackletContainer && AliTRDReconstructor::RecoParam()->IsTrackletWriteEnabled())
+ if (!fTrackletContainer && AliTRDReconstructor::GetRecoParam()->IsTrackletWriteEnabled())
{
fTrackletContainer = new UInt_t *[2];
for (Int_t i=0; i<2 ;i++){
fDigitsManager->RemoveDictionaries(det);
fDigitsManager->ClearIndexes(det);
- if (!AliTRDReconstructor::RecoParam()-> IsTrackletWriteEnabled()) continue;
+ if (!AliTRDReconstructor::GetRecoParam()-> IsTrackletWriteEnabled()) continue;
if (*(fTrackletContainer[0]) > 0 || *(fTrackletContainer[1]) > 0) WriteTracklets(det); // if there is tracklet words in this det
}
- if (AliTRDReconstructor::RecoParam()->IsTrackletWriteEnabled()){
+ if (AliTRDReconstructor::GetRecoParam()->IsTrackletWriteEnabled()){
delete [] fTrackletContainer;
fTrackletContainer = NULL;
}
// There is no ADC threshold anymore, and simParam should not be used in clusterizer. KO
Float_t adcThreshold = 0;
- if (!AliTRDReconstructor::RecoParam())
+ if (!AliTRDReconstructor::GetRecoParam())
{
AliError("RecoParam does not exist\n");
return kFALSE;
}
// Threshold value for the maximum
- Float_t maxThresh = AliTRDReconstructor::RecoParam()->GetClusMaxThresh();
+ Float_t maxThresh = AliTRDReconstructor::GetRecoParam()->GetClusMaxThresh();
// Threshold value for the digit signal
- Float_t sigThresh = AliTRDReconstructor::RecoParam()->GetClusSigThresh();
+ Float_t sigThresh = AliTRDReconstructor::GetRecoParam()->GetClusSigThresh();
// Threshold value for the maximum ( cut noise)
- Float_t minMaxCutSigma = AliTRDReconstructor::RecoParam()->GetMinMaxCutSigma();
+ Float_t minMaxCutSigma = AliTRDReconstructor::GetRecoParam()->GetMinMaxCutSigma();
// Threshold value for the sum pad ( cut noise)
- Float_t minLeftRightCutSigma = AliTRDReconstructor::RecoParam()->GetMinLeftRightCutSigma();
+ Float_t minLeftRightCutSigma = AliTRDReconstructor::GetRecoParam()->GetMinLeftRightCutSigma();
// Iteration limit for unfolding procedure
const Float_t kEpsilon = 0.01;
// The position of the cluster in COL direction relative to the center pad (pad units)
Double_t clusterPosCol = 0.0;
- if (AliTRDReconstructor::RecoParam()->IsLUT()) {
+ if (AliTRDReconstructor::GetRecoParam()->IsLUT()) {
// Calculate the position of the cluster by using the
// lookup table method
clusterPosCol = LUTposition(ilayer,clusterSignal[2]
{
// Apply the tail cancelation via the digital filter
// (only for non-coorupted pads)
- if (AliTRDReconstructor::RecoParam()->IsTailCancelation())
+ if (AliTRDReconstructor::GetRecoParam()->IsTailCancelation())
{
- DeConvExp(inADC,outADC,nTimeTotal,AliTRDReconstructor::RecoParam()->GetTCnexp());
+ DeConvExp(inADC,outADC,nTimeTotal,AliTRDReconstructor::GetRecoParam()->GetTCnexp());
}
}
return -1;
}
- AliTRDrecoParam *rec = AliTRDReconstructor::RecoParam();
+ const AliTRDrecoParam *rec = AliTRDReconstructor::GetRecoParam();
if (!rec) {
AliErrorGeneral("AliTRDpidESD::MakePID()", "No TRD reco param.");
return 0x0;
Double_t GetRoad2z() const { return fkRoad2z; }
Double_t GetTrackLikelihood() const { return fkTrackLikelihood; }
Int_t GetStreamLevel() const { return fkStreamLevel; }
- inline void GetSysCovMatrix(Double_t *sys);
+ inline void GetSysCovMatrix(Double_t *sys) const;
Double_t GetMinMaxCutSigma() const { return fMinMaxCutSigma; };
Double_t GetMinLeftRightCutSigma() const { return fMinLeftRightCutSigma; };
Double_t GetClusMaxThresh() const { return fClusMaxThresh; };
};
//___________________________________________________
-inline void AliTRDrecoParam::GetSysCovMatrix(Double_t *sys)
+inline void AliTRDrecoParam::GetSysCovMatrix(Double_t *sys) const
{
if(!sys) return;
memcpy(sys, fSysCovMatrix, 5*sizeof(Double_t));
nclusters[slice]++;
} // End of loop over clusters
- if(AliTRDReconstructor::RecoParam()->GetPIDMethod() == AliTRDrecoParam::kLQPID){
+ if(AliTRDReconstructor::GetRecoParam()->GetPIDMethod() == AliTRDrecoParam::kLQPID){
// calculate mean charge per slice (only LQ PID)
for(int is=0; is<nslices; is++){
if(nclusters[is]) fdEdx[is] /= nclusters[is];
return 0x0;
}
- AliTRDrecoParam *rec = AliTRDReconstructor::RecoParam();
+ const AliTRDrecoParam *rec = AliTRDReconstructor::GetRecoParam();
if (!rec) {
AliError("No TRD reco param.");
return 0x0;
AliError("No access to AliTRDCalPID object");
return 0x0;
}
- //AliInfo(Form("Method[%d] : %s", AliTRDReconstructor::RecoParam()->GetPIDMethod(), pd->IsA()->GetName()));
+ //AliInfo(Form("Method[%d] : %s", AliTRDReconstructor::GetRecoParam()->GetPIDMethod(), pd->IsA()->GetName()));
// calculate tracklet length TO DO
Float_t length = (AliTRDgeometry::AmThick() + AliTRDgeometry::DrThick());
// debug level 7
//
- if(!AliTRDReconstructor::RecoParam()){
+ if(!AliTRDReconstructor::GetRecoParam()){
AliError("Seed can not be used without a valid RecoParam.");
return kFALSE;
}
AliTRDchamberTimeBin *layer = 0x0;
- if(AliTRDReconstructor::RecoParam()->GetStreamLevel()>=7 && c){
+ if(AliTRDReconstructor::GetRecoParam()->GetStreamLevel()>=7 && c){
TClonesArray clusters("AliTRDcluster", 24);
clusters.SetOwner(kTRUE);
AliTRDcluster *cc = 0x0;
}
Float_t tquality;
- Double_t kroady = AliTRDReconstructor::RecoParam()->GetRoad1y();
+ Double_t kroady = AliTRDReconstructor::GetRecoParam()->GetRoad1y();
Double_t kroadz = fPadLength * .5 + 1.;
// initialize configuration parameters
fZ[iTime] = cl->GetZ();
ncl++;
}
- if(AliTRDReconstructor::RecoParam()->GetStreamLevel()>=7) AliInfo(Form("iter = %d ncl [%d] = %d", iter, fPlane, ncl));
+ if(AliTRDReconstructor::GetRecoParam()->GetStreamLevel()>=7) AliInfo(Form("iter = %d ncl [%d] = %d", iter, fPlane, ncl));
if(ncl>1){
// calculate length of the time bin (calibration aware)
AliTRDseed::Update();
}
- if(AliTRDReconstructor::RecoParam()->GetStreamLevel()>=7) AliInfo(Form("iter = %d nclFit [%d] = %d", iter, fPlane, fN2));
+ if(AliTRDReconstructor::GetRecoParam()->GetStreamLevel()>=7) AliInfo(Form("iter = %d nclFit [%d] = %d", iter, fPlane, fN2));
if(IsOK()){
tquality = GetQuality(kZcorr);
// 6. fit tracklet
//
- if(!AliTRDReconstructor::RecoParam()){
+ if(!AliTRDReconstructor::GetRecoParam()){
AliError("Seed can not be used without a valid RecoParam.");
return kFALSE;
}
const Int_t kClusterCandidates = 2 * knTimebins;
//define roads
- Double_t kroady = AliTRDReconstructor::RecoParam()->GetRoad1y();
+ Double_t kroady = AliTRDReconstructor::GetRecoParam()->GetRoad1y();
Double_t kroadz = fPadLength * 1.5 + 1.;
// correction to y for the tilting angle
Float_t zcorr = kZcorr ? fTilt * (fZProb - fZref[0]) : 0.;
}
// number of minimum numbers of clusters expected for the tracklet
- Int_t kClmin = Int_t(AliTRDReconstructor::RecoParam()->GetFindableClusters()*AliTRDtrackerV1::GetNTimeBins());
+ Int_t kClmin = Int_t(AliTRDReconstructor::GetRecoParam()->GetFindableClusters()*AliTRDtrackerV1::GetNTimeBins());
if (fN2 < kClmin){
AliWarning(Form("Not enough clusters to fit the tracklet %d [%d].", fN2, kClmin));
fN2 = 0;
// insert systematic uncertainties calibration and misalignment
Double_t sys[15];
- AliTRDReconstructor::RecoParam()->GetSysCovMatrix(sys);
+ AliTRDReconstructor::GetRecoParam()->GetSysCovMatrix(sys);
cov[0] += (sys[0]*sys[0]);
cov[2] += (sys[1]*sys[1]);
Int_t nSeed = event->GetNumberOfTracks();
if(!nSeed){
// run stand alone tracking
- if (AliTRDReconstructor::RecoParam()->IsSeeding()) Clusters2Tracks(event);
+ if (AliTRDReconstructor::GetRecoParam()->IsSeeding()) Clusters2Tracks(event);
return 0;
}
// Debug part of tracking
TTreeSRedirector &cstream = *fDebugStreamer;
Int_t eventNrInFile = event->GetEventNumberInFile(); // This is most likely NOT the event number you'd like to use. It has nothing to do with the 'real' event number.
- if (AliTRDReconstructor::RecoParam()->GetStreamLevel() > 0) {
+ if (AliTRDReconstructor::GetRecoParam()->GetStreamLevel() > 0) {
if (track->GetBackupTrack()) {
cstream << "Tracks"
<< "EventNrInFile=" << eventNrInFile
// Add TRD track to ESDfriendTrack - maybe this tracks are
// not useful for post-processing - TODO make decision
- if (AliTRDReconstructor::RecoParam()->GetStreamLevel() > 0) {
+ if (AliTRDReconstructor::GetRecoParam()->GetStreamLevel() > 0) {
seed->AddCalibObject(new AliTRDtrack(*pt2/*, kTRUE*/));
}
delete pt2;
}
// Add TRD track to ESDfriendTrack
- if (AliTRDReconstructor::RecoParam()->GetStreamLevel() > 0) {
+ if (AliTRDReconstructor::GetRecoParam()->GetStreamLevel() > 0) {
seed->AddCalibObject(new AliTRDtrack(*pt/*, kTRUE*/));
}
delete pt;
isFake = kTRUE;
}
- if (AliTRDReconstructor::RecoParam()->GetStreamLevel() > 0) {
+ if (AliTRDReconstructor::GetRecoParam()->GetStreamLevel() > 0) {
if ((!isFake) || ((icl3%10) == 0)) { // Debugging print
TTreeSRedirector &cstream = *fDebugStreamer;
cstream << "Seeds0"
if (1 || (!isFake)) {
Float_t zvertex = GetZ();
TTreeSRedirector &cstream = *fDebugStreamer;
- if (AliTRDReconstructor::RecoParam()->GetStreamLevel() > 0) {
+ if (AliTRDReconstructor::GetRecoParam()->GetStreamLevel() > 0) {
cstream << "Seeds1"
<< "isFake=" << isFake
<< "Vertex=" << zvertex
esdtrack.UpdateTrackParams(track,AliESDtrack::kTRDout);
esdtrack.SetLabel(label);
esd->AddTrack(&esdtrack);
- if (AliTRDReconstructor::RecoParam()->GetStreamLevel() > 0) {
+ if (AliTRDReconstructor::GetRecoParam()->GetStreamLevel() > 0) {
cstream << "Tracks"
<< "EventNrInFile=" << eventNrInFile
<< "ESD.=" << &esdtrack
}
}
- if (AliTRDReconstructor::RecoParam()->GetStreamLevel() > 0) {
+ if (AliTRDReconstructor::GetRecoParam()->GetStreamLevel() > 0) {
cstream << "Seeds2"
<< "Iter=" << jter
<< "Track.=" << track
TGraph graphy(t1-t0,x,yt);
TGraph graphz(t1-t0,x,zt);
- if (AliTRDReconstructor::RecoParam()->GetStreamLevel() > 0) {
+ if (AliTRDReconstructor::GetRecoParam()->GetStreamLevel() > 0) {
cstream << "tracklet"
<< "track.=" << track // Track parameters
<< "tany=" << tany // Tangent of the local track angle
for (Int_t isector = 0; isector < AliTRDgeometry::kNsector; isector++) new(&fTrSec[isector]) AliTRDtrackingSector(fGeom, isector);
- // retrive reco params
- AliTRDrecoParam *rec = 0x0;
- if (!(rec = AliTRDReconstructor::RecoParam())){
- if(!(rec = trd->GetRecoParam(0))){
- AliInfo("Using default RecoParams = LowFluxParam.");
- rec = AliTRDrecoParam::GetLowFluxParam();
- }
- AliTRDReconstructor::SetRecoParam(rec);
- }
-
for(Int_t isl =0; isl<kNSeedPlanes; isl++) fSeedTB[isl] = 0x0;
- if(rec->GetStreamLevel() > 1){
- TDirectory *savedir = gDirectory;
- fgDebugStreamer = new TTreeSRedirector("TRD.TrackerDebug.root");
- savedir->cd();
- }
+ TDirectory *savedir = gDirectory;
+ fgDebugStreamer = new TTreeSRedirector("TRD.TrackerDebug.root");
+ savedir->cd();
}
//____________________________________________________________________
// See AliTRDtrackerV1::Clusters2TracksSM() for details.
//
- if(!AliTRDReconstructor::RecoParam()){
- AliError("Reconstruction configuration not initialized. Call first AliTRDReconstructor::SetRecoParam().");
+ if(!AliTRDReconstructor::GetRecoParam()){
+ AliError("Reconstruction configuration not initialized.");
return 0;
}
track.UpdateESDtrack(seed);
// Add TRD track to ESDfriendTrack
- if (AliTRDReconstructor::RecoParam()->GetStreamLevel() > 0 /*&& quality TODO*/){
+ if (AliTRDReconstructor::GetRecoParam()->GetStreamLevel() > 0 /*&& quality TODO*/){
AliTRDtrackV1 *calibTrack = new AliTRDtrackV1(track);
calibTrack->SetOwner();
seed->AddCalibObject(calibTrack);
AliInfo(Form("Number of back propagated TRD tracks: %d", found));
// run stand alone tracking
- if (AliTRDReconstructor::RecoParam()->IsSeeding()) Clusters2Tracks(event);
+ if (AliTRDReconstructor::GetRecoParam()->IsSeeding()) Clusters2Tracks(event);
return 0;
}
}
}
- if(AliTRDReconstructor::RecoParam()->GetStreamLevel() > 1){
+ if(AliTRDReconstructor::GetRecoParam()->GetStreamLevel() > 1){
Int_t index;
for(int iplane=0; iplane<6; iplane++){
AliTRDseedV1 *tracklet = GetTracklet(&t, iplane, index);
if(!(chamber = fTrSec[sector].GetChamber(stack, ilayer))) continue;
- if(chamber->GetNClusters() < fgNTimeBins*AliTRDReconstructor::RecoParam()->GetFindableClusters()) continue;
+ if(chamber->GetNClusters() < fgNTimeBins*AliTRDReconstructor::GetRecoParam()->GetFindableClusters()) continue;
x = chamber->GetX();
if(!tracklet.AttachClustersIter(chamber, 1000.)) continue;
tracklet.Init(&t);
- if(tracklet.GetN() < fgNTimeBins * AliTRDReconstructor::RecoParam()->GetFindableClusters()) continue;
+ if(tracklet.GetN() < fgNTimeBins * AliTRDReconstructor::GetRecoParam()->GetFindableClusters()) continue;
break;
}
} // end layers loop
- if(AliTRDReconstructor::RecoParam()->GetStreamLevel() > 1){
+ if(AliTRDReconstructor::GetRecoParam()->GetStreamLevel() > 1){
TTreeSRedirector &cstreamer = *fgDebugStreamer;
Int_t eventNumber = AliTRDtrackerDebug::GetEventNumber();
//AliTRDtrackV1 *debugTrack = new AliTRDtrackV1(t);
for(Int_t ip = 0; ip < AliTRDtrackerV1::kNPlanes; ip++)
tracklets[ip].SetCC(curvature);
- if(AliTRDReconstructor::RecoParam()->GetStreamLevel() >= 5){
+ if(AliTRDReconstructor::GetRecoParam()->GetStreamLevel() >= 5){
//Linear Model on z-direction
Double_t xref = CalculateReferenceX(tracklets); // Relative to the middle of the stack
Double_t slope = fitter->GetParameter(2);
tracklets[iLayer].SetChi2(chi2track);
}
- if(AliTRDReconstructor::RecoParam()->GetStreamLevel() >=5){
+ if(AliTRDReconstructor::GetRecoParam()->GetStreamLevel() >=5){
TTreeSRedirector &cstreamer = *fgDebugStreamer;
Int_t eventNumber = AliTRDtrackerDebug::GetEventNumber();
Int_t candidateNumber = AliTRDtrackerDebug::GetCandidateNumber();
}
}
- if(AliTRDReconstructor::RecoParam()->GetStreamLevel() >=5){
+ if(AliTRDReconstructor::GetRecoParam()->GetStreamLevel() >=5){
TTreeSRedirector &cstreamer = *fgDebugStreamer;
Int_t eventNumber = AliTRDtrackerDebug::GetEventNumber();
Int_t candidateNumber = AliTRDtrackerDebug::GetCandidateNumber();
nChambers = 0;
for(int ilayer=0; ilayer<AliTRDgeometry::kNlayer; ilayer++){
if(!(chamber = stack[ilayer])) continue;
- if(chamber->GetNClusters() < fgNTimeBins * AliTRDReconstructor::RecoParam()->GetFindableClusters()) continue;
+ if(chamber->GetNClusters() < fgNTimeBins * AliTRDReconstructor::GetRecoParam()->GetFindableClusters()) continue;
nChambers++;
//AliInfo(Form("sector %d stack %d layer %d clusters %d", sector, istack, ilayer, chamber->GetNClusters()));
}
// Build initial seeding configurations
Double_t quality = BuildSeedingConfigs(stack, configs);
- if(AliTRDReconstructor::RecoParam()->GetStreamLevel() > 1){
+ if(AliTRDReconstructor::GetRecoParam()->GetStreamLevel() > 1){
AliInfo(Form("Plane config %d %d %d Quality %f"
, configs[0], configs[1], configs[2], quality));
}
ntracks = MakeSeeds(stack, &sseed[6*ntracks], pars);
if(ntracks == kMaxTracksStack) break;
}
- if(AliTRDReconstructor::RecoParam()->GetStreamLevel() > 1) AliInfo(Form("Candidate TRD tracks %d in iteration %d.", ntracks, fSieveSeeding));
+ if(AliTRDReconstructor::GetRecoParam()->GetStreamLevel() > 1) AliInfo(Form("Candidate TRD tracks %d in iteration %d.", ntracks, fSieveSeeding));
if(!ntracks) break;
Int_t ich = 0; while(!(chamber = stack[ich])) ich++;
trackParams[6] = fGeom->GetSector(chamber->GetDetector());/* *alpha+shift; // Supermodule*/
- if(AliTRDReconstructor::RecoParam()->GetStreamLevel() > 1){
+ if(AliTRDReconstructor::GetRecoParam()->GetStreamLevel() > 1){
AliInfo(Form("Track %d [%d] nlayers %d trackQuality = %e nused %d, yref = %3.3f", itrack, trackIndex, nlayers, fTrackQuality[trackIndex], nused, trackParams[1]));
Int_t nclusters = 0;
esdTrack.SetLabel(track->GetLabel());
track->UpdateESDtrack(&esdTrack);
// write ESD-friends if neccessary
- if (AliTRDReconstructor::RecoParam()->GetStreamLevel() > 0){
+ if (AliTRDReconstructor::GetRecoParam()->GetStreamLevel() > 0){
AliTRDtrackV1 *calibTrack = new AliTRDtrackV1(*track);
calibTrack->SetOwner();
esdTrack.AddCalibObject(calibTrack);
// Rebuild plane configurations and indices taking only unused clusters into account
quality = BuildSeedingConfigs(stack, configs);
- if(quality < 1.E-7) break; //AliTRDReconstructor::RecoParam()->GetPlaneQualityThreshold()) break;
+ if(quality < 1.E-7) break; //AliTRDReconstructor::GetRecoParam()->GetPlaneQualityThreshold()) break;
for(Int_t ip = 0; ip < kNPlanes; ip++){
if(!(chamber = stack[ip])) continue;
chamber->Build(fGeom);//Indices(fSieveSeeding);
}
- if(AliTRDReconstructor::RecoParam()->GetStreamLevel() > 1){
+ if(AliTRDReconstructor::GetRecoParam()->GetStreamLevel() > 1){
AliInfo(Form("Sieve level %d Plane config %d %d %d Quality %f", fSieveSeeding, configs[0], configs[1], configs[2], quality));
}
} while(fSieveSeeding<10); // end stack clusters sieve
padlength[iplane] = pp->GetLengthIPad();
}
- if(AliTRDReconstructor::RecoParam()->GetStreamLevel() > 1){
+ if(AliTRDReconstructor::GetRecoParam()->GetStreamLevel() > 1){
AliInfo(Form("Making seeds Stack[%d] Config[%d] Tracks[%d]...", istack, config, ntracks));
}
}
Bool_t isFake = kFALSE;
- if(AliTRDReconstructor::RecoParam()->GetStreamLevel() >= 2){
+ if(AliTRDReconstructor::GetRecoParam()->GetStreamLevel() >= 2){
if (c[0]->GetLabel(0) != c[3]->GetLabel(0)) isFake = kTRUE;
if (c[1]->GetLabel(0) != c[3]->GetLabel(0)) isFake = kTRUE;
if (c[2]->GetLabel(0) != c[3]->GetLabel(0)) isFake = kTRUE;
<<"\n";
}
- if(chi2[0] > AliTRDReconstructor::RecoParam()->GetChi2Z()/*7./(3. - sLayer)*//*iter*/){
+ if(chi2[0] > AliTRDReconstructor::GetRecoParam()->GetChi2Z()/*7./(3. - sLayer)*//*iter*/){
//AliInfo(Form("Failed chi2 filter on chi2Z [%f].", chi2[0]));
AliTRDtrackerDebug::SetCandidateNumber(AliTRDtrackerDebug::GetCandidateNumber() + 1);
continue;
}
- if(chi2[1] > AliTRDReconstructor::RecoParam()->GetChi2Y()/*1./(3. - sLayer)*//*iter*/){
+ if(chi2[1] > AliTRDReconstructor::GetRecoParam()->GetChi2Y()/*1./(3. - sLayer)*//*iter*/){
//AliInfo(Form("Failed chi2 filter on chi2Y [%f].", chi2[1]));
AliTRDtrackerDebug::SetCandidateNumber(AliTRDtrackerDebug::GetCandidateNumber() + 1);
continue;
//chi2[1] = GetChi2ZTest(&cseed[0]);
Double_t like = CookLikelihood(&cseed[0], planes, chi2); // to be checked
- if (TMath::Log(1.E-9 + like) < AliTRDReconstructor::RecoParam()->GetTrackLikelihood()){
+ if (TMath::Log(1.E-9 + like) < AliTRDReconstructor::GetRecoParam()->GetTrackLikelihood()){
//AliInfo(Form("Failed likelihood %f[%e].", TMath::Log(1.E-9 + like), like));
AliTRDtrackerDebug::SetCandidateNumber(AliTRDtrackerDebug::GetCandidateNumber() + 1);
continue;
// AliInfo("Extrapolation done.");
// Debug Stream containing all the 6 tracklets
- if(AliTRDReconstructor::RecoParam()->GetStreamLevel() >= 2){
+ if(AliTRDReconstructor::GetRecoParam()->GetStreamLevel() >= 2){
TTreeSRedirector &cstreamer = *fgDebugStreamer;
TLinearFitter *tiltedRieman = GetTiltedRiemanFitter();
Int_t eventNumber = AliTRDtrackerDebug::GetEventNumber();
// do the final track fitting (Once with vertex constraint and once without vertex constraint)
Double_t chi2Vals[3];
chi2Vals[0] = FitTiltedRieman(&cseed[0], kFALSE);
- if(AliTRDReconstructor::RecoParam()->IsVertexConstrained())
+ if(AliTRDReconstructor::GetRecoParam()->IsVertexConstrained())
chi2Vals[1] = FitTiltedRiemanConstraint(&cseed[0], GetZ()); // Do Vertex Constrained fit if desired
else
chi2Vals[1] = 1.;
cseed[iLayer].SetChi2Z(chi2[1]);
}
- if(AliTRDReconstructor::RecoParam()->GetStreamLevel() >= 2){
+ if(AliTRDReconstructor::GetRecoParam()->GetStreamLevel() >= 2){
TTreeSRedirector &cstreamer = *fgDebugStreamer;
Int_t eventNumber = AliTRDtrackerDebug::GetEventNumber();
Int_t candidateNumber = AliTRDtrackerDebug::GetCandidateNumber();
}
chi2 = FitTiltedRieman(bseed, kTRUE);
- if(AliTRDReconstructor::RecoParam()->GetStreamLevel() >= 7){
+ if(AliTRDReconstructor::GetRecoParam()->GetStreamLevel() >= 7){
Int_t eventNumber = AliTRDtrackerDebug::GetEventNumber();
Int_t candidateNumber = AliTRDtrackerDebug::GetCandidateNumber();
TLinearFitter *tiltedRieman = GetTiltedRiemanFitter();
sumdaf /= Float_t (nLayers - 2.0);
Double_t likeChi2Z = TMath::Exp(-chi2[2] * 0.14); // Chi2Z
- Double_t likeChi2TC = (AliTRDReconstructor::RecoParam()->IsVertexConstrained()) ?
+ Double_t likeChi2TC = (AliTRDReconstructor::GetRecoParam()->IsVertexConstrained()) ?
TMath::Exp(-chi2[1] * 0.677) : 1; // Constrained Tilted Riemann
Double_t likeChi2TR = TMath::Exp(-chi2[0] * 0.78); // Non-constrained Tilted Riemann
Double_t likeAF = TMath::Exp(-sumdaf * 3.23);
Double_t trackLikelihood = likeChi2Z * likeChi2TR * likeAF;
- if(AliTRDReconstructor::RecoParam()->GetStreamLevel() >= 2){
+ if(AliTRDReconstructor::GetRecoParam()->GetStreamLevel() >= 2){
Int_t eventNumber = AliTRDtrackerDebug::GetEventNumber();
Int_t candidateNumber = AliTRDtrackerDebug::GetCandidateNumber();
TTreeSRedirector &cstreamer = *fgDebugStreamer;
//
// ratio of the total number of clusters/track which are expected to be found by the tracker.
- Float_t fgFindable = AliTRDReconstructor::RecoParam()->GetFindableClusters();
+ Float_t fgFindable = AliTRDReconstructor::GetRecoParam()->GetFindableClusters();
Int_t nclusters = 0;
Double_t like = likea * likechi2y * likechi2z * likeN;
// AliInfo(Form("sumda(%f) chi2[0](%f) chi2[1](%f) likea(%f) likechi2y(%f) likechi2z(%f) nclusters(%d) likeN(%f)", sumda, chi2[0], chi2[1], likea, likechi2y, likechi2z, nclusters, likeN));
- if(AliTRDReconstructor::RecoParam()->GetStreamLevel() >= 2){
+ if(AliTRDReconstructor::GetRecoParam()->GetStreamLevel() >= 2){
Int_t eventNumber = AliTRDtrackerDebug::GetEventNumber();
Int_t candidateNumber = AliTRDtrackerDebug::GetCandidateNumber();
// The Debug Stream contains the seed
const Int_t kMaxRows = 16;\r
const Int_t kMaxCols = 144;\r
const Int_t kMaxPads = 2304;\r
- Int_t timeBinMin = AliTRDReconstructor::RecoParam()->GetNumberOfPresamples();\r
- Int_t timeBinMax = AliTRDReconstructor::RecoParam()->GetNumberOfPostsamples();\r
+ Int_t timeBinMin = AliTRDReconstructor::GetRecoParam()->GetNumberOfPresamples();\r
+ Int_t timeBinMax = AliTRDReconstructor::GetRecoParam()->GetNumberOfPostsamples();\r
\r
// Get the geometrical data of the chamber\r
Int_t layer = geo->GetLayer(fDetector);\r
TMath::Sort(nPads, hvals, indices); // bins storing a 0 should not matter\r
// Set Threshold\r
Int_t maximum = hvals[indices[0]]; // best\r
- Int_t threshold = Int_t(maximum * AliTRDReconstructor::RecoParam()->GetFindableClusters());\r
+ Int_t threshold = Int_t(maximum * AliTRDReconstructor::GetRecoParam()->GetFindableClusters());\r
Int_t col, row, lower, lower1, upper, upper1;\r
for(Int_t ib = 0; ib < nPads; ib++){\r
if(nCandidates >= AliTRDtrackerV1::kMaxTracksStack){\r
fakeLayer->BuildIndices();\r
//fakeLayer->PrintClusters();\r
\r
- if(AliTRDReconstructor::RecoParam()->GetStreamLevel() >= 3){\r
+ if(AliTRDReconstructor::GetRecoParam()->GetStreamLevel() >= 3){\r
//TMatrixD hist(nRows, nCols);\r
//for(Int_t i = 0; i < nRows; i++)\r
// for(Int_t j = 0; j < nCols; j++)\r
reco.SetWriteESDfriend();
reco.SetWriteAlignmentData();
AliTPCReconstructor::SetStreamLevel(1);
+ // reco.SetRecoParam("ITS",AliITSRecoParam::GetLowFluxParam());
+ reco.SetRecoParam("TPC",AliTPCRecoParam::GetLowFluxParam());
+ reco.SetRecoParam("TRD",AliTRDrecoParam::GetLowFluxParam());
+ reco.SetRecoParam("PHOS",AliPHOSRecoParam::GetDefaultParameters());
+ reco.SetRecoParam("MUON",AliMUONRecoParam::GetLowFluxParam());
// AliTPCReconstructor::SetRecoParam(AliTPCRecoParam::GetLowFluxParam());
// reco.SetInput("raw.root");
// reco.SetRunReconstruction("ITS TPC TRD TOF HMPID PHOS EMCAL MUON T0 VZERO FMD PMD ZDC");
reco.SetUniformFieldTracking(kFALSE);
reco.SetWriteESDfriend();
reco.SetWriteAlignmentData();
- AliTPCRecoParam * tpcRecoParam = AliTPCRecoParam::GetLowFluxParam();
- AliTPCReconstructor::SetRecoParam(tpcRecoParam);
// AliTPCReconstructor::SetStreamLevel(1);
-
+ // reco.SetRecoParam("ITS",AliITSRecoParam::GetLowFluxParam());
+ reco.SetRecoParam("TPC",AliTPCRecoParam::GetLowFluxParam());
+ reco.SetRecoParam("TRD",AliTRDrecoParam::GetLowFluxParam());
+ reco.SetRecoParam("PHOS",AliPHOSRecoParam::GetDefaultParameters());
+ reco.SetRecoParam("MUON",AliMUONRecoParam::GetLowFluxParam());
+
reco.SetRunReconstruction("ITS TPC TRD TOF HMPID PHOS EMCAL MUON FMD PMD ZDC T0 VZERO");
reco.SetInput("raw.root");
reco.SetNumberOfEventsPerFile(-1); // all events in one single file
+ reco.SetRunQA(":");
+ reco.SetRunGlobalQA(kTRUE);
+
TStopwatch timer;
timer.Start();
reco.Run();