void MakeEMCALResMisAlignment(){
// Create TClonesArray of residual misalignment objects for EMCAL
//
- TClonesArray *array = new TClonesArray("AliAlignObjParams",10);
- TClonesArray &alobj = *array;
const char* macroname = "MakeEMCALResMisAlignment.C";
+ const AliEMCALGeometry *emcalGeom = AliEMCALGeometry::GetInstance(AliEMCALGeometry::GetDefaultGeometryName(),"");
+ if(!emcalGeom) {
+ Error("MakeEMCALResMisAlignment","Cannot obtain AliEMCALGeometry singleton\n");
+ return;
+ }
+
+ TClonesArray *array = new TClonesArray("AliAlignObjParams",emcalGeom->GetNumberOfSuperModules());
+ TClonesArray &alobj = *array;
+
// Activate CDB storage and load geometry from CDB
AliCDBManager* cdb = AliCDBManager::Instance();
- if(!cdb->IsDefaultStorageSet()) cdb->SetDefaultStorage("local://$ALICE_ROOT");
+ if(!cdb->IsDefaultStorageSet()) cdb->SetDefaultStorage("local://$ALICE_ROOT/OCDB");
cdb->SetRun(0);
AliCDBStorage* storage;
- if( gSystem->Getenv("TOCDB") == TString("kTRUE") ){
+ if( TString(gSystem->Getenv("TOCDB")) == TString("kTRUE") ){
TString Storage = gSystem->Getenv("STORAGE");
if(!Storage.BeginsWith("local://") && !Storage.BeginsWith("alien://")) {
Error(macroname,"STORAGE variable set to %s is not valid. Exiting\n",Storage.Data());
// sigma translation = 1mm
// sigma rotation = 0.1 degree
TRandom *rnd = new TRandom(4321);
- Double_t sigmatr = 0.1; // max shift in cm w.r.t. local RS
+ Double_t sigmatr = 0.05; // max shift in cm w.r.t. local RS
Double_t sigmarot = 0.1; // max rot in degrees w.r.t. local RS
for(i=0; i<10; i++){
new(alobj[j++]) AliAlignObjParams(pathstr, volid, dx, dy, dz, dpsi, dtheta, dphi, kTRUE);
}
- if( gSystem->Getenv("TOCDB") != TString("kTRUE") ){
+ if( TString(gSystem->Getenv("TOCDB")) != TString("kTRUE") ){
// save on file
const char* filename = "EMCALresidualMisalignment.root";
TFile f(filename,"RECREATE");
}else{
// save in CDB storage
AliCDBMetaData* md = new AliCDBMetaData();
- md->SetResponsible("Jennifer Clay");
- md->SetComment("Residual misalignment for EMCAL, produced with sigmatr=0.05 and sigmarot=0.3 in the local RS");
+ md->SetResponsible("Jennifer Klay");
+ md->SetComment("Residual misalignment for EMCAL, produced with sigmatr=0.05 and sigmarot=0.1 in the local RS");
md->SetAliRootVersion(gSystem->Getenv("ARVERSION"));
AliCDBId id("EMCAL/Align/Data",0,AliCDBRunRange::Infinity());
storage->Put(array,id,md);