1 #define BaseDataClasses_C 3 #include "BaseDataClasses.hxx" 5 #include "BasicUtils.hxx" 13 EFieldRefitMomentum = -999;
23 dEdxSigmaProton = -999;
50 std::cout <<
"-------- AnaTPCParticleB --------- " << std::endl;
56 AnaTPCParticleB::~AnaTPCParticleB(){
95 MostUpStreamLayerHit = -999;
96 anaUtils::ReserveArray(ShowerPosition, 3);
105 PIDEmHip = seg.PIDEmHip;
157 AnaParticleMomE::AnaParticleMomE(){
166 AnaParticleMomE::~AnaParticleMomE(){
184 std::cout <<
"Charge: " <<
Charge << std::endl;
185 std::cout <<
"Momentum: " <<
Momentum << std::endl;
186 std::cout <<
"MomentumEnd: " <<
MomentumEnd << std::endl;
196 AnaParticleMomB::~AnaParticleMomB(){
220 if (! TMath::Finite(m1)) m1 = -2e6;
221 if (! TMath::Finite(m2)) m2 = -2e6;
225 if (m1 != m1) m1 = -1e6;
226 if (m2 != m2) m2 = -1e6;
236 std::cout <<
"-------- AnaParticleMomB --------- " << std::endl;
258 AnaParticleB::~AnaParticleB(){
289 std::cout <<
"-------- AnaParticleB --------- " << std::endl;
293 std::cout <<
"NHits: " <<
NHits << std::endl;
294 std::cout <<
"NNodes: " <<
NNodes << std::endl;
308 RangeMomentumMuon = -999;
311 TPCQualityCut = -999;
319 TPCSegmentsVect.clear();
320 FGDSegmentsVect.clear();
321 P0DSegmentsVect.clear();
322 ECALSegmentsVect.clear();
323 SMRDSegmentsVect.clear();
327 AnaTrackB::~AnaTrackB(){
330 for (Int_t i=0;i<nTPCSegments;i++){
331 delete TPCSegments[i];
332 TPCSegments[i] = NULL;
334 for (Int_t i=0;i<nFGDSegments;i++){
335 delete FGDSegments[i];
336 FGDSegments[i] = NULL;
338 for (Int_t i=0;i<nECALSegments;i++){
339 delete ECALSegments[i];
340 ECALSegments[i] = NULL;
342 for (Int_t i=0;i<nSMRDSegments;i++){
343 delete SMRDSegments[i];
344 SMRDSegments[i] = NULL;
346 for (Int_t i=0;i<nP0DSegments;i++){
347 delete P0DSegments[i];
348 P0DSegments[i] = NULL;
351 if (TPCSegmentsVect.size()>0 && nTPCSegments ==0)
for (UInt_t i=0;i<TPCSegmentsVect.size(); i++)
delete TPCSegmentsVect[i];
352 if (FGDSegmentsVect.size()>0 && nFGDSegments ==0)
for (UInt_t i=0;i<FGDSegmentsVect.size(); i++)
delete FGDSegmentsVect[i];
353 if (P0DSegmentsVect.size()>0 && nP0DSegments ==0)
for (UInt_t i=0;i<P0DSegmentsVect.size(); i++)
delete P0DSegmentsVect[i];
354 if (ECALSegmentsVect.size()>0 && nECALSegments==0)
for (UInt_t i=0;i<ECALSegmentsVect.size();i++)
delete ECALSegmentsVect[i];
355 if (SMRDSegmentsVect.size()>0 && nSMRDSegments==0)
for (UInt_t i=0;i<SMRDSegmentsVect.size();i++)
delete SMRDSegmentsVect[i];
363 TPCSegmentsVect.clear();
364 FGDSegmentsVect.clear();
365 P0DSegmentsVect.clear();
366 ECALSegmentsVect.clear();
367 SMRDSegmentsVect.clear();
403 FGDSegmentsVect.clear();
404 P0DSegmentsVect.clear();
405 ECALSegmentsVect.clear();
406 SMRDSegmentsVect.clear();
413 std::cout <<
"-------- AnaTrackB --------- " << std::endl;
417 std::cout <<
"MomentumFlip: " <<
MomentumFlip << std::endl;
430 AnaDetCrossingB::AnaDetCrossingB(){
436 anaUtils::ReserveArray(EntrancePosition, 4);
437 anaUtils::ReserveArray(ExitPosition, 4);
439 anaUtils::ReserveArray(EntranceMomentum, 3);
440 anaUtils::ReserveArray(ExitMomentum, 3);
451 anaUtils::CopyArray(cross.
ExitPosition, ExitPosition, 4);
454 anaUtils::CopyArray(cross.
ExitMomentum, ExitMomentum, 3);
466 anaUtils::ReserveArray(Position, 4);
468 anaUtils::ReserveArray(Direction, 3);
476 DetCrossingsVect.clear();
480 AnaTrueParticleB::~AnaTrueParticleB(){
483 for (Int_t i=0;i<nDetCrossings;i++)
484 delete DetCrossings[i];
486 if (DetCrossingsVect.size()>0 && nDetCrossings==0)
for (UInt_t i=0;i<DetCrossingsVect.size();i++)
delete DetCrossingsVect[i];
487 DetCrossingsVect.clear();
492 if(DetCrossings != NULL)
delete [] DetCrossings;
532 std::cout <<
"-------- AnaTrueParticleB --------- " << std::endl;
536 std::cout <<
"PDG: " <<
PDG << std::endl;
537 std::cout <<
"ParentPDG: " <<
ParentPDG << std::endl;
538 std::cout <<
"GParentPDG: " <<
GParentPDG << std::endl;
539 std::cout <<
"Momentum: " <<
Momentum << std::endl;
540 std::cout <<
"Charge: " <<
Charge << std::endl;
543 std::cout <<
"VertexID: " <<
VertexID << std::endl;
556 anaUtils::ReserveArray(
Position, 4);
558 TrueParticles = NULL;
561 TrueParticlesVect.clear();
565 AnaTrueVertexB::~AnaTrueVertexB(){
569 if(TrueParticles != NULL)
delete [] TrueParticles;
570 TrueParticles = NULL;
572 TrueParticlesVect.clear();
600 std::cout <<
"-------- AnaTrueVertexB --------- " << std::endl;
604 std::cout <<
"NuPDG: " <<
NuPDG << std::endl;
605 std::cout <<
"NuEnergy: " <<
NuEnergy << std::endl;
606 std::cout <<
"Bunch: " <<
Bunch << std::endl;
607 std::cout <<
"Detector: " <<
Detector << std::endl;
613 AnaDelayedClustersB::AnaDelayedClustersB(){
626 MinTime = clusters.MinTime;
627 MinTime = clusters.MaxTime;
628 NHits = clusters.NHits;
629 RawChargeSum = clusters.RawChargeSum;
639 DelayedClusters=NULL;
644 AnaBunchB::~AnaBunchB(){
647 for (UInt_t i=0;i<Vertices.size();i++)
652 for (UInt_t i=0;i<Particles.size();i++)
657 for (Int_t i=0;i<nDelayedClusters;i++){
658 delete DelayedClusters[i];
659 DelayedClusters[i] = NULL;
661 nDelayedClusters = 0;
662 if (DelayedClusters)
delete [] DelayedClusters;
663 DelayedClusters = NULL;
671 for (UInt_t i=0;i<bunch.
Vertices.size();i++)
675 for (UInt_t i=0;i<bunch.
Particles.size();i++)
678 nDelayedClusters = 0;
683 for(
int i = 0; i < bunch.nDelayedClusters; ++i){
687 for (Int_t i=0;i<bunch.nDelayedClusters;i++){
698 std::cout <<
"-------- AnaBunchB --------- " << std::endl;
702 std::cout <<
"NVertices: " << (int)
Vertices.size() << std::endl;
703 std::cout <<
"NParticles: " << (int)
Particles.size() << std::endl;
704 std::cout <<
"NDelayedClusters: " << nDelayedClusters << std::endl;
711 if ((
int)
Vertices.size()==0)
return NULL;
716 std::cout <<
"WARNING: this vertex is not in this bunch " <<
Bunch << std::endl;
720 std::vector<AnaVertexB*>::const_iterator it;
722 if ( (*it)->PrimaryIndex ==-1 ) {
723 std::cout <<
"WARNING: here you are the PrimaryVertex with PrimaryIndex -1, but they are not properly sorted!" << std::endl;
726 std::cout <<
"WARNING: this vertex is not in this bunch " <<
Bunch << std::endl;
731 std::cout <<
"WARNING: Primary Vertex not found, here you are the vertex with PrimaryIndex: " <<
Vertices.front()->PrimaryIndex << std::endl;
733 std::cout <<
"WARNING: this vertex is not in this bunch " <<
Bunch << std::endl;
744 AnaFgdTimeBinB::AnaFgdTimeBinB(){
748 for (Int_t i=0;i<2;i++){
750 RawChargeSum[i] = -999;
755 AnaFgdTimeBinB::~AnaFgdTimeBinB(){
764 MinTime = bin.MinTime;
766 for (Int_t i=0;i<2;i++){
767 NHits[i] = bin.NHits[i];
768 RawChargeSum[i] = bin.RawChargeSum[i];
776 std::cout <<
"-------- AnaFgdTimeBinB --------- " << std::endl;
778 std::cout <<
"MinTime: " << MinTime << std::endl;
786 NTotalTrueVertices = 999;
787 NTotalTrueParticles = 999;
788 TrueVertices.clear();
789 TrueParticles.clear();
799 AnaSpillB::~AnaSpillB(){
804 for (UInt_t i=0;i<TrueVertices.size();i++)
805 delete TrueVertices[i];
808 TrueVertices.clear();
812 for (UInt_t i=0;i<TrueParticles.size();i++)
813 delete TrueParticles[i];
816 TrueParticles.clear();
818 for (UInt_t i=0;i<FgdTimeBins.size();i++)
819 delete FgdTimeBins[i];
885 std::vector<AnaBunchC*> allBunches =
Bunches;
888 for (UInt_t i=0;i<allBunches.size();i++){
891 for (UInt_t j=0;j<bunch->
Particles.size();j++){
898 for (UInt_t j=0;j<bunch->
Vertices.size();j++){
902 for (Int_t k=0;k<vertex->nParticles;k++){
905 for (UInt_t l=0;l<bunch->
Particles.size();l++){
916 for (UInt_t i2=0;i2<allBunches.size();i2++){
917 if ((Int_t)i2==bunch->
Bunch)
continue;
919 for (UInt_t l=0;l<bunch2->
Particles.size();l++){
941 std::cout <<
"-------- AnaSpillB --------- " << std::endl;
946 std::cout <<
"NO Event Info available !!!" << std::endl;
947 std::cout <<
"GeomID: " <<
GeomID << std::endl;
948 std::cout <<
"NBunches: " << (int)
Bunches.size() << std::endl;
950 std::cout <<
"NSavedTrueVertices: " << (int)
TrueVertices.size() << std::endl;
952 std::cout <<
"NSavedTrueParticles: " << (int)
TrueParticles.size() << std::endl;
953 std::cout <<
"NFgdTimeBins: " << (int)
FgdTimeBins.size() << std::endl;
957 std::cout <<
"NO DataQuality Info available !!!" << std::endl;
963 std::cout <<
"NO Beam Info available !!!" << std::endl;
971 std::vector<AnaBunchC*> bunches =
Bunches;
974 for (std::vector<AnaBunchC*>::iterator it=bunches.begin();it!=bunches.end();it++){
976 for (UInt_t i=0;i<bunch->
Particles.size();i++){
978 if (!track)
continue;
983 track->FGDSegmentsVect.clear();
985 track->FGDSegmentsVect.push_back(track->
FGDSegments[j]);
987 track->ECALSegmentsVect.clear();
989 track->ECALSegmentsVect.push_back(track->
ECALSegments[j]);
991 track->SMRDSegmentsVect.clear();
993 track->SMRDSegmentsVect.push_back(track->
SMRDSegments[j]);
995 track->P0DSegmentsVect.clear();
997 track->P0DSegmentsVect.push_back(track->
P0DSegments[j]);
1000 for (UInt_t i=0;i<bunch->
Vertices.size();i++){
1004 for (Int_t j=0;j<vertex->nParticles;j++){
1032 std::vector<AnaBunchC*> bunches =
Bunches;
1036 for (std::vector<AnaBunchC*>::iterator it=bunches.begin();it!=bunches.end();it++){
1039 for (UInt_t i=0;i<bunch->
Particles.size();i++){
1041 if (!track)
continue;
1047 for (UInt_t j=0;j<track->FGDSegmentsVect.size();j++)
1051 for (UInt_t j=0;j<track->ECALSegmentsVect.size();j++)
1055 for (UInt_t j=0;j<track->SMRDSegmentsVect.size();j++)
1059 for (UInt_t j=0;j<track->P0DSegmentsVect.size();j++)
1063 for (UInt_t i=0;i<bunch->
Vertices.size();i++){
1066 vertex->nParticles=0;
1094 AnaEventInfoB::AnaEventInfoB(){
1105 AnaEventInfoB::~AnaEventInfoB(){
1116 Event = spill.
Event;
1125 std::cout <<
"-------- AnaEventInfoB --------- " << std::endl;
1127 std::cout <<
"IsMC: " << IsMC << std::endl;
1128 std::cout <<
"IsSand: " << IsSand << std::endl;
1129 std::cout <<
"Run: " << Run << std::endl;
1130 std::cout <<
"SubRun: " << SubRun << std::endl;
1131 std::cout <<
"Evt: " << Event << std::endl;
1137 std::stringstream sRun;
1139 IsSand = ((sRun.str())[4]==
'7');
1144 AnaDataQualityB::AnaDataQualityB(){
1158 AnaBeamB::AnaBeamB(){
1162 POTSincePreviousSavedSpill = -999;
1163 SpillsSincePreviousSavedSpill = -999;
1179 PrimaryIndex = -999;
1181 anaUtils::ReserveArray(Position, 4);
1187 TrueVerticesMatch.clear();
1189 ParticlesVect.clear();
1193 AnaVertexB::~AnaVertexB(){
1196 if(Particles != NULL)
delete [] Particles;
1199 ParticlesVect.clear();
1211 anaUtils::CreateArray(
Particles, vertex.nParticles);
1214 nParticles = vertex.nParticles;
1241 if (m1 != m1) m1 = 999;
1242 if (m2 != m2) m2 = 999;
1245 if (m1 != m2 || ! t1 || ! t2)
return m1 < m2;
1249 if (t1->nParticles > 0 && t2->nParticles > 0) {
1255 if (t1->nParticles != t2->nParticles)
return t1->nParticles > t2->nParticles;
1265 std::cout <<
"-------- AnaVertexB --------- " << std::endl;
1269 std::cout <<
"PrimaryIndex: " <<
PrimaryIndex << std::endl;
1271 std::cout <<
"NReconParticles: " << nParticles << std::endl;
1272 std::cout <<
"NTrueVerticesMatch: " << (int)
TrueVerticesMatch.size() << std::endl;
1281 std::vector<std::pair<AnaTrueVertexB*, AnaRecTrueMatchB> >::const_iterator it;
1283 arr[count] = it->first;
1295 std::cout <<
"WARNING: this true vertex is not in this bunch: " <<
Bunch <<
" vs " <<
TrueVerticesMatch.front().first->Bunch << std::endl;
1304 std::cout <<
"error: there is no true vertices associated to this global vertex" << std::endl;
1309 std::cout <<
"error: the main associated true vertex is null" << std::endl;
1314 std::cout <<
"WARNING: this true vertex is not in this bunch " <<
Bunch << std::endl;
1324 std::cout <<
"error: there is no true vertices associated to this global vertex" << std::endl;
1329 std::cout <<
"error: the main associated true vertex is null" << std::endl;
1334 std::cout <<
"WARNING: this true vertex is not in this bunch " <<
Bunch << std::endl;
1343 std::vector<std::pair<AnaTrueVertexB*, AnaRecTrueMatchB> >::const_iterator it;
1345 if ( ! it->first) std::cout <<
"error: this true vertex is null" << std::endl;
1346 if ( ! it->first)
continue;
1347 if (it->first->ID == trueVertex.
ID) {
1348 if (
Bunch != it->first->Bunch)
1349 std::cout <<
"WARNING: this true vertex is not in this bunch " <<
Bunch << std::endl;
1350 return (it->second.Cleanliness);
1354 std::cout <<
"ERROR: this true vertex seems not associated to this global vertex " << std::endl;
1362 std::vector<std::pair<AnaTrueVertexB*, AnaRecTrueMatchB> >::const_iterator it;
1364 if ( ! it->first) std::cout <<
"error: this true vertex is null" << std::endl;
1365 if ( ! it->first)
continue;
1366 if (it->first->ID == trueVertex.
ID) {
1367 if (
Bunch != it->first->Bunch)
1368 std::cout <<
"WARNING: this true vertex is not in this bunch " <<
Bunch << std::endl;
1369 return (it->second.Completeness);
1373 std::cout <<
"ERROR: this true vertex seems not associated to this global vertex " << std::endl;
1380 for(
int i = 0; i < SampleId::kNSamples; ++i){
1381 LeptonCandidate[i]=NULL;
1382 RooVertexIndex[i] = -1;
1384 for(
int j = 0; j < 4; ++j){
1385 VertexPosition[i][j] = -9999;
1388 EventSample = SampleId::kUnassigned;
1393 void AnaEventSummaryB::ResetSummary(){
1396 for(
int i = 0; i < SampleId::kNSamples; ++i){
1397 LeptonCandidate[i]=NULL;
1398 RooVertexIndex[i] = -1;
1400 for(
int j = 0; j < 4; ++j){
1401 VertexPosition[i][j] = -9999;
1404 EventSample = SampleId::kUnassigned;
1413 TrueParticles = NULL;
1414 TrueVertices = NULL;
1424 DelayedClusters=NULL;
1431 AnaEventB::~AnaEventB(){
1434 for (Int_t i=0;i<nParticles;i++){
1442 for (Int_t i=0;i<nVertices;i++){
1447 if (Vertices)
delete [] Vertices;
1452 for (Int_t i=0;i<nTrueParticles;i++){
1453 delete TrueParticles[i];
1454 TrueParticles[i] = NULL;
1458 if (TrueParticles)
delete [] TrueParticles;
1459 TrueParticles = NULL;
1463 for (Int_t i=0;i<nTrueVertices;i++){
1464 delete TrueVertices[i];
1465 TrueVertices[i] = NULL;
1470 if (TrueVertices)
delete [] TrueVertices;
1471 TrueVertices = NULL;
1473 for (Int_t i=0;i<nFgdTimeBins;i++){
1474 delete FgdTimeBins[i];
1475 FgdTimeBins[i] = NULL;
1479 if (FgdTimeBins)
delete [] FgdTimeBins;
1492 for (Int_t i=0;i<nDelayedClusters;i++){
1493 delete DelayedClusters[i];
1494 DelayedClusters[i] = NULL;
1496 nDelayedClusters = 0;
1497 if (DelayedClusters)
delete [] DelayedClusters;
1498 DelayedClusters = NULL;
1512 anaUtils::CreateArray(
Particles, event.nParticles);
1513 for (Int_t i=0;i<
event.nParticles;i++){
1518 anaUtils::CreateArray(Vertices, event.nVertices);
1519 for (Int_t i=0;i<
event.nVertices;i++){
1520 Vertices[nVertices] =
event.Vertices[i]->Clone();
1524 Bunch =
event.Bunch;
1529 anaUtils::CreateArray(TrueVertices, event.nTrueVertices);
1530 for (Int_t i=0;i<
event.nTrueVertices;i++){
1532 TrueVertices[nTrueVertices] =
event.TrueVertices[i]->Clone();
1534 TrueVertices[nTrueVertices]->nTrueParticles = 0;
1538 TrueVertices[nTrueVertices] =
event.TrueVertices[i];
1544 anaUtils::CreateArray(TrueParticles, event.nTrueParticles);
1545 for (Int_t i=0;i<
event.nTrueParticles;i++){
1547 TrueParticles[nTrueParticles] =
event.TrueParticles[i]->Clone();
1548 for(
int j = 0; j < nTrueVertices; ++j){
1549 if(TrueParticles[nTrueParticles]->VertexID == TrueVertices[j]->ID){
1551 TrueParticles[nTrueParticles]->TrueVertex = TrueVertices[j];
1554 if(TrueVertices[j]->nTrueParticles == 0){
1555 anaUtils::CreateArray(TrueVertices[j]->TrueParticles, event.nTrueParticles);
1557 TrueVertices[j]->TrueParticles[TrueVertices[j]->nTrueParticles] = TrueParticles[nTrueParticles];
1558 TrueVertices[j]->nTrueParticles++;
1565 TrueParticles[nTrueParticles] =
event.TrueParticles[i];
1571 anaUtils::CreateArray(FgdTimeBins, event.nFgdTimeBins);
1572 for (Int_t i=0;i<
event.nFgdTimeBins;i++){
1573 FgdTimeBins[nFgdTimeBins] =
event.FgdTimeBins[i]->Clone();
1579 nDelayedClusters = 0;
1583 for(
int i = 0; i <
event.nDelayedClusters; ++i){
1584 DelayedClusters[i] = NULL;
1586 for (Int_t i=0;i<
event.nDelayedClusters;i++){
1587 DelayedClusters[nDelayedClusters] =
event.DelayedClusters[i]->
Clone();
1592 EventInfo =
event.EventInfo;
1596 Beam =
event.Beam->
Clone();
1599 if (event.DataQuality)
1600 DataQuality =
event.DataQuality->
Clone();
1609 Copy(event,
true,
false);
1616 std::cout <<
"-------- AnaEventB --------- " << std::endl;
1620 std::cout <<
"Bunch: " <<
Bunch << std::endl;
1621 std::cout <<
"NParticles: " <<
nParticles << std::endl;
1622 std::cout <<
"NVertices: " << nVertices << std::endl;
1623 std::cout <<
"NTrueParticles: " << nTrueParticles << std::endl;
1624 std::cout <<
"NTrueVertices: " << nTrueVertices << std::endl;
1625 std::cout <<
"NFgdTimeBins: " << nFgdTimeBins << std::endl;
1627 std::cout <<
"Good Spill: " <<
Beam->
GoodSpill << std::endl;
1634 std::stringstream sRun;
1637 std::stringstream sSubRun;
1640 std::stringstream sEvent;
1643 std::stringstream sBunch;
1646 return "("+sRun.str()+
"/"+sSubRun.str()+
"/"+sEvent.str()+
"/"+sBunch.str()+
")";
1654 for (UInt_t i=0;i<NMAXEVENTBOXES;i++)
1691 for (UInt_t i=0;i<bunch.
Particles.size();i++){
1699 for (UInt_t i=0;i<bunch.
Vertices.size();i++){
1729 nDelayedClusters = 0;
1733 for(
int i = 0; i < bunch.nDelayedClusters; ++i){
1737 for (Int_t i=0;i<bunch.nDelayedClusters;i++){
virtual void Print() const
Dump the object to screen.
Float_t dEdxexpMuon
Expected dE/dx for a muon, based on the reconstructed momentum.
virtual void CopyArraysIntoVectors()
Copy the arrays into std vectors, needed for FlatTree creation.
bool InActive
If the particle passes through an active part of the subdetector.
AnaTrueVertexB * TrueVertex
Pointer to the AnaTrueVertexB of the interaction that created this AnaTrueParticleB.
int nP0DSegments
How many P0D tracks are associated with this track.
Float_t PositionStart[4]
The reconstructed start position of the particle.
void Print() const
Dump the object to screen.
virtual AnaBunchB * Clone()
Clone this object.
Representation of the beam quality and perhaps other beam information as needed.
AnaTrueVertexB * TrueVertex
Representation of the ND280 data quality flags.
AnaP0DParticleB * P0DSegments[NMAXP0DS]
The P0D segments that contributed to this global track.
Int_t NuPDG
The PDG code of the incoming neutrino.
int nDetCrossings
The number of DetCrossing objects.
int GetTrueVertices(AnaTrueVertexB **arr)
The true vertices that is associated with this global vertex.
virtual void Print() const
Dump the object to screen.
int nTrueParticles
How many true particles are associated with this vertex.
Float_t GetTrueVertexCleanliness(const AnaTrueVertexB &trueVertex)
The cleanliness of this global vertex respect to an associated true vertex.
Float_t ExitPosition[4]
for each subdetector tell the exit position
AnaFgdTimeBinB ** FgdTimeBins
The FGD time bins.
Float_t dEdxexpProton
Expected dE/dx for a proton, based on the reconstructed momentum.
AnaECALParticleB * ECALSegments[NMAXECALS]
The ECAL segments that contributed to this global track.
int nECALSegments
How many ECAL tracks are associated with this track.
std::vector< std::pair< AnaTrueVertexB *, AnaRecTrueMatchB > > TrueVerticesMatch
The true vertices that are associated with this global vertex, with the related cleanliness and compl...
/// Extension to AnaParticleB containing momentum and charge info
Float_t GetMainTrueVertexCompleteness()
The completeness of this global vertex respect to the main associated true vertex.
void SetIsSandMC()
Set whether this event is from Sand MC.
Float_t Pullp
Proton pull, according to FGD information.
AnaSMRDParticleB * SMRDSegments[NMAXSMRDS]
The SMRD segments that contributed to this global track.
AnaVertexB ** Vertices
The reconstructed objects in this bunch.
Representation of a true Monte Carlo vertex.
Float_t DirectionEnd[3]
The reconstructed end direction of the particle.
Float_t Position[4]
The identified position of the global vertex.
std::vector< AnaTrueVertexB * > TrueVertices
The true MC vertices used in this spill.
std::vector< AnaBunchC * > Bunches
The reconstructed objects, split into timing bunches.
AnaBeamB * Beam
The beam quality flags for this event.
Float_t Pullno
Dummy pull. If the FGD pulls weren't set, this is set to 1.
Int_t NNodes
The number of nodes in the reconstructed object.
Int_t GParentPDG
The PDG code of this particle's grandparent, or 0 if there is no grandparent.
virtual void Print() const
Dump the object to screen.
Representation of an ECAL segment of a global track.
Float_t Pullpi
Pion pull, according to FGD information.
AnaTPCParticleB * TPCSegments[NMAXTPCS]
The TPC segments that contributed to this global track.
virtual AnaTPCParticleB * Clone()
Clone this object.
Extension to AnaParticleB containing momentum and charge info, to be used by aggregation.
Float_t AvgTime
Time charged averaged over hits.
virtual void Print() const
Dump the object to screen.
Int_t SpillsSincePreviousSavedSpill
virtual void Print() const
Dump the object to screen.
Float_t dEdxSigmaProton
Expected error on the dE/dx measurement, for the proton hypothesis.
virtual std::string GetEventInfoString() const
User-frienly method to get event info (run,subrun,etc)
virtual void associateVertexToParticle(AnaParticleB *, AnaVertexB *) const
Add to a particle a given associated vertex (not in the base class)
virtual void associateParticleToTrueParticle(AnaParticleB *) const
Add to a true particle a given associated reconstructed particle (not in the base class) ...
static bool CompareMomentum(const AnaParticleMomB *t1, const AnaParticleMomB *t2)
Function used to sort momentum in decreasing order.
virtual AnaEventInfoB * Clone()
Clone this object.
AnaToF ToF
Times of flight between pairs of detectors.
AnaEventInfoB * EventInfo
Run, sunrun, event, time stamp, etc.
Float_t Momentum
The initial momentum of the true particle.
void Print() const
Dump the object to screen.
AnaParticleB ** Particles
The reconstructed objects in this bunch.
AnaTrueParticleB ** TrueParticles
The true particles associated with this vertex.
AnaBunchB * OutOfBunch
Reconstructed objects that didn't fit into one of the timing bunches.
Int_t Bunch
The bunch of the global vertex, based on the Position.T()
virtual void CopyVectorsIntoArrays()
Copy the vectore into the arrays, needed after FlatTree reading.
Float_t RangeMomentumMuon
Momentum by range calculated with muon hypothesis.
std::vector< AnaTPCParticleB * > TPCSegmentsVect
A copy of the segment arrays but using an std::vector, which can be saved into a tree.
static bool CompareNHits(const AnaParticleB *t1, const AnaParticleB *t2)
Compare the NHits of two particles. Return whether t1 is higher NHts than t2.
bool IsSand
Is this event from the Sand MC.
virtual AnaDetCrossingB * Clone()
Clone this object.
AnaEventInfoB EventInfo
Run, sunrun, event, time stamp, etc.
Float_t dEdxexpPion
Expected dE/dx for a pion, based on the reconstructed momentum.
Int_t VertexID
The TruthVertexID of the AnaTrueVertexB of the interaction that created this AnaTrueParticleB.
Int_t UniqueID
The UniqueID of this reconstructed object.
std::vector< AnaParticleB * > ParticlesVect
A copy of Particles but using an std::vector, which can be saved into a tree.
Float_t dEdxexpEle
Expected dE/dx for an electron, based on the reconstructed momentum.
Float_t Pullmu
Muon pull, according to FGD information.
Float_t Charge
The reconstructed charge of the particle.
Int_t ID
The ID of the trueObj, which corresponds to the ID of the TTruthParticle that created it...
Int_t SubRun
The subrun number.
std::vector< AnaVertexB * > Vertices
int nSMRDSegments
How many SMRD tracks are associated with this track.
const AnaVertexB * Original
Float_t MomentumError
Error of the momentum at the start of the segment.
AnaDelayedClustersB ** DelayedClusters
The delayed cluster groups.
Float_t GetMainTrueVertexCleanliness()
The cleanliness of this global vertex respect to the main associated true vertex. ...
Float_t MomentumFlip
Momentum for the main PID hypothesis and reverse sense.
Float_t ShowerPosition[3]
The position of the shower-fit to this object by ecalRecon.
std::vector< AnaTrueParticleB * > TrueParticlesVect
A copy of TrueParticles but using an std::vector, which can be saved into a tree. ...
Float_t Momentum
The reconstructed momentum of the particle, at the start position.
Int_t Index
The index of this particle track in the vector of particles. TODO: Not sure it is needed (only use in...
int nTPCSegments
How many TPC tracks are associated with this track.
Representation of a true Monte Carlo trajectory/particle.
virtual AnaParticleB * Clone()
Clone this object.
Float_t NuEnergy
The true energy of the incoming neutrino.
virtual void Copy(const AnaEventC &event, bool copyBunchInfo=true, bool cloneTruth=true)
Copy the entire object.
virtual void Print() const
Dump the object to screen.
Representation of an SMRD segment of a global track.
Representation of a Tracker segment of a global track.
Int_t UniqueID
The event unique ID.
virtual bool IsEmpty() const
Returns true if the bunch is completely empty.
const AnaParticleB * Original
UInt_t GeomID
Is this the original Spill or a clone.
Float_t Position[4]
The position the true interaction happened at.
Float_t dEdxSigmaEle
Expected error on the dE/dx measurement, for the electron hypothesis.
void Print() const
Dump the object to screen.
Float_t EntrancePosition[4]
for each subdetector tell the entrance position
AnaBeamB * Beam
The beam quality flags for this spill.
AnaDetCrossingB ** DetCrossings
Representation of a detector crossing info for a true particle (G4 trajectory).
Float_t EFieldRefitMomentum
Reconstructed momentum with the E-field distortion corrections.
Int_t TPCQualityCut
Whether track passes TPC quality cut.
Int_t PDG
The PDG code of this particle.
virtual void Print() const
Dump the object to screen.
Int_t NHits
The number of hits in the particle.
Int_t ParentPDG
The PDG code of this particle's immediate parent, or 0 if there is no parent.
virtual AnaECALParticleB * Clone()
Clone this object.
std::vector< AnaFgdTimeBinB * > FgdTimeBins
The FGD time bins.
virtual void Print() const
Dump the object to screen.
Float_t dEdxMeas
dE/dx as measured by the TPC.
virtual void Print() const
Dump the object to screen.
Representation of a global track.
Int_t Bunch
The index of this bunch (0-7).
AnaTrueVertexB * GetMainTrueVertex(bool warning=true)
The main true vertex that is associated with this global vertex.
Float_t MomentumEnd
The reconstructed momentum of the particle, at the end position.
Representation of a TPC segment of a global track.
Float_t Weight
The weight to apply to this bunch (nominally 1). An example is the beam flux weight.
AnaParticleB ** Particles
Float_t ExitMomentum[3]
for each subdetector tell the exit momentum
UInt_t NTotalTrueVertices
virtual AnaP0DParticleB * Clone()
Clone this object.
std::vector< AnaTrueParticleB * > TrueParticles
The true MC particles used in this spill.
Representation of a global vertex.
Float_t Weight
Run, subrun, event, time stamp, etc.
Double_t POTSincePreviousSavedSpill
Float_t Length
The length of the ECal segment.
Float_t DirectionStart[3]
The reconstructed start direction of the particle.
virtual AnaBeamB * Clone()
Clone this object.
int nParticles
The number of reconstructed particles in the event.
AnaEventSummaryC * Summary
A summary of the event with high level quantities.
Representation of a FGD segment of a global track.
AnaDelayedClustersB ** DelayedClusters
The delayed cluster groups.
Int_t Bunch
The index of this bunch (0-7).
virtual AnaFGDParticleB * Clone()
Clone this object.
AnaVertexB * GetPrimaryVertex()
The primary reconstructed vertex associated with this bunch.
Int_t PrimaryIndex
Index of the global vertex.
Int_t GoodSpill
Good spill flag, as defined in Beam Summary Data. 0 is bad.
std::vector< AnaDetCrossingB * > DetCrossingsVect
A copy of DetCrossings but using an std::vector, which can be saved into a tree.
Int_t Event
The ND280 event number.
int nFGDSegments
How many FGD tracks are associated with this track.
AnaTrueParticleB ** TrueParticles
The true MC particles used in this spill.
Float_t dEdxSigmaMuon
Expected error on the dE/dx measurement, for the muon hypothesis.
virtual void Print() const
Dump the object to screen.
Int_t ParentID
The ID of this particle's immediate parent, or 0 if there is no parent.
Float_t PositionEnd[4]
The end position of the true particle.
Float_t Position[4]
The initial position of the true particle.
Int_t Containment
Containment flag required for proper PID analysis.
virtual void RedoLinks()
Redo reco-reco and reco-truth after cloning or reading MiniTree.
AnaTrueVertexB ** TrueVertices
The true MC vertices used in this spill.
std::vector< AnaParticleB * > Particles
Int_t MostUpStreamLayerHit
Innermost layer hit of the ecal object (used in ecal pi0 veto)
bool isClone
Is this the original Event or a clone.
void Print() const
Dump the object to screen.
Representation of a P0D segment of a global track.
Float_t dEdxSigmaPion
Expected error on the dE/dx measurement, for the pion hypothesis.
Float_t Charge
The true charge of the particle.
Float_t GetTrueVertexCompleteness(const AnaTrueVertexB &trueVertex)
The completeness of this global vertex respect to an associated true vertex.
AnaDataQualityB * DataQuality
The ND280 data quality flags for this event.
Representation of a reconstructed particle (track or shower).
AnaDataQualityB * DataQuality
The ND280 data quality flags for this spill.
bool IsMC
Says if the event is MC or data.
void Print() const
Dump the object to screen.
Float_t Direction[3]
The initial direction of the true particle.
virtual void Print() const
Dump the object to screen.
virtual AnaDataQualityB * Clone()
Clone this object.
static bool ComparePrimaryIndex(const AnaVertexB *t1, const AnaVertexB *t2)
Function used to sort PrimaryIndex in increasing order.
UInt_t NTotalTrueParticles
virtual void associateVertexToTrueVertex(AnaVertexB *) const
Add to a true vertex a given associated reconstructed vertex (not in the base class) ...
AnaFGDParticleB * FGDSegments[NMAXFGDS]
The FGD segments that contributed to this global track.
Int_t nEventBoxes
The array of boxes where objects that are valid for all toys are stored.
virtual AnaSMRDParticleB * Clone()
Clone this object.
Float_t EntranceMomentum[3]
for each subdetector tell the entrance momentum
Float_t PositionEnd[4]
The reconstructed end position of the particle.
virtual AnaDelayedClustersB * Clone()
Clone this object.
Float_t RefitMomentum
Reconstructed momentum with the empirical distortion corrections.
Int_t Run
The ND280 run number.