Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Clean BuildFiles in RecoHI and RecoLocalMuon #28972

Merged
merged 2 commits into from Feb 21, 2020
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Jump to
Jump to file
Failed to load files.
Diff view
Diff view
27 changes: 0 additions & 27 deletions RecoHI/HiCentralityAlgos/BuildFile.xml

This file was deleted.

17 changes: 16 additions & 1 deletion RecoHI/HiCentralityAlgos/plugins/BuildFile.xml
@@ -1,4 +1,19 @@
<use name="RecoHI/HiCentralityAlgos"/>
<use name="FWCore/Framework"/>
<use name="FWCore/ParameterSet"/>
<use name="FWCore/Utilities"/>
<use name="CommonTools/UtilAlgos"/>
<use name="DataFormats/Candidate"/>
<use name="DataFormats/HcalRecHit"/>
<use name="DataFormats/Common"/>
<use name="DataFormats/HeavyIonEvent"/>
<use name="DataFormats/TrackerRecHit2D"/>
<use name="DataFormats/TrackReco"/>
<use name="DataFormats/VertexReco"/>
<use name="CondFormats/HIObjects"/>
<use name="CondFormats/DataRecord"/>
<use name="CondCore/DBOutputService"/>
<use name="Geometry/CaloGeometry"/>
<use name="Geometry/TrackerGeometryBuilder"/>
<flags EDM_PLUGIN="1"/>
<library file="*.cc" name="HiCentralityPlugins">
</library>
6 changes: 4 additions & 2 deletions RecoHI/HiEgammaAlgos/BuildFile.xml
@@ -1,11 +1,13 @@
<use name="FWCore/Framework"/>
<use name="FWCore/ParameterSet"/>
<use name="DataFormats/EgammaCandidates"/>
<use name="DataFormats/EgammaReco"/>
<use name="DataFormats/Candidate"/>
<use name="DataFormats/HepMCCandidate"/>
<use name="Geometry/CaloGeometry"/>
<use name="RecoEcal/EgammaClusterAlgos"/>
<use name="DataFormats/EgammaCandidates"/>
<use name="Geometry/CaloTopology"/>
<use name="Geometry/Records"/>
<use name="RecoEcal/EgammaCoreTools"/>
<use name="clhep"/>
<use name="root"/>
<export>
Expand Down
9 changes: 1 addition & 8 deletions RecoHI/HiEvtPlaneAlgos/BuildFile.xml
@@ -1,23 +1,16 @@
<use name="root"/>

<use name="FWCore/Framework"/>
<use name="FWCore/PluginManager"/>
<use name="FWCore/ParameterSet"/>
<use name="FWCore/Utilities"/>
<use name="PhysicsTools/UtilAlgos"/>
<use name="DataFormats/Candidate"/>
<use name="DataFormats/HcalRecHit"/>
<use name="DataFormats/WrappedStdDictionaries"/>
<use name="Geometry/Records"/>
<use name="DataFormats/HepMCCandidate"/>
<use name="DataFormats/TrackReco"/>
<use name="DataFormats/VertexReco"/>
<use name="DataFormats/Common"/>
<use name="DataFormats/HeavyIonEvent"/>
<use name="DataFormats/CaloTowers"/>
<use name="DataFormats/Provenance"/>
<use name="CondCore/DBOutputService"/>
<use name="CondFormats/DataRecord"/>
<use name="RecoHI/HiCentralityAlgos"/>
<use name="clhep"/>

<flags EDM_PLUGIN="1"/>
113 changes: 31 additions & 82 deletions RecoHI/HiEvtPlaneAlgos/src/HiEvtPlaneFlatProducer.cc
@@ -1,4 +1,3 @@
#include <memory>
#include "FWCore/Framework/interface/Frameworkfwd.h"
#include "FWCore/Framework/interface/stream/EDProducer.h"

