X-Git-Url: http://git.uio.no/git/?a=blobdiff_plain;f=EMCAL%2FMakeEMCALResMisAlignment.C;h=5a3b3d276db0e5883026d3963498a9723d3f4454;hb=f3dd29bfcbce4d86ce3a91128d5f71b6ad738735;hp=e0b465df65d29a573a62140403dd527f4ac2768a;hpb=a24be56b08ef731a32c600e49534f4c4beb9370c;p=u%2Fmrichter%2FAliRoot.git diff --git a/EMCAL/MakeEMCALResMisAlignment.C b/EMCAL/MakeEMCALResMisAlignment.C index e0b465df65d..5a3b3d276db 100644 --- a/EMCAL/MakeEMCALResMisAlignment.C +++ b/EMCAL/MakeEMCALResMisAlignment.C @@ -1,13 +1,21 @@ -void MakeEMCALResMisAlignment(){ +void MakeEMCALResMisAlignment(TString geoname = "EMCAL_COMPLETE"){ // Create TClonesArray of residual misalignment objects for EMCAL // - TClonesArray *array = new TClonesArray("AliAlignObjParams",10); - TClonesArray &alobj = *array; const char* macroname = "MakeEMCALResMisAlignment.C"; + if(geoname=="")geoname=AliEMCALGeometry::GetDefaultGeometryName(); + const AliEMCALGeometry *emcalGeom = AliEMCALGeometry::GetInstance(geoname,""); + 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; @@ -50,7 +58,7 @@ void MakeEMCALResMisAlignment(){ // 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++){ @@ -92,8 +100,8 @@ void MakeEMCALResMisAlignment(){ }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);