80 virtual void endJob()
override ;
110 cout<<
"Enter MoveFlatParamsToDB"<<endl;
112 inFile =
new TFile(
"data/rpflat_combined.root");
113 if(inFile->IsZombie()) {
114 cout<<
"file not found"<<endl;
116 TList *
list = ((TDirectory *)inFile->Get(
"hiEvtPlaneFlatCalib"))->GetListOfKeys();
124 while(indx >=0 && indx<NumEPNames) {
126 TString
name = list->At(indx)->GetName();
127 if(!name.Contains(
"cent")&&!name.Contains(
"vtx")&&!name.Contains(
"MidEtaTrackRescor")) {
134 if(EPNameIndx <0)
cout<<
"A bad reaction plane name has been encountered: "<<name.Data()<<endl;
135 RPNameIndx[cnt]=EPNameIndx;
137 x[cnt] = (TH1D *) inFile->Get(Form(
"hiEvtPlaneFlatCalib/%s/x_%s",name.Data(),name.Data()));
138 y[cnt] = (TH1D *) inFile->Get(Form(
"hiEvtPlaneFlatCalib/%s/y_%s",name.Data(),name.Data()));
139 xycnt[cnt] = (TH1D *) inFile->Get(Form(
"hiEvtPlaneFlatCalib/%s/cnt_%s",name.Data(),name.Data()));
141 if(!
x[cnt])
cout<<
"bad x"<<endl;
142 if(!
y[cnt])
cout<<
"bad y"<<endl;
143 if(!xycnt[cnt])
cout<<
"bad cnt"<<endl;
144 if(
x[cnt] && xycnt[cnt] &&
y[cnt]) {
145 x[cnt]->Divide(xycnt[cnt]);
146 y[cnt]->Divide(xycnt[cnt]);
149 if(cnt>NumEPNames||cnt>50) {
150 cout<<
"Maximum number of reaction planes exceeded!"<<endl;
155 if(list->At(indx)==list->Last())
161 cout<<
"nRP = "<<nRP<<endl;
184 rpFlat->m_table.reserve(
x[0]->GetNbinsX());
185 cout<<
"Size of table: "<<
x[0]->GetNbinsX()<<endl;
186 for(
int j = 0;
j<
x[0]->GetNbinsX();
j++) {
188 for(
int i = 0;
i<nRP;
i++) {
189 thisBin->
x[
i] =
x[
i]->GetBinContent(
j+1);
190 thisBin->
y[
i] =
y[
i]->GetBinContent(
j+1);
193 rpFlat->m_table.push_back(*thisBin);
194 if(thisBin)
delete thisBin;
196 cout<<
"Number of RP: "<<nRP<<endl;
198 if(poolDbService.isAvailable())
199 poolDbService->
writeOne( rpFlat,poolDbService->beginOfTime(),
"HeavyIonRPRcd");
#define DEFINE_FWK_MODULE(type)
const std::string EPNames[]
virtual void beginJob() override
MoveFlatParamsToDB(const edm::ParameterSet &)
virtual void analyze(const edm::Event &, const edm::EventSetup &) override
void writeOne(T *payload, Time_t time, const std::string &recordName, bool withlogging=false)
virtual void endJob() override
static const int NumEPNames
How EventSelector::AcceptEvent() decides whether to accept an event for output otherwise it is excluding the probing of A single or multiple positive and the trigger will pass if any such matching triggers are PASS or EXCEPTION[A criterion thatmatches no triggers at all is detected and causes a throw.] A single negative with an expectation of appropriate bit checking in the decision and the trigger will pass if any such matching triggers are FAIL or EXCEPTION A wildcarded negative criterion that matches more than one trigger in the trigger list("!*","!HLTx*"if it matches 2 triggers or more) will accept the event if all the matching triggers are FAIL.It will reject the event if any of the triggers are PASS or EXCEPTION(this matches the behavior of"!*"before the partial wildcard feature was incorporated).Triggers which are in the READY state are completely ignored.(READY should never be returned since the trigger paths have been run