Expand All @@ -20,17 +19,6 @@
#include "DataFormats/TrackReco/interface/Track.h"
#include "DataFormats/VertexReco/interface/Vertex.h"
#include "DataFormats/VertexReco/interface/VertexFwd.h"
#include "SimDataFormats/Track/interface/SimTrack.h"
#include "SimDataFormats/Track/interface/SimTrackContainer.h"
#include "SimDataFormats/Track/interface/CoreSimTrack.h"
#include "SimDataFormats/EncodedEventId/interface/EncodedEventId.h"
#include "SimDataFormats/Vertex/interface/SimVertex.h"
#include "SimDataFormats/Vertex/interface/SimVertexContainer.h"
#include "SimDataFormats/TrackingHit/interface/PSimHit.h"
#include "SimDataFormats/TrackingHit/interface/PSimHitContainer.h"
#include "SimDataFormats/TrackingHit/interface/UpdatablePSimHit.h"
#include "SimDataFormats/TrackingAnalysis/interface/TrackingParticleFwd.h"
#include "SimDataFormats/TrackingAnalysis/interface/TrackingVertexContainer.h"

#include "FWCore/ServiceRegistry/interface/Service.h"
#include "CommonTools/UtilAlgos/interface/TFileService.h"
Expand All @@ -41,19 +29,17 @@
#include "CondFormats/HIObjects/interface/RPFlatParams.h"

#include "RecoHI/HiEvtPlaneAlgos/interface/HiEvtPlaneFlatten.h"
#include "TList.h"
#include "TString.h"
#include <ctime>
#include <cstdlib>

#include "RecoHI/HiEvtPlaneAlgos/interface/HiEvtPlaneList.h"
#include "RecoHI/HiEvtPlaneAlgos/interface/LoadEPDB.h"

using namespace std;
using namespace hi;
#include "TList.h"
#include "TString.h"

#include <vector>
using std::vector;
#include <ctime>
#include <cstdlib>
#include <memory>

//
// class declaration
Expand Down Expand Up @@ -99,24 +85,10 @@ class HiEvtPlaneFlatProducer : public edm::stream::EDProducer<> {
int CentBinCompression_;
int Noffmin_;
int Noffmax_;
HiEvtPlaneFlatten* flat[NumEPNames];
HiEvtPlaneFlatten* flat[hi::NumEPNames];
bool useOffsetPsi_;
double nCentBins_;
};
//
// constants, enums and typedefs
//

typedef std::vector<TrackingParticle> TrackingParticleCollection;
typedef TrackingParticleRefVector::iterator tp_iterator;

//
// static data member definitions
//

