Skip to content

Commit 7c14395

Browse files
authored
Add files via upload
1 parent 078df08 commit 7c14395

File tree

1 file changed

+43
-0
lines changed

1 file changed

+43
-0
lines changed

ALICE3/Macros/writeLUTCollection.C

Lines changed: 43 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,43 @@
1+
// Copyright 2019-2020 CERN and copyright holders of ALICE O2.
2+
// See https://alice-o2.web.cern.ch/copyright for details of the copyright holders.
3+
// All rights not expressly granted are reserved.
4+
//
5+
// This software is distributed under the terms of the GNU General Public
6+
// License v3 (GPL Version 3), copied verbatim in the file "COPYING".
7+
//
8+
// In applying this license CERN does not waive the privileges and immunities
9+
// granted to it by virtue of its status as an Intergovernmental Organization
10+
// or submit itself to any jurisdiction.
11+
12+
/// \file writeLUTCollection.C
13+
/// \author Nicolò Jacazio nicolo.jacazio@cern.ch
14+
/// \brief Writer for the collection of LUTs for DelphesO2TrackSmearer
15+
16+
#include "ALICE3/Core/DelphesO2TrackSmearer.h"
17+
#include "ALICE3/Core/GeometryContainer.h"
18+
19+
#include <CCDB/BasicCCDBManager.h>
20+
21+
#include <TFile.h>
22+
23+
#include <fairlogger/Logger.h>
24+
25+
void writeLUTCollection(std::string geometryFile = "/home/njacazio/alice/O2Physics/ALICE3/Macros/Configuration/a3geo.ini")
26+
{
27+
28+
fair::Logger::SetConsoleSeverity(fair::Severity::debug);
29+
auto& ccdb = o2::ccdb::BasicCCDBManager::instance();
30+
ccdb.setURL("http://alice-ccdb.cern.ch");
31+
ccdb.setTimestamp(-1);
32+
33+
const std::string filename = "ccdb:/Users/j/jekarlss/LookUpTables/NoEloss/el";
34+
const std::string localFilename = o2::fastsim::GeometryEntry::accessFile(filename, "./.ALICE3/LUTs/", &ccdb, -10);
35+
36+
o2::delphes::DelphesO2TrackSmearer mSmearer;
37+
mSmearer.loadTable(11, localFilename.c_str(), true);
38+
39+
TFile outFile("/tmp/LUTCollection.root", "RECREATE");
40+
outFile.cd();
41+
mSmearer.Write();
42+
outFile.Close();
43+
}

0 commit comments

Comments
 (0)