20 #include "Math/Vector3D.h"
73 virtual void endJob()
override ;
84 static const int NumCentBins=9;
139 hcent = fs->make<TH1D>(
"cent",
"cent",41,0,40);
140 hvtx = fs->make<TH1D>(
"vtx",
"vtx",1000,-50,50);
142 Int_t FlatOrder = 21;
147 int nbins = flat[
i]->GetHBins();
151 Double_t psirange = 4;
152 if(
EPOrder[i]==2 ) psirange = 2;
153 if(
EPOrder[i]==3 ) psirange = 1.5;
154 if(
EPOrder[i]==4 ) psirange = 1;
155 if(
EPOrder[i]==5) psirange = 0.8;
156 if(
EPOrder[i]==6) psirange = 0.6;
157 hPsi[
i] = subdir.
make<TH1D>(
"psi",
"psi",800,-psirange,psirange);
158 hPsi[
i]->SetXTitle(
"#Psi");
159 hPsi[
i]->SetYTitle(Form(
"Counts (cent<80%c)",
'%'));
160 hPsiFlat[
i] = subdir.
make<TH1D>(
"psiFlat",
"psiFlat",800,-psirange,psirange);
161 hPsiFlat[
i]->SetXTitle(
"#Psi");
162 hPsiFlat[
i]->SetYTitle(Form(
"Counts (cent<80%c)",
'%'));
163 for(
int j = 0;
j<NumCentBins;
j++) {
164 TString hname = Form(
"psiFlat_%d_%d",(
int) wcent[
j],(
int) wcent[j+1]);
165 hPsiFlatCent[
i][
j] = subdir.
make<TH1D>(hname.Data(),hname.Data(),800,-psirange,psirange);
166 hPsiFlatCent[
i][
j]->SetXTitle(
"#Psi");
167 hPsiFlatCent[
i][
j]->SetYTitle(Form(
"Counts (%d<cent#leq%d%c)",(
int) wcent[j],(
int) wcent[j+1],
'%'));
193 using namespace reco;
200 double centval = 2.5*
bin+1.25;
206 iEvent.
getByToken(vtxCollection_,vertexCollection3);
208 vs_sell = vertices3->size();
210 vzr_sell = vertices3->begin()->z();
211 vzErr_sell = vertices3->begin()->zError();
220 int flatTableSize = flatparmsDB_->m_table.size();
221 for(
int i = 0;
i<flatTableSize;
i++) {
226 flat[indx]->SetXDB(
i, thisBin->
x[
j]);
227 flat[indx]->SetYDB(
i, thisBin->
y[
j]);
238 iEvent.
getByLabel(
"hiEvtPlane",
"recoLevel",evtPlanes);
240 if(!evtPlanes.isValid()){
245 for (EvtPlaneCollection::const_iterator rp = evtPlanes->begin();rp !=evtPlanes->end(); rp++) {
246 if(rp->angle() > -5) {
247 string baseName = rp->label();
250 double psiFlat = flat[
i]->GetFlatPsi(rp->angle(),vzr_sell,
bin);
253 flat[
i]->Fill(rp->angle(),vzr_sell,
bin);
254 if(
i==0) hvtx->Fill(vzr_sell);
256 if(centval<=80) hPsi[
i]->Fill(rp->angle());
258 if(centval<=80) hPsiFlat[
i]->Fill(psiFlat);
259 for(
int j = 0;
j<NumCentBins;
j++) {
260 if(centval>wcent[
j]&¢val<=wcent[
j+1]) hPsiFlatCent[
i][
j]->Fill(psiFlat);
281 for(
int j = 0;
j<flat[
i]->GetHBins();
j++) {
282 flatXhist[
i]->SetBinContent(
j+1,flat[
i]->GetX(
j));
283 flatYhist[
i]->SetBinContent(
j+1,flat[
i]->GetY(
j));
284 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
edm::EDGetTokenT< int > ctag_
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 &)
edm::Service< TFileService > fs