]> git.uio.no Git - u/mrichter/AliRoot.git/blame - HMPID/MakeHMPIDZeroMisAlignment.C
New data members: distance to bad channels from the center of a reconstructed cluster...
[u/mrichter/AliRoot.git] / HMPID / MakeHMPIDZeroMisAlignment.C
CommitLineData
d3a9c52a 1void MakeHMPIDZeroMisAlignment(){
2 // Create TClonesArray of zero misalignment objects for HMPID
3 //
4 TClonesArray *pCA = new TClonesArray("AliAlignObjMatrix",10);
5
6 AliAlignObjMatrix o;
7
8 Double_t dX=0.,dY=0.,dZ=0.,dPsi=0.,dTheta=0.,dPhi=0.;
9
10 Int_t idHMPID = AliAlignObj::kHMPID;
11 for (Int_t iCh = 0; iCh < 7; iCh++) {
12 new((*pCA)[iCh]) AliAlignObjMatrix(AliAlignObj::SymName(idHMPID,iCh),AliAlignObj::LayerToVolUID(idHMPID,iCh),dX,dY,dZ,dPsi,dTheta,dPhi,kTRUE);
13 }
14
15// pCA->Print();
16
5bd470e1 17 if( gSystem->Getenv("TOCDB") != TString("kTRUE") ){
d3a9c52a 18 // save on file
19 TFile f("HMPIDzeroMisalignment.root","RECREATE");
20 if(!f) cerr<<"cannot open file for output\n";
21 f.cd();
22 f.WriteObject(pCA,"HMPIDAlignObjs","kSingleKey");
23 f.Close();
24 }else{
25 // save in CDB storage
5bd470e1 26 const char* Storage = gSystem->Getenv("STORAGE");
d3a9c52a 27 AliCDBManager* cdb = AliCDBManager::Instance();
28 AliCDBStorage* storage = cdb->GetStorage(Storage);
29 AliCDBMetaData *pMeta= new AliCDBMetaData();
30 pMeta->SetResponsible("HMPID Expert");
31 pMeta->SetComment("Zero alignment objects for HMPID");
5bd470e1 32 pMeta->SetAliRootVersion(gSystem->Getenv("ARVERSION"));
d3a9c52a 33 AliCDBId id("HMPID/Align/Data",0,9999999);
34 storage->Put(pCA,id,pMeta);
35 }
36
37 pCA->Delete();
38}