Tool_DetailsArranger.h 5.21 KB
Newer Older
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
/*
  Copyright (C) 2002-2017 CERN for the benefit of the ATLAS collaboration
*/

///////////////////////////////////////////////////////////////////
//  Header file for class Tool_DetailsArranger
///////////////////////////////////////////////////////////////////
// (c) ATLAS Detector software
///////////////////////////////////////////////////////////////////
// Tool for PID of TauSeeds
///////////////////////////////////////////////////////////////////
// sebastian.fleischmann@cern.ch
///////////////////////////////////////////////////////////////////

#ifndef PANTAUALGS_TOOL_DETAILSARRANGER_H
#define PANTAUALGS_TOOL_DETAILSARRANGER_H

#include <string>
#include <vector>

//! Gaudi
#include "AthenaBaseComps/AthAlgTool.h"
#include "GaudiKernel/ToolHandle.h"

//! xAOD EDM
#include "xAODTau/TauJet.h"
// #include "xAODTau/TauDefs.h"

//! PanTau
#include "PanTauInterfaces/ITool_DetailsArranger.h"
#include "PanTauInterfaces/ITool_InformationStore.h"

33
#include "PanTauEvent/TauConstituent.h"
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85

namespace PanTau {
    class PanTauSeed;
    class PanTauDetails;
}

namespace Analysis {
    class TauDetailsContainer;
}

class StoreGateSvc;


namespace PanTau {

    /** @class Tool_DetailsArranger
        Tool for PID of Tau Seeds
        @author Sebastian Fleischmann
        @author Christian Limbach <limbach@physik.uni-bonn.de>
    */
    class Tool_DetailsArranger : public AthAlgTool, virtual public PanTau::ITool_DetailsArranger {
    
    
    public:
        
        enum PanTauDetailsType {
            t_Int,
            t_Float,
            t_NTypes
        };
        
        Tool_DetailsArranger(const std::string&,const std::string&,const IInterface*);
        virtual ~Tool_DetailsArranger ();
        
        virtual StatusCode initialize();
//         virtual StatusCode finalize();
        
        virtual StatusCode arrangeDetails(PanTau::PanTauSeed* inSeed);//, Analysis::TauDetailsContainer* detailsCont);
        
    protected:
        
        StoreGateSvc*                                       m_sgSvc;
        
        ToolHandle<PanTau::ITool_InformationStore>  m_Tool_InformationStore;
        
        void                        addPanTauDetailToTauJet(PanTauSeed*                            inSeed,
                                                            std::string                            featName,
                                                            xAOD::TauJetParameters::PanTauDetails  detailEnum,
                                                            PanTauDetailsType                      detailType) const;
        void                        arrangeScalarDetail(PanTau::PanTauDetails* targetDetails, std::string featName, int featEnumFromPanTauDetails) const;
        void                        arrangeVectorDetail(PanTau::PanTauDetails* targetDetails, std::string featName, int featEnumFromPanTauDetails) const;
        void                        arrangePFOLinks(PanTau::PanTauSeed* inSeed, xAOD::TauJet* tauJet);
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102

	std::vector< ElementLink< xAOD::PFOContainer > > PreselectNeutralLinks(std::vector< ElementLink<xAOD::PFOContainer> > neutralPFOLinks, xAOD::TauJet* tauJet);

	void StripPi0ConstsFromNeutralConsts(std::vector< ElementLink< xAOD::PFOContainer > > &neutralPFOLinks, std::vector< ElementLink< xAOD::PFOContainer > > pi0PFOLinks);

	bool HasMultPi0sInOneCluster(const xAOD::PFO* pfo, int decayModeProto, TString inputAlg);

	void SetNeutralConstituentMass(xAOD::PFO* neutral_pfo, double mass);

	void SetNeutralConstituentVectorMasses(std::vector< ElementLink<xAOD::PFOContainer> > neutralPFOLinks, double mass);

	std::vector< ElementLink< xAOD::PFOContainer > > CollectConstituentsAsPFOLinks( PanTau::PanTauSeed* inSeed, std::vector< ElementLink< xAOD::PFOContainer > > cellbased_neutralPFOLinks, PanTau::TauConstituent::Type type );

        /* std::vector<unsigned int>   helper_IndicesOfNeutralsToBePi0(xAOD::TauJet* tauJet,  */
        /*                                                             std::vector< ElementLink<xAOD::PFOContainer> > neutralPFOLinks,  */
        /*                                                             int nMaxPi0s); */
        /* int                         helper_CopyNeutralsAndSetPi0(xAOD::TauJet* tauJet, int nMaxPi0s, bool isSpecialCase_1pXnTo1p1n); */
103
104
105
        
        bool        m_expectInvalidFeatures;
        
106
107
108
109
110
111
	const float MASS_PI0 = 134.98; // in MeV
        
        double      m_CoreCone;
        std::vector<double> m_EtaBinEdges;
        std::vector<double> m_EtaBinnedEtCuts;
        
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
        std::string m_varTypeName_Sum;
        std::string m_varTypeName_Ratio;
        std::string m_varTypeName_EtInRing;
        std::string m_varTypeName_Isolation;
        std::string m_varTypeName_Num;
        std::string m_varTypeName_Mean;
        std::string m_varTypeName_StdDev;
        std::string m_varTypeName_HLV;
        std::string m_varTypeName_Angle;
        std::string m_varTypeName_DeltaR;
        std::string m_varTypeName_JetMoment;
        std::string m_varTypeName_Combined;
        std::string m_varTypeName_JetShape;
        std::string m_varTypeName_ImpactParams;
        std::string m_varTypeName_Basic;
        std::string m_varTypeName_PID;
        std::string m_varTypeName_Shots;
        
    };
} // end of namespace PanTau
#endif // PANTAUALGS_TAUDISCRIMINANTTOOL_H