9 #include "Math/Vector3D.h" 98 : centralityVariable_(iConfig.getParameter<
std::
string>(
"centralityVariable")),
99 centralityBinTag_(iConfig.getParameter<
edm::
InputTag>(
"centralityBinTag")),
100 centralityTag_(iConfig.getParameter<
edm::
InputTag>(
"centralityTag")),
101 vertexTag_(iConfig.getParameter<
edm::
InputTag>(
"vertexTag")),
102 inputPlanesTag_(iConfig.getParameter<
edm::
InputTag>(
"inputPlanesTag")),
103 trackTag_(iConfig.getParameter<
edm::
InputTag>(
"trackTag")),
104 FlatOrder_(iConfig.getParameter<
int>(
"FlatOrder")),
105 NumFlatBins_(iConfig.getParameter<
int>(
"NumFlatBins")),
106 flatnvtxbins_(iConfig.getParameter<
int>(
"flatnvtxbins")),
107 flatminvtx_(iConfig.getParameter<double>(
"flatminvtx")),
108 flatdelvtx_(iConfig.getParameter<double>(
"flatdelvtx")),
109 caloCentRef_(iConfig.getParameter<double>(
"caloCentRef")),
110 caloCentRefWidth_(iConfig.getParameter<double>(
"caloCentRefWidth")),
111 CentBinCompression_(iConfig.getParameter<
int>(
"CentBinCompression")),
112 useOffsetPsi_(iConfig.getParameter<
bool>(
"useOffsetPsi")) {
115 if (iConfig.
exists(
"nonDefaultGlauberModel")) {
132 produces<reco::EvtPlaneCollection>();
156 using namespace reco;
170 if (minbin > 0 && maxbin >= minbin) {
196 double bestvz = -999.9;
206 auto evtplaneOutput = std::make_unique<EvtPlaneCollection>();
212 for (
auto&& rp : (evtPlanes)) {
213 double s = rp.sumSin(0);
214 double c = rp.sumCos(0);
218 double psiOffset = -10;
219 double psiFlat = -10;
220 if (rp.angle(0) > -5) {
228 ep[indx] =
new EvtPlane(indx, 2, psiFlat, soff, coff, rp.sumw(), rp.sumw2(), rp.sumPtOrEt(), rp.sumPtOrEt2(),
m);
229 ep[indx]->addLevel(0, rp.angle(0),
s,
c);
230 ep[indx]->addLevel(3, 0., rp.sumSin(3), rp.sumCos(3));
232 ep[indx]->addLevel(1, psiOffset, soff, coff);
237 if (
ep[
i] !=
nullptr)
238 evtplaneOutput->push_back(*
ep[
i]);
241 for (
int i = 0;
i < indx;
i++)
double offsetPsi(double s, double c) const
T getParameter(std::string const &) const
edm::InputTag centralityBinTag_
edm::EDGetTokenT< int > centralityBinToken_
T const & getData(const ESGetToken< T, R > &iToken) const noexcept(false)
std::string centralityVariable_
edm::ESGetToken< RPFlatParams, HeavyIonRPRcd > flatparmsToken_
edm::EDGetTokenT< reco::Centrality > centralityToken_
edm::ESWatcher< HeavyIonRcd > hiWatcher
edm::EDGetTokenT< reco::TrackCollection > trackToken_
bool exists(std::string const ¶meterName) const
checks if a parameter exists
edm::ESGetToken< CentralityTable, HeavyIonRcd > centralityESToken_
~HiEvtPlaneFlatProducer() override
void setCaloCentRefBins(const int caloCentRefMinBin, const int caloCentRefMaxBin)
HiEvtPlaneFlatten * flat[NumEPNames]
edm::InputTag inputPlanesTag_
void produce(edm::Event &, const edm::EventSetup &) override
edm::EDGetTokenT< std::vector< reco::Vertex > > vertexToken_
double getFlatPsi(double psi, double vtx, int centbin) const
std::string centralityMC_
const std::array< int, NumEPNames > EPDet
#define DEFINE_FWK_MODULE(type)
double coffset(double c, double vtx, int centbin) const
void init(int order, int nbins, int nvtxbins=10, double minvtx=-25, double delvtx=5, std::string tag="", int vord=2)
HiEvtPlaneFlatProducer(const edm::ParameterSet &)
double soffset(double s, double vtx, int centbin) const
edm::EDGetTokenT< reco::EvtPlaneCollection > inputPlanesToken_
bool check(const edm::EventSetup &iSetup)
edm::Handle< reco::TrackCollection > trackCollection_
edm::ESWatcher< HeavyIonRPRcd > hirpWatcher
const std::array< int, NumEPNames > EPOrder
const std::array< std::string, NumEPNames > EPNames
edm::InputTag centralityTag_
static const int NumEPNames