1 #include "TreeConverterUtils.hxx" 96 case SubDetId::kECAL :
99 case SubDetId::kSMRD :
102 case SubDetId::kP0D :
106 std::cout <<
"convUtils::ConvertLocalDetEnumToBitField(). Cannot get old local detector enumeration for subsystem: " << subdet_enum <<
". Please define whether it is a TPC, FGD, ECAL, SMRD or P0D track." << std::endl;
186 if (Detectors>12345){
191 for(
int i=5; i>0; i--){
192 int value = Detectors % 10;
205 for(UInt_t i = 0; i < NDETECTORS; ++i){
216 for(UInt_t i = 0; i < NDETECTORS; ++i){
280 case SubDetId::kTPC :
282 else std::cout <<
"Error: Should not be here, detector " << idet <<
" is not in the TPC" << std::endl;
284 case SubDetId::kFGD :
286 else std::cout <<
"Error: Should not be here, detector " << idet <<
" is not in the FGD" << std::endl;
288 case SubDetId::kP0D :
290 else std::cout <<
"Error: Should not be here, detector " << idet <<
" is not in the P0D" << std::endl;
292 case SubDetId::kECAL :
295 case SubDetId::kLeftPECAL:
298 case SubDetId::kRightPECAL:
301 case SubDetId::kTopPECAL:
304 case SubDetId::kBottomPECAL:
307 case SubDetId::kLeftTECAL:
310 case SubDetId::kRightTECAL:
313 case SubDetId::kTopTECAL:
316 case SubDetId::kBottomTECAL:
319 case SubDetId::kDSECAL:
323 std::cout <<
"Error: Should not be here, detector " << idet <<
" is not in the ECal" << std::endl;
328 case SubDetId::kSMRD :
331 case SubDetId::kLeftSMRD:
334 case SubDetId::kRightSMRD:
337 case SubDetId::kTopSMRD:
340 case SubDetId::kBottomSMRD:
344 std::cout <<
"Error: Should not be here, detector " << idet <<
" is not in the SMRD" << std::endl;
350 std::cout <<
"convUtils::GetLocalDetEnum(). Cannot get old local detector enumeration for subsystem: " << det <<
". Please define whether it is a TPC, FGD, ECAL, P0D or SMRD track." << std::endl;
353 std::cout <<
"convUtils::GetLocalDetEnum(). Cannot get old local detector enumeration for subsystem: " << det <<
". Please define whether it is a TPC, FGD, ECAL, P0D or SMRD track." << std::endl;
386 ( det & (1<<SubDetId::kTECAL))) trueDet = 4;
388 ( det & (1<<SubDetId::kPECAL))) trueDet = 5;
393 ( det & (1<<SubDetId::kSMRD))) trueDet = 9;
void SetDetectorUsedField(unsigned long &det, unsigned int i)
Set the bit field for a used detector given oaAnalysis detector enumeration (TGlobalPID::DetectorUsed...
static bool IsFGDDetector(SubDetId::SubDetEnum det)
Check if a detector enumeration refers to a FGD or not.
void ConvertLocalDetEnumToBitField(unsigned long &det, int index, SubDetId::SubDetEnum subdet_enum)
Convert the detector used array to the bit field used by psyche given a SubDetEnum.
void ConvertTPCDetEnumToBitField(unsigned long &det, int tpc)
Convert the detector used array to the bit field used by psyche for TPC track segments.
static bool IsP0DDetector(SubDetId::SubDetEnum det)
Check if a detector enumeration refers to a SMRDP0D or not.
static void SetDetectorSystemFields(unsigned long &BitField)
static bool GetDetectorUsed(unsigned long BitField, SubDetId::SubDetEnum det)
Method to see if a certain subdetector or subdetector system is used.
static void SetDetectorUsed(unsigned long &BitField, SubDetId::SubDetEnum det)
Method to set a certain subdetector or subdetector system to used used.
void ConvertECALDetEnumToBitField(unsigned long &det, int ecal)
Convert the detector used array to the bit field used by psyche for ECAL track segments.
static bool IsTPCDetector(SubDetId::SubDetEnum det)
Check if a detector enumeration refers to a TPC or not.
static bool IsECALDetector(SubDetId::SubDetEnum det)
Check if a detector enumeration refers to a ECAL or not.
SubDetEnum
Enumeration of all detector systems and subdetectors.
void ConvertSMRDDetEnumToBitField(unsigned long &det, int smrd)
Convert the detector used array to the bit field used by psyche for SMRD track segments.
void ConvertFGDDetEnumToBitField(unsigned long &det, int fgd)
Convert the detector used array to the bit field used by psyche for FGD track segments.
int GetLocalDetEnum(SubDetId::SubDetEnum det, SubDetId::SubDetEnum idet)
Get old local detector enumeration to find array index of Flat tree.
void ConvertTrueParticleDetEnumToBitField(unsigned long &det, int DetUsed)
Convert the detector used array to the bit field used by psyche for truth trueParts.
void ConvertTrackerDetFieldToBitField(unsigned long &det, int Detectors)
Convert tracker detector field to bit field.
void ConvertTrackerDetEnumToBitField(unsigned long &det, int DetUsed)
Convert the detector used array to the bit field used by psyche for tracker tracks.
void ConvertTrackDetEnumToBitField(unsigned long &det, int DetUsed[])
Convert the detector used array to the bit field used by psyche for ana tracks.
void ConvertBitFieldToTrueParticleDetEnum(unsigned long det, int &trueDet)
Get highland style numbering for true objects.
static bool IsSMRDDetector(SubDetId::SubDetEnum det)
Check if a detector enumeration refers to a SMRD or not.
void ConvertBitFieldToTrackerDetField(unsigned long det, int &trackerDet)
Get highland style tracker combination numbering.