3 #include "DataClasses.hxx" 4 #include "BasicUtils.hxx" 8 const Float_t kFloatUnassigned = -999.;
9 const UInt_t kUnassigned = 0xDEADBEEF;
10 const short kShortUnassigned = 0xFF;
14 AnaSubTrack::AnaSubTrack(){
35 std::cout <<
"-------- AnaSubTrack --------- " << std::endl;
38 std::cout <<
"Length: " <<
Length << std::endl;
43 AnaParticleE::AnaParticleE(){
53 for (
int i=0; i<2; i++) {
54 UpstreamHits_Position[i] = TVector3(-999, -999, -999);
55 DownstreamHits_Position[i] = TVector3(-999, -999, -999);
56 UpstreamHits_Charge[i] = -999;
57 DownstreamHits_Charge[i] = -999;
62 MomentumProton = -999;
63 MomentumErrorEle = -999;
64 MomentumErrorMuon = -999;
65 MomentumErrorProton = -999;
67 #if VERSION_HAS_REVERSED_REFITS 68 anaUtils::ReserveArray(PositionStartFlip, 4);
69 anaUtils::ReserveArray(DirectionStartFlip, 3);
70 anaUtils::ReserveArray(DirectionEndFlip, 3);
74 #if VERSION_HAS_PRANGE_ESTIMATES 75 RangeMomentumEle = -999;
76 RangeMomentumProton = -999;
77 RangeMomentumMuonFlip = -999;
78 RangeMomentumProtonFlip = -999;
82 ReconVertices.clear();
83 anaUtils::ReserveArray(DirectionAtVertex, 3);
84 MomentumAtVertex = -999;
86 #if VERSION_HAS_TIME_FITS 92 AnaParticleE::~AnaParticleE(){
96 #if VERSION_HAS_TIME_FITS 97 for (UInt_t i=0;i<TimeNodes.size();i++)
116 for (
int i=0; i<2; i++) {
118 DownstreamHits_Position[i] = track.DownstreamHits_Position[i];
119 UpstreamHits_Charge[i] = track.UpstreamHits_Charge[i];
120 DownstreamHits_Charge[i] = track.DownstreamHits_Charge[i];
130 #if VERSION_HAS_REVERSED_REFITS 131 anaUtils::CopyArray(track.PositionStartFlip, PositionStartFlip, 4);
133 anaUtils::CopyArray(track.DirectionEndFlip, DirectionEndFlip, 3);
136 #if VERSION_HAS_PRANGE_ESTIMATES 137 RangeMomentumEle = track.RangeMomentumEle;
138 RangeMomentumProton = track.RangeMomentumProton;
139 RangeMomentumMuonFlip = track.RangeMomentumMuonFlip;
140 RangeMomentumProtonFlip = track.RangeMomentumProtonFlip;
146 ReconVertices.clear();
155 #if VERSION_HAS_TIME_FITS 157 for (UInt_t i=0;i<track.TimeNodes.size();i++)
158 TimeNodes.push_back(track.TimeNodes[i]->
Clone());
167 std::cout <<
"-------- AnaParticleE --------- " << std::endl;
169 std::cout <<
"Chi2: " << Chi2 << std::endl;
170 std::cout <<
"MomentumMuon: " << MomentumMuon << std::endl;
171 std::cout <<
"MomentumEle: " << MomentumEle << std::endl;
172 std::cout <<
"MomentumProton: " << MomentumProton << std::endl;
174 #if VERSION_HAS_PRANGE_ESTIMATES 175 std::cout <<
"RangeMomentumEle: " << RangeMomentumEle << std::endl;
176 std::cout <<
"RangeMomentumProton: " << RangeMomentumProton << std::endl;
177 std::cout <<
"RangeMomentumMuonFlip: " << RangeMomentumMuonFlip << std::endl;
178 std::cout <<
"RangeMomentumProtonFlip: " << RangeMomentumProtonFlip << std::endl;
181 #if VERSION_HAS_REVERSED_REFITS 182 dump_array4(PositionStartFlip);
183 dump_array3(DirectionStartFlip);
184 dump_array3(DirectionEndFlip);
187 std::cout <<
"Bunch: " << Bunch << std::endl;
188 std::cout <<
"NReconVertices: " << (int)ReconVertices.size() << std::endl;
189 std::cout <<
"MomentumAtVertex: " << MomentumAtVertex << std::endl;
190 std::cout <<
"DirectionAtVertex: " << DirectionAtVertex[0] <<
" " << DirectionAtVertex[1] <<
" " << DirectionAtVertex[2] << std::endl;
204 anaUtils::ReserveArray(NuDir, 3);
206 anaUtils::ReserveArray(NuParentDecPoint, 4);
211 anaUtils::ReserveArray(TargetDir, 3);
212 anaUtils::ReserveArray(LeptonDir, 3);
213 anaUtils::ReserveArray(ProtonDir, 3);
214 anaUtils::ReserveArray(PionDir, 3);
220 IsPauliBlocked =
false;
223 for (UInt_t i=0; i<(ParticleId::kLast+1); i++)
224 NPrimaryParticles[i]=0;
228 ReconParticles.clear();
229 ReconVertices.clear();
257 IsCohOnH = vertex.IsCohOnH;
259 for (UInt_t i=0; i<(ParticleId::kLast+1); i++)
267 for (UInt_t i=0;i<vertex.
AccumLevel.size();i++){
269 for (UInt_t j=0;j<vertex.
AccumLevel[i].size();j++){
290 std::cout <<
"-------- AnaTrueVertex --------- " << std::endl;
294 std::cout <<
"RooVtxIndex: " <<
RooVtxIndex << std::endl;
295 std::cout <<
"RooVtxEntry: " <<
RooVtxEntry << std::endl;
296 std::cout <<
"ReacCode: " <<
ReacCode << std::endl;
297 std::cout <<
"TargetPDG: " <<
TargetPDG << std::endl;
300 std::cout <<
"NuDir: " <<
NuDir[0] <<
" " <<
NuDir[1] <<
" " <<
NuDir[2] << std::endl;
302 std::cout <<
"NuParentPDG: " <<
NuParentPDG << std::endl;
306 std::cout <<
"NBaryons: " <<
NBaryons << std::endl;
307 std::cout <<
"LeptonPDG: " <<
LeptonPDG << std::endl;
308 std::cout <<
"Q2: " <<
Q2 << std::endl;
315 std::cout <<
"TargetMom: " <<
TargetMom << std::endl;
316 std::cout <<
"LeptonMom: " <<
LeptonMom << std::endl;
317 std::cout <<
"ProtonMom: " <<
ProtonMom << std::endl;
318 std::cout <<
"PionMom: " <<
PionMom << std::endl;
320 std::cout <<
"NReconParticles: " << (int)
ReconParticles.size() << std::endl;
321 std::cout <<
"NReconVertices: " << (int)
ReconVertices.size() << std::endl;
332 IsTruePrimaryPi0DecayPhoton =
false;
333 IsTruePrimaryPi0DecayPhotonChild =
false;
347 IsTruePrimaryPi0DecayPhotonChild = truePart.IsTruePrimaryPi0DecayPhotonChild;
361 std::cout <<
"-------- AnaTrueParticle --------- \n";
365 std::cout <<
"NReconParticles: " << (int)
ReconParticles.size() <<
"\n" 368 <<
"IsTruePrimaryPi0DecayPhotonChild: " << IsTruePrimaryPi0DecayPhotonChild << std::endl;
376 #if VERSION_HAS_BFIELD_REFIT_FULL 378 anaUtils::ReserveArray(RefitDirection,3);
379 anaUtils::ReserveArray(RefitPosition,4);
387 dEdxSigmaKaon = -999;
394 #if VERSION_HAS_BFIELD_REFIT_FULL 395 RefitCharge = seg.RefitCharge;
396 anaUtils::CopyArray(seg.RefitDirection, RefitDirection,3);
397 anaUtils::CopyArray(seg.RefitPosition, RefitPosition,4);
412 std::cout <<
"-------- AnaTPCParticle --------- " << std::endl;
415 std::cout <<
"Pullmu: " <<
Pullmu << std::endl;
416 std::cout <<
"Pullele: " <<
Pullele << std::endl;
417 std::cout <<
"Pullp: " <<
Pullp << std::endl;
418 std::cout <<
"Pullpi: " <<
Pullpi << std::endl;
419 std::cout <<
"Pullk: " <<
Pullk << std::endl;
423 AnaTPCParticle::~AnaTPCParticle(){
435 #if VERSION_HAS_FGD_VERTEX_AND_END_ACTIVITY 437 HasFgdVA_fmode = -999;
447 #if VERSION_HAS_FGD_VERTEX_AND_END_ACTIVITY 449 HasFgdEA_fmode = -999;
468 #if VERSION_HAS_FGD_VERTEX_AND_END_ACTIVITY 469 HasFgdVA = seg.HasFgdVA;
470 HasFgdVA_fmode = seg.HasFgdVA_fmode;
475 Vertex3x3 = seg.Vertex3x3;
476 Vertex5x5 = seg.Vertex5x5;
477 Vertex7x7 = seg.Vertex7x7;
478 VertexLayer = seg.VertexLayer;
480 #if VERSION_HAS_FGD_VERTEX_AND_END_ACTIVITY 481 HasFgdEA = seg.HasFgdEA;
482 HasFgdEA_fmode = seg.HasFgdEA_fmode;
506 PIDMipPion = seg.PIDMipPion;
507 Containment = seg.Containment;
523 EDeposit = seg.EDeposit;
547 TRACKERSegments.clear();
551 AnaTrack::~AnaTrack(){
554 for (UInt_t i=0;i<TRACKERSegments.size();i++)
555 delete TRACKERSegments[i];
557 TRACKERSegments.clear();
578 std::cout <<
"-------- AnaTrack --------- " << std::endl;
583 std::cout <<
"Length: " <<
Length << std::endl;
584 std::cout <<
"NTRACKERs: " << (int)
TRACKERSegments.size() << std::endl;
589 AnaTimeNode::AnaTimeNode(){
607 AnaBunch::AnaBunch(){
613 AnaBunch::~AnaBunch(){
670 MaxTime = bin.MaxTime;
678 std::cout <<
"-------- AnaFgdTimeBin --------- " << std::endl;
682 std::cout <<
"MaxTime: " << MaxTime << std::endl;
694 AnaSpill::~AnaSpill(){
717 (static_cast<AnaTrueParticle*>(
TrueParticles[i]))->ReconParticles.clear();
767 std::cout <<
"-------- AnaSpill --------- " << std::endl;
780 AnaEvent::~AnaEvent(){
804 std::cout <<
"-------- AnaEvent --------- " << std::endl;
811 AnaLocalReconEvent::AnaLocalReconEvent():
AnaEvent(){
813 TECALReconObjects .clear();
814 TECALUnmatchedObjects.clear();
815 PECALReconObjects .clear();
816 PECALUnmatchedObjects.clear();
817 FGDOnlyReconObjects .clear();
818 P0DReconVertices .clear();
819 P0DReconParticles .clear();
820 P0DReconClusters .clear();
824 AnaLocalReconEvent::~AnaLocalReconEvent(){
826 for (std::vector<AnaTECALReconObject*>::iterator it = TECALReconObjects.begin();
827 it != TECALReconObjects.end(); ++it) {
830 TECALReconObjects.clear();
832 for (std::vector<AnaTECALUnmatchedObject*>::iterator it = TECALUnmatchedObjects.begin();
833 it != TECALUnmatchedObjects.end(); ++it) {
836 TECALUnmatchedObjects.clear();
838 for (std::vector<AnaPECALReconObject*>::iterator it = PECALReconObjects.begin();
839 it != PECALReconObjects.end(); ++it) {
842 PECALReconObjects.clear();
844 for (std::vector<AnaPECALUnmatchedObject*>::iterator it = PECALUnmatchedObjects.begin();
845 it != PECALUnmatchedObjects.end(); ++it) {
848 PECALUnmatchedObjects.clear();
850 for (std::vector<AnaP0DReconVertex*>::iterator it = P0DReconVertices.begin();
851 it != P0DReconVertices.end(); ++it) {
854 P0DReconVertices.clear();
856 for (std::vector<AnaP0DReconParticle*>::iterator it = P0DReconParticles.begin();
857 it != P0DReconParticles.end(); ++it) {
860 P0DReconParticles.clear();
862 for (std::vector<AnaP0DReconCluster*>::iterator it = P0DReconClusters.begin();
863 it != P0DReconClusters.end(); ++it) {
866 P0DReconClusters.clear();
868 for (std::vector<AnaFGDOnlyReconObject*>::iterator it = FGDOnlyReconObjects.begin();
869 it != FGDOnlyReconObjects.end(); ++it) {
872 FGDOnlyReconObjects.clear();
879 TECALReconObjects.clear();
880 for (std::vector<AnaTECALReconObject*>::const_iterator it = event.TECALReconObjects.begin();
881 it !=
event.TECALReconObjects.end(); ++it) {
882 TECALReconObjects.push_back((*it)->Clone());
885 TECALUnmatchedObjects.clear();
886 for (std::vector<AnaTECALUnmatchedObject*>::const_iterator it = event.TECALUnmatchedObjects.begin();
887 it !=
event.TECALUnmatchedObjects.end(); ++it) {
888 TECALUnmatchedObjects.push_back((*it)->Clone());
891 PECALReconObjects.clear();
892 for (std::vector<AnaPECALReconObject*>::const_iterator it = event.PECALReconObjects.begin();
893 it !=
event.PECALReconObjects.end(); ++it) {
894 PECALReconObjects.push_back((*it)->Clone());
897 PECALUnmatchedObjects.clear();
898 for (std::vector<AnaPECALUnmatchedObject*>::const_iterator it = event.PECALUnmatchedObjects.begin();
899 it !=
event.PECALUnmatchedObjects.end(); ++it) {
900 PECALUnmatchedObjects.push_back((*it)->Clone());
903 FGDOnlyReconObjects.clear();
904 for (std::vector<AnaFGDOnlyReconObject*>::const_iterator it = event.FGDOnlyReconObjects.begin();
905 it !=
event.FGDOnlyReconObjects.end(); ++it) {
906 FGDOnlyReconObjects.push_back((*it)->Clone());
909 P0DReconVertices.clear();
910 for (std::vector<AnaP0DReconVertex*>::const_iterator it = event.P0DReconVertices.begin();
911 it !=
event.P0DReconVertices.end(); ++it) {
912 P0DReconVertices.push_back((*it)->Clone());
915 P0DReconParticles.clear();
916 for (std::vector<AnaP0DReconParticle*>::const_iterator it = event.P0DReconParticles.begin();
917 it !=
event.P0DReconParticles.end(); ++it) {
918 P0DReconParticles.push_back((*it)->Clone());
921 P0DReconClusters.clear();
922 for (std::vector<AnaP0DReconCluster*>::const_iterator it = event.P0DReconClusters.begin();
923 it !=
event.P0DReconClusters.end(); ++it) {
924 P0DReconClusters.push_back((*it)->Clone());
932 TECALReconObjects.clear();
933 for (std::vector<AnaTECALReconObject*>::const_iterator it = bunch.TECALReconObjects.begin();
934 it != bunch.TECALReconObjects.end(); ++it) {
935 TECALReconObjects.push_back((*it)->Clone());
938 TECALUnmatchedObjects.clear();
939 for (std::vector<AnaTECALUnmatchedObject*>::const_iterator it = bunch.TECALUnmatchedObjects.begin();
940 it != bunch.TECALUnmatchedObjects.end(); ++it) {
941 TECALUnmatchedObjects.push_back((*it)->Clone());
944 PECALReconObjects.clear();
945 for (std::vector<AnaPECALReconObject*>::const_iterator it = bunch.PECALReconObjects.begin();
946 it != bunch.PECALReconObjects.end(); ++it) {
947 PECALReconObjects.push_back((*it)->Clone());
950 PECALUnmatchedObjects.clear();
951 for (std::vector<AnaPECALUnmatchedObject*>::const_iterator it = bunch.PECALUnmatchedObjects.begin();
952 it != bunch.PECALUnmatchedObjects.end(); ++it) {
953 PECALUnmatchedObjects.push_back((*it)->Clone());
956 FGDOnlyReconObjects.clear();
957 for (std::vector<AnaFGDOnlyReconObject*>::const_iterator it = bunch.FGDOnlyReconObjects.begin();
958 it != bunch.FGDOnlyReconObjects.end(); ++it) {
959 FGDOnlyReconObjects.push_back((*it)->Clone());
962 P0DReconVertices.clear();
963 for (std::vector<AnaP0DReconVertex*>::const_iterator it = bunch.P0DReconVertices.begin();
964 it != bunch.P0DReconVertices.end(); ++it) {
965 P0DReconVertices.push_back((*it)->Clone());
968 P0DReconParticles.clear();
969 for (std::vector<AnaP0DReconParticle*>::const_iterator it = bunch.P0DReconParticles.begin();
970 it != bunch.P0DReconParticles.end(); ++it) {
971 P0DReconParticles.push_back((*it)->Clone());
974 P0DReconClusters.clear();
975 for (std::vector<AnaP0DReconCluster*>::const_iterator it = bunch.P0DReconClusters.begin();
976 it != bunch.P0DReconClusters.end(); ++it) {
977 P0DReconClusters.push_back((*it)->Clone());
986 anaUtils::ReserveArray(Variance, 4);
1005 std::cout <<
"-------- AnaVertex --------- " << std::endl;
1009 std::cout <<
"Bunch: " <<
Bunch << std::endl;
1011 std::cout <<
"NDOF: " <<
NDOF << std::endl;
1012 std::cout <<
"Chi2: " <<
Chi2 << std::endl;
1033 std::cout <<
"-------- AnaEventInfo --------- " << std::endl;
1037 std::cout <<
"EventTime: " <<
EventTime << std::endl;
1041 AnaDataQuality::AnaDataQuality(){
1045 for (UInt_t i=0;i<7;i++){
1055 for (UInt_t i=0;i<7;i++)
1064 #if !VERSION_HAS_OFFICIAL_POT 1077 #if !VERSION_HAS_OFFICIAL_POT 1086 AnaTrigger::AnaTrigger() {
1089 TripTCosmic =
false;
1104 std::cout <<
"Trigger: FGDCosmic" << std::endl;
1105 else if (TripTCosmic)
1106 std::cout <<
"Trigger: TripTCosmic" << std::endl;
1108 std::cout <<
"Trigger: Unknown" << std::endl;
1112 AnaTECALReconObject::AnaTECALReconObject(){
1115 AverageHitTime = kUnassigned;
1116 AverageZPos = kUnassigned;
1117 Containment = kUnassigned;
1118 EFitResult = kUnassigned;
1119 EFitUncertainty = kUnassigned;
1120 FirstLayer = kUnassigned;
1121 IsShowerLike = kUnassigned;
1122 IsTrackLike = kUnassigned;
1123 LastLayer = kUnassigned;
1124 LikeMIPEM = kUnassigned;
1125 LikeMIPPion = kUnassigned;
1126 LikeEMHIP = kUnassigned;
1127 LikeMIPEMLow = kUnassigned;
1128 MatchingLike = kUnassigned;
1129 MichelTagNDelayedCluster = kUnassigned;
1131 MostDownStreamLayerHit = kUnassigned;
1132 MostUpStreamLayerHit = kUnassigned;
1133 NHits = kUnassigned;
1134 NLayersHit = kUnassigned;
1135 ObjectLength = kUnassigned;
1136 PIDAMR = kUnassigned;
1137 PIDAngle = kUnassigned;
1138 PIDAsymmetry = kUnassigned;
1139 PIDCircularity = kUnassigned;
1140 PIDFBR = kUnassigned;
1141 PIDMaxRatio = kUnassigned;
1142 PIDMeanPos = kUnassigned;
1143 PIDShowerAngle = kUnassigned;
1144 PIDShowerWidth = kUnassigned;
1145 PIDTransverseChargeRatio = kUnassigned;
1146 PIDTruncatedMaxRatio = kUnassigned;
1147 anaUtils::VectorToArray (TVector3(0,0,0), Pointing );
1148 Thrust = kUnassigned;
1149 anaUtils::VectorToArray (TVector3(0,0,0), ThrustAxis );
1150 anaUtils::VectorToArray (TVector3(0,0,0), ThrustOrigin);
1151 TimeBunch = kUnassigned;
1152 TotalHitCharge = kUnassigned;
1153 TrueID = kUnassigned;
1154 TrueIDPrimary = kUnassigned;
1155 TrueIDRecursive = kUnassigned;
1156 TrueIDSingle = kUnassigned;
1157 UniqueID = kUnassigned;
1159 Bunch = kUnassigned;
1167 AverageHitTime = tecalRecon.AverageHitTime;
1168 AverageZPos = tecalRecon.AverageZPos;
1169 Containment = tecalRecon.Containment;
1170 EFitResult = tecalRecon.EFitResult;
1171 EFitUncertainty = tecalRecon.EFitUncertainty;
1172 FirstLayer = tecalRecon.FirstLayer;
1173 IsShowerLike = tecalRecon.IsShowerLike;
1174 IsTrackLike = tecalRecon.IsTrackLike;
1175 LastLayer = tecalRecon.LastLayer;
1176 LikeMIPEM = tecalRecon.LikeMIPEM;
1177 LikeMIPPion = tecalRecon.LikeMIPPion;
1178 LikeEMHIP = tecalRecon.LikeEMHIP;
1179 LikeMIPEMLow = tecalRecon.LikeMIPEMLow;
1180 MatchingLike = tecalRecon.MatchingLike;
1181 MichelTagNDelayedCluster = tecalRecon.MichelTagNDelayedCluster;
1182 Module = tecalRecon.Module;
1183 MostDownStreamLayerHit = tecalRecon.MostDownStreamLayerHit;
1184 MostUpStreamLayerHit = tecalRecon.MostUpStreamLayerHit;
1185 NHits = tecalRecon.NHits;
1186 NLayersHit = tecalRecon.NLayersHit;
1187 ObjectLength = tecalRecon.ObjectLength;
1188 PIDAMR = tecalRecon.PIDAMR;
1189 PIDAngle = tecalRecon.PIDAngle;
1190 PIDAsymmetry = tecalRecon.PIDAsymmetry;
1191 PIDCircularity = tecalRecon.PIDCircularity;
1192 PIDFBR = tecalRecon.PIDFBR;
1193 PIDMaxRatio = tecalRecon.PIDMaxRatio;
1194 PIDMeanPos = tecalRecon.PIDMeanPos;
1195 PIDShowerAngle = tecalRecon.PIDShowerAngle;
1196 PIDShowerWidth = tecalRecon.PIDShowerWidth;
1197 PIDTransverseChargeRatio = tecalRecon.PIDTransverseChargeRatio;
1198 PIDTruncatedMaxRatio = tecalRecon.PIDTruncatedMaxRatio;
1199 anaUtils::CopyArray (tecalRecon.Pointing, Pointing, 3);
1200 Thrust = tecalRecon.Thrust;
1201 anaUtils::CopyArray (tecalRecon.ThrustAxis, ThrustAxis, 3);
1202 anaUtils::CopyArray (tecalRecon.ThrustOrigin, ThrustOrigin, 3);
1203 TimeBunch = tecalRecon.TimeBunch;
1204 TotalHitCharge = tecalRecon.TotalHitCharge;
1205 TrueID = tecalRecon.TrueID;
1206 TrueIDPrimary = tecalRecon.TrueIDPrimary;
1207 TrueIDRecursive = tecalRecon.TrueIDRecursive;
1208 TrueIDSingle = tecalRecon.TrueIDSingle;
1209 UniqueID = tecalRecon.UniqueID;
1211 Bunch = tecalRecon.Bunch;
1219 std::cout<<
"-- AnaTECALReconObject.Print() --\n" 1220 <<
"NHits : "<<NHits <<
"\n" 1221 <<
"Bunch : "<<Bunch <<
"\n" 1222 <<
"FirstLayer : "<<FirstLayer <<
"\n" 1223 <<
"LastLayer : "<<LastLayer <<
"\n" 1224 <<
"EFitResult : "<<EFitResult <<
"\n" 1225 <<
"TotalHitCharge : "<<TotalHitCharge<<
"\n" 1226 <<
"IsTrack(Shower)Like : "<<IsTrackLike<<
"("<<IsShowerLike<<
")" 1232 AnaTECALUnmatchedObject::AnaTECALUnmatchedObject(){
1235 AverageHitTime = kUnassigned;
1236 anaUtils::VectorToArray (TVector3(0,0,0), BackPos );
1237 anaUtils::VectorToArray (TVector3(0,0,0), FrontPos);
1238 MostDownStreamLayerHit = kUnassigned;
1239 MostUpStreamLayerHit = kUnassigned;
1240 NHits = kUnassigned;
1241 TotalHitCharge = kUnassigned;
1242 TrueID = kUnassigned;
1243 TrueIDPrimary = kUnassigned;
1244 TrueIDRecursive = kUnassigned;
1245 TrueIDSingle = kUnassigned;
1248 Bunch = kUnassigned;
1256 AverageHitTime = tecalUnmatched.AverageHitTime;
1257 anaUtils::CopyArray (tecalUnmatched.BackPos, BackPos, 3);
1258 anaUtils::CopyArray (tecalUnmatched.FrontPos, FrontPos, 3);
1259 MostDownStreamLayerHit = tecalUnmatched.MostDownStreamLayerHit;
1260 MostUpStreamLayerHit = tecalUnmatched.MostUpStreamLayerHit;
1261 NHits = tecalUnmatched.NHits;
1262 TotalHitCharge = tecalUnmatched.TotalHitCharge;
1263 TrueID = tecalUnmatched.TrueID;
1264 TrueIDPrimary = tecalUnmatched.TrueIDPrimary;
1265 TrueIDRecursive = tecalUnmatched.TrueIDRecursive;
1266 TrueIDSingle = tecalUnmatched.TrueIDSingle;
1267 View = tecalUnmatched.View;
1269 Bunch = tecalUnmatched.Bunch;
1277 std::cout<<
"-- AnaTECALUnmatchedObject.Print() --\n" 1278 <<
"NHits : "<<NHits <<
"\n" 1279 <<
"Bunch : "<<Bunch <<
"\n" 1280 <<
"MostUpStreamLayerHit : "<<MostUpStreamLayerHit <<
"\n" 1281 <<
"MostDownStreamLayerHit : "<<MostDownStreamLayerHit <<
"\n" 1282 <<
"TotalHitCharge : "<<TotalHitCharge <<
"\n" 1289 AnaP0DReconObject::AnaP0DReconObject(){
1293 ParticlesP .clear();
1304 Cycle = kShortUnassigned;
1305 NHits = kShortUnassigned;
1306 UniqueID = kUnassigned;
1307 Bunch = kUnassigned;
1308 ValidDimensions = kShortUnassigned;
1310 Truth_PrimaryTrajIDs .clear();
1311 Truth_TrajIDs .clear();
1312 Truth_HitCount .clear();
1313 Truth_ChargeShare .clear();
1314 anaUtils::VectorToArray (TLorentzVector(0,0,0,0), Position );
1315 anaUtils::VectorToArray (TLorentzVector(0,0,0,0), PosVariance);
1323 VerticesP = p0dObject.VerticesP;
1324 ParticlesP = p0dObject.ParticlesP;
1325 ClustersP = p0dObject.ClustersP;
1327 Vertices = p0dObject.Vertices;
1328 Particles = p0dObject.Particles;
1329 Tracks = p0dObject.Tracks;
1330 Showers = p0dObject.Showers;
1331 Clusters = p0dObject.Clusters;
1332 Nodes = p0dObject.Nodes;
1333 Hits = p0dObject.Hits;
1334 AlgorithmName = p0dObject.AlgorithmName;
1335 Cycle = p0dObject.Cycle;
1336 NHits = p0dObject.NHits;
1337 UniqueID = p0dObject.UniqueID;
1338 Bunch = p0dObject.Bunch;
1340 ValidDimensions = p0dObject.ValidDimensions;
1341 Truth_PrimaryTrajIDs = p0dObject.Truth_PrimaryTrajIDs;
1342 Truth_TrajIDs = p0dObject.Truth_TrajIDs;
1343 Truth_HitCount = p0dObject.Truth_HitCount;
1344 Truth_ChargeShare = p0dObject.Truth_ChargeShare;
1345 anaUtils::CopyArray (p0dObject.Position, Position, 4);
1346 anaUtils::CopyArray (p0dObject.PosVariance, PosVariance, 4);
1354 std::cout<<
"-- AnaP0DReconObject.Print() --\n" 1355 <<
"Vertices .size() : "<<Vertices .size()<<
"\n" 1356 <<
"Particles .size() : "<<Particles.size()<<
"\n" 1357 <<
"Tracks .size() : "<<Tracks .size()<<
"\n" 1358 <<
"Showers .size() : "<<Showers .size()<<
"\n" 1359 <<
"Clusters .size() : "<<Clusters .size()<<
"\n" 1360 <<
"Nodes .size() : "<<Nodes .size()<<
"\n" 1361 <<
"Hits .size() : "<<Hits .size()<<
"\n" 1362 <<
"AlgorithmName : "<<AlgorithmName <<
"\n" 1363 <<
"Cycle : "<<Cycle <<
"\n" 1364 <<
"NHits : "<<NHits <<
"\n" 1365 <<
"UniqueID : "<<UniqueID <<
"\n" 1366 <<
"Bunch : "<<Bunch <<std::endl;
1371 AnaP0DReconVertex::AnaP0DReconVertex(){
1373 Status = kUnassigned;
1374 Quality = kFloatUnassigned;
1376 Fiducial = kFloatUnassigned;
1384 Status = p0dVertex.Status;
1385 Quality = p0dVertex.Quality;
1386 NDOF = p0dVertex.NDOF;
1387 Fiducial = p0dVertex.Fiducial;
1392 AnaP0DReconParticle::AnaP0DReconParticle(){
1395 Status = kUnassigned;
1396 Quality = kFloatUnassigned;
1398 SideDeposit = kFloatUnassigned;
1399 EndDeposit = kFloatUnassigned;
1400 anaUtils::VectorToArray (TVector3(0,0,0),Direction );
1401 anaUtils::VectorToArray (TVector3(0,0,0),DirVariance);
1402 Momentum = kFloatUnassigned;
1403 Charge = kFloatUnassigned;
1404 Length = kFloatUnassigned;
1405 EDeposit = kFloatUnassigned;
1406 realPIDNames .clear();
1407 realPIDValues .clear();
1408 integerPIDNames .clear();
1409 integerPIDValues .clear();
1411 PID_weight .clear();
1414 TrueParticle = NULL;
1421 Status = p0dParticle.Status;
1422 Quality = p0dParticle.Quality;
1423 NDOF = p0dParticle.NDOF;
1424 SideDeposit = p0dParticle.SideDeposit;
1425 EndDeposit = p0dParticle.EndDeposit;
1426 anaUtils::CopyArray (p0dParticle.Direction, Direction, 3);
1427 anaUtils::CopyArray (p0dParticle.DirVariance, DirVariance, 3);
1428 Momentum = p0dParticle.Momentum;
1429 Charge = p0dParticle.Charge;
1430 Length = p0dParticle.Length;
1431 EDeposit = p0dParticle.EDeposit;
1432 realPIDNames = p0dParticle.realPIDNames;
1433 realPIDValues = p0dParticle.realPIDValues;
1434 integerPIDNames = p0dParticle.integerPIDNames;
1435 integerPIDValues = p0dParticle.integerPIDValues;
1436 PID = p0dParticle.PID;
1437 PID_weight = p0dParticle.PID_weight;
1439 TrueParticle = p0dParticle.TrueParticle;
1443 AnaP0DReconCluster::AnaP0DReconCluster(){
1446 NFiducialHits = kShortUnassigned;
1447 EDeposit = kFloatUnassigned;
1455 NFiducialHits = p0dCluster.NFiducialHits;
1456 EDeposit = p0dCluster.EDeposit;
1461 AnaLocalReconBunch::AnaLocalReconBunch(){
1464 TECALReconObjects .clear();
1465 TECALUnmatchedObjects.clear();
1466 PECALReconObjects .clear();
1467 PECALUnmatchedObjects.clear();
1468 FGDOnlyReconObjects .clear();
1469 P0DReconVertices .clear();
1470 P0DReconParticles .clear();
1471 P0DReconClusters .clear();
1475 AnaLocalReconBunch::~AnaLocalReconBunch(){
1477 for (std::vector<AnaTECALReconObject*>::iterator it = TECALReconObjects.begin();
1478 it != TECALReconObjects.end(); ++it) {
1481 TECALReconObjects.clear();
1483 for (std::vector<AnaTECALUnmatchedObject*>::iterator it = TECALUnmatchedObjects.begin();
1484 it != TECALUnmatchedObjects.end(); ++it) {
1487 TECALUnmatchedObjects.clear();
1489 for (std::vector<AnaPECALReconObject*>::iterator it = PECALReconObjects.begin();
1490 it != PECALReconObjects.end(); ++it) {
1493 PECALReconObjects.clear();
1495 for (std::vector<AnaPECALUnmatchedObject*>::iterator it = PECALUnmatchedObjects.begin();
1496 it != PECALUnmatchedObjects.end(); ++it) {
1499 PECALUnmatchedObjects.clear();
1501 for (std::vector<AnaP0DReconVertex*>::iterator it = P0DReconVertices.begin();
1502 it != P0DReconVertices.end(); ++it) {
1505 P0DReconVertices.clear();
1507 for (std::vector<AnaP0DReconParticle*>::iterator it = P0DReconParticles.begin();
1508 it != P0DReconParticles.end(); ++it) {
1511 P0DReconParticles.clear();
1513 for (std::vector<AnaP0DReconCluster*>::iterator it = P0DReconClusters.begin();
1514 it != P0DReconClusters.end(); ++it) {
1517 P0DReconClusters.clear();
1519 for (std::vector<AnaFGDOnlyReconObject*>::iterator it = FGDOnlyReconObjects.begin();
1520 it != FGDOnlyReconObjects.end(); ++it) {
1523 FGDOnlyReconObjects.clear();
1529 TECALReconObjects.clear();
1530 for (std::vector<AnaTECALReconObject*>::const_iterator it = bunch.TECALReconObjects.begin();
1531 it != bunch.TECALReconObjects.end(); ++it) {
1532 TECALReconObjects.push_back((*it)->Clone());
1535 TECALUnmatchedObjects.clear();
1536 for (std::vector<AnaTECALUnmatchedObject*>::const_iterator it = bunch.TECALUnmatchedObjects.begin();
1537 it != bunch.TECALUnmatchedObjects.end(); ++it) {
1538 TECALUnmatchedObjects.push_back((*it)->Clone());
1541 PECALReconObjects.clear();
1542 for (std::vector<AnaPECALReconObject*>::const_iterator it = bunch.PECALReconObjects.begin();
1543 it != bunch.PECALReconObjects.end(); ++it) {
1544 PECALReconObjects.push_back((*it)->Clone());
1547 PECALUnmatchedObjects.clear();
1548 for (std::vector<AnaPECALUnmatchedObject*>::const_iterator it = bunch.PECALUnmatchedObjects.begin();
1549 it != bunch.PECALUnmatchedObjects.end(); ++it) {
1550 PECALUnmatchedObjects.push_back((*it)->Clone());
1553 FGDOnlyReconObjects.clear();
1554 for (std::vector<AnaFGDOnlyReconObject*>::const_iterator it = bunch.FGDOnlyReconObjects.begin();
1555 it != bunch.FGDOnlyReconObjects.end(); ++it) {
1556 FGDOnlyReconObjects.push_back((*it)->Clone());
1559 P0DReconVertices.clear();
1560 for (std::vector<AnaP0DReconVertex*>::const_iterator it = bunch.P0DReconVertices.begin();
1561 it != bunch.P0DReconVertices.end(); ++it) {
1562 P0DReconVertices.push_back((*it)->Clone());
1565 P0DReconParticles.clear();
1566 for (std::vector<AnaP0DReconParticle*>::const_iterator it = bunch.P0DReconParticles.begin();
1567 it != bunch.P0DReconParticles.end(); ++it) {
1568 P0DReconParticles.push_back((*it)->Clone());
1571 P0DReconClusters.clear();
1572 for (std::vector<AnaP0DReconCluster*>::const_iterator it = bunch.P0DReconClusters.begin();
1573 it != bunch.P0DReconClusters.end(); ++it) {
1574 P0DReconClusters.push_back((*it)->Clone());
1591 TECALReconObjects.empty() &&
1592 TECALUnmatchedObjects.empty() &&
1593 PECALReconObjects.empty() &&
1594 PECALUnmatchedObjects.empty() &&
1595 P0DReconVertices.empty() &&
1596 P0DReconParticles.empty() &&
1597 P0DReconClusters.empty() &&
1598 FGDOnlyReconObjects.empty());
virtual void Print() const
Dump the object to screen.
virtual void Print() const
Dump the object to screen.
Float_t Pullmu
Muon pull of the segment: (dEdxMeas-dEdxexpMuon)/dEdxSigmaMuon.
AnaTrueVertexB * TrueVertex
Pointer to the AnaTrueVertexB of the interaction that created this AnaTrueParticleB.
Float_t DirectionStartFlip[3]
Direction at the start for the main PID hypothesis and reverse sense.
void Print() const
Dump the object to screen.
Float_t MomentumAtVertex
The reconstructed momentum of the track, at the most primary global vertex (if exists).
Representation of the beam quality and perhaps other beam information as needed.
Representation of a global track.
AnaTrueVertexB * TrueVertex
Representation of the ND280 data quality flags.
Int_t InputFileIndex
Index of the input file producing this spill.
virtual void RedoLinks()
Redo reco-reco and reco-truth after cloning or reading MiniTree.
Int_t LeptonPDG
The PDG code of the primary outgoing electron/muon.
void Print() const
Dump the object to screen.
Float_t MomentumEle
Momentum from refitting the track assuming the electron hypothesis.
virtual void Print() const
Dump the object to screen.
virtual void Print() const
Dump the object to screen.
bool IsTruePrimaryPi0DecayPhoton
Is this a true primary pi0 decay photon or the child of one?
Int_t NDOF
The number of degrees of freedom of the fit using a Kalman filter.
virtual void Print() const
Dump the object to screen.
bool FGDCosmic
FGD cosmic trigger flag.
virtual bool IsEmpty() const
Returns true if the bunch is completely empty.
Int_t NuParentPDG
Neutrino parent PDG code.
Float_t LeptonDir[3]
The direction of the primary outgoing electron/muon.
Representation of the ND280 trigger bits.
Int_t NDOF
The number of degrees of freedom when the track was fitted with a Kalman filter.
Float_t Variance[4]
The variance values of the fit using a Kalman filter.
Float_t NuParentDecPoint[4]
Decay point of the neutrino parent.
Int_t RooVtxIndex
The index of the associated RooTrackerVtx vertex from its position in the TClonesArray.
Representation of a true Monte Carlo vertex.
Float_t E
Input to the pull calculations. Needs to be documented properly in oaAnalysis.
Float_t Pullpi
Pion pull of the segment: (dEdxMeas-dEdxexpPion)/dEdxSigmaPion.
std::vector< std::vector< Int_t > > AccumLevel
Accumulated cut level for all selections and cut branches. Tell us if a true vertex has been selected...
std::vector< AnaTrueVertexB * > TrueVertices
The true MC vertices used in this spill.
Int_t NBaryons
The total number of primary baryons that were ejected.
Float_t ProtonDir[3]
The direction of the primary outgoing protons listed first (likely the interacted one)...
Float_t TargetDir[3]
The direction of the target nucleus.
Representation of an ECAL segment of a global track.
Representation of the ND280 data quality flags.
Float_t Vertex1x1
Vertex activity variables.
virtual void Print() const
Dump the object to screen.
virtual void Print() const
Dump the object to screen.
virtual void Print() const
Dump the object to screen.
Int_t Bunch
The bunch of the track, based on the PositionStart.T()
virtual void Print() const
Dump the object to screen.
AnaTrueObjectC * TrueObject
The link to the true oject that most likely generated this reconstructed object.
Float_t Length
The number of hits in the reconstructed object.
void Print() const
Dump the object to screen.
This Ana* object is used to flatten TECALReconObjects from ReconDir/TrackerECal.
Float_t MomentumErrorProton
Error on momentum from refitting the track assuming the proton hypothesis.
Float_t AvgTime
Average Time for the iso FGD hits.
Int_t Bunch
The bunch of the global vertex, based on the Position.T()
Int_t TargetPDG
The PDG code of the target nucleus.
std::vector< AnaParticleB * > ReconParticles
Vector of pointers to AnaParticle's associated with this true particle.
Float_t Chi2
The chi2 value of the fit using a Kalman filter.
virtual void Print() const
Dump the object to screen.
std::vector< AnaVertexB * > Vertices
Int_t Spill
Spill number from BeamSummaryDataModule::ND280Spill.
Float_t Chi2
The chi2 value when the track was fitted using a Kalman filter.
virtual void Print() const
Dump the object to screen.
Representation of detector time info.
Float_t POTCT4
The POT from CT4 for this spill. This is only needed for P5 files.
virtual void Print() const
Dump the object to screen.
Float_t ProtonMom
The momentum of the primary outgoing protons listed first (likely the interacted one).
Float_t LeptonMom
The momentum of the primary outgoing electron/muon.
void Print() const
Dump the object to screen.
Representation of a true Monte Carlo vertex.
virtual void Print() const
Dump the object to screen.
virtual void associateParticleToTrueParticle(AnaParticleB *) const
Add to a true particle a given associated reconstructed particle (not in the base class) ...
Representation of a true Monte Carlo trajectory/particle.
TVector3 UpstreamHits_Position[2]
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.
Float_t dEdxSigmaKaon
Expected error on the dE/dx measurement, for the proton hypothesis.
std::vector< AnaVertexB * > ReconVertices
Vector of pointers to AnaVertexB (global vertices) associated with this true vertex.
virtual AnaParticleE * Clone()
Clone this object.
Float_t DirectionAtVertex[3]
The reconstructed direction of the track at the most primary global vertex (if exists).
virtual void associateVertexToTrueVertex(AnaVertexB *) const
Add to a true vertex a given associated reconstructed vertex (not in the base class) ...
Int_t SpillNumber
Spill number from BeamSummaryDataModule::BeamSummaryData::SpillNumber.
Float_t MomentumErrorMuon
Error on momentum from refitting the track assuming the muon hypothesis.
virtual void Print() const
Dump the object to screen.
Float_t MomentumErrorEle
Error on momentum from refitting the track assuming the electron hypothesis.
void Print() const
Dump the object to screen.
Representation of a global track.
bool TripTCosmic
TripT cosmic trigger flag.
Int_t Bunch
The index of this bunch (0-7).
Int_t EventTime
The ND280 subrun number.
Representation of a TPC segment of a global track.
Float_t Pullk
Kaon pull of the segment: (dEdxMeas-dEdxexpPion)/dEdxSigmaKaon.
std::vector< AnaTrackerTrackB * > TRACKERSegments
The TRACKER segments that contributed to this global track.
Float_t Pullp
Proton pull of the segment: (dEdxMeas-dEdxexpProton)/dEdxSigmaProton.
std::vector< AnaTrueParticleB * > TrueParticles
The true MC particles used in this spill.
Representation of a global vertex.
Int_t RooVtxEntry
Not in the MiniTree for the Moment since it produces a seg fault.
Float_t Length
The length of this global track.
This is a base P0D object that shares the common attributes of Vertex, Particle, Track, Shower, Cluster, Hit.
Float_t MomentumError
The error on the reconstructed momentum.
Representation of a FGD segment of a global track.
std::vector< AnaVertexB * > ReconVertices
Vector of pointers to AnaVertexB (global vertices) associated with this track.
This Ana* object is used to flatten TECALUnmatchedObjects from ReconDir/TrackerECal.
Float_t Pullele
Electron pull of the segment: (dEdxMeas-dEdxexpEle)/dEdxSigmaEle.
Float_t PionDir[3]
The direction of the primary outgoing pions listed first (likely the interacted one).
Float_t Q2
The Q2 of the true interaction.
AnaTrigger Trigger
Not in the MiniTree for the Moment since it produces a seg fault.
virtual void Print() const
Dump the object to screen.
Int_t RooVtxEntry
Entry in the RooTrackerVtx tree (not set directly)
virtual void Print() const
Dump the object to screen.
Float_t Purity
The purity with which this particle was matched to a reconstructed object.
Int_t Containment
Containment flag required for proper PID analysis.
virtual void RedoLinks()
Redo reco-reco and reco-truth after cloning or reading MiniTree.
std::vector< AnaParticleB * > Particles
Representation of a TPC segment of a global track.
Float_t TimeStart
Start time.
void Print() const
Dump the object to screen.
Float_t NuDir[3]
The true (unit) direction of the incoming neutrino.
virtual void associateVertexToParticle(AnaParticleB *, AnaVertexB *) const
Add to a particle a given associated vertex (not in the base class)
AnaTrueParticleB * GetTrueParticle() const
Return a casted version of the AnaTrueObject associated.
Representation of a reconstructed particle (track or shower).
Int_t ReconPDG
PDG of the most probable particle hypothesis used at reconstruction level.
virtual void Print() const
Dump the object to screen.
void Print() const
Dump the object to screen.
Representation of a true Monte Carlo trajectory/particle.
Float_t MomentumMuon
Momentum from refitting the track assuming the muon hypothesis.
Representation of the beam information, including POT and quality.
AnaTrigger Trigger
The trigger flags for this event.
Float_t POT
The POT for this spill. For data, this comes from the Beam Summary Data.
Float_t dEdxexpKaon
Expected dE/dx for a proton, based on the reconstructed momentum.
Float_t TargetMom
The momentum of the target nucleus.
Float_t PionMom
The momentum of the primary outgoing pions listed first (likely the interacted one).
virtual void Print() const
Dump the object to screen.
Extension to AnaParticleB to be used by aggregation.
Int_t NPrimaryParticles[Int_t(ParticleId::kLast)+1]
Array to count the outgoing primary particles of each type (.
std::vector< AnaParticleB * > ReconParticles
virtual void Print() const
Dump the object to screen.
Float_t MomentumProton
Momentum from refitting the track assuming the proton hypothesis.