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;
246 double minet = minet_;
247 double maxet = maxet_;
259 if (not passEta(
track.eta,
i))
274 double minet = minet_;
275 double maxet = maxet_;
286 if (not passEta(
track.eta,
i))
317 double minpt = minpt_;
318 double maxpt = maxpt_;
329 if (not passEta(
track.eta,
i))
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")) {
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();
505 for (
unsigned int i = 0,
n =
cands->size();
i <
n; ++
i) {
516 if (!
pf.hasTrackDetails())
548 for (
unsigned int i = 0,
n = calocands->size();
i <
n; ++
i) {
610 auto evtplaneOutput = std::make_unique<EvtPlaneCollection>();
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_
T getParameter(std::string const &) const
edm::Handle< CaloTowerCollection > caloCollection_
common ppss p3p6s2 common epss epspn46 common const1 w2
edm::Handle< reco::TrackCollection > trackCollection_
double ptError() const
error on Pt (set to 1000 TeV if charge==0 for safety)
unsigned short numberOfValidHits() const
number of valid hits found
std::string centralityMC_
const std::array< std::string, NumEPNames > MomConsWeight
#define DEFINE_FWK_MODULE(type)
int trackerLayersWithMeasurement() const
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)
bool passEta(float eta, int i)
double getW(double pt, double vtx, int centbin) const
edm::ESGetToken< CentralityTable, HeavyIonRcd > centralityToken_
const std::array< double, NumEPNames > EPEtaMin2
const std::array< double, NumEPNames > EPEtaMax1
edm::EDGetTokenT< pat::PackedCandidateCollection > packedToken_
edm::ESWatcher< HeavyIonRcd > hiWatcher_
void fillHF(const TrackStructure &track, double vz, int bin)
void produce(edm::Event &, const edm::EventSetup &) override
edm::EDGetTokenT< pat::PackedCandidateCollection > lostToken_
double pt() const
track transverse momentum
int charge() const
track electric charge
const std::array< double, NumEPNames > maxTransverse
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...
bool isGoodTrack(const TrackStructure &track) const
double dxyError() const
error on dxy
bool bScalo_particleFlow_
GenPlane * rp[NumEPNames]
double dzError() const
error on dz
edm::EDGetTokenT< std::vector< reco::Vertex > > vertexToken_
Cos< T >::type cos(const T &t)
void fillTracker(const TrackStructure &track, double vz, int bin)
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)
double phi() const
azimuthal angle of momentum vector
const std::array< int, NumEPNames > EPDet
edm::EDGetTokenT< int > centralityBinToken_
bool getData(T &iHolder) const
GenPlane(string name, double etaminval1, double etamaxval1, double etaminval2, double etamaxval2, int orderval)
bool isGoodHF(const TrackStructure &track) const
edm::InputTag chi2MapLostTag_
EvtPlaneProducer(const edm::ParameterSet &)
edm::ESGetToken< RPFlatParams, HeavyIonRPRcd > flatparmsToken_
edm::InputTag chi2MapTag_
edm::Handle< std::vector< reco::CastorTower > > castorCollection_
const std::array< double, NumEPNames > minTransverse
bool bStrack_packedPFCandidates_
const std::array< double, NumEPNames > EPEtaMin1
void init(int order, int nbins, int nvtxbins=10, double minvtx=-25, double delvtx=5, std::string tag="", int vord=2)
std::string centralityVariable_
double etScale(double vtx, int centbin) const
void fillCastor(const TrackStructure &track, double vz, int bin)
double eta() const
pseudorapidity of momentum vector
TrackAlgorithm algo() const
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
bool check(const edm::EventSetup &iSetup)
~EvtPlaneProducer() override
const std::array< double, NumEPNames > EPEtaMax2
Particle reconstructed by the particle flow algorithm.
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_
static const int NumEPNames
edm::EDGetTokenT< std::vector< reco::CastorTower > > castorToken_
bool isGoodCastor(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])
edm::Handle< std::vector< reco::Vertex > > vertex_
double dxy() const
dxy parameter. (This is the transverse impact parameter w.r.t. to (0,0,0) ONLY if refPoint is close t...
edm::EDGetTokenT< edm::ValueMap< float > > chi2MapToken_
edm::InputTag losttrackTag_