21 #include "Math/Vector3D.h"
74 virtual void endJob()
override ;
85 static const int NumCentBins=9;
140 hcent = fs->make<TH1D>(
"cent",
"cent",41,0,40);
141 hvtx = fs->make<TH1D>(
"vtx",
"vtx",1000,-50,50);
143 Int_t FlatOrder = 21;
148 int nbins = flat[
i]->GetHBins();
152 Double_t psirange = 4;
153 if(
EPOrder[i]==2 ) psirange = 2;
154 if(
EPOrder[i]==3 ) psirange = 1.5;
155 if(
EPOrder[i]==4 ) psirange = 1;
156 if(
EPOrder[i]==5) psirange = 0.8;
157 if(
EPOrder[i]==6) psirange = 0.6;
158 hPsi[
i] = subdir.
make<TH1D>(
"psi",
"psi",800,-psirange,psirange);
159 hPsi[
i]->SetXTitle(
"#Psi");
160 hPsi[
i]->SetYTitle(Form(
"Counts (cent<80%c)",
'%'));
161 hPsiFlat[
i] = subdir.
make<TH1D>(
"psiFlat",
"psiFlat",800,-psirange,psirange);
162 hPsiFlat[
i]->SetXTitle(
"#Psi");
163 hPsiFlat[
i]->SetYTitle(Form(
"Counts (cent<80%c)",
'%'));
164 for(
int j = 0;
j<NumCentBins;
j++) {
165 TString hname = Form(
"psiFlat_%d_%d",(
int) wcent[
j],(
int) wcent[j+1]);
166 hPsiFlatCent[
i][
j] = subdir.
make<TH1D>(hname.Data(),hname.Data(),800,-psirange,psirange);
167 hPsiFlatCent[
i][
j]->SetXTitle(
"#Psi");
168 hPsiFlatCent[
i][
j]->SetYTitle(Form(
"Counts (%d<cent#leq%d%c)",(
int) wcent[j],(
int) wcent[j+1],
'%'));
194 using namespace reco;
200 centrality_->newEvent(iEvent,iSetup);
201 int bin = centrality_->getBin();
202 double centval = 2.5*
bin+1.25;
208 iEvent.
getByToken(vtxCollection_,vertexCollection3);
210 vs_sell = vertices3->size();
212 vzr_sell = vertices3->begin()->z();
213 vzErr_sell = vertices3->begin()->zError();
222 int flatTableSize = flatparmsDB_->m_table.size();
223 for(
int i = 0;
i<flatTableSize;
i++) {
228 flat[indx]->SetXDB(
i, thisBin->
x[
j]);
229 flat[indx]->SetYDB(
i, thisBin->
y[
j]);
240 iEvent.
getByLabel(
"hiEvtPlane",
"recoLevel",evtPlanes);
242 if(!evtPlanes.isValid()){
247 for (EvtPlaneCollection::const_iterator rp = evtPlanes->begin();rp !=evtPlanes->end(); rp++) {
248 if(rp->angle() > -5) {
249 string baseName = rp->label();
252 double psiFlat = flat[
i]->GetFlatPsi(rp->angle(),vzr_sell,
bin);
255 flat[
i]->Fill(rp->angle(),vzr_sell,
bin);
256 if(
i==0) hvtx->Fill(vzr_sell);
258 if(centval<=80) hPsi[
i]->Fill(rp->angle());
260 if(centval<=80) hPsiFlat[
i]->Fill(psiFlat);
261 for(
int j = 0;
j<NumCentBins;
j++) {
262 if(centval>wcent[
j]&¢val<=wcent[
j+1]) hPsiFlatCent[
i][
j]->Fill(psiFlat);
283 for(
int j = 0;
j<flat[
i]->GetHBins();
j++) {
284 flatXhist[
i]->SetBinContent(
j+1,flat[
i]->GetX(
j));
285 flatYhist[
i]->SetBinContent(
j+1,flat[
i]->GetY(
j));
286 flatCnthist[
i]->SetBinContent(
j+1,flat[
i]->GetCnt(
j));
virtual void beginJob() override
T getParameter(std::string const &) const
T getUntrackedParameter(std::string const &, T const &) const
virtual void endJob() override
bool getByToken(EDGetToken token, Handle< PROD > &result) const
#define DEFINE_FWK_MODULE(type)
std::vector< Vertex > VertexCollection
collection of Vertex objects
const std::string EPNames[]
virtual void analyze(const edm::Event &, const edm::EventSetup &) override
T * make(const Args &...args) const
make new ROOT object
bool getByLabel(InputTag const &tag, Handle< PROD > &result) const
TFileDirectory mkdir(const std::string &dir, const std::string &descr="")
create a new subdirectory
char data[epos_bytes_allocation]
static const int NumEPNames
edm::EDGetTokenT< reco::VertexCollection > vtxCollection_
HiEvtPlaneFlatCalib(const edm::ParameterSet &)
CentralityProvider * centrality_
edm::Service< TFileService > fs