//
// constructors and destructor
//
HiEvtPlaneFlatProducer::HiEvtPlaneFlatProducer(const edm::ParameterSet& iConfig)
: centralityVariable_(iConfig.getParameter<std::string>("centralityVariable")),
centralityBinTag_(iConfig.getParameter<edm::InputTag>("centralityBinTag")),
Expand All @@ -132,9 +104,6 @@ HiEvtPlaneFlatProducer::HiEvtPlaneFlatProducer(const edm::ParameterSet& iConfig)
Noffmin_(iConfig.getParameter<int>("Noffmin")),
Noffmax_(iConfig.getParameter<int>("Noffmax")),
useOffsetPsi_(iConfig.getParameter<bool>("useOffsetPsi")) {
// UseEtHF = kFALSE;
nCentBins_ = 200.;

if (iConfig.exists("nonDefaultGlauberModel")) {
centralityMC_ = iConfig.getParameter<std::string>("nonDefaultGlauberModel");
}
Expand All @@ -153,29 +122,26 @@ HiEvtPlaneFlatProducer::HiEvtPlaneFlatProducer(const edm::ParameterSet& iConfig)
//register your products
produces<reco::EvtPlaneCollection>();
//now do what ever other initialization is needed
for (int i = 0; i < NumEPNames; i++) {
for (int i = 0; i < hi::NumEPNames; i++) {
flat[i] = new HiEvtPlaneFlatten();
flat[i]->init(FlatOrder_, NumFlatBins_, EPNames[i], EPOrder[i]);
flat[i]->init(FlatOrder_, NumFlatBins_, hi::EPNames[i], hi::EPOrder[i]);
}
}

HiEvtPlaneFlatProducer::~HiEvtPlaneFlatProducer() {
// do anything here that needs to be done at desctruction time
// (e.g. close files, deallocate resources etc.)
for (int i = 0; i < NumEPNames; i++) {
for (int i = 0; i < hi::NumEPNames; i++) {
delete flat[i];
}
}

//
// member functions
//

// ------------ method called to produce the data ------------
void HiEvtPlaneFlatProducer::produce(edm::Event& iEvent, const edm::EventSetup& iSetup) {
using namespace edm;
using namespace std;
using namespace reco;
using namespace hi;

//
//Get Flattening Parameters
Expand All @@ -186,12 +152,12 @@ void HiEvtPlaneFlatProducer::produce(edm::Event& iEvent, const edm::EventSetup&
//
edm::ESHandle<CentralityTable> centDB_;
iSetup.get<HeavyIonRcd>().get(centralityLabel_, centDB_);
nCentBins_ = centDB_->m_table.size();
for (int i = 0; i < NumEPNames; i++) {
int nCentBins = centDB_->m_table.size();
for (int i = 0; i < hi::NumEPNames; i++) {
flat[i]->setCaloCentRefBins(-1, -1);
if (caloCentRef_ > 0) {
int minbin = (caloCentRef_ - caloCentRefWidth_ / 2.) * nCentBins_ / 100.;
int maxbin = (caloCentRef_ + caloCentRefWidth_ / 2.) * nCentBins_ / 100.;
int minbin = (caloCentRef_ - caloCentRefWidth_ / 2.) * nCentBins / 100.;
int maxbin = (caloCentRef_ + caloCentRefWidth_ / 2.) * nCentBins / 100.;
minbin /= CentBinCompression_;
maxbin /= CentBinCompression_;
if (minbin > 0 && maxbin >= minbin) {
Expand All @@ -213,17 +179,11 @@ void HiEvtPlaneFlatProducer::produce(edm::Event& iEvent, const edm::EventSetup&
//Get Centrality
//

int bin = 0;
edm::Handle<int> cbin_;
iEvent.getByToken(centralityBinToken, cbin_);
int cbin = *cbin_;
bin = cbin / CentBinCompression_;
int bin = iEvent.get(centralityBinToken) / CentBinCompression_;

if (Noffmin_ >= 0) {
edm::Handle<reco::Centrality> centrality_;
iEvent.getByToken(centralityToken, centrality_);
int Noff = centrality_->Ntracks();
if ((Noff < Noffmin_) or (Noff >= Noffmax_)) {
int nOff = iEvent.get(centralityToken).Ntracks();
if ((nOff < Noffmin_) or (nOff >= Noffmax_)) {
return;
}
}
Expand All @@ -232,38 +192,28 @@ void HiEvtPlaneFlatProducer::produce(edm::Event& iEvent, const edm::EventSetup&
//
int vs_sell; // vertex collection size
float vzr_sell;
edm::Handle<std::vector<reco::Vertex>> vertex_;
iEvent.getByToken(vertexToken, vertex_);
const reco::VertexCollection* vertices3 = vertex_.product();
vs_sell = vertices3->size();
auto const& vertices3 = iEvent.get(vertexToken);
vs_sell = vertices3.size();
if (vs_sell > 0) {
vzr_sell = vertices3->begin()->z();
vzr_sell = vertices3.begin()->z();
} else
vzr_sell = -999.9;

//
//Get Event Planes
//

edm::Handle<reco::EvtPlaneCollection> evtPlanes_;
iEvent.getByToken(inputPlanesToken, evtPlanes_);

if (!evtPlanes_.isValid()) {
// cout << "Error! Can't get hiEvtPlane product!" << endl;
return;
}

auto evtplaneOutput = std::make_unique<EvtPlaneCollection>();
EvtPlane* ep[NumEPNames];
for (int i = 0; i < NumEPNames; i++) {
EvtPlane* ep[hi::NumEPNames];
for (int i = 0; i < hi::NumEPNames; i++) {
ep[i] = nullptr;
}
int indx = 0;
for (EvtPlaneCollection::const_iterator rp = evtPlanes_->begin(); rp != evtPlanes_->end(); rp++) {
double psiOffset = rp->angle(0);
double s = rp->sumSin(0);
double c = rp->sumCos(0);
uint m = rp->mult();
for (auto const& rp : iEvent.get(inputPlanesToken)) {
double psiOffset = rp.angle(0);
double s = rp.sumSin(0);
double c = rp.sumCos(0);
uint m = rp.mult();

double soff = s;
double coff = c;
Expand All @@ -273,16 +223,15 @@ void HiEvtPlaneFlatProducer::produce(edm::Event& iEvent, const edm::EventSetup&
psiOffset = flat[indx]->getOffsetPsi(soff, coff);
}
double psiFlat = flat[indx]->getFlatPsi(psiOffset, vzr_sell, bin);
ep[indx] =
new EvtPlane(indx, 2, psiFlat, soff, coff, rp->sumw(), rp->sumw2(), rp->sumPtOrEt(), rp->sumPtOrEt2(), m);
ep[indx]->addLevel(0, rp->angle(0), s, c);
ep[indx]->addLevel(3, 0., rp->sumSin(3), rp->sumCos(3));
ep[indx] = new EvtPlane(indx, 2, psiFlat, soff, coff, rp.sumw(), rp.sumw2(), rp.sumPtOrEt(), rp.sumPtOrEt2(), m);
ep[indx]->addLevel(0, rp.angle(0), s, c);
ep[indx]->addLevel(3, 0., rp.sumSin(3), rp.sumCos(3));
if (useOffsetPsi_)
ep[indx]->addLevel(1, psiOffset, soff, coff);
++indx;
}

for (int i = 0; i < NumEPNames; i++) {
for (int i = 0; i < hi::NumEPNames; i++) {
if (ep[i] != nullptr)
evtplaneOutput->push_back(*ep[i]);
}
Expand Down
30 changes: 0 additions & 30 deletions RecoHI/HiMuonAlgos/BuildFile.xml

This file was deleted.

1 change: 0 additions & 1 deletion RecoHI/HiMuonAlgos/interface/DiMuonSeedGeneratorHIC.h

This file was deleted.

1 change: 0 additions & 1 deletion RecoHI/HiMuonAlgos/interface/DiMuonTrajectorySeed.h

This file was deleted.

1 change: 0 additions & 1 deletion RecoHI/HiMuonAlgos/interface/FastMuPropagator.h

This file was deleted.

1 change: 0 additions & 1 deletion RecoHI/HiMuonAlgos/interface/FmpConst.h

This file was deleted.

1 change: 0 additions & 1 deletion RecoHI/HiMuonAlgos/interface/HICConst.h

This file was deleted.

1 change: 0 additions & 1 deletion RecoHI/HiMuonAlgos/interface/HICFTSfromL1orL2.h

This file was deleted.

1 change: 0 additions & 1 deletion RecoHI/HiMuonAlgos/interface/HICMeasurementEstimator.h

This file was deleted.

1 change: 0 additions & 1 deletion RecoHI/HiMuonAlgos/interface/HICMuonPropagator.h

This file was deleted.

1 change: 0 additions & 1 deletion RecoHI/HiMuonAlgos/interface/HICMuonUpdator.h

This file was deleted.

1 change: 0 additions & 1 deletion RecoHI/HiMuonAlgos/interface/HICSeedMeasurementEstimator.h

This file was deleted.

1 change: 0 additions & 1 deletion RecoHI/HiMuonAlgos/interface/HICSimpleNavigationSchool.h

This file was deleted.

This file was deleted.

1 change: 0 additions & 1 deletion RecoHI/HiMuonAlgos/interface/HICTrajectoryBuilder.h

This file was deleted.

1 change: 0 additions & 1 deletion RecoHI/HiMuonAlgos/interface/HICTrajectoryCorrector.h

This file was deleted.

1 change: 0 additions & 1 deletion RecoHI/HiMuonAlgos/interface/HITrackVertexMaker.h

This file was deleted.

1 change: 0 additions & 1 deletion RecoHI/HiMuonAlgos/plugins/BuildFile.xml
Expand Up @@ -27,7 +27,6 @@
<use name="RecoMuon/GlobalTrackingTools"/>
<use name="RecoMuon/TrackingTools"/>
<use name="hepmc"/>
<use name="RecoHI/HiMuonAlgos"/>
<library file="*.cc" name="RecoHIHiMuonAlgosPlugins">
<flags EDM_PLUGIN="1"/>
</library>