35 #include "Math/Vector3D.h"
88 virtual void endJob() ;
98 static const int NumCentBins=9;
152 hcent = fs->make<TH1D>(
"cent",
"cent",41,0,40);
153 hvtx = fs->make<TH1D>(
"vtx",
"vtx",1000,-50,50);
155 Int_t FlatOrder = 21;
160 int nbins = flat[
i]->GetHBins();
164 Double_t psirange = 4;
165 if(
EPOrder[i]==2 ) psirange = 2;
166 if(
EPOrder[i]==3 ) psirange = 1.5;
167 if(
EPOrder[i]==4 ) psirange = 1;
168 if(
EPOrder[i]==5) psirange = 0.8;
169 if(
EPOrder[i]==6) psirange = 0.6;
170 hPsi[
i] = subdir.
make<TH1D>(
"psi",
"psi",800,-psirange,psirange);
171 hPsi[
i]->SetXTitle(
"#Psi");
172 hPsi[
i]->SetYTitle(Form(
"Counts (cent<80%c)",
'%'));
173 hPsiFlat[
i] = subdir.
make<TH1D>(
"psiFlat",
"psiFlat",800,-psirange,psirange);
174 hPsiFlat[
i]->SetXTitle(
"#Psi");
175 hPsiFlat[
i]->SetYTitle(Form(
"Counts (cent<80%c)",
'%'));
176 for(
int j = 0;
j<NumCentBins;
j++) {
177 TString hname = Form(
"psiFlat_%d_%d",(
int) wcent[
j],(
int) wcent[j+1]);
178 hPsiFlatCent[
i][
j] = subdir.
make<TH1D>(hname.Data(),hname.Data(),800,-psirange,psirange);
179 hPsiFlatCent[
i][
j]->SetXTitle(
"#Psi");
180 hPsiFlatCent[
i][
j]->SetYTitle(Form(
"Counts (%d<cent#leq%d%c)",(
int) wcent[j],(
int) wcent[j+1],
'%'));
206 using namespace reco;
212 centrality_->newEvent(iEvent,iSetup);
213 int bin = centrality_->getBin();
214 double centval = 2.5*
bin+1.25;
220 iEvent.
getByLabel(
"hiSelectedVertex",vertexCollection3);
222 vs_sell = vertices3->size();
224 vzr_sell = vertices3->begin()->z();
225 vzErr_sell = vertices3->begin()->zError();
234 int flatTableSize = flatparmsDB_->m_table.size();
235 for(
int i = 0;
i<flatTableSize;
i++) {
240 flat[indx]->SetXDB(
i, thisBin->
x[
j]);
241 flat[indx]->SetYDB(
i, thisBin->
y[
j]);
252 iEvent.
getByLabel(
"hiEvtPlane",
"recoLevel",evtPlanes);
254 if(!evtPlanes.isValid()){
259 for (EvtPlaneCollection::const_iterator rp = evtPlanes->begin();rp !=evtPlanes->end(); rp++) {
260 if(rp->angle() > -5) {
261 string baseName = rp->label();
264 double psiFlat = flat[
i]->GetFlatPsi(rp->angle(),vzr_sell,
bin);
267 flat[
i]->Fill(rp->angle(),vzr_sell,
bin);
268 if(
i==0) hvtx->Fill(vzr_sell);
270 if(centval<=80) hPsi[
i]->Fill(rp->angle());
272 if(centval<=80) hPsiFlat[
i]->Fill(psiFlat);
273 for(
int j = 0;
j<NumCentBins;
j++) {
274 if(centval>wcent[
j]&¢val<=wcent[
j+1]) hPsiFlatCent[
i][
j]->Fill(psiFlat);
295 for(
int j = 0;
j<flat[
i]->GetHBins();
j++) {
296 flatXhist[
i]->SetBinContent(
j+1,flat[
i]->GetX(
j));
297 flatYhist[
i]->SetBinContent(
j+1,flat[
i]->GetY(
j));
298 flatCnthist[
i]->SetBinContent(
j+1,flat[
i]->GetCnt(
j));
T getUntrackedParameter(std::string const &, T const &) const
#define DEFINE_FWK_MODULE(type)
std::vector< Vertex > VertexCollection
collection of Vertex objects
const std::string EPNames[]
bool getByLabel(InputTag const &tag, Handle< PROD > &result) const
virtual void analyze(const edm::Event &, const edm::EventSetup &)
TFileDirectory mkdir(const std::string &dir, const std::string &descr="")
create a new subdirectory
char data[epos_bytes_allocation]
T * make() const
make new ROOT object
static const int NumEPNames
HiEvtPlaneFlatCalib(const edm::ParameterSet &)
CentralityProvider * centrality_
edm::Service< TFileService > fs