80 GenPlane(
string name,
double etaminval1,
double etamaxval1,
double etaminval2,
double etamaxval2,
int orderval) {
92 order = (double)orderval;
96 if ((eta >= etamin1 && eta < etamax1) || (etamin2 != etamax2 && eta >= etamin2 && eta < etamax2)) {
105 sumPtOrEt2 += PtOrEt * PtOrEt;
123 svNoWgt = sumsinNoWgt;
124 cvNoWgt = sumcosNoWgt;
128 PtOrEt2 = sumPtOrEt2;
130 double q = sv * sv + cv *
cv;
132 ang = atan2(sv, cv) / order;
246 double minet = minet_;
247 double maxet = maxet_;
255 if (track.
et < minet)
257 if (track.
et > maxet)
259 if (not passEta(track.
eta,
i))
263 w = track.
et * flat[
i]->etScale(vz, bin);
266 w = flat[
i]->getW(track.
et, vz, bin);
274 double minet = minet_;
275 double maxet = maxet_;
282 if (track.
et < minet)
284 if (track.
et > maxet)
286 if (not passEta(track.
eta,
i))
291 w = flat[
i]->getW(track.
et, vz, bin);
317 double minpt = minpt_;
318 double maxpt = maxpt_;
325 if (track.
pt < minpt)
327 if (track.
pt > maxpt)
329 if (not passEta(track.
eta,
i))
336 w = flat[
i]->getW(track.
pt, vz, bin);
346 : centralityVariable_(iConfig.getParameter<std::
string>(
"centralityVariable")),
347 centralityBinTag_(iConfig.getParameter<edm::
InputTag>(
"centralityBinTag")),
348 vertexTag_(iConfig.getParameter<edm::
InputTag>(
"vertexTag")),
349 caloTag_(iConfig.getParameter<edm::
InputTag>(
"caloTag")),
350 castorTag_(iConfig.getParameter<edm::
InputTag>(
"castorTag")),
351 trackTag_(iConfig.getParameter<edm::
InputTag>(
"trackTag")),
352 losttrackTag_(iConfig.getParameter<edm::
InputTag>(
"lostTag")),
353 chi2MapTag_(iConfig.getParameter<edm::
InputTag>(
"chi2MapTag")),
354 chi2MapLostTag_(iConfig.getParameter<edm::
InputTag>(
"chi2MapLostTag")),
355 loadDB_(iConfig.getParameter<bool>(
"loadDB")),
356 minet_(iConfig.getParameter<double>(
"minet")),
357 maxet_(iConfig.getParameter<double>(
"maxet")),
358 minpt_(iConfig.getParameter<double>(
"minpt")),
359 maxpt_(iConfig.getParameter<double>(
"maxpt")),
360 flatnvtxbins_(iConfig.getParameter<int>(
"flatnvtxbins")),
361 flatminvtx_(iConfig.getParameter<double>(
"flatminvtx")),
362 flatdelvtx_(iConfig.getParameter<double>(
"flatdelvtx")),
363 dzdzerror_(iConfig.getParameter<double>(
"dzdzerror")),
364 d0d0error_(iConfig.getParameter<double>(
"d0d0error")),
365 pterror_(iConfig.getParameter<double>(
"pterror")),
366 chi2perlayer_(iConfig.getParameter<double>(
"chi2perlayer")),
367 dzdzerror_pix_(iConfig.getParameter<double>(
"dzdzerror_pix")),
368 chi2_(iConfig.getParameter<double>(
"chi2")),
369 nhitsValid_(iConfig.getParameter<int>(
"nhitsValid")),
370 FlatOrder_(iConfig.getParameter<int>(
"FlatOrder")),
371 NumFlatBins_(iConfig.getParameter<int>(
"NumFlatBins")),
372 caloCentRef_(iConfig.getParameter<double>(
"caloCentRef")),
373 caloCentRefWidth_(iConfig.getParameter<double>(
"caloCentRefWidth")),
374 CentBinCompression_(iConfig.getParameter<int>(
"CentBinCompression")),
375 cutEra_(iConfig.getParameter<int>(
"cutEra"))
384 if (iConfig.
exists(
"nonDefaultGlauberModel")) {
398 if (bStrack_packedPFCandidates_) {
414 produces<reco::EvtPlaneCollection>();
440 using namespace reco;
453 if (minbin > 0 && maxbin >= minbin) {
465 if (!
db.IsSuccess()) {
483 double bestvz = vtx.z();
484 double bestvx = vtx.x();
485 double bestvy = vtx.y();
486 double bestvzError = vtx.zError();
496 for (
int idx = 1; idx < 3; idx++) {
505 for (
unsigned int i = 0,
n =
cands->size();
i <
n; ++
i) {
548 for (
unsigned int i = 0,
n = calocands->size();
i <
n; ++
i) {
610 auto evtplaneOutput = std::make_unique<EvtPlaneCollection>();
625 rp[
i]->
getAngle(ang, sv,
cv, svNoWgt, cvNoWgt,
wv, wv2, pe, pe2, epmult);
626 evtplaneOutput->push_back(
EvtPlane(
i, 0, ang, sv,
cv,
wv, wv2, pe, pe2, epmult));
627 evtplaneOutput->back().addLevel(3, 0., svNoWgt, cvNoWgt);
edm::InputTag centralityBinTag_
edm::EDGetTokenT< reco::TrackCollection > trackToken_
edm::Handle< CaloTowerCollection > caloCollection_
OrphanHandle< PROD > put(std::unique_ptr< PROD > product)
Put a new product.
const edm::EventSetup & c
common ppss p3p6s2 common epss epspn46 common const1 w2
edm::Handle< reco::TrackCollection > trackCollection_
double et() const override
transverse energy
std::string centralityMC_
bool getByToken(EDGetToken token, Handle< PROD > &result) const
const std::array< std::string, NumEPNames > MomConsWeight
double dxyError() const
error on dxy
#define DEFINE_FWK_MODULE(type)
Sin< T >::type sin(const T &t)
bool exists(std::string const ¶meterName) const
checks if a parameter exists
void setCaloCentRefBins(const int caloCentRefMinBin, const int caloCentRefMaxBin)
double phi() const
azimuthal angle of momentum vector
bool passEta(float eta, int i)
edm::ESGetToken< CentralityTable, HeavyIonRcd > centralityToken_
const std::array< double, NumEPNames > EPEtaMin2
int pdgId() const override
PDG identifier.
const std::array< double, NumEPNames > EPEtaMax1
edm::EDGetTokenT< pat::PackedCandidateCollection > packedToken_
int trackerLayersWithMeasurement() const
edm::ESWatcher< HeavyIonRcd > hiWatcher_
void fillHF(const TrackStructure &track, double vz, int bin)
void produce(edm::Event &, const edm::EventSetup &) override
int pdgId() const final
PDG identifier.
TrackAlgorithm algo() const
bool getData(T &iHolder) const
edm::EDGetTokenT< pat::PackedCandidateCollection > lostToken_
const std::array< double, NumEPNames > maxTransverse
double eta() const
pseudorapidity of momentum vector
double eta() const override
momentum pseudorapidity
bool bScalo_particleFlow_
GenPlane * rp[NumEPNames]
edm::EDGetTokenT< std::vector< reco::Vertex > > vertexToken_
double pt() const
track transverse momentum
bool trackHighPurity() const
true if the track had the highPurity quality bit
Cos< T >::type cos(const T &t)
void fillTracker(const TrackStructure &track, double vz, int bin)
double ptError() const
error on Pt (set to 1000 TeV if charge==0 for safety)
HiEvtPlaneFlatten * flat[NumEPNames]
edm::Ref< pat::PackedCandidateCollection > PackedCandidateRef
void addParticle(double w, double PtOrEt, double s, double c, double eta)
Abs< T >::type abs(const T &t)
bool get(ProductID const &oid, Handle< PROD > &result) const
virtual const reco::Track & pseudoTrack() const
const std::array< int, NumEPNames > EPDet
unsigned short numberOfValidHits() const
number of valid hits found
edm::EDGetTokenT< int > centralityBinToken_
GenPlane(string name, double etaminval1, double etamaxval1, double etaminval2, double etamaxval2, int orderval)
edm::InputTag chi2MapLostTag_
EvtPlaneProducer(const edm::ParameterSet &)
edm::ESGetToken< RPFlatParams, HeavyIonRPRcd > flatparmsToken_
edm::InputTag chi2MapTag_
bool isGoodTrack(const TrackStructure &track) const
edm::Handle< std::vector< reco::CastorTower > > castorCollection_
const std::array< double, NumEPNames > minTransverse
bool bStrack_packedPFCandidates_
const std::array< double, NumEPNames > EPEtaMin1
bool hasTrackDetails() const
Return true if a bestTrack can be extracted from this Candidate.
void init(int order, int nbins, int nvtxbins=10, double minvtx=-25, double delvtx=5, std::string tag="", int vord=2)
double dz() const
dz parameter (= dsz/cos(lambda)). This is the track z0 w.r.t (0,0,0) only if the refPoint is close to...
double dzError() const
error on dz
std::string centralityVariable_
void fillCastor(const TrackStructure &track, double vz, int bin)
const HitPattern & hitPattern() const
Access the hit pattern, indicating in which Tracker layers the track has hits.
XYZPointD XYZPoint
point in space with cartesian internal representation
T getParameter(std::string const &) const
bool check(const edm::EventSetup &iSetup)
~EvtPlaneProducer() override
const std::array< double, NumEPNames > EPEtaMax2
Particle reconstructed by the particle flow algorithm.
bool isGoodCastor(const TrackStructure &track) const
double et() const final
transverse energy
edm::EDGetTokenT< reco::PFCandidateCollection > caloTokenPF_
edm::ESWatcher< HeavyIonRPRcd > hirpWatcher_
const std::array< int, NumEPNames > EPOrder
const std::array< std::string, NumEPNames > EPNames
edm::EDGetTokenT< edm::ValueMap< float > > chi2MapLostToken_
edm::EDGetTokenT< CaloTowerCollection > caloToken_
int charge() const
track electric charge
static const int NumEPNames
edm::EDGetTokenT< std::vector< reco::CastorTower > > castorToken_
double dxy() const
dxy parameter. (This is the transverse impact parameter w.r.t. to (0,0,0) ONLY if refPoint is close t...
double phi() const final
momentum azimuthal angle
bool isGoodHF(const TrackStructure &track) const
double getAngle(double &ang, double &sv, double &cv, double &svNoWgt, double &cvNoWgt, double &w, double &w2, double &PtOrEt, double &PtOrEt2, uint &epmult)
void reset(double vett[256])
double phi() const override
momentum azimuthal angle
edm::Handle< std::vector< reco::Vertex > > vertex_
edm::EDGetTokenT< edm::ValueMap< float > > chi2MapToken_
edm::InputTag losttrackTag_
double eta() const final
momentum pseudorapidity