33 #include "Math/Vector3D.h"
86 virtual void endJob()
override ;
96 static const int NumCentBins=9;
150 hcent = fs->make<TH1D>(
"cent",
"cent",41,0,40);
151 hvtx = fs->make<TH1D>(
"vtx",
"vtx",1000,-50,50);
153 Int_t FlatOrder = 21;
158 int nbins = flat[
i]->GetHBins();
162 Double_t psirange = 4;
163 if(
EPOrder[i]==2 ) psirange = 2;
164 if(
EPOrder[i]==3 ) psirange = 1.5;
165 if(
EPOrder[i]==4 ) psirange = 1;
166 if(
EPOrder[i]==5) psirange = 0.8;
167 if(
EPOrder[i]==6) psirange = 0.6;
168 hPsi[
i] = subdir.
make<TH1D>(
"psi",
"psi",800,-psirange,psirange);
169 hPsi[
i]->SetXTitle(
"#Psi");
170 hPsi[
i]->SetYTitle(Form(
"Counts (cent<80%c)",
'%'));
171 hPsiFlat[
i] = subdir.
make<TH1D>(
"psiFlat",
"psiFlat",800,-psirange,psirange);
172 hPsiFlat[
i]->SetXTitle(
"#Psi");
173 hPsiFlat[
i]->SetYTitle(Form(
"Counts (cent<80%c)",
'%'));
174 for(
int j = 0;
j<NumCentBins;
j++) {
175 TString hname = Form(
"psiFlat_%d_%d",(
int) wcent[
j],(
int) wcent[j+1]);
176 hPsiFlatCent[
i][
j] = subdir.
make<TH1D>(hname.Data(),hname.Data(),800,-psirange,psirange);
177 hPsiFlatCent[
i][
j]->SetXTitle(
"#Psi");
178 hPsiFlatCent[
i][
j]->SetYTitle(Form(
"Counts (%d<cent#leq%d%c)",(
int) wcent[j],(
int) wcent[j+1],
'%'));
204 using namespace reco;
210 centrality_->newEvent(iEvent,iSetup);
211 int bin = centrality_->getBin();
212 double centval = 2.5*
bin+1.25;
218 iEvent.
getByLabel(
"hiSelectedVertex",vertexCollection3);
220 vs_sell = vertices3->size();
222 vzr_sell = vertices3->begin()->z();
223 vzErr_sell = vertices3->begin()->zError();
232 int flatTableSize = flatparmsDB_->m_table.size();
233 for(
int i = 0;
i<flatTableSize;
i++) {
238 flat[indx]->SetXDB(
i, thisBin->
x[
j]);
239 flat[indx]->SetYDB(
i, thisBin->
y[
j]);
250 iEvent.
getByLabel(
"hiEvtPlane",
"recoLevel",evtPlanes);
252 if(!evtPlanes.isValid()){
257 for (EvtPlaneCollection::const_iterator rp = evtPlanes->begin();rp !=evtPlanes->end(); rp++) {
258 if(rp->angle() > -5) {
259 string baseName = rp->label();
262 double psiFlat = flat[
i]->GetFlatPsi(rp->angle(),vzr_sell,
bin);
265 flat[
i]->Fill(rp->angle(),vzr_sell,
bin);
266 if(
i==0) hvtx->Fill(vzr_sell);
268 if(centval<=80) hPsi[
i]->Fill(rp->angle());
270 if(centval<=80) hPsiFlat[
i]->Fill(psiFlat);
271 for(
int j = 0;
j<NumCentBins;
j++) {
272 if(centval>wcent[
j]&¢val<=wcent[
j+1]) hPsiFlatCent[
i][
j]->Fill(psiFlat);
293 for(
int j = 0;
j<flat[
i]->GetHBins();
j++) {
294 flatXhist[
i]->SetBinContent(
j+1,flat[
i]->GetX(
j));
295 flatYhist[
i]->SetBinContent(
j+1,flat[
i]->GetY(
j));
296 flatCnthist[
i]->SetBinContent(
j+1,flat[
i]->GetCnt(
j));
virtual void beginJob() override
T getUntrackedParameter(std::string const &, T const &) const
virtual void endJob() override
#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
HiEvtPlaneFlatCalib(const edm::ParameterSet &)
CentralityProvider * centrality_
edm::Service< TFileService > fs