250{
251 std::unique_ptr<TFile>
f(TFile::Open(fileName,
"RECREATE"));
252 TTree
tree (
"tree",
"");
253
255 double xi1[99], xi2[99], xip1[99], xip2[99];
256 int calo;
259
260 tree.Branch(
"hash", &hash);
261
262 if (tmpl) {
263 tree.Branch(
"calo", &calo);
264 tree.Branch(
"layer", &layer);
265 tree.Branch(
"ft", &ft);
266 tree.Branch(
"slot", &slot);
267 tree.Branch(
"channel", &channel);
270 }
271 tree.Branch(
"gain", &gain);
272 tree.Branch(
"lwb1", &lwb1);
273 tree.Branch(
"lwb2", &lwb2);
274 tree.Branch(
"nSamples", &nSamples);
275 tree.Branch(
"xi1", xi1,
"xi1[nSamples]/D");
276 tree.Branch(
"xi2", xi2,
"xi2[nSamples]/D");
277 tree.Branch(
"xip1", xip1,
"xip1[nSamples]/D");
278 tree.Branch(
"xip2", xip2,
"xip2[nSamples]/D");
279
281 if (k % 10000 == 0) cout <<
"Processing entry " <<
k << endl;
283 if (tmpl) {
284 std::unique_ptr<const CellInfo> cellInfo = tmpl->
cellInfo(k);
285 calo = (cellInfo ? cellInfo->calo() : -999 );
286 layer = (cellInfo ? cellInfo->layer() : -999 );
287 ft = (cellInfo ? cellInfo->feedThrough() : -999 );
288 slot = (cellInfo ? cellInfo->slot() : -999 );
289 channel = (cellInfo ? cellInfo->channel() : -999 );
290 eta = (cellInfo ? cellInfo->eta() : -999 );
291 phi = (cellInfo ? cellInfo->phi() : -999 );
292 }
293 for (
unsigned int g = 0;
g < 3;
g++) {
297
299 lwb2 = (data2 ? data2->lwb() : -1);
301 int lwb = (lwb1 >= 0 ? lwb1 : lwb2);
302 if (lwb<0) throw std::runtime_error("TreeShapeErrorGetter::compare() attempt to access arrays with negative index");
306 xi2[
j] = (data2 && data2->isInRange(j) ? data2->xi()(j) : -999);
307 xip2[
j] = (data2 && data2->isInRange(j) ? data2->xip()(j) : -999);
308 }
310 }
311 }
314 return true;
315}
Scalar eta() const
pseudorapidity method
Scalar phi() const
phi method
virtual std::unique_ptr< const CellInfo > cellInfo(unsigned int i) const
virtual std::unique_ptr< ShapeErrorData > shapeErrorData(unsigned int hash, CaloGain::CaloGain gain, const Residual *toExclude=0) const override
float j(const xAOD::IParticle &, const xAOD::TrackMeasurementValidation &hit, const Eigen::Matrix3d &jab_inv)
static const unsigned int nChannels