34 #include "Math/Vector3D.h"
87 virtual void endJob() ;
97 static const int NumCentBins=9;
151 hcent = fs->make<TH1D>(
"cent",
"cent",41,0,40);
152 hvtx = fs->make<TH1D>(
"vtx",
"vtx",1000,-50,50);
154 Int_t FlatOrder = 21;
159 int nbins = flat[
i]->GetHBins();
163 Double_t psirange = 4;
164 if(
EPOrder[i]==2 ) psirange = 2;
165 if(
EPOrder[i]==3 ) psirange = 1.5;
166 if(
EPOrder[i]==4 ) psirange = 1;
167 if(
EPOrder[i]==5) psirange = 0.8;
168 if(
EPOrder[i]==6) psirange = 0.6;
169 hPsi[
i] = subdir.
make<TH1D>(
"psi",
"psi",800,-psirange,psirange);
170 hPsi[
i]->SetXTitle(
"#Psi");
171 hPsi[
i]->SetYTitle(Form(
"Counts (cent<80%c)",
'%'));
172 hPsiFlat[
i] = subdir.
make<TH1D>(
"psiFlat",
"psiFlat",800,-psirange,psirange);
173 hPsiFlat[
i]->SetXTitle(
"#Psi");
174 hPsiFlat[
i]->SetYTitle(Form(
"Counts (cent<80%c)",
'%'));
175 for(
int j = 0;
j<NumCentBins;
j++) {
176 TString hname = Form(
"psiFlat_%d_%d",(
int) wcent[
j],(
int) wcent[j+1]);
177 hPsiFlatCent[
i][
j] = subdir.
make<TH1D>(hname.Data(),hname.Data(),800,-psirange,psirange);
178 hPsiFlatCent[
i][
j]->SetXTitle(
"#Psi");
179 hPsiFlatCent[
i][
j]->SetYTitle(Form(
"Counts (%d<cent#leq%d%c)",(
int) wcent[j],(
int) wcent[j+1],
'%'));
205 using namespace reco;
211 centrality_->newEvent(iEvent,iSetup);
212 int bin = centrality_->getBin();
213 double centval = 2.5*
bin+1.25;
219 iEvent.
getByLabel(
"hiSelectedVertex",vertexCollection3);
221 vs_sell = vertices3->size();
223 vzr_sell = vertices3->begin()->z();
224 vzErr_sell = vertices3->begin()->zError();
233 int flatTableSize = flatparmsDB_->m_table.size();
234 for(
int i = 0;
i<flatTableSize;
i++) {
239 flat[indx]->SetXDB(
i, thisBin->
x[
j]);
240 flat[indx]->SetYDB(
i, thisBin->
y[
j]);
251 iEvent.
getByLabel(
"hiEvtPlane",
"recoLevel",evtPlanes);
253 if(!evtPlanes.isValid()){
258 for (EvtPlaneCollection::const_iterator rp = evtPlanes->begin();rp !=evtPlanes->end(); rp++) {
259 if(rp->angle() > -5) {
260 string baseName = rp->label();
263 double psiFlat = flat[
i]->GetFlatPsi(rp->angle(),vzr_sell,
bin);
266 flat[
i]->Fill(rp->angle(),vzr_sell,
bin);
267 if(
i==0) hvtx->Fill(vzr_sell);
269 if(centval<=80) hPsi[
i]->Fill(rp->angle());
271 if(centval<=80) hPsiFlat[
i]->Fill(psiFlat);
272 for(
int j = 0;
j<NumCentBins;
j++) {
273 if(centval>wcent[
j]&¢val<=wcent[
j+1]) hPsiFlatCent[
i][
j]->Fill(psiFlat);
294 for(
int j = 0;
j<flat[
i]->GetHBins();
j++) {
295 flatXhist[
i]->SetBinContent(
j+1,flat[
i]->GetX(
j));
296 flatYhist[
i]->SetBinContent(
j+1,flat[
i]->GetY(
j));
297